Closed reportingsjr closed 5 years ago
Oh, I should add: I used a list instead of a tuple, because right after this data is parsed the degrees portion is modified to be positive or negative based on if the location is N/S or E/W. Also, this is a breaking change for the API.
And lastly, here is a way to get a string with reasonable precision decimal degrees:
latitude = '{}.{:06d}'.format(int(gps.latitude[0]),int((gps.latitude[1]100000)/6)) longitude = '{}.{:06d}'.format(int(gps.longitude[0]),int((gps.longitude[1]100000)/6))
@reportingsjr Please consider the changes requested on this PR.
I will be leaving this PR open for one more week. If there is no activity on it by then, I will be closing it. At that point, it can be reopened when you're ready to revisit it.
This has been determined to be an issue with the way floats and strings are handled in CircuitPython. Closing. Comments in #10
This fixes #10. The parsed latitude and longitude return a list of degrees and minutes rather than decimal degrees to preserve the precision of the location returned by the GPS IC.
The only example that uses the latitude and longitude was updated to match this as well (gps_simpletest.py). I tested this code change with an M0 adalogger feather and the ultimate gps wing.