This wiki documents Piksi v2.3.1 which was discontinued April 1st, 2017.
Visit for newer products including Piksi Multi.

Integrating Piksi with the Pixhawk platform

From Swift Navigation Wiki
Jump to navigation Jump to search


This guide presents a step-by-step tutorial for integrating the Piksi v2.3.1 RTK GPS receiver as a secondary, high precision GPS unit aboard vehicles powered by the Pixhawk autopilot platform and Ardupilot firmware. This guide does not apply to integrating Piksi Multi with the Pixhawk system.

We recommend you use the standard ublox module as the primary GPS and Piksi as the secondary GPS on your vehicle. This provides the highest reliability and fail-over safety. ArduPilot will automatically switch to the GPS with the most accurate solution. In Piksi’s case, it will switch to Piksi's solution once it has a float or integer fixed RTK solution.

IMPORTANT NOTE: The driver will NOT function if the base station Piksi does not send its own surveyed position. Please see the Appendix at the end of this document for instructions in how to achieve this.


  1. Please first follow the Piksi User Getting Started Guide and read RTK Fundamentals before following this guide!
  2. Successfully complete a bench test of RTK Fixed positioning performance with two Piksi's connected to your computer.
  3. Only Pixhawk and similar flight controllers are compatible with Piksi. APM2.5/2.6 boards and older are unsupported.
  4. Flash an Ardupilot Firmware binary to your vehicle that meets one of the following criteria:
    • ArduCopter v3.3.1 or later
    • ArduPlane v3.4.0 or later
    • ArduRover v2.5 or later
    It is NOT necessary to build Ardupilot firmware from source. ArduPilot firmware includes a driver for Piksi.

System Overview

To acheive RTK position solutions, the vehicle's Piksi needs to receive GPS Observations from a ground station Piksi, and the ground station Piksi's location must be known as accurately as possible. This guide expects a stationary Piksi to supply these observations to the vehicle Piksi using the provided radio modules. Additionally, it expects a telemetry link from the ground station to the vehicle to transmit flight data.

This diagram outlines all the components and their connections necessary to use Piksi for centimeter-precise positioning of an ArduPilot vehicle.

Dedicated Radio Layout.jpg

On the Ground Station:

  1. The stationary Piksi produces a stream of GPS Observations and its stationary position in the form of Swift Binary Protocol (SBP) Messages.
  2. The Piksi radio transmits SPB data to the vehicle piksi.
  3. The Ground Station Computer runs the Piksi Console. This reads the stationary Piksi's SBP messages, provides the user with status information, and allow the user to make changes to the system.
  4. The GCS provides all the standard ground station functions (such as mapping, configuration, and control) and allows the user to monitor the vehicle Piksi status.
  5. The vehicle telemetry radio transmits and receives MAVLink messages.

Onboard the Vehicle:

  1. The vehicle Piksi receives SBP messages through Piksi radio.
  2. The Vehicle Piksi calculates its RTK Position as a centimeter-accurate vector from the ground station. Next, it calculates its pseudo-absolute position as the received ground station position plus this centimeter-accurate RTK vector.
  3. The Vehicle Piksi reports its pseudo-absolute position to the Pixhawk.
  4. The Pixhawk receives the MAVLink data stream through the telemetry radio and transmits back the flight data such as attitude and status.
  5. The UboxGPS provides the Pixhawk with GPS data if the Piksi can’t. It also provides magnetometer data used for heading.

One-time Hardware Setup


  1. Install Piksi on your vehicle with the following important factors in mind:
    • We recommend installing a high-gain external GPS antenna.
    • The GPS antenna needs a clear view of the sky.
    • Install a ground plane for the GPS antenna.
    • Adequately shield both Piksi and its GPS antenna from other electronics on your vehicle. See #Piksi mechanical installation tips
  2. Connect UART B from the Piksi to the Serial 4/5 picoblade connector on the Pixhawk.
    • A cable for this connection is available from the Swift Navigation webstore
    • Piksi to Pixhawk cable is long with blue and red wires.Both cables .jpg
    • If your kit came with a 3DR radio, there will be a cable with the same connectors as the Piksi/Pixhawk cable. DO NOT use the provided short cord with a BLACK wire. That cable is for connecting the 3DR radio to the Piksi.
    • You can alternatively make your own cable according to this diagram.
  3. Connect UART A from the Piksi to the radio with the provided cable.
  4. Keep the standard ublox or similar GPS plugged into the GPS port on the Pixhawk, as the primary GPS sensor.

Ground Station

In order to achieve RTK position solutions, the vehicle's Piksi needs to receive information from a stationary Piksi. The stationary Piksi relays observations over radio to the vehicle's Piksi.

  1. Connect the ground station Piksi to the ground station computer via the micro USB connection.
  2. Use the provided radio cable to connect UART A from the Piksi to the radio.
  3. Mount an antenna for the Piksi acting as a ground station.
    • It is important that ground station antenna have clear sky view.
    • This antenna should have a ground plane.
    • For best results mount this antenna on a pole or tripod at least 6ft from the ground and away from any obstacles.

One-time Vehicle Software Setup

Vehicle's Pixhawk

  1. Ensure your vehicle's Pixhawk is loaded with Ardupilot Firmware that is later than the versions in the #Prerequisites.
  2. The two sets of radio should be set to different frequencies to decrease the interference amongst them. Out of the available bands, about half should be allocated to the telemetry link, about half should be give to Piksi link and a small band should be left between them. This step helps reduce interference between the two radio links. The upper and lower frequency limits of the telemetry radios can be changed using Mission Planner. Refer to this guide to learn how to make those changes. PLEASE refer to your local transmission laws before using the provided radios.
  3. Configure the following ArduPilot parameters using your ground station software:
  4. Param Value Notes
    GPS_TYPE2 1 Auto protocol discovery mode
    SERIAL4_BAUD 115 Baud rate of 115200
    GPS_SBP_LOGMASK* -1 All messages logged*
    GPS_AUTO_SWITCH** 0 Switch to GPS reporting best fix for vehicle control.**

* -1 as a signed integer corresponds to binary 0xFFFF, which means all SBP messages received will be logged to the dataflash logs

** If using Piksi for logging and/or geotagging only, GPS_AUTO_SWITCH should remain 0. If using Piksi as part of feedback system for vehicle control, GPS_AUTO_SWITCH should be set to 1.

Vehicle's Piksi

  1. Connect your computer to the vehicle Piksi's USB port.
  2. Configure the vehicle Piksi with the following settings using the Piksi Console. Settings are controlled through the "Settings" tab of the console software. Make sure to press the 'save to flash' button on the console in order to make the settings persistent.
  3. Section Setting Value Notes
    UART B sbp message mask 65280
    UART A baudrate 57600
    solution soln freq 5 (5 solutions per second)
    solution output every n obs 1
    telemetry configuration string AT&F,ATS1=57,ATS2=64,ATS3=50,ATS5=0,AT&W,ATZ Sets the NetID of radio to 50 (from default of 25)*

    *Radio settings do not take effect until Piksi is rebooted or power cycled. Ensure that the Piksi radio units (both the vehicle piksi and ground station radios) have a different Net-ID than the mavlink telemetry radios. To learn more about AT commands and how to change Net-ID refer to this SiK manual for more information.

  4. Verify that the vehicle Piksi can communicate with the Pixhawk.
    1. Mission Planner
      1. In the status tab, verify that GPSSTATUS2 is 1 or higher. 0 means no communication.
    2. MavProxy / APM Planner
      1. Open a terminal to your vehicle.
        • MAVProxy shows the terminal as its command line by default.
      2. Hit the hardware RESET button on Piksi
      3. If configured correctly, when the Piksi boots up while connected to the Pixhawk, ArduPilot will report the Debug message:
        "SBP AP_GPS_SBP:64: SBP Driver Initialized"

One-time Ground Station Software Setup

Piksi (Ground Station) Setup

  1. Determine the ground station antenna location as accurately as possible.
    • The vehicle determines a centimeter-accurate global position relative to the ground station antenna's location.
    • If you cannot determine the ground station's position very accurately, your vehicle will still have centimeter-precise positioning, but will have a constant offset against its true accurate global position. This is sufficient for many applications.
  2. Configure the settings of your ground station Piksi using the Piksi Console with the following values:
    Section Setting Value Notes
    Surveyed Position latitude <determine this value> This value must be as accurate as possible
    Surveyed Position longitude <determine this value> This value must be as accurate as possible
    Surveyed Position altitude <determine this value> This value must be as accurate as possible
    Surveyed Position Broadcast True
    solution soln freq 5hz
    solution output every n obs 1
    sbp obs message max size 102
    UART A baudrate 57600
    telemetry configuration string AT&F,ATS1=57,ATS2=64,ATS3=50,ATS5=0,AT&W,ATZ Sets the NetID of radio to 50 (from default of 25)*

*Radio settings do not take effect until Piksi is rebooted or power cycled. Ensure that the Piksi radio units (both the vehicle piksi and ground station radios) have a different Net-ID than the mavlink telemetry radios. To learn more about AT commands and how to change Net-ID refer to this SiK manual for more information.

Using the Piksi-Pixhawk System for Accurate Flight

Power the base Piksi using a laptop or other source of power. Power the copter with the flight battery.

Expected Vehicle Behavior

Confirm that red light is blinking on vehicle Piksi. It shows that GPS observations are being received from the ground station Piksi !

  • The vehicle will use ublox until piksi gets a float/fixed RTK fix
  • GPS STATUS2 will report DGPS or RTK fix (level 4, 5) in your GCS when piksi obtains a solution.
    • The HUD in Mission Planner only shows GPS1 Status
    • To see Piksi's status, click the "status" tab and find "GPS2 STATUS". The value should be 4 or 5 for float or fixed.
  • Initially the float filter jumps around a lot, this can trigger many gps glitch messages in arducopter. We will be working to improve this.
  • Once in RTK Fixed, take off!


Piksi Mechanical Installation Tips

The Piksi requires an external antenna such as the one provided with Piksi development kits. There are many ways to mount the antenna to typical vehicles, but it is very important to adhere to these principles.

  • Mount GPS antenna as far as possible from other RF devices:
  • Install the Piksi with a ground plane
    • The ground plane should be at least 4" x 4".
    • wrapping a structural component with Triple layer copper tape has worked succesfully for users
    • Either use, or model your ground plane after the aluminum ground plane supplied with your Piksi kit
  • Mount the Piksi with double-sided foam pads or similar damping material to reduce vibrations.
  • Mount the Piksi antenna flush with the ground plane on a high point of your vehicle. The images below may help as a guide for the mechanical installation of your antenna and Piksi.
  • Make sure to remove any magnets from the antenna if it includes a magnet. The magnet will interfere with compass sensors on the aircraft.
    Top copter.JPG
    Side copter.jpgFoam mount.jpg

Determining Coordinates for Base Station

RTK GPS provides a "pseudo-absolute" position: a centimeter-accurate position relative to the arbirarily-accurate ground station positon. Many applications don't require an extremely accurate ground station location, caring only about positioning relative to a known fixed point. For example, accurate landings and takeoffs, or logging accurate relative locations of pictures.

As the user, you need to determine your ground station location. The driver will not function without a reasonably accurate (<100ft) surveyed position entered in the ground station. You have several approaches to doing this:

  • A simple, relatively inaccurate approach is to simply read the values from the "Solution" tab of the ground station Piksi's console. This is standard GPS multi-meter accurate
  • If you want to line up your global position to Google Maps, you can locate your ground station on a Google Map and get the specific lat-lon-alt location of that point.

Alternate Radio Setup

Rather than using a dedicated set of radios to send observation from the ground station Piksi to the vehicle's Piksi, it is also possible to inject Piksi on the main telemetry stream through Mission Planner or APM Planner. Follow this guideAlternate Radio Setup (Send SBP over UDP) .