pub fn parse_dprs(sentence: &str) -> Result<DprsReport, DprsError>Expand description
Parse a DPRS sentence into a DprsReport.
The sentence must start with $$CRC<4hex>,. The CRC field is
parsed but not validated here — callers that want to verify it
should compute super::compute_crc over the body bytes after
the comma and compare against the 4-hex value between $$CRC
and ,.
§Errors
DprsError::MissingCrcPrefixif the sentence doesn’t start with$$CRCDprsError::TooShortif shorter than the minimum viable lengthDprsError::MalformedCoordinatesif lat/lon fields fail to parseDprsError::LatitudeOutOfRange/DprsError::LongitudeOutOfRangeDprsError::InvalidCallsignif the callsign field is invalid
§See also
ircDDBGateway/Common/APRSCollector.cpp:371-394 — the reference
parser this decoder mirrors. CRC-CCITT uses reflected polynomial
0x8408, initial value 0xFFFF, final ~accumulator.