Determining the direction to the airport using RTL-SDR and GNU Radio

Hi 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 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



First, a question to readers - how to generate a signal so that using an omnidirectional receiving antenna can determine the direction? The answer is under the cut.



general information



The Very high frequency Omni-directional Range (VOR) system has been used for aeronautical 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 108-117 MHz. Now, in the epoch of gigahertz, the name very high frequency in relation to such frequencies sounds funny and in itself speaks of the age of this standard, but by the way, NDB beacons still work , operating in the medium wave range of 400-900 KHz.



Placing a directional antenna on an aircraft is constructively inconvenient, so the problem arose of how to encode information about the direction to the beacon in the signal itself. The principle of "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 once a 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 non-directional to the beacona red lamp that flashes when the lighthouse beam "passes" the north direction. Because the period of the flares and the coordinates of the beacon are known, calculating the delay between the red and green flashes, you can find the azimuth to the north. It's 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 manner 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 clever modulation. Which, in fact, is the topic of this article.



Let's imagine that we have a regular legacy beacon that has been in operation since the 50s and transmits signals in conventional AM Morse code modulation. Probably, once upon a time, the navigator actually listened to these signals with headphones and marked the directions with a ruler and compasses on the map. We want to add new functions to the signal, but so as not to β€œ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 serves as a reference-phase of the signal, and a high-frequency component encoded by frequency modulation at a frequency of 9.96 KHz, which transmits 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. Wherein,all this will not hurt to listen 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, choose AM modulation and 12 KHz bandwidth. VOR frequencies can be easily found on the net. On the spectrum, the signal looks like this:







In this case, the beacon signal is transmitted at 113.950 MHz. In the center there is an easily recognizable amplitude modulation line and signals in Morse code (.- -… which means AMS, Amsterdam, Schiphol airport). 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 signal structure) 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 at 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:







That's it, problem 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, a picture from aviation.stackexchange.com:







Fortunately, you don't have to do all this manually: there is a ready-made Python project that decodes VOR signals from WAV files. Actually, studying it inspired me to study this topic.



Those interested can run the program in the console and get a ready-made angle in degrees from an already recorded file:







Aviation fans can even make themselves a portable receiver from RTL-SDR and Raspberry Pi. By the way, on a "real" aircraft, this indicator looks something like this:





Image Β© www.aopa.org



Conclusion



Such signals "from the last century" are definitely interesting for analysis. Firstly, they are quite simple, modern DRM, or even more so GSM, you won't be able to decode like this on your fingers. They are open to receive, they have no keys and no cryptography. Secondly, it is possible that in the future they will become history and will 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 a different 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 to everyone.



All Articles