How can Raspberry PI receive RTK corrections over the internet and forwart them to Pixhawk?

I have a rover with a Pixhawk4 running Ardurover 3.5.1 with an Ardusimple RTK gps board. I have successfully used Mission Planner (running on a windows ground control computer) to receive and inject RTK messages which get sent over the 900 mhz radios to the rover. My Ardusimple is running in RTK Float and RTK Fixed modes.

To get the ground control computer out of the equation (at least for the RTK corrections), I put a Raspberry PI onboard the rover. RPi is talking to the Pixhawk4 as per http://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html.

The RPi has its own internet connection (through a Huawei 3372 USB stick and a Google FI data-only SIM card; worked flawlessly on the first try!).

So my question (@stephendade ?) is, how is the best way to run an NTRIP client on the RPi that will connect over the internet to the NTRIP server, receive corrections from that server, and forward them (presumably using some mavlink feature) to the Pixhawk? Is this already coded up in Mavlink? Or, do I need to run an NTRIP client on the RPi that somehow sends the corrections to mavproxy running on the RPi which in turn forwards the corrections to the Pixhawk4?

Thanks in advance for any pointers in the right direction…

Chris

1 Like

MAVProxy has the DGPS module which may work grabbing the NTRIP data and forwarding it to the Pixhawk.

[I’ve not used the DGPS module in some time, so not 100% sure if it’ll work with your particular NTRIP server]

1 Like

Hello everyone,

We are trying to achieve a similar implementation so after a small research this topic came up to me. Is there any update you would like to share?

Thanks in advance.

this is how we do it:

git clone https://github.com/tomojitakasu/RTKLIB.git --branch rtklib_2.4.3

cd RTKLIB/app/str2str/gcc

make

./str2str -in ntrip://USER:PASSWORD@CORS_IP:2101/MOUNT_POINT -b 1 -out serial://ttyAMA1:115200:8:n:1

I have my F9 connected to pixhawk trough serial one of the gps module and send corretion to the serial 2 of the gps module. Serial 2 of the module has NMEA and RTCM 3 enabled. Serial 2 of the module is connected to serial 2 of the raspberry (ttyAMA1).

I also made a service so that correction starts when raspberry starts and i can start, stop and look at the status of it. If you know how to make a service on raspberry it is really simple, just start the software as described above (./str2str -in ntrip…)

Hope it is clear enough, if you need more infos please ask.

Hi,

I’m trying to make exactly the same : provide the RCTM3 frame by a RPI and Mobile connexion (so, without Mission planer).

But I’m not sure about the architecture : where I need to send the RTCM3 frame : to the pixhawk or to the F9P GPS Module ?

It is written in my previous post, read it.

More discussion here: ArduRover + PixHawk + GPS RTK WITHOUT telemtry : 4G connexion - #3 by myozone

Here is the solution that works for me. I am running mavproxy on my companion computer (RPi) and using the ntrip module in mavproxy. The mavproxy NTrip module connects to an ntrip server (I use rtk2go.com) to source the corrections and forwards them to the Pixhawk4 (which forwards them to the GPS). I use rtk2go.com to host my own stream and I also use another nearby stream. I have noticed a difference in accuracy depending on how far away the correction source is. Somewhere I read about 1cm accuracy per km distant to the correction source.

I did edit the ntrip mavproxy model code quite a bit; at this point while I have a working version I’m not sure that the version in the public repository works.

1 Like

It is aprox. 1 cm per 10Km

1 Like

Excuse me and I wanted to ask a related topic… there is a part of the architecture that is not clear to me… I leave you my configuration, I have a rover with a pixhawk 6c, where I have connected a GPS RTK from the same manufacturer through port GPS1 In the telemetry port 1 I have a telemetry module connected to be able to connect from the laptop, in turn in the telemetry port 2 it is connected to a BeagleBone Black (BBB) to have a MapLink connection and this board connected by 4G to the internet, So from the internet I can send you missions and other things. The RTK data injection module, where I put them on the BBB board running as a service and send it to the Telemtria 2 connection or I have to put another exclusive connection by Telemtria 3 to the Pixhawk. I have noticed that using the str2str procedure blocks the connection that goes from the BBB to the pixhawk and I cannot send more commands to it. Or do I have to use the MAVproxy solution and ntrip service for the connection between pixhawk (telem2) and BBB, can I also send other mavlink2 commands through this same port?
Or the best solution is to have telem2 port for mavlink2 commands, and telem3 also connected to BBB for MAVProxy commands for NTRIP?
Let’s see if you can give me a cable or give me light, thanks
A smile

I think you have to run MAVProxy on the BBB. Then between the BBB and the Pixhawk 6c you have a single cable, and MAVProxy on the BBB talks to the 6c over that cable. Then, MAVProxy on the BBB connects to a RTK correction service (over the internet) using the ntrip module. The MAVProxy ntrip module receives incoming corrections and routes them to the 6c. At least if I understand your configuration correctly, this is what I would recommend.

Thank you very much for the answer at the end it is just what I have done and I am very happy, it works really well and I am resending the RTCM packets to my Pixhawk with Gps RTk from an RTK base that I have made.

A smile to all.

1 Like

Hi Christopher,

Can you share more info about your approach? I am also using rtk2go and I want to send the correction directly to my pixhawk. I already tried the DGPS from mavproxy and event their implementation to send the package directly using mavlink but I got no feedback or change of status when checking mission planner. Would you have any idea what I am missing?

Thank you