📜 ⬆️ ⬇️

Radar hack



Some time ago I saw on one of the forums a discussion about the possibility of finding aircraft, taking reflected radar signals. The idea seemed interesting, and the goal was unattainable for use in everyday life, until the advent of an SDR receiver based on a cheap DVB-T dongle on the RTL2832U chipset. With the help of dongle, you can digitize the received signal at a speed sufficient to obtain a resolution on the ground of the order of hundreds of meters, which is quite suitable for the experiment.

For the sake of justice, I don’t really believe in the possibility of bearing the planes in this way, but the signal reflected by large ground objects should be clearly visible. The second limitation - the radar uses a highly directional antenna for radiation and for receiving it, with a weakly directed television antenna, which was used during the experiment, it is not necessary to expect high resolution.

Experiment: SDR dongle is connected to a television antenna, we get a radar from the bushes, good, it is located at the airport just a few kilometers and works in the meter television range. The signal is recorded with the help of SDR # in a wav-file with a speed of 2M measurements per second, which will give a theoretical resolution on the ground about 75 meters. The fact that the emitter and receiver are spaced apart in space is neglected.
')
After the signals are recorded and the best sample is selected, we write a script that simulates the sweep of the radar and synchronization with the first powerful pulse.

import os from PIL import Image, ImageDraw import wave import math dir = os.path.dirname(os.path.abspath(__file__)) image = Image.new("RGB", (1000, 1000), (0, 0, 0)) (w, h) = image.size sync_level = 45 seconds_max = 40 px_from_center = 30 seconds_per_spin = 20 wav = wave.open(dir + "/samples/134201.wav", mode="r") (nchannels, sampwidth, framerate, nframes, comptype, compname) = wav.getparams() data = wav.readframes(nframes) bytes = nframes * nchannels * sampwidth seconds = float(nframes) / framerate px_per_km = int(framerate / 300000.0 * 2) print(str(bytes) + " bytes, " + str(seconds) + " seconds") t = 0 avg = 0 synchronized = 0 i = 0 while i < bytes - 4: l = abs(128 - ord(data[i])) r = abs(128 - ord(data[i + 2])) avg = avg * .9 + l * .1 level = l + r if not synchronized and avg > sync_level: synchronized = 1 if synchronized: s = float(i) / bytes * seconds if s >= seconds_max: break if t % (10 * px_per_km) == 0: level += 20 if t < 400: x = int(w/2 - (t + px_from_center) * math.cos(s / seconds_per_spin * 2 * math.pi)) y = int(h/2 - (t + px_from_center) * math.sin(s / seconds_per_spin * 2 * math.pi)) image.putpixel((x, y), (level, level, level)) t += 1 if t >= 400: t = 0 synchronized = 0 avg = 0 i += 4 image.save(dir + "/radar.png", "PNG") 


One turn the radar makes in 20 seconds. We select the level of synchronization and get a picture that stably repeats with each turn.



What we needed. The picture is quite blurry, but nothing prevents it from improving, experimenting with the parameters and using the best equipment.

Sources with digitized signal - 73M

Source: https://habr.com/ru/post/241029/


All Articles