on run tell application "GPSy" copy ヌclass pLatネ to GPSLat copy ヌclass pLonネ to GPSLon copy ヌclass pAltネ to GPSAlt copy ヌclass pTrkネ to GPSHead end tell set GPSAlt to round (GPSAlt) set WGSLat to GPSLat * 3600 set WGSLon to GPSLon * 3600 set DLat to 1.06958758E-4 * WGSLat - 1.74669288E-5 * WGSLon - 16.5671618 set DLon to 4.60470542E-5 * WGSLat + 8.30490355E-5 * WGSLon - 36.1476919 set GPSLat to S2DMS(WGSLat + DLat) set GPSLon to S2DMS(WGSLon + DLon) set PoiStr to "N" & item 2 of GPSLat & " E" & item 2 of GPSLon tell application "やまおたく for Mac" activate ヌevent YAMASet1ネ PoiStr given ヌclass Latiネ:item 1 of GPSLat, ヌclass Longネ:item 1 of GPSLon, ヌclass Heitネ:GPSAlt, ヌclass Azmsネ:GPSHead, ヌclass ElvAネ:0 end tell end run on S2DMS(s) set d to s div 3600 set m to (s div 60) mod 60 set s to s mod 60 return {d + m / 100 + s / 10000, d & "。" & m & "'" & (round (s)) & "\"" as string} end S2DMS