I'm trying to plot out GPS data that is given to me in Hour Minute Second degree format. Will GLatLng take it in this form or do I need to convert it first. Having a hard time finding anything on the internet about this. If it can take it in this format an example would be much appreciated.
+6
A:
As far as I know it does not accept that format, but its really easy to convert it, just do the math:
var = hour+(((minute*60)+(second))/3600);
Sergi
2009-11-17 21:44:56
Thanks but I am having a hard time with the Latitude as this formula doesn't account for the earth not being perfectly spherical. I'm also having a hard time finding a formula that compensates for this. Precision is of the up most importance on this project.
Serhiy
2009-11-18 16:16:21
@Serhiy - This formula perfectly converts a coordinate from 'Degree-Minute-Second' format to 'Decimal Degrees' format. The shape of the earth doesn't affect this conversion, though it does affect things like calculating distances
Chris B
2009-11-18 17:13:10
@Chris B - I see... thanks for the explanation... I think I was having some calculation issues either with PHP or JS... they've been resolved for the most part.
Serhiy
2010-07-21 14:26:38