Servers by jDrones

Mavproxy Module Ntrip


I have MavProxy running on a Raspberry Pi 3 as a companion computer to my ardupilot flight controller (Mrobotics Rev2). My Raspberry Pi 3 also has an internet connection. I want to use the Ntrip module to enable RTK via internet for my rover platform and not needing a local base station. I noticed has free Ntrip Client connectivity so I wanted to connect to there. How are you able to get the Ntrip module to work in mavproxy? It’s been hard to find documentation or an example to go on. I loaded the module via command line module load ntrip but I am not sure what to do from there such as adding/pointing to the Ntrip service.


If the normal mavpxroxy ntrip module does not work for you you may want to try my mavproxy RTK injection module. It`s on a github PR. But you will need to compile it from source.

I am currently trying to use the normal mavproxy ntrip module with the following settings
HOLD> caster
logfile None
mountpoint DETROIT_RTCM3-GG
password test
port 2101
username test

When I start the Ntrip Module I get the following when I type ntrip status
HOLD> ntrip status
HOLD> 1004: 3 (len 186)
1008: 1 (len 26)
1012: 3 (len 128)
1033: 1 (len 57)
1230: 1 (len 18)
ntrip: 9 packets, 67.0 bytes/sec last 0.3s ago framesize 415
ntrip status
HOLD> 1004: 10 (len 186)
1006: 2 (len 27)
1008: 2 (len 26)
1012: 10 (len 128)
1033: 2 (len 57)
1230: 2 (len 18)
ntrip: 28 packets, 145.6 bytes/sec last 0.1s ago framesize 442
ntrip status
HOLD> 1004: 20 (len 186)
1006: 4 (len 27)
1008: 4 (len 26)
1012: 20 (len 128)
1033: 4 (len 57)
1230: 4 (len 18)
ntrip: 56 packets, 263.1 bytes/sec last 0.6s ago framesize 442

What do these statuses mean and how do I know if my gps is now in RTK? If I keep checking Ntrip status the packets keep increasing (which I assume is good).
In QGroundControl the GPS Status only says 3D lock not rtk. Also the NTRIP public caster that I am connecting to is about 400 miles away. It is the closest, not sure if that is why it is not going into rtk mode.

@Christopher_Milner (tagging you in this as I have seen you have had success with the ntrip module in other posts) Thanks!

The status info gives you the the count of each RTCM message type received. If you wan to know what each one is you can look it up here:
I have high end, high gain antennas and I can get an rtk fix from base stations up to 100 miles away. I do notice an increase time to fix and less accuracy with distance. RTK requires that the base station and rover have visibility of the same satellites in order to calculate a solution. I do not think that 400 miles is useful baseline distance.

I am using this gps module
I found a closer Ntrip base Station that is about 60mi away. However the GPS still is not going into a rtk fix mode. The best that I got was 3d DGPS lock. However, I can get a 3d DGPS lock without the correction data streaming from Mavproxy. Is there a way to check to see if the data is being sent to the GPS unit?

M8N modules do not support RTK. If you want to stick with an Mro product you would need the ZED-F9

Do you have a link for it? i would like to try it because ntrip module for me doesn’t work (it crashes after few minutes).

@brove I’m using ZED-F9Ps from sparkfun and ardusimple. I’m running ntrip and mavproxy on a companion computer (Raspberry Pi) that’s on my rover and directly connected to the autopilot. The companion computer is connected to the internet via a 4g/LTE USB modem. Connecting ntrip to the snip server at I set up my own base station that pushes corrections to the rtk2go server. It’s working very reliably. Once you upgrade to a GPS that supports RTK, let me know if you still have questions.

I finally got it working. Thank you. Do you happen to know how the RTCM corrections are being streamed to the flight controller? Meaning, are the corrections just passing through the flight controller and straight into the GPS or is the flight controller altering/formatting the data in some way before sending to the GPS?

If the RTCM messages are too large, MAVProxy breaks the messages up into multiple GPS_INJECT_DATA messages.

Aside from that, Ardurover passes the messages straight through.

GPS_INJECT_TO controls which GPS ardurover sends the corrections to.

Would you happen to know how to inject the RTCM messages directly into the RTK GPS? I posted more details on StackOverflow.

I am using the and files from MAVProxy. I can run the file fine on my desktop and on a Raspberry PI and see the data packets coming in but I am not sure how to forward that data (or where in the script) to the GPS that is hooked up via serial port on the RPI

I use str2str from rtklib for this task. It has an ntrip client and can output to serial.

In my configuration, for my (fixed, stationary) base, I have an RPi connected to the Sparkfun ZED-F9P (ZED-F9P’s UART connected to the Pi’s USB port with a USB-to-serial converter). Then, I run str2str on the RPi and it collects the RTCM messages and forwards them to rtk2go’s ntrip caster (stream name is SandySpringMD in the table here - str2str has native ntrip support. Then on my rovers I use mavproxy’s ntrip module (ntrip client) to connect to the rtkgo server to source the RTCM data, and forward the data to the Ardurover software.

Servers by jDrones