Access geographic coordinates as decimal degrees
masterWhile NMEA sentences use the DDDMM.MMMM format, pynmea2 provides helper properties on NMEASentence objects to access coordinates as Python floats (Decimal Degrees).
Supported helpers:
latitude/longitude: Returns decimal degrees as floats.latitude_minutes/longitude_minutes: Returns the minutes component.latitude_seconds/longitude_seconds: Returns the seconds component.
# Example of using coordinate helpers
msg = pynmea2.parse("$GPGGA,184353.07,1929.045,S,02410.506,E,1,04,2.6,100.00,M,-33.9,M,,0000*6D")
print(msg.latitude) # -19.4840833333
print(msg.longitude) # 24.1751