RTK and Navio

This is a replacement thread, to be updated when RTK solutions are available for Navio RAW running APM.

1 Like


Thank you for making a replacement and sorry about lost posts. We have made required changes to APM and latest code in navio branch should work with RTK, but it has to be tested, we will try to get to it on monday and do a write-up on how to set everything up.

1 Like


I have my land rover set up and ready to test. Hoping for 1-2cm solutions on the fly in the field.

I am using long-range hi-power wifi as my telemetry link, mainly because it means one less RF component hanging off the electronics.

One interesting thing - it seems as if, if there is no PPM input to Navio (that is, no RC controller connected)… APMrover2 will not allow auto mode because of failsafe problems.

It might be better, although maybe a big job, to shut off the RC link and close the code-ends that depend on it, so as to allow you to receive telemetry through wifi (or whatever you are using), and send the equivalent of RC commands through the same link.


1 Like

About RC override over Wi-Fi guess this might be helpful http://copter.ardupilot.com/wiki/flying-with-a-joystickgamepad-instead-of-rc-controller/

Also you can disable rc failsafe in APM parameters.


It did not work the easy way and now we are working to make APM stream raw data to RTKLIB and make RTK GPS present as the second GPS unit. I will post further updates as we progress.

1 Like

That is how I was working on it. :slight_smile: I thought maybe I could plug all the RTKRCV code inside APMrover2 (or whatever), with the .conf file for RTKRCV telling the whole thing whether to send native GPS stuff from the GPS receiver, or to send RTK fix solutions.

1 Like

@timkaiser we are now able to send raw data from APM to RTKLIB and receive NMEA from RTKLIB on second GPS port. We developed it on Navio+, so hopefully it will work both for Navio+ and Navio Raw. After code cleanup and small bug fixes we will be able to give it to you for field testing. This will probably take several days more.

1 Like


I’ll be waiting anxiously haha.

Finishing the hardware attachments etc.

Any tips on setting up my rover with a PPM encoder? I have a SkyFly 6 channel transmitter/receiver and a PPM encoder - it looks like it is working well, although when APMrover2.elf is finished booting the rover takes off (or would, if it weren’t up on blocks)…Must be some failsafe configs not quite set right. Do you have a config file for MIssion Planner for your rover?


Maybe a bit off-topic. @timkaiser, can you tell me what do you use for your long range wifi setup ?


1 Like

An ENGenius ENS202 at the base, and a cheap chinese “hipower” USB adapter. Works for about 1km

1 Like

@igor.vereninov any luck on the RTK?



We’ve come up with little hacks for now to make RTK work.

These are the steps that I make to see the obs-count in rtkrcv tick.

  1. you need to clone our APM repo

git clone git@github.com:emlid/ardupilot.git

git clone git@github.com:emlid/RTKLIB.git or use our tutorial to download it

  1. Compile navio-raw-rtk branch

cd ardupilot/APMrover2
git checkout navio-raw-rtk

If you compile on RPI you just type make configure && make navio and you’re good to go!

To cross-compile refer to our tutorial

  1. Launch rtkrcv

cd ~/rtklib/bin-rpi

After rtkrcv's CLI has been launched, type several commands to it:

load rover-single-apm.conf
status 1

  1. Run APM

sudo ./ArduCopter.elf -A udp:<mavproxy ip>:14500 -E tcp:

-E tells APM to use second GPS.

For now we’ve implemented switch to second GPS right after it’s got 2D_FIX.

  1. obs() count in rtkrcv should be updated at 5Hz.

It’s been tested on NavIO+. I’ll test it on NavIO RAW as soon as I get an opportunity.
I believe it should work.

We’ve heard that APM is capable to track your position with cm accuracy. But mavlink uses float to send coordinated. Thus, only meter accuracy in GCS is achievable for now.

There’s some fuss about it right now. Take a look at this issue.

I’ll be glad to help you out anytime. And I’d really appreciate your feedback.

1 Like

Well, hmm.

OK. I looked at the rover-single-apm.conf file.

All that is happening is that APM is sending the GPS info out on the local tcp port (should be 12345), to RTKLIB. Which will allow RTKLIB to calculate an RTK fix when it is also getting the base corrections.

But how does the RTK fix get sent back to APM?

A few points:

  1. if you start APMrover2.elf without rtkrcv running, it generates a “connection refused” error. Even without the -E switch in the command line.

  2. The Navio RAW is not sending recognizable GPS data to rtkrcv over the loopback address port 12345.

  3. Are you sure you won’t give me a trade-in amount on the RAW for a new Navio+, so you don’t have to develop RTKLIB for both?

:smiley: :smiley: :smiley:


1 Like


APM will receive NMEA data from RTKLIB on port -E and see it as secondary GPS unit. Switch to secondary unit will happen when it has fix.

We will check what you have pointed out and I will PM you about Navio+ :smile:

1 Like


  1. This branch was developed to be used with RTKLIB. The error just says that it cannot find rtkrcv. It doesn’t affect other APM functionality.

  2. I’d be really grateful if you connected APM to u-center (it can be launched with wine, if you’re using a linux machine) to see what’s really being trasferred to rtkrcv. In order to do it you need

socat -d -d tcp-l:12345 tcp-l:12346
sudo sudo ./APMRover2.elf -A udp:<mavproxy ip>:14500 (without -E switch)

After that socat will be waiting for connection on

Run u-center.exe and connect to tcp:rpi-ip:12346 (The connection established in the top left corner menus. It’s not really hard to find, but feel free to ask!)

socat will respond to the connection from u-center with some debug info. Thus, you know the connection has been established.

In u-center you need to open Message Configuration and you will see the messages that would get transmitted from APM to rtkrcv (we sniff the data).

If you see the RXM-RAW and RXM-SFRB messaged, everything works as I’d wanted. These are sufficient for rtkrcv to tick obs() count.

If you don’t see anything, the problem might be in AP_HAL_Linux/LinuxSPIDriver.cpp. The wrong speed has been selected for NEO-6T. It might not be able to work @ 4Mhz like NEO-M8N. The only thing you need to change is Ublox’ speed. Try 400KHz.

1 Like


I just updated the repo. You can git pull the changes. If the speed was the issue, all problems will go away.


Made APMrover2 in the right branch.
Running rtkrcv…

And the GPS lock is good. :smiley:

Everything seems to be working… except for the “float” versus “int” problem (resolution). I will hook up my second raw receiver tomorrow as a base and hook it into RTK and see what kind of resolution I get.

Thanks guys! You are GREAT!

@timkaiser is this https://github.com/diydrones/ardupilot/issues/1907 the float / int problem you mention? According to LorenzMeier (who replied to this issue on github )this is an usage issue.


I hooked up my other raw receiver (base station for RTK, a Skytraq raw receiver)… configured it all, ran APM with the hacks… and it works pretty well. It is a cloudy day and I am inside, so I am not getting RTK “fix” solutions, but even with “single” solutions it is within 1 foot of being right (in relation to the base station - I don’t exactly know the coordinates of my base station to the mm, but that’s ok).

I wonder if we will get Mission Planner to display “RTK FIX” or “RTK FLOAT” instead of “3D Fix” on the GPS.

Now, once I get my Sabertooth 2x25 problem figured out, I will be out in the vineyard with this dude; first a flyover with the quad and IR camera… then image processing to see where the bugs are (all ready to go)… then send out the rover with the spray gun.


1 Like

Perfect. I am planing to use the navio+ on RTK on a research quad. I am looking to stream video and telemetry over 4G LTE… Looking forward to the write-up. Thank you for your innovation. I am looking forward to putting this to work.

1 Like