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

Hello, Habr!

Currently, there are not many communication standards that are both interesting and easy to understand, and at the same time, their descriptions don't take up 500 pages in PDF format. One such standard, which is straightforward to decode, is the VHF Omni-directional Radio Beacon (VOR) used in aeronautics.

Determining direction to the airport using RTL-SDR and GNU Radio
VOR Beacon (c) wikimedia.org

To start, a question for readers — how can a signal be formed so that the direction can be determined using an omnidirectional receiving antenna? The answer is below.

General information

System Very High Frequency Omni-directional Range (VOR) has been used in aeronautics since the 1950s and consists of radio beacons with relatively short ranges (100-200 km) operating in the VHF frequency range of 108-117 MHz. Nowadays, in the age of gigahertz, the term 'very high frequency' applied to such frequencies sounds funny and itself indicates the age of this standard, but by the way, beacons are still operational. NDB, operating in the medium wave range of 400-900 kHz.

Placing a directional antenna on an aircraft is structurally inconvenient, so the challenge arose of how to encode the information about the bearing to the beacon directly in the signal. The working principle can be explained quite simply. Imagine we have a regular beacon sending a narrow beam of green light, which rotates once a minute. Clearly, we will see a flash of light once a minute, but one such flash doesn’t carry much information. Let’s add a second omnidirectional A red light that flashes at the moment when the lighthouse beam 'crosses' the direction to the north. Since the flash period and the lighthouse's coordinates are known, by calculating the delay between the red and green flashes, one can determine the azimuth to the north. It's straightforward. Now, the same thing needs to be done using radio. This was solved by changing phases. Two signals are used for transmission: the first phase is constant (reference), and the second phase (variable) changes in a complex way depending on the radiation direction — each angle corresponds to its own phase shift. Thus, each receiver will receive a signal with its 'own' phase shift, proportional to the azimuth towards the lighthouse. The 'spatial modulation' technology is implemented using a special antenna (Alford Loop, see KDPV) and a particular, quite clever modulation. This is actually the topic of this article.

Imagine that we have a regular legacy beacon, operational since the 1950s, transmitting signals in standard AM modulation using Morse code. Perhaps long ago, a navigator truly listened to these signals through headphones and marked directions with a ruler and compass on the map. We want to add new features to the signal without 'disrupting' compatibility with the old ones. This is a familiar topic; nothing new… It was done as follows — a low-frequency 30 Hz tone was added to the AM signal, serving as the reference-phase signal, and a high-frequency component was encoded using frequency modulation at 9.96 kHz, transmitting the variable phase signal. By isolating the two signals and comparing their phases, we get the desired angle from 0 to 360 degrees, which is the required azimuth. At the same time, all this does not hinder listening to the beacon 'in the usual way' and remains compatible with old AM receivers.

Let's move from theory to practice. We will start an SDR receiver, select AM modulation, and set the bandwidth to 12 kHz. The frequencies of VOR beacons can be easily found online. The spectrum of the signal looks as follows:

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

In this case, the beacon signal is transmitted at a frequency of 113.950 MHz. In the center, there is a recognizable amplitude modulation line, along with Morse code signals (.- — … which means AMS, Amsterdam, Schiphol airport). Around it, at a distance of 9.6 kHz from the carrier, we can see two peaks transmitting the second signal.

Let's record the signal in WAV (not MP3 — compression will 'kill' the whole signal structure) and open it in GNU Radio.

Decoding

Step 1We will open the file with the recorded signal and apply a low-pass filter to obtain the first reference signal. The GNU Radio graph is shown in the figure.

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

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

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

Step 2Now, we will decode the variable phase signal. As mentioned earlier, it is located at a frequency of 9.96 kHz, and we need to shift it to zero frequency and feed it to the FM demodulator.

GNU Radio graph:

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

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

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

The signal is sufficiently noisy, and additional filtering may be required for the final phase difference calculation, but I hope the principle is clear. For those who forgot how phase difference is determined, here's a picture from aviation.stackexchange.com:

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

Fortunately, all this does not need to be done manually: there is already a ready-made project in Python that decodes VOR signals from WAV files. In fact, studying it inspired me to explore this topic.

Those interested can run the program in the console and obtain the resulting angle in degrees from an already recorded file:

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

Aviation enthusiasts can even build a portable receiver using RTL-SDR and Raspberry Pi. By the way, on a 'real' airplane, this indicator looks something like this:

Determining direction to the airport using RTL-SDR and GNU Radio
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 GSM cannot be decoded this easily. They are open for reception, without keys and cryptography. Secondly, they may go down in history in the future and be replaced by satellite navigation and more modern digital systems. Thirdly, studying such standards reveals interesting technical and historical details of how tasks were solved with different equipment and technology from the last century. So, receiver owners might want to capture these signals while they are still operational.

As usual, I wish everyone successful experiments.

Source: habr.com

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster