Automatizing NTRIP RTK injection to Ardupilot

Hello everyone.

I want to automatize the process of connecting Ardupilot to an NTRIP caster.
When testing I used the Mission Planner’s RTK/GPS Inject tab to connect to an NTRIP mountpoint, and was able to have RTK Fixed/Float position data.
I want to do the same but utilizing MAVProxy or some custom script for the companion computer so when people shutdown the companion computer, when it is rebooted, have the NTRIP connection automatically (when internet is present).
Do you happen to know any way how to start impementing that?

Can we use mavinit.scr perhaps to tell MAVProxy what to do on startup?

Connection script would be something like this in MAVProxy’s ntrip module
module load ntrip
ntrip set caster rtk2go.com
ntrip set port 2101
ntrip set mountpoint KOVARIK
ntrip set username
ntrip set password none
ntrip start

1 Like

I guess I made it working with the SITL

image
Here I can see that the .mavinit.scr script is being executed by the launched MAVProxy, but I cannot really validate whether I get RTCM corrections since the SITL is always showing RTK Fixed in the Mission Planner. Is there a way to test whether the RTK injection is working?

Thank you

Connect it to a real vehicle?

Otherwise, check if there are GPS_RTCM_DATA MAVLink messages being sent.