CBielstein / APRSsharp

APRS# - Modern APRS software for the amateur radio community
MIT License
12 stars 5 forks source link

AprsParser can decode TNC2 packets #79

Closed CBielstein closed 2 years ago

CBielstein commented 3 years ago

Description

APRS-IS sends packets in TNC2 format (source 1, source 2). Currently Packet.cs does not handle this encoding, so we cannot display human readable packets.

For this issue

An example of such a method:

public void DecodeTnc2(string encodedPacket)
{
    // Decode TNC2 information
        // e.g. Callsign (sender)
        // Path
    DecodeInformationField(/* information field */);
}

NOTE: Not all packet types can be decoded by AprsParser at this point in time, so choose your test packets wisely. Consider building test packets based on those already covered in tests in PacketInformationFieldUnitTests.cs to avoid personal data from "real" packets being put in our repository...and to ensure you're using an information field that should decode.

Acceptance Criteria:

CBielstein commented 3 years ago

Potentially relevant, here is the APRS 1.0.1 spec. You shouldn't need it for this...but you never know.

CBielstein commented 2 years ago

This will be changed by #93, which changes the structure. As long as that PR is merged more-or-less as it stands now, TNC2 decode is now just directly in the Packet(string) constructor. It's okay to implement TNC2 directly there and we can break it out later if we need to decode different types in the future.