问题
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
- What is the name of format I am receiving coordinates?
- What is the name of format that google maps are using?
- What is the best formula to conversate received gps locations into google maps format?
回答1:
- degrees, minutes, seconds
- decimal degrees
- 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.
- The format name is DMS (Degress Minutes & Seconds) that is Geographic coordinate system.
- The format for google maps is Decimal degress.
- 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