GPS tracker coordinate conversion into google maps format and preciseness

匆匆过客 提交于 2019-12-23 04:40:33

问题


I own gps tracker that send latitude and longitude to my server, as it is described in gps tracker manual(example for Latitude, for Longitude the same):

xxmm.dddd, where
xx = degrees;
mm = minutes;
dddd = decimal part of minutes; for example 11 deg. 26.6639 min.

I`d like to convert received coordinates into google maps format, for this purpuse I am using formula:

result = xx + (mm.dddd)/60

since, there is a division result could be presented as periodically fraction, for example - 1.6666(6), but it is very bad cause I am loosing so much of GPS preciness.

Questions

  1. What is the name of format I am receiving coordinates?
  2. What is the name of format that google maps are using?
  3. What is the best formula to conversate received gps locations into google maps format?

回答1:


  1. degrees, minutes, seconds
  2. decimal degrees
  3. decimal degrees = degrees + (minutes/60) + (seconds/3600)



回答2:


If you would like to convert DDD MM.MMM to Decimal Degress, I assume that you know the North South East or West for that location.

  1. The format name is DMS (Degress Minutes & Seconds) that is Geographic coordinate system.
  2. The format for google maps is Decimal degress.
  3. For convert DMS to Decimal degress: D + (M/60) + (S/3600) like Galen said.

Example Latitude:

int xD = 020;
int xM = 10;
int xS = 7587;

Example Longitude:

int yD = 130;
int yM = 50;
int yS = 5475;

Conversion:

Lat = 020+(10/60)+(7587/3600);
Lon = 130+(50/60)+(5475/3600);


来源:https://stackoverflow.com/questions/4091530/gps-tracker-coordinate-conversion-into-google-maps-format-and-preciseness

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!