The APRS 1.01 spec calls out three types of weather report packets: raw, positionless, and complete. This PR adds handling for complete weather reports.
Complete weather reports are a subset of Position reports, so WeatherInfo was implemented as an extension of PositionInfo. As such, there were some changes to the constructors and protection of property setters to enable such a scenario to work. However, I think it ended up working really nicely.
This PR also adds extensive encode/decode "round trip" tests where a packet is decoded, checked, then encoded and checked to ensure it produces the same string again.
This resolves #106. Other types of weather reports will be handled by different issues in different PRs.
Changes
Introduced WeatherInfo as an extension of PositionInfo
Implemented encode and decode for WeatherInfo
Hooked in WeatherInfo decode to full packet TNC2 decode by inspecting decoded PositionInfo packets to see if they are actually weather reports (based on station symbol, as per the APRS 1.01 spec)
Updated some PositionInfo and InfoField constructors and property modifiers to enable more object-oriented logic
Added testing for WeatherInfo encode and decode and full-TNC2-packet encode and decode of WeatherInfo packets
Validation
All tests pass on my machine
Decode works on command line (see screenshot below with filter to type = weather)
Description
The APRS 1.01 spec calls out three types of weather report packets: raw, positionless, and complete. This PR adds handling for complete weather reports.
Complete weather reports are a subset of Position reports, so
WeatherInfo
was implemented as an extension ofPositionInfo
. As such, there were some changes to the constructors and protection of property setters to enable such a scenario to work. However, I think it ended up working really nicely.This PR also adds extensive encode/decode "round trip" tests where a packet is decoded, checked, then encoded and checked to ensure it produces the same string again.
This resolves #106. Other types of weather reports will be handled by different issues in different PRs.
Changes
WeatherInfo
as an extension ofPositionInfo
WeatherInfo
WeatherInfo
decode to full packet TNC2 decode by inspecting decodedPositionInfo
packets to see if they are actually weather reports (based on station symbol, as per the APRS 1.01 spec)PositionInfo
andInfoField
constructors and property modifiers to enable more object-oriented logicWeatherInfo
encode and decode and full-TNC2-packet encode and decode ofWeatherInfo
packetsValidation