Aprs. CompressedPositionHelpers
(aprs v2.0.1)
View Source
Decodes APRS compressed position coordinates, cs pairs, and compression metadata.
Summary
Functions
Decodes a compressed cs pair that has no compression type byte to go with it.
Decodes a compressed cs pair.
Decodes a four-byte base-91 compressed latitude.
Decodes a four-byte base-91 compressed longitude.
Decodes the GPS fix age, NMEA source, and encoder origin from a compression type byte.
Functions
Decodes a compressed cs pair that has no compression type byte to go with it.
@spec convert_compressed_cs(binary(), binary()) :: %{ optional(:course) => pos_integer(), optional(:speed) => float(), optional(:range) => float(), optional(:altitude) => float() }
Decodes a compressed cs pair.
GGA-originated positions use the pair for altitude in feet. Other positions use it for course and speed in knots, except for the radio-range marker.
Decodes a four-byte base-91 compressed latitude.
Decodes a four-byte base-91 compressed longitude.
@spec parse_compression_type(binary()) :: %{ gps_fix: :old | :current, nmea_source: :other | :gll | :gga | :rmc, origin: :compressed | :tnc_btext | :software | :tbd | :kpc3 | :pico | :other_tracker | :digipeater_conversion }
Decodes the GPS fix age, NMEA source, and encoder origin from a compression type byte.
An empty value, or a leading byte below the base-91 offset, decodes as zero.