Good afternoon, judging by the photos, snow fell on Bali! How did it happen?
Recently, I have to deal with the design and manufacture of satellite navigation antennas, antenna arrays and radio receivers. It should be noted here that these radio controllers are converters of the navigation signal to a form convenient for further processing, and not those navigation receivers that provide the solution to the navigation task and which are built into your gadgets.
When testing antennas, especially their new designs, in a normal city room there are problems with good radio satellite visibility. Roughly speaking, it is difficult to understand the new antenna better or worse than the old one; the modified scheme of matching the radio frequency response with the antenna gave or not an improvement in the sensitivity of the system. About the antenna array in general can not speak. In addition, personally in my case, there is some kind of hindrance that interferes with the reception. It is necessary to move away from the window and the receiver loses the satellites, although the direct visibility of a quarter of the sky is preserved.
In summer, the cottage becomes salvation. There is almost a free sky and there is no interference. But there you must either go with all the property, or keep there an additional set of it. There are also comrades from the past work, who give work in an anechoic chamber. I do not know why, but there is such happiness.
In general, the share of the developer is not easy.
Recently I was lucky to get close to solving this problem. I always knew about navigation signal simulators, but they were expensive for me. There have been some happy events.
One friend from Moscow at the meeting spoke about the GPS simulator, published by Professor Ebinuma in the source code.
I was already acquainted with the professor by correspondence and I had confidence in him and his workings out. It was possible to begin work, hoping for the consultation of the professor.
It was thought that it would be cool to be able to test antennas and radio control devices is stable and predictable.
And then, it was thought, this is our almost traditional Russian fun - to deceive the GPS. I remembered how I myself recently was dropped informationally from the metro station Tretyakovskaya at Vnukovo Airport. And you can even make something like a matryoshka - to launch a false signal on the Tretyakov, as if I were on the Tretyakov.
An illusion, but it can help to calm many troubled people, especially in the spring. And how is it in Russian, damn it!
After all, if they can, then why should not we? But we must especially make a reservation that the launch of the simulator was carried out at minimum power 10 kW and even without connecting the antenna all the hair on my head fell out . We ask everyone to be careful when experimenting. and wear a foil cap so as not to destroy the navigation space of the people around and specialist services. It is also worth recalling that ignorance of the laws is no excuse. And that in Russia it is customary not to blame not only on the bag.
All down with the philosophy! To the point! Less letters, more pictures!
To launch our global positioning system, earlier we would need an orbital constellation of satellites, ground stations, etc. Now everything is easier.
We need:
A computer with an operating system such as Windows or Linux and, preferably, with a USB 3.0 port. On port 2.0, I did not test, but it should work.
USRP b210 board (other options are possible).
The generated file with the signal, or the program for its generation GPS-SDR-SIM from prof. Ebinums.
To run all this stuff on the computer, you must quickly and carefully install a software set from the board manufacturer. Although it may not be necessary. But let it be. When installing under Windows, it sometimes complains that it cannot add itself to the PATH, but this does not interfere, because of all this stuff, I only needed the utility uhd_find_devices.exe, which allowed me to understand if I saw the system at all. You can find the utility at:
C:/UHD/bin/uhd_find_devices.exe
Then we stick the board and open the device manager. Where can I find that the driver under the device is not installed automatically. What - happens. Manually using the zadig program, we indicate to the system that for the fee we need to use the libusb drivers, i.e. winusb.
After the system picked up the standard driver, you can run uhd_find_devices from the software set from the board manufacturer. This utility should find a board and flash its controller (Cypress FX3 costs there). It seems that after that the device will change its PID and it will be necessary to tell the system (using zadig) that you can use standard winusb drivers for this device.
Of course, it will not work the first time. And of course this can be cured by unplugging the board and connecting it back. Here are the detailed instructions .
You need to install gnuradio, which inside contains Python-python. I took from here the latest version for AVX2 processors.
I was too lazy to set up the environment in the right way, so I used the included script: C: /GNURadio-3.7/bin/run_gr.bat
Through it, I will run a script to send the generated file to the b210 board.
For convenience, the path to this script must be added to the PATH environment variable.
Source codes take here . What a pleasant surprise was the ease and ease of assembly. No dependencies, no extra action. Everything would be so.
Build under linux
$ gcc gpssim.c -lm -O3 -o gps-sdr-sim
Building under Windows
Start Visual Studio. Run Studio (I used 2015)
Create an empty project for a console application. Create an empty console project. It is empty!
On the Solution Explorer at the right, add "gpssim.c" and "getopt.c" to the Soup Files folder. Add two files to the project.
Select "Release" in Solution Configurations drop-down list. Change the build type to release, select the x86 / amd64 architecture.
I did not collect under Linux, because there was a need to run everything on a specific machine, and there were a dozen on it.
A detailed description of the parameters of the generator is in the readme. For a start, you can not understand, but to do very simply, to generate a signal in this way:
gps-sdr-sim.exe -e brdc3540.14n -s 2500000 -l 30.286502,120.032669,100 -b 8 -d 300 -v -o sim.bin
gps-sdr-sim.exe is the file that you have compiled by the studio.
brdc3540.14n is a file with ephemeris satellites.
2500000 is the sampling rate
30.286502,120.032669 - coordinates
100 - height
8 is the digit capacity of the numbers in the output file (one count is IQ, two numbers).
300 is the duration in seconds.
-v is to write more to the log
You can take a line from the readme, but it will generate a signal with RR = 2.6 MHz, then b210 will need to be tuned to the same RR (sampling rate). If generated with one frequency, and issued on a fee with another, then, of course, nothing will work.
I gave the signal to the board using this command:
run_gr.bat gps-sdr-sim-uhd.py -t sim.bin -s 2500000 -x 40
40 is a level. 2500000 is BH. A detailed description of the settings can be seen in the file gps-sdr-sim-uhd.py, it is very simple to understand.
For b210, the BH value should completely divide the frequency of the internal oscillator, and it seems to be 40 MHz there.
And now the fun part.
Turning off the board.
Connect the board.
Run uhd_find_devices
If not determined, then goto 1.
Run transmit.bat, monitor the log.
If the letter U is constantly displayed in the logs, it means that your system does not have time to slip the data into the board. You should check if something is working against the background and if you indicated a very high BH.
After some time (up to 3 minutes), all devices will begin to determine the location as you specified. But before that, they suddenly lose their current position.
Carefully read the instructions to the program prof. Abinums can figure out how to generate a file with a changing location, how to use other dates, and more.
There is a proven way to build the most of the inexpensive means of a GPS signal simulator. This is a great joy for developers. Thanks to Professor Ebinume!
Not all receivers are subject to imitation interference. Some have protection.
There is a danger that such a simulator will be used or is already being used by criminal elements for its own purposes. Now there are receivers with protection against signal spoofing. It is necessary to test this function and use such receivers in responsible applications.
And for the last two points - thanks to Professor Einume! Developers will have something to do on both sides of the barricades.
Soon I will talk about trying to get rid of the interference and it came out of it.
Source: https://habr.com/ru/post/320206/
All Articles