Aprs (aprs v2.0.0)
View SourceMain APRS packet parsing library.
parse/1 accepts a TNC2-format packet (SRC>DST,PATH:information) and
returns {:ok, map} or {:error, reason}.
Units
Every packet format reports the same units, so a caller does not have to know how a packet happened to encode a value:
speed- knots, floataltitude- feet, floatcourse- degrees, integer; 360 is due north, 0 (or absent) is unknownposresolution- metres, float
Summary
Functions
Determine the data type of an information field.
Returns the current version of the APRS library as a static string.
Types
@type coordinate() :: float() | nil
@type packet() :: %{ :id => String.t(), :sender => String.t(), :path => String.t(), :destination => String.t(), :information_field => String.t(), :data_type => atom(), :base_callsign => String.t(), :ssid => String.t() | nil, :data_extended => map() | nil, :received_at => DateTime.t(), optional(atom()) => term() }
@type position_ambiguity() :: 0..4
@type position_data() :: %{ :latitude => coordinate(), :longitude => coordinate(), optional(:timestamp) => String.t() | integer() | nil, optional(:symbol_table_id) => String.t() | nil, optional(:symbol_code) => String.t() | nil, optional(:comment) => String.t(), optional(:altitude) => float() | nil, optional(:phg) => String.t() | nil, optional(:aprs_messaging?) => boolean(), optional(:compressed?) => boolean(), optional(:position_ambiguity) => position_ambiguity(), optional(:dao) => map() | nil, optional(:course) => integer() | nil, optional(:speed) => float() | nil, optional(:has_position) => boolean(), optional(:data_type) => atom() }
Functions
@spec parse(term()) :: parse_result()
Determine the data type of an information field.
@spec version() :: String.t()
Returns the current version of the APRS library as a static string.