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

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…


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 --branch rtklib_2.4.3

cd RTKLIB/app/str2str/gcc


./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.


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 to source the corrections and forwards them to the Pixhawk4 (which forwards them to the GPS). I use 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