Closed camielverdult closed 3 years ago
Nvm, sorry
Here is code that converts the NMEA latitude and longitude to decimal degrees. I found how to convert in the Readme, I was very confused first...
def get_geo_coordinates(GGA_data: pynmea2.GGA) -> tuple:
latitude = '%02d°%02d′%07.4f″' % (GGA_data.latitude, GGA_data.latitude_minutes, GGA_data.latitude_seconds)
longitude = '%02d°%02d′%07.4f″' % (GGA_data.longitude, GGA_data.longitude_minutes, GGA_data.longitude_seconds)
return (latitude, longitude)
The following code parses a GGA message:
When wanting to access the latitude and longitude property, the following values are returned:
These values are of factor 100 too big...