Setup Options for Dual GPS

Hi all -

I have a couple of questions of different configurations for dual GPS units. Running ArduCopter v3.6.8 on a Pixracer. I have the baseline GPS that came with the autopilot (uBlox) and an RTK Piksi Multi. I do not want to blend the GPS units. I’m looking at two different configurations.

First, I’d like to setup the Piksi so I can log data and check its operation without it being used in any of the GNC loops. The ublox GPS is used for GNC. In this setup I have:

  • Pikis connected to Serial 2 - this should make the Piksi “GPS 1”
  • ublox connected to Serial 3 (GPS + mag) - this should make the ublox “GPS 2”
  • GPS_AUTO_SWITCH = 3 (use second GPS)

In the second setup, after confirming the Pikis is functioning properly, I want to set the Piksi as the active GPS. The settings should be (I think):

  • Pikis connected to Serial 2 - this should make the Piksi “GPS 1”
  • ublox connected to Serial 3 (GPS + mag) - this should make the ublox “GPS 2”
  • GPS_AUTO_SWITCH = 0 (disabled)

I think these settings will make the Piksi (GPS 1) active w/o using GPS 2. Is that correct? Will the external magnetometer coming in on Serial 3 still be used?


  • Jared
1 Like

Have you read the arducopter wiki about using dual GPS? Using two different models is not recommended

###We recommend using two GPSs from the same manufacturer because the reported accuracies from different manufacturers might not be compatible leading to a non-optimal blend.###

You will also need to change your parameters, or at least verify that they are set to the setup you want:

###Connect a second GPS to an available Serial port (like Serial 4/5) and then set these parameters:

  • SERIAL4_PROTOCOL = 5 (replace the “4” with “1” or “2” if the 2nd GPS is connected to Telem1 or 2)
  • GPS_TYPE2 = 1 (to enable automatic detection of the 2nd GPS)
  • GPS_AUTO_SWITCH = 2 (to enable Blending) or 1 to use the existing logic which uses only one GPS at a time###

Yes, I have read the wiki which is why I indicated I am not trying to blend the GPS units. I’ve also read a lot of the posts on the forum but did not find anything that addressed my specific questions.

Ultimately, I would like to remove the ublox GPS and use the Piksi unit, but I’ve had some issues with getting the Piksi to work properly and get an RTK lock. This is why I’d like to have the two different scenarios I described in my first message.

Wouldn’t the above suggest use of GPS_AUTO_SWITCH=1 (use best), at least until you’re sure they both work?

Setting GPS_AUTO_SWITCH = 1 is definitely an option but for my testing it introduces another element/complexity into the test matrix. I don’t know which GPS is being used during the flight and I wanted to set this. Since I know the ublox works, flying with it active and the Piksi dormant but logging data, was the route I took.

I was able to fly with the settings from my original message and for anyone that could benefit, everything went smoothly and those settings are correct. Particularly, GPS_AUTO_SWITCH = 3 does use GPS2 (ublox for me) and allows you to monitor and record information from GPS1 (Piksi for my test). There was some uncertainty on my part on this setting because it’s not listed in Mission Planner but is listed in the complete parameter list page. The only “tricky” thing I noticed is in Mission Planner display it will indicate “GPS 3D” (or similar) if either GPS1 or 2 has a lock even if you are only using one of the GPS units in the control loops. It’s good to monitor the gps status using the Tuning feature in this case.

After some discussion with the manufacturer of the Piksi, driver updates, and changing settings in the SiK radios, the Piksi operated very well and showed very good performance. I flew two waypoint missions and had the vehicle perform RTL to launch. In both tests, the vehicle landing within one or two inches from the takeoff location.