Hello!
A year ago, I finished my glorious university studies at the Faculty of Geo-Engineering and Cadastre. I, like, surely, many students, tried to write a diploma for the benefit of myself, so that the time and effort was not a pity, therefore I chose a more interesting topic of the diploma project. In search of interesting material, I came across this
article and had a burning desire to try something similar.
I thought then: satellite systems, satellite receivers, geodesy, surveying - close contact things in the construction and engineering areas. And there was the theme of the graduation project: the use of single-frequency satellite receivers in the land registry.
')
It is clear that using single-frequency signals in the land cadastre, as well as in geodesy, is an unreasonable thing: interference, accuracy, duration of signal reception. But it was important for me to look at and figure out how the receiver works, how the data is processed, how the result can be visualized. It was interesting to me.
I defended the diploma, but my interest in the topic did not disappear. I continued to work in this direction and set myself the task: to establish
a real-time positioning system with data transmission via the Internet. In this article I want to tell you what I did.

In the article I did not describe in detail what the RTKLib is, what subroutines it includes and how it works. Details can be read
here . I advise you at least briefly to read
this article before continuing to read further.
So let's get started. What we have:
- Raspberry pi - 2 pieces;
- NVS NV08C-CSM - 2 pieces;
- Antenna NV2410 - 2 pieces;
- 3000 mAh powerbank and display (for mobile station).
From all this, I assembled a base station and a rover. Both receivers work in
NVS BINR .
Appearance rover. In the absence of a second USB converter connected the receiver through the ArduinoFurther, according to my idea: there should be a server that will receive and save data from the base station, then, upon request, issue it to the rovers, and the rovers will independently calculate their position and send the coordinates to the server or somewhere else.
No sooner said than done. First, I wrote python scripts that set up receivers for work and write data to a file / send data to the server. Then the server's turn came: I registered on OpenShift and started the service using Tornado and MongoDB, connected RockMongo for debugging, wrote the necessary handlers.
With the rover turned out to be a little more difficult. There were no problems with compiling RTKLib under Raspbian: programs for * nix in the console version, everything is fine assembled with one sh makeall.sh. We need rtkrcv - this is the Linux analog rtknavi used to implement RTK.
I was delighted when I discovered that rtkrcv already supports http as an input stream. But then I realized that it did not suit me. So using one rtkrcv will fail. Then I wrote a transmitter between the server and rtkrcv, which sends requests, receives data and sends them to rtkrcv via a socket.
If you are interested in a more detailed description, then all the written code, configuration files, * .pos and raw data for testing are publicly available on
github .
Wrote, checked, tried. The time has come for the first test: put the antenna on the roof of the car, the receiver is in the passenger seat, the phone is in the access point mode. The antenna of the base station is installed on the roof of a country house, launched in advance, with a reserve per hour. Rover works without errors, the data is transmitted correctly. In rtkrcv, there are 9-11 valid satellites. No solution.
At first, I thought that the data was corrupted during the transfer process and this interferes with the calculations. I captured the data at the entrance to rtkrcv and began to try other options. I tried to send the same data, but in the form of files, to the input of rtkrcv, and I received such a track.
Entire track completelyHere I am still in the parking lot, but the track can not be saidAnd here I am very slowly and lawfully crawling in a dense stream of carsAt the top of the window: a graph with the number of satellitesThen I tried postprocessing: first, we convert the raw data into RINEX, postprocess and we get the track. And it turned out.
The entire track is complete. Green dots - there is a solution, yellow - there is a solution, but inaccurateHere I am still standing in the parking lot, pay attention to the grid step in the lower right cornerAt the top of the window: a graph with the number of satellites. Added for comparison with the same picture above.Why did this happen and rtkrcv has not issued a solution to me that is still not clear. I tried to rewrite the config in different ways, tried with different data and at different times, but to no avail. Errors in my actions, I have not yet discovered. Update the post, if suddenly it turns out.
But we need to move on. I thought: if I managed to get the coordinates manually, can I try to process the data every time? Processing began to take more time, intermediate files and stages appeared, it turns out not quite RTK, and in general it is illiterate. But it works.
For beauty and convenience, I made a page with markers that are updated every ten seconds. It turned out to be such a kind of tracker.
Terms of use
Google Maps API imposes a number of restrictions on the use of the service. In our case, we are interested in paragraph 10.4.c.iii, which reads as follows:
No navigation. Real-time navigation guidance or route guidance; or (b) automatic or autonomous vehicle control.
Technically, I did not succeed in setting up and launching the RTK, and there is also no route guidance. But just in case, I will still clarify whether such actions violate the terms of use.

Now I am building the same system, but I will use the radio channel and nRF24L01 + for communication, it should turn out to be something more like RTK, but at a short distance. I will write an article about this later.
Thanks for attention!