Aprs.DAO (aprs v2.0.1)

View Source

APRS 1.1 DAO extension (!DAO!).

The extension carries the datum used by the sender plus one extra digit of latitude/longitude minute precision:

  • uppercase datum (!W52!) - the two bytes are ASCII digits giving thousandths of a minute (4903.50N + 5 becomes 49 03.505')
  • lowercase datum (!w52!) - the two bytes are base-91 giving (byte - 33) / 91 of a hundredth of a minute

The datum byte is reported upper-cased, matching reference parsers.

Summary

Types

t()

Parsed DAO extension: datum byte plus the extra precision in degrees

Functions

Apply DAO additional precision to a decoded coordinate pair.

Find and remove a DAO extension in a comment.

Types

t()

@type t() :: %{datum: String.t(), lat_offset: float(), lon_offset: float()}

Parsed DAO extension: datum byte plus the extra precision in degrees

Functions

apply_precision(lat, lon, arg3, ambiguity)

@spec apply_precision(float() | nil, float() | nil, t() | nil, non_neg_integer()) ::
  {float() | nil, float() | nil}

Apply DAO additional precision to a decoded coordinate pair.

The offset moves the coordinate away from the equator or the prime meridian, in the direction its own sign already points. An ambiguous position is left alone, since ambiguity exists to drop the precision DAO would add.

parse(comment)

@spec parse(String.t()) :: {t() | nil, String.t()}

Find and remove a DAO extension in a comment.

Returns {dao, comment_without_dao}, or {nil, comment} when the comment holds no DAO extension.