Hey Habr!
Currently, there are not so many communication standards that, on the one hand, are curious and interesting, on the other hand, their description does not take up 500 pages in PDF format. One of these, easy to decode, is the VHF Omni-directional Radio Beacon (VOR) signal used in air navigation.

VOR Beacon (c) wikimedia.org
To begin with, a question for readers - how to form a signal so that with the help of an omnidirectional receiving antenna it is possible to determine the direction? The answer is under the cut.
General information
System (VOR) has been used for air navigation since the 50s of the last century, and consists of relatively short range radio beacons (100-200 km), operating in the VHF frequency range of 108-117 MHz. Now, in the era of gigahertz, the name very high frequency in relation to such frequencies sounds funny and in itself speaks of age of this standard, but by the way, beacons are still working operating in the medium wave range of 400-900 kHz.
Placing a directional antenna on an aircraft is structurally inconvenient, so the problem arose of how to encode information about the direction to the beacon in the signal itself. The principle of operation "on the fingers" can be explained as follows. Let's imagine that we have an ordinary beacon that sends out a narrow beam of green light, the lamp of which rotates 1 time per minute. Obviously, once a minute we will see a flash of light, but one such flash does not carry much information. Let's add a second one to the lighthouse non-directional a red lamp flashing at the moment when the beacon beam "passes" the direction to the north. Because the flash period and beacon coordinates are known, by calculating the delay between red and green flashes, you can find the azimuth to the north. Everything is simple. It remains to do the same, but with the help of the radio. This was solved by changing the phases. Two signals are used for transmission: the phase of the first is constant (reference), the phase of the second (variable) changes in a complex way depending on the direction of radiation - each angle has its own phase shift. Thus, each receiver will receive a signal with "its own" phase shift proportional to the azimuth to the beacon. The technology of "spatial modulation" is carried out using a special antenna (Alford Loop, see KDPV) and a special, rather tricky modulation. Which is actually the topic of this article.
Let's imagine that we have an ordinary legacy beacon that has been operating since the 50s and transmits signals in the usual AM modulation in Morse code. Probably, once upon a time, the navigator really listened to these signals in headphones and marked the directions with a ruler and a compass on the map. We want to add new features to the signal, but in a way that does not “break” compatibility with the old ones. The topic is familiar, nothing new ... It was done as follows - a low-frequency 30 Hz tone was added to the AM signal, which acts as a reference-phase signal, and a high-frequency component encoded by frequency modulation at a frequency of 9.96 kHz, transmitting a variable phase signal. By selecting two signals and comparing the phases, we get the desired angle from 0 to 360 degrees, which is the desired azimuth. At the same time, all this does not interfere with listening to the beacon "in the usual way" and remains compatible with old AM receivers.
Let's move from theory to practice. Let's start the SDR receiver, select the AM modulation and the bandwidth of 12 kHz. VOR beacon frequencies can be easily found on the web. On the spectrum, the signal looks like this:

In this case, the beacon signal is transmitted at a frequency of 113.950 MHz. The easily recognizable amplitude modulation line and Morse code signals (.- - ... which means AMS, Amsterdam, Schiphol Airport) are visible in the center. Around at a distance of 9.6 kHz from the carrier, two peaks are visible, transmitting the second signal.
Let's record the signal in WAV (not MP3 - lossy compression will "kill" the entire structure of the signal) and open it in GNU Radio.
Decoding
Step 1. Let's open the file with the recorded signal and apply a low pass filter to it to get the first reference signal. The GNU Radio graph is shown in the figure.

Result: a low frequency signal with a frequency of 30 Hz.

Step 2: decode the variable phase signal. As mentioned above, it is located at a frequency of 9.96 kHz, we need to transfer it to zero frequency and feed it to the FM demodulator.
GNU Radio graph:

Everything, the task is solved. We see two signals, the phase difference of which indicates the angle from the receiver to the VOR beacon:

The signal is quite noisy, and additional filtering may be required for the final calculation of the phase difference, but the principle is hopefully clear. For those who have forgotten how the phase difference is determined, the picture is from :

Fortunately, all this manually can not be done: there is already in Python that decodes VOR signals from WAV files. Actually, his study inspired me to study this topic.
Those who wish can run the program in the console and get the finished angle in degrees from the already recorded file:

Aviation fans can even make their own portable receiver using an RTL-SDR and a Raspberry Pi. By the way, on a “real” aircraft, this indicator looks something like this:

Image ©
Conclusion
Such signals "from the last century" are definitely interesting for analysis. Firstly, they are quite simple, modern DRM, or even more so GSM, so it’s impossible to decode “on the fingers” like that. They are open for reception, they do not have keys and cryptography. Secondly, perhaps in the future they will become history and be replaced by satellite navigation and more modern digital systems. Thirdly, the study of such standards allows you to find out interesting technical and historical details of how problems were solved on other circuitry and element base of the last century. So the owners of receivers can be advised to receive such signals while they are still working.
As usual, good luck with your experiments.
Source: habr.com
