top of page
  • Andreas

Packet Decoding

Updated: Mar 11


In order to be able to assign the recordings of the SDR recorder to the recorded packets of the Maxx II variometers, we have developed a small software tool that decodes the FLARM packets of the SDR recorder using digital signal processing. To decode the FLARM packets, we remove the carrier frequency, i.e. we shift the packets so that they are centered around 0 Hz (baseband). Technically, this is realized by multiplying the I/Q data by the carrier frequency and then filtering it with a steep low-pass filter. The image above shows a section of the recorded raw data from Lenk, where the gaps between the packets were filtered out in a pre-processing step using a squelch function.


After multiplication with a 200 kHz carrier and application of a low-pass filter, we only see the packets from 868.2 MHz, shifted to 0 Hz. The 868.4 MHz packets are practically completely suppressed by the low-pass filter.



In the FLARM packets, the mark and space frequencies are clearly visible as short red horizontal lines. The time resolution of the waterfall diagram (generated with a fast-fourier transform function) is too low to recognize that these lines are interrupted and contain the individual bits of the packet.


We can now process the filtered I/Q raw data and find out which frequency is active at which time. This is because the I/Q vector rotates in one direction for positive frequencies and in the other direction for negative frequencies. Consequently, we can first differentiate the angle of the I/Q vector using the arctan function and then the direction of rotation using a mathematical first derivative. The following graphic shows the result for a section of a single FLARM packet:



The FLARM protocol does not use pure FSK modulation, but filters the signals before transmission, resulting in G-FSK modulation (Gaussian FSK). As a result of the filtering, the signal no longer appears as a square wave signal between 0 and 1 after decoding, but has smoother characteristics.


You can see the synchronization part of the packet in the left half, which appears as an even alternation between 0 and 1. The actual transmission of the data begins approximately in the middle. The following figure shows "manually" annotated decoding of the individual bits for the above example.



FLARM packets use Manchester encoding. The individual 0 and 1 bits are transmitted as bit pairs 10 and 01. The Manchester encoding must be reversed when decoding the packets in order to obtain the actual packet data.


Our packet decoding tool searches the data stream for the synchronization part of the packets, then decodes the individual bits using Manchester decoding and returns the content of the FLARM packets together with the time offset as output. Some decoded packets are shown below:



With the ability to decode the FLARM packets from the SDR recorder, we can next link the data with the decoded data from the Maxx II variometer. The knowledge gained from this will help to create a simulation model that is as close to reality as possible, with which the new protocol can be optimized and tested.



85 views0 comments

Recent Posts

See All
bottom of page