简体   繁体   中英

converting long lat to google maps long lat

I'm having some trouble getting accurate readings from a GPRS tracker, implementing the coordinates given into gMaps api.

I've read here that you should convert the minutes / degrees by dividing them by 60 and 3600 respectively, but even trying this i can't get anything TOO accurate:

GPS tracker coordinate conversion into google maps format and preciseness

the trackers sends packets with the following information;

5242.8157 North
00126.3539 West

Which i translate as;

latitude: 52 degrees, 42 minutes, 8157 seconds - > 52.428157
longitude: -1 degree, 26 minutes, 3539 seconds - > -1.263539

But this puts a marker significantly off where i am. Is there something i'm missing here, perhaps something simple that someone might know to do just the trick for more precision?

The decimal part of your input data (eg .8157) is not seconds; it is decimal minutes. So it should be:

latitude 52 degrees, 42.8157 minutes or 52.7136 degrees

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM