Data Processing in the RTTV - PSASCapstone2013/rttv GitHub Wiki
Data Parsing
UDP packets received by the RTTV are parsed according to the documentation provided by PSAS which is available here: http://psas.pdx.edu/avionics/av3-data-protocol/
Data Manipulation
Once parsed the data undergoes scaling and/or unit conversion as appropriate. Scaling is needed to make certain data types human readable and unit conversion is needed to conform to the requirement that all data must be passed to the JavaScript portion of the RTTV in MKS units.
After scaling and unit conversion all data that has been received over a period of 0.1 seconds is averaged and stored as a JSON object. If it does not make sense for the data to be averaged (for example an error message) only the most recent of that data type is used.
Packet Loss Statistics Generation
Since not all packets generated by the flight computer will reach the RTTV statistics to illustrate the amount of lost packets are generated. These include:
- A count of packets received and lost since the program start and since the last update
- The time stamp of the most recent message and the most recent system time that a packet was received