GPS Blending (aka Dual GPS)¶
Copter 3.5 (and higher), Plane 3.8.0 (and higher) and recent versions of Rover all support GPS Blending. Using two GPSs reduces the chance of glitches affecting the vehicle.
Two GPSs should not be used on Copter-3.4.5 (and older) firmwares because of the risk of sudden vehicle movements when the primary GPS changes.
Only GPSs that report position and speed accuracy can be used for blending. All UBlox GPSs provide this extra information while GPSs using the NMEA protocol generally do not.
Normally blending should be done with two GPSs from the same manufacturer because the scaling of the accuracy numbers varies and will lead to favouring one GPS over the other.
Setup through the Ground Station¶
- SERIAL4_PROTOCOL = 5 / “GPS”. Alternatively telemetry port 1 or 2 can be used by setting SERIAL1_PROTOCOL or SERIAL2_PROTOCOL to 5.
- GPS_TYPE2 = 1 / “AUTO” or the specific number corresponding to the type of GPS
- GPS_AUTO_SWITCH = 2 / “Blend”. Alternatively set to 1 / “UseBest” to only use the better GPS. The better GPS is decided based on the GPS’s self reported accuracy.
After rebooting the board, the status, hdop and satellite count of both GPSs should be visible.
The first GPS’s data appears in the GPS and GPA messages. The second GPS’s data appears in the GPS2 and GPA2 messages. The blended GPS data appears in the GPSB and GPAB messages.
If using the Mission Planner, opening a dataflash log and clicking on “Show Map” will show both GPSs, the blended position and the EKF’s final estimate (shown as “POS”)
Video of a heavily loaded IRIS using Blended GPS, optical flow and a lidar range finder