Skip to content

Instantly share code, notes, and snippets.

View Esteban82's full-sized avatar

Federico Esteban Esteban82

  • Instituto de Geociencias Básicas, Aplicadas y Ambientales de Buenos Aires - IGEBA (University of Buenos Aires-CONICET)
  • Buenos Aires, Argentina
  • 22:29 (UTC -03:00)
View GitHub Profile
@Esteban82
Esteban82 / parse_gpgga.py
Created December 28, 2022 19:59 — forked from mhuisi/parse_gpgga.py
Function to parse a GPGGA string, extracting latitude, longitude and altitude.
from collections import namedtuple
GPS = namedtuple("GPS", ["latitude", "longitude", "altitude"])
__CARDINALS = {"N": 1, "S": -1, "E": 1, "W": -1}
def __parse_geo_location(geo_location, degree_digits, cardinal):
"""
Parses a geographic location into degrees,
geo_location being the location to parse,