ArduPilot simpleRTK2B+heading configuration

Ardupilot yaw

Looking at the official Ardupilot forum we found many users having problems configuring their simpleRTK2B+heading kit with their ArduPlane / ArduCopter / ArduRover software.
After some testing we prepared this tutorial to make the process easier.

If you plan to send RTK corrections from your ground control station to your simpleRTK2B+heading kit, please read this other tutorial

Important things before start:

  • This tutorial is based on the simpleRTK2B+heading Basic Starter Kit, if you have a different hardware you may need to apply some changes in this tutorial.
    We have prepared another tutorial for the simpleRTK3B Heading.
  • The configurations files (see Step 2 and Step 3) for the GNSS receivers will set them at an output rate of 10Hz, with UBX-RELPOSNED and UBX-PVT sent to the autopilot.
  • simpleRTK2B (big board) acts as a rover in the moving base configuration
  • simpleRTK2Blite (small board) acts as a base in the moving base configuration
  • We have validated the tutorial with these autopilots:
    • Holybro Pixhawk4
    • mRo Pixhawk Flight Controller (aka Pixhawk 1)
  • We have validated the tutorial with these firmware versions:
    • ArduRover 4.1.0-dev
    • ArduCopter 4.1.0-dev
    • ArduPlane 4.1.0-dev
  • Ardupilot programmers introduced restrictive conditions to let your autopilot use GNSS based heading, here a few of them:
    • You need good RTK fix so it is mandatory to place both antennas in a good location (outdoors, no trees, no high buildings around).
      If you try to follow this tutorial inside your house with the antennas close to your window, it will not work.
    • Place both antennas away from each other (distance between antennas should be >30cm and <5m).
      If you place the antennas next to each other, it will not work.
      Place the antennas in the X axis of your rover (forward direction). You can change this later.
    • Place both antennas in a plane parallel to your autopilot plane (i.e. if your autopilot is horizontal, place both antennas at the same height above ground).
      If the antennas are not placed at the same height level with respect your plane/rover/copter you will need to set the parameter GPS_POS1_Z, otherwise it will not work
  • Do not connect the GNSS receivers with the autopilot yet, we will configure everything independently and connect everything afterwards

Step 1: load simpleRTK2B (aka big board) configuration

  • Connect the simpleRTK2B to your PC via the POWER+GPS microUSB connector
  • Run u-center and connect to the receivers
  • Go to Tools > Receiver Configuration … > Select configuration file simpleRTK2B_FW113_HeadingKit_Rover_10Hz_Ardupilot.txt
  • Click Transfer file -> GNSS
  • Go to View > Messages View > UBX > CFG > CFG > Select Save current configuration and click Send button

Step 2: load simpleRTK2Blite (aka small board) configuration

  • Make sure the simpleRTK2Blite board is mounted on top of the simpleRTK2B board
  • Connect the simpleRTK2Blite to your PC via the POWER+XBEE microUSB connector
  • Run u-center and connect to the receivers
  • Go to Tools > Receiver Configuration … > Select configuration file  simpleRTK2B_FW113_HeadingKit_MovingBase_10Hz_Ardupilot.txt
  • Click Transfer file -> GNSS
  • Go to View > Messages View > UBX > CFG > CFG > Select Save current configuration and click Send button

Step 3: load ArduPilot configuration file
Since the firmware versions may be different to yours, here is a list of all the parameters modified with respect to the default configuration:

GPS_POS1_X,-1.25 *This value must contain the distance in meters between antennas. Change sign if heading has a 180deg offset (or swap SMA connectors in simpleRTK2B+heading).

Step 4: reset your autopilot

  • After saving all the parameters make sure you remove the power from your autopilot

Step 5: connect the heading kit to your autopilot

  • Use the JST connector on the simpleRTK2B (big board) and connect it to the Telem1 port.
  • Power the autopilot and check the AHRS heading value, it should match the direction between your antennas.
  • As an additional check to see if it is working, the heading value of the AHRS should be the same as the one in CTRL+F > MAVlink inspector > GPS2_RAW > yaw
  • Notice that the EKF will take into account the gyroscope readings so if you turn the autopilot without turning the whole vehicle frame where the antennas are mounted the heading will change, although after a few seconds it will go back to the GNSS calculated heading.
Ardupilot ardusimple heading check

Again, remember if:

  • Fix type is not RTK fix
  • Antenna distance is not within 20% of the GPS1_POS_X parameter
  • Autopilot attitude does not match antenna height difference

The GNSS based yaw will not work properly.

If you liked this content, you can follow us on Twitter, YouTube, Facebook or LinkedIn to stay updated of content like this.

Want to learn more about GPS/RTK?

1. Our engineering team will contact you to solve any questions
2. We will keep you updated about promotions and new product releases
3.You will only hear from us when we have important news, we won’t spam your email