BI1ALF Someone has already posted the link on the upper floor of the library, so I won't repeat that here. To briefly explain the principle:
The physical layer of APRS uses AFSK1200. In simpler terms, 1200Hz and 2200Hz represent 1 and 0 (or 0 and 1 – the distinction is not important because NRZI encoding follows, using a flip to represent 0 and no flip to represent 1). The length of each bit is 1/1200s, which corresponds to one cycle of 1200Hz. This encoding method, with a bit length and cycle similar in value, cannot be demodulated by simply filtering; the group delay of the filter response is already greater than the bit length, making it unable to keep up with the changes in the code.
Typically, this type of signal demodulation uses IQ demodulation. In simple terms, it involves multiplying two orthogonal signals (for example, sin(2π × 1200t) and cos(2π × 1200t)) with the input signal, filtering out high-frequency components, then taking the square root of the sum, which results in the actual code sequence (i.e., determining when it's a 1 and when it's a 0). Subsequently, based on the length of the code sequence (i.e., identifying when complete 1s and 0s occur, as well as the initial 0x7E segment that appears at the start of APRS to align with the timing), you can determine when to begin decoding.

LibAPRS uses a simpler approach: why are sin(2π × 1200t) and cos(2π × 1200t) multiplied separately, as mentioned earlier? This is because the phase of the input signal is unknown. If only sin or cos is used, the DC component of the result will be offset depending on the phase difference. After multiplication, the square sum disappears. LibAPRS directly multiplies its signal by half a cycle and itself, which means that regardless of the phase of the input signal, the DC component of the resulting product always represents the code sequence (when the delay is 0.5/1200 cycles, only multiplying 1200 × 1200 results in a DC component of 1).2200,2200The DC components of the 1200 and 2200*2200 signals are both 0. This allows for self-multiplication followed by filtering to obtain the code sequence. Compared to the IQ demodulation method described above, this approach requires half the number of multiplication and filtering operations, saving resources on a single microcontroller.
https://cloud.tsinghua.edu.cn/d/ad481bc84b9e43779395/ There are several MATLAB code snippets here: `aprs_iq.m` is the IQ demodulation I wrote myself, and `aprs1.m` is simulation code written based on the LibAPRS principles a long time ago. Now, I can't even understand it anymore (sad).