Skip to content

Instantly share code, notes, and snippets.

@JoshuaGross
JoshuaGross / pygga.py
Last active May 17, 2022 09:19
Generate a GPGGA NMEA string using python
# Copyright (c) 2016, Swift Navigation, All Rights Reserved.
# Released under MIT License.
#
# Find documentation of parameters here:
# http://aprs.gids.nl/nmea/#gga
#
# time_t is a `time_struct` (https://docs.python.org/2/library/time.html)
# alt_m, geoidal_sep_m are in meters
import time
from math import floor