-
Notifications
You must be signed in to change notification settings - Fork 21
Description
I'm unhappy with the data structures we're using for the base APRSPacket. Hear me out:
I've been working on adding weather data parsers. It's not too complex, but it highlights the different ways the data can be presented. If you refer to chapter 12 of the APRS Spec, there are at least 5 different ways to encode weather information. Some contain positions, some contain timestamps. This makes the object hierarchy get messy pretty quickly.
Looking at the chart in Chapter 5 (page19) and the "APRS Data and Data Extension" table on page 18, it looks like there should be an interface called "APRSData" and an interface called "APRSDataExtension". An APRSPacket can contain multiple instances of the interface (i.e. a packet can contain Lat/Long Coordinates AND Raw Weather Station Data). I'm proposing that the APRSPacket contain a Set of APRSData objects, and a Set of APRSDataExtension objects. This is probably going to break some stuff downstream, so I'm looking for input here.
I'm also thinking about how to indicate at a high-level what information a packet actually contains. I'm not sure we should have to walk an entire set to see if a packet contains a position. Perhaps a set of boolean values like hasPosition(), hasWeather(), hasTelemetry(), etc?