Aprs.PHG (aprs v2.0.1)

View Source

PHG (Power, Height, Gain) parsing for APRS packets.

Summary

Functions

Parse a PHG or DFS string, with or without a leading #.

Functions

parse(phg_str)

@spec parse(String.t()) :: map()

Parse a PHG or DFS string, with or without a leading #.

Returns %{phg: "PHGD", data_type: :phg_data, raw_data: ...} for PHG and %{dfs: "SHGD", data_type: :df_report, raw_data: ...} for DFS. Input that matches neither returns an :error key. Use Aprs.PHGHelpers to decode the individual digits.