uataq.gps#
GPS helpers: great-circle geometry and motion estimated from positions.
When a receiver logs only GPGGA sentences (position, altitude, fix quality)
and not GPRMC, there is no recorded speed or course. Both can be recovered
from the positions themselves, which is what estimate_speed_course()
does; uataq.instruments.GPS calls it to fill whatever the files did
not record.
Formulas from https://www.movable-type.co.uk/scripts/latlong.html. They assume a spherical Earth, which is well under GPS noise at these distances.
Validated against a day of recorded 1 Hz speed and course from the TRAX
platform: correlation 0.995, median speed difference 0.00 m/s and median course
error 0.4 degrees while moving. Position noise becomes speed noise, so widen
estimate_window before thresholding a stationary
platform.
Examples
The example reads the archive, so neither the docs build nor the tests run it (# doctest: +SKIP).
>>> import uataq
>>> data = uataq.read_data("trx01", "gps", time_range="2017-03")
>>> gps = data["gps"]
>>> # Speed_m_s is filled in the GPGGA-only years too
>>> moving = gps[gps.Speed_m_s > 1.0]
Attributes
Mean Earth radius (m). |
Functions
Return the initial great-circle bearing from the first point to the second. |
|
Estimate speed and course from a sequence of positions. |
|
Full GPS datetimes from a receiver's time of day and the logger's clock. |
|
Great-circle distance between two points (haversine formula). |