Closed kwilcox closed 7 years ago
@kerfoot This function is going to occasionally return floating point rounding errors:
>>> get_decimal_degrees(10601.6986)
106.02830999999999
Is there a sensible precision we should lock this to? I can't find the right documentation that states what precision NMEA reports at. 5
decimal places is going to be inches... can we round to that?
I set the precision attribute to 5 decimal places.
From Kerfoot:
I found a bug in the GUTILS get_decimal_degrees() when trying to convert small (near the equator) GPS positions from NMEA coordinates to decimal degrees:
https://github.com/SECOORA/GUTILS/blob/master/gutils/gbdr/methods.py#L281
I rewrote the function to do a straight mathematical conversion instead of converting to a string, parsing, etc. Here's the code: