Aprs.PHGHelpers (aprs v2.0.1)

View Source

PHG/DF helper functions for APRS.

Summary

Functions

Decode the S digit of a DFS value into {strength, description}.

Decode the D digit of a PHG value into {degrees, description}.

Decode the G digit of a PHG value into {dB, description}.

Decode the H digit of a PHG value into {feet, description}.

Decode the P digit of a PHG value into {watts, description}.

Types

df_strength()

@type df_strength() :: {integer() | nil, String.t()}

phg_directivity()

@type phg_directivity() :: {integer() | nil, String.t()}

phg_gain()

@type phg_gain() :: {integer() | nil, String.t()}

phg_height()

@type phg_height() :: {integer() | nil, String.t()}

phg_power()

@type phg_power() :: {integer() | nil, String.t()}

Functions

parse_df_strength(s)

@spec parse_df_strength(integer()) :: df_strength()

Decode the S digit of a DFS value into {strength, description}.

An unrecognised digit gives {nil, description}.

parse_phg_directivity(d)

@spec parse_phg_directivity(integer()) :: phg_directivity()

Decode the D digit of a PHG value into {degrees, description}.

An unrecognised digit gives {nil, description}.

parse_phg_gain(g)

@spec parse_phg_gain(integer()) :: phg_gain()

Decode the G digit of a PHG value into {dB, description}.

An unrecognised digit gives {nil, description}.

parse_phg_height(h)

@spec parse_phg_height(integer()) :: phg_height()

Decode the H digit of a PHG value into {feet, description}.

An unrecognised digit gives {nil, description}.

parse_phg_power(p)

@spec parse_phg_power(integer()) :: phg_power()

Decode the P digit of a PHG value into {watts, description}.

An unrecognised digit gives {nil, description}.