RTKLib + Python + Google Maps JS API. Make your Navigator

Hello!

A year ago I finished my glorious education at the University at the faculty of geoengineering and cadastre. I, like probably many students tried to write the diploma for the benefit of themselves, that was not a pity spent time and effort, so the theme of the graduation project chose more interesting. In search of interesting material I came across this article and was eager to try something similar.

I thought then: satellite system, satellite receivers, geodesy, surveying close touching things in the construction and engineering field. And there was a theme of the diploma project: application of single-frequency satellite receivers at the land registry.

It is clear that to apply odnoclasniki in the land cadastre, and geodesy — it is unreasonable: noise, precision, duration of signal reception. But it was important to see and understand how to operate the receiver, how data is handled, how it is possible to visualize the result. I was wondering.

I defended my diploma, but interest in the topic never waned. I continued to work in this direction and have set a goal: to establish positioning system in real time with data transmission via the Internet. In this article I want to tell you what I did.

image

In the article I described in detail what RTKLib, which routines it includes and how it works. Details can be read here. I suggest at least a quick read of this article before you proceed to read further.

So, let's start. What we have:
the
    the
  • Raspberry pi — 2 pieces;
  • the
  • NVS NV08C-CSM — 2 pieces;
  • the
  • Antenna NV2410 — 2 pieces;
  • the
  • Powerbank 3000 mAh and the display (for mobile station).

From all this I gathered the base station and the Rover. Both receivers work in NVS BINR.
image

the appearance of the Rover. For lack of a second USB Converter hooked up to the receiver via Arduino

Further according to my idea: there should be a server that will receive and store data from the base station, then, upon request, to extradite them to the Rovers, and Rovers already independently calculate its position and send the coordinates to the server or something.

No sooner said than done. First I wrote a python scripts that set up receivers for operation and writes data to a file/send data to the server. Then came the server queue: signed up for OpenShift and launched the service using Tornado and MongoDB for debugging hooked RockMongo, wrote the desired handler.

With the Rover was a little more complicated. Problems with compiling RTKLib under Raspbian does not have any programs for *nix in the console version, everything is fine going one sh makeall.sh. We need rtkrcv is the Linux analogue of rtknavi used to implement RTK.

I was glad when I found that rtkrcv already supports http as the input stream. But then I realized that I do not fit. It means to use one rtkrcv will not work. Then I wrote the transmitter between the server and rtkrcv, which sends the requests, receives the data and sends them to the socket rtkrcv.

If interested a more detailed description, the entire code is written, the configuration files *.pos and raw data for testing is in the public domain on github.

Wrote, tested, tried. It's time for the first test: put the antenna on the roof of the car, in the passenger seat is the receiver, phone in access point mode. The base station antenna is installed on the roof of the cottage, running in advance, with a margin of an hour. The Rover runs with no errors, the data is transferred correctly. In rtkrcv observed 9-11 valid satellites. There is no solution.
At first I thought that the data become corrupted in the transfer process and this prevents the calculations. Intercepted data at the entrance to rtkrcv and started to try other options. I tried to send the same data, but in files, the input rtkrcv and got here this track.

image

the Whole track completely

image

Here I am, still standing in the Parking lot, but the track won't tell

image

And here I am law-abiding and very slow crawl in heavy traffic

image

Top: the graph with the number of satellites

Then tried to hold post-processing: first, convert the raw data in RINEX produced by post-processing and get the track. Happened.

image

the Whole track completely. Green points — there is a solution, the yellow solution is, but inaccurate

image

Here I am, still standing in the Parking lot, note the grid in the lower right corner

image

Top: the graph with the number of satellites. Added for comparison with the same figure above

Why it happened and rtkrcv not given the solution is not clear to me until now. I tried different ways to rewrite the config, tried with different data and at different times, but to no avail. Errors in their actions, I have not yet discovered. Will update the post if this could work.

But we need to move on. I thought if I was able to get the coordinates manually, you can try each time to process the data? Treatment began to occupy more time, there intermediate stages, is not quite the RTK, and in General this is wrong. But it works.

For beauty and convenience have made the page refreshes every ten seconds markers, just a tracker.

Google Maps API imposes some restrictions on the use of the service. In our case we are interested in item 10.4.c.iii, which reads as follows:
No navigation. You will not use the Service or Content for or in connection with (a) real time navigation or route guidance; or (b) automatic or autonomous vehicle control.

Technically to set up and run RTK I and failed, navigating a route, the same is not conducted. But just in case still I will specify, do not violate such actions terms of use.

image

I now bring the same system, but for connection, I use the radio channel and the nRF24L01+, you should get something more like RTK, but at a short distance. Article will write about it later.

Thank you for your attention!
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

ODBC Firebird, Postgresql, executing queries in Powershell

garage48 for the first time in Kiev!

The Ministry of communications wants to ban phones without GLONASS