# Skynet Viper ‘ M ’ Series UAV

Skynet Remote Systems LLC. 880 N. Vanguard St.
McPherson KS 67460
316

- 847

- 8809 www.skynetuavs.com

# Setup for Plane

Assembly

This section contains the wiring instructions for assembling the flight controller and other essential
components of Plane (for several flight controllers):



### Mounting the flight controller This article explains how to mount the flight controller (Pixhawk, PX4, APM2) in standard and
alternative orientations.

Standard orientation
The Fl ight Controller (Pixhawk, PX4, APM2) should be mounted with the white arrow pointing directly
towards the front of the vehicle. It should be placed close to the center of gravity of the vehicle (both horizontally and vertically). Generally this means it s hould be placed within a few centimeters of the middle of the vehicle
and level with the motors. It is not critical that it is placed exactly at the middle but closer is better (there are no recorded cases of problems caused by the cont roller being far fr om the center of gravity). The board should be attached to the frame using 4 cubes of vibration dampening foam approximately 3/4 inch square (3DR

- supplied Pixhawk’s come with foam cubes made by 3M ).

Ti p: Vibration dampening foam is a simple and effective mechanism for vibration control. If Measuring
Vibration shows that it is not sufficient, alternative mechanisms are discussed in Vibration Damping

.

Alternative orientations
If the standar d orientation of the Pixhawk is not convenie nt, it can be mounted in over 30 other possible
orientations. The full list of possible orientations can be seen and set through the Mission Planner Config/Tuning | Advanced Param eter screen, look for the Board Orientation (AHRS_ORIENTATION) parameter. F or Roll values, positive means roll right (i.e. “Roll90” means board is rolled right 90 degrees so the white arrow still points forward but the board is standing on its right edge).For Pitch values, positive numbers indicate pitch back (i.e. “Pitch90” mea ns the board’s nose is pitched

up 90 degrees so the arrow points directly up) For Yaw values, positive numbers indicate the nose of the board is rotated clockwise (i.e. “Yaw90” means board is rotated so white arrow points off to the right).



### Pixhaw k wiring quick start

Warning: Do not connect any servos to the direct PWM outputs of your receiver. The RCIN port on the Pixhawk is designed for low power devices only, and a servo may draw a lot of current when moving rapidly. If you connect a servo dir ectly onto your receiver while the receiver is powered from the RCIN port of your Pixhawk you may damage your Pixhawk.

### Pixhawk Wiring Chart

### Power Pixhawk

Pixhawk is typically powered via its “power” port, as shown in the picture below. The

powe r port simultaneously powers Pixhawk and reads voltage and current analog measurements produced by an optional power module. Information about powering the Pixhawk can be found in the topic powering the Pixhawk

.

Connect remote control inputs Pixhawk is compatible with PPM remote control (RC) receivers, Futaba S.Bus receivers, and Spektrum DSM,DSM2, and DSM

- X Satellite receivers. F or traditional single

- wire

per

- channel (PWM) receivers a PPM encoder can be used to convert the receiver outputs
to PPM

- SUM. Information about compatible receivers and how they are connected can
be found in Compatible RC Transmitter and Receiver Systems (Pixhawk/PX4)

.

FRSky Taranis Transmitter Connect buzzer and safety switch
The buzzer and safety switch button are mandatory for Pixhawk. Connect to the BUZZER and SWITCH ports as shown.

### Warning:

Mount the beeper is at least 5cm away from the flight controller or the noise may upset
the accelerometers. 3DR GPS+Compass
The 3DR UBlox GPS + Compass Module is the recommend ed GPS for Pixhawk. The GPS ports are connected with the six

- position DF13 cable, and t he MAG port is connected to the I2C port with the four

- position DF13 cable.

3DR UBlox GPS + Compass Module The topic 3DR UBlox GPS + Compass Module shows how to connect to Pixhawk and include additional configuration and mounting information.
Connect Motors

### Plane:

For planes connect the control channel wires to the main output signa l pins:

 

### Pin 1 = Aileron

 

### Pin 2 = Elevator

 

### Pin 3 = Throttle

 

### Pin 4 = Rudder Connect other peripherals Depending on your hardware there may be any number of other peripherals attached, including sensors, cameras, grippers etc. These can be found as sub

- pages o f the topic Optional Hardware

. Information about connecting these peripherals to Pixhawk is found in the respective

pages.

Powering the Pixhawk

Overview For most users powering the Pixhawk is as simple as connecting the 6

- pin DF13 cable from the 3DR power module into the Pixhawk’s “Power” port as shown below.

Pixhawk Power Port This will provide a steady 5V and allow the Pixhawk to measure the current and voltage of the main battery. The power module can be used with 3S or 4S batteries (i.e. up to 18V) and 90amps of power (most multic opters draw less than 20amps when hovering and rarely consume more than 90amps at full throttle).Other voltage/current measurement devices such as an Attopilot can be used in place of the 3DR Power

Module. Warning:
Pixhawk does not supply power to the ser vo rail. Powering the servo rails is normally done by an ESC or alternatively a separate source such as a BEC (as shown in the wiring overview below ). Powering/backup off the servo rail Pixhawk can be powered off the servo rail instead of from a power module. This is achieved by connecting a 5V BEC (with or without a servo) to a power (+) pin and a ground (

- ) pin of the “MAIN
OUT” or “AUX OUT” pins. You must also add a Zener diode (part number 1N5339) to condition the power across the rail and restrict it to less than 5.7V.

This method can also be used as backup power for Pixhawk when using a power module. If the voltage provided by the power module falls too low (4V?), Pixhawk will take power from the output rail. See the voltage ratings section below for more information on powering Pixhawk. Warning: At any voltage above 5.7V the servo rail cannot be used to power the Pixhawk and the Zener d iode must not be used . The servo rail can supply servos requiring up to 10.5V (but not also power the Pixhawk). Pixhawk Power/ESC Wiring Overview The block diagram below synthesizes an overview of Pixhawk’s power and ESC wiring. In this diagram, a 3DR powe r module (or equivalent device) powers Pixhawk through its power port (primary source). One power source is enough but obviously not redundant if the power module fails to power this primary source. Therefore the diagram adds a second backup power source v ia a 5V BEC that wires to Pixhawk’s output servo rail. If the primary source fails, Pixhawk will automatically switch to this second power

source.

Pixhawk Power/ESC Wiring Overview Diagram acronyms:

 PDB = Power Distribution Board. PM = pixhawk power po rt.

 PM/Atto = optional power module from 3DR or Attopilot alternative for higher than 4S battery voltages.
Note: Looking for a detailed explanation of power wiring with Pixhawk? Click here for more information about connecting ESCs and servos to Pixhawk. General wiring recommendations

 Always connect a ground reference wire with your ESC’s signal wires on the Pixhawk servo rail (output ports 1

- 8). Indeed an ESC’s signal wire should never be left floating without its ground reference (THERE IS NO SETUP WHICH WOULDN’T REQUIRE SIGNAL GROUND TO BE CONNECTED).

 It is dangerous to power the Pixhawk only from the servo rail, especially with digital servos. Servos may cause voltage sp ikes (as shown on illustration below that shows the servo rail voltage on an oscilloscope when a single digital servo attached to a Pixhawk is moved rapidly ). The key thing is that the digital servo causes the voltage on the rail to rise above the critica l 5.7V level. Above that level the Pixhawk power management will cut power to the FMU and the Pixhawk will reboot. If that happens when flying you will lose your aircraft.

It is up to the user to provide a clean source of power for the cases when it is p owered off the servo rail. Servos by themselves are not quite enough.

 Do not connect a BEC power source to the RC IN port (black ground, red power and white signal wires from the receiver’s PPM ou t put are connected to these RC pins)

 Adding an external Zener is a recommendation specifically for systems that are using 5V servos and have the servo rail configured for back up power. Connect the recommended Zener diode with its polarity as indicated on the diagram. Use as short wires as possible or even better, u se a standard 3 position JR servo connector with the diode legs directly inserted (and soldered) in the servo female pins. To complement the diode, it is also useful to add a capacitorin parallel to the diode. The capacitor will smooth out eventual voltage ripples. As advised for the diode, the capacitor should be connected with as short wires as possible. Do not oversize the capacitor.Advanced power supply configuration

This section explains how to set up triple redundant power sources (power module as pr imary, with two backup BECs). In this scheme, a simple MBR1545CT integrated circuit is used. This circuit takes two BECs on its inputs, and outputs only off the BEC with the highest voltage (i.e. if BEC1 outputs 5.25V and BEC2 outputs 5.45V, MBR1545CT will pass BEC2 and blocks BEC1). Here is a tie bus circuit wiring diagram and example realisation with the MBR1545CT integrated circuit and a 6 pin JST connector:

Voltage ratings Pixhawk can be triple

- redundant on the power sup ply if three power sources are supplied. The three rails are: Power module input, servo rail input, USB input. Normal Operation Maximum Ratings Under these conditions all power sources will be used in this order to power the system. Power module input (4.1 V to 5.7V) [refers to the voltage coming into Pixhawk from the power module] Servo rail input (4.1V to 5.7V) USB power input (4.1V to 5.7V) Absolute Maximum Ratings Under these conditions the system will not draw any power (will not be operational), but wi ll remain
intact.Power module input (0V to 20V) [refers to the voltage coming into Pixhawk from the power module]

Servo rail input (0V to 20V) USB power input (0V to 6V)



### Compatible RC Transmitter and Receiver Systems (Pixhawk/PX4)

# O verview

P ixhawk is c ompatible with PPM RC receivers, Futaba S.Bus receivers, and Spektrum DSM,DSM2, and DSM

- X Satellite receivers.

For traditional single

- wire

- per

- channel (PWM) receivers a PPM encod er can be used to convert the receiver outputs to PPM

- SUM.

# Connecting the receiver

To connect a PPM receiver, Futaba S.Bus receiver, or PPM encoder, connect the black ground, red power and white signal wires to the RC pins. These S.BUS receivers have been tested and are known to work: R2008SB, R6008SB.

For a Spektrum DSM

, DSM2 , or DSM

- X Satellite receiver, connect to the SPKT/DSM port.

# Radio systems that support PPM

- Sum or S

Bus directly

This section list radio systems that support PPM

- Sum or S

- Bus dir ectly.

FRSKY Taranis PPM

- Sum Compatible Transmitter

T ip:
This solution is very highly recommended for all RC uses



### The FRSky Taranis RC Transmitter is a very high quality open source RC Transmitter that is compatible with a wide variety of high quality FrSky PPM

- Sum compatible receivers.

FRSky Delta 8 MultiProtocol PPM

- Sum Receiver

 T his PPM

- Sum compatible FRSky Delta 8 Receiver is multi

- platform capable including Hitec
Aurora 9 and Futaba RC transmitters.

 For an Aurora 9, install a jumper between receiver signal pins 6 and 7 (Hitec AFHSS) and pins 3 and 4 (C PPM mode) in order to bind.

 Note: For a Hitec Aurora 9 system you need to have version 3.01 or later of the firmware in the transmitter’s AFHSS 2.4ghz module.

o If your module does not have version 3.01 or later firmware you will need the Hitec

HPP

- 22 progr ammer module in order to upgrade it.

o Upgrade both the AFHSS 2.4ghz module and the transmitter itself to the latest versions following HP

- 22 online instructions

.

o If the transmitter’s AFHSS module’s blu e LED will not illuminate during binding you will need to perform this firmware upgrade.

# T urnigy Transmitter Compatible With FRSky

Transmitter Module

# FRSky Transmitter Adapter Module and PPM

- Sum
Receiver

The FR

- Sky PPM Sum Receiver and conversion module below will work with Turnigy 9x, 9XR (above) and other RC transmitters. FRSky makes several receivers, some are compatib le with PPM

- Sum, some are not, check at FRSky’s web site

. The receiver shown is PPM

- Sum compatible and is recommended (4 channel receivers still do 8
channel PPM

- Sum )

# Futaba Transmitter Compatible With Futaba S

- Bus
Receivers

Futaba S.BUS2 receivers are supported since Copter/Plane 3.2. The SBUS receiver must be connected to the PPM input, not the adjacent SBUS output.

The list of supported receivers for the Pixhawk (or a PX4FMU in combination with a PX4IO board) is given below:

 Futaba / Robbe R7008SB S.BUS 2 Receiver

 Futaba / Robbe R6303SB S.BUS Receiver

 FrSky TFR4 SB 3/16ch 2.4Ghz S.BUS Receiver FASST Compatible

 Futaba FASST S.BUS 2.4 GHz Receiver R6303SB (tested by PX4 core team, very lightweight, only 7g)

 FrSky FASST compatible S.BUS compatible TFR8 SB 8ch 2.4Ghz Receiver

# Further notes on S

- Bus / S

- Bus 2 compatibility

In addition to the receivers discussed in the Futaba Transmitter Compatible With Futaba S

- Bus Receivers section above, we have anecdotal information that a number of other receivers are also compatible (see discussion Current state of SBus compatibility? on drones

- discuss mailing list).

These include:

 FrSky X4, X6 and X8 Receivers on SBUS.

 Delta 8 FRSky receiver

 X8R receivers (non

- EU versions) with OpenTX

- Taranis X9D, via the receiver SBUS ou t on the
receiver to RCIN on the PixHawk.

 OrangeRX R800 receiver that also has SBUS output, with both a Spektrum DX9 and also a Taranis X9D with OrangeRX transmitter module.

 DX8 with OrangeRX R800 and also the Lemon RX 8

- channel PPM

 OrangeRX DSM receivers

Tip: The parameter to enable the SBUS output from the PixHawk is BRD_SBUS_OUT.

# Spektrum Satellite Receivers Operate on

PPM

- Sum

 Although Spektrum main receivers do not communicate by PPM

- Sum their range extending
“satellite” receivers do.

 So it is feasible to use a single Spektrum Satellite Receiver to act as a PPM

- Sum receiver with
PX4 and Pixhawk.

o Simply pre

- bind the Spektrum Satell ite to your transmitter using a conventional Spektrum receiver with satellite attached.

o Then connect the tiny Spektrum Satellite receiver to the special “Spektrum” connector
on either the PX4IO or Pixhawk.

 Currently satellites only work with the Spektrum D X7 and DX8 transmitters, Transmitters with more channels are (in progress).

 Please note that you can use a Spektrum Satellite receiver with Pixhawk or PX4 if you bind it to the transmitter using a main Spektrum receiver module. It is not currently supporte d to bind the Satellite receiver directly to the transmitter while the receiver is connected to the Pixhawk or

PX4.

 Being a satellite, range is limited with this configuration and the preceding receivers and
methods will provide greater range.

# 3DR PPM e ncoder and 3DR telemetry radio

The 3DR PPM Encoder will allow you to use any Conventional RC receiver. Both the new and previous versions of the 3DR PPM

- Sum encoder are shown below:

Newest 3DR PPM

- Sum encoder

Original 3DR PPM

- Sum encoder



### There are some downsides of using this encoder:

 The 3DR PPM Encoder does require quite a bit of additional wiring to the receiver.

 It uses quite a bit of power making it likely you will need to plug in your battery while doing radio setup with USB cable in Mission Planner.

 The 3DR encoder also costs as much or more than several of the available PPM

- Sum receivers including the FRSky Delta 8 be low.



### There is addition information about connecting and configuring the encoder here

.

# Using the 3DR PPM Sum encoder in a system

The diagram below shows how to use the original 3DR PPM

- Sum encoder. The new encoder is used in the same way.

# Using a Standard RC Radio Receiver with 3DR PPM
Encoder

o You can use a standard radio receiver with an 8 channel PPM Encoder in place of the

PPM

- SUM receiver.

 An 8 Channel PPM Encoder is available from 3DRobotics Here!

 Solder a 3×8 Right angle connector from the top into one end of the 8 Channel
PPM Encoder board.

 With the 3×8 connector up and facing away from you, solder a 3×1 Right angle connector on the right edge of the 8 Channel PPM Encoder board.

o Connect 5

- 8 output channels of your receiver to the inputs of the 8 Channel Encoder (signal wire furthest from board) with 5

- 8 female to female servo jumpers.

 Connect the PPM

- SUM output of the Encoder with a 3 wire cable to the PX4IO boards PPM sum input (1×3 connector).

o Note:

If you are using a 3DR PPM Encoder it is important to know that when you are calibrating your transmi tter you will quite likely need to hook up your flight battery to the PX4IO because the USB port alone can’t supply enough power.

### PX4 Wiring QuickStart

PX4FMU plus PX4IO Wiring Diagram for PlaneAssembly

1. Solder the right angle 9×3 pin connector that was included with your PX4 kit to the side of the PX4IO board that has “PX4 autopilot” printed on it.

1. When you insert the 9 x 3 connector into the PX4IO board put it in with the plastic spacer on the connector facing to the back of the board, NOT down

aga inst the board.

2. Solder the small white PAP

- 02

- VS 2 pin connector into the 2 holes directly behind the battery pads on the PX4IO board.

3. Install the PX4IO board on top of the PX4FMU board.

1. Ensure all of the connector pins are straight and insertion is compl ete.
2. Mount the PX4

- FMU + PX4

- IO board stack in a central and level location on top of your Plane.

3. The PX4FMU board is normally on top.

4. It can be advantageous to mount the PX4IO board on top to provide for better

Connector access.

5. If you do mount the PX4IO board on top it will be necessary to set the “Board Orientation (AHRS_ORIENTATION)” parameter to “Roll 180” in the Advanced
Parameter List in Mission Planner.

6. The arrow labeled “FRONT” should be facing to the front of the aircraft.

7. The Micro SD memory card holder should face to the back of the Aircraft.

4. Use the included standoffs and hardware.

1. Which ever side of which ever board is going to be on top but a black standoff through one of the mounting holes from the bottom and thread a black plastic

nut onto it from the top.

2. Repeat the above for the remaining 3 holes.

3. Connect the PX4FMU and PX4IO board insuring no pins are bent on the board

interconnection connector.

4. Thread 4 more of the black standoffs into the already installed black standoffs.

5. You will need additional vibration damping and you should also review the Wiki
section on vibration control.

1. At a minimum you should mount the standoffs to an intermediate plate.

2. Mount the plate to your airframe with 4 small (<1′′)square pads of Kyosho “Zeal” gel or “Moon Gel” in the corners.

6. Mount the GPS facing up with an unobstructed “view” of the sky.

1. Connect the GPS cable to the GPS connector on the PX4FMU board.

2. The GPS must be positioned so that it’s cable will connect without strain to the
PX4FMU’s GPS connector.

3. The GPS can be mounted on a short riser to give it the widest satellite access.
Wire the PX4FMU and PX4IO boards to Your Plane

1. Wire the PX4

- IO board.

1. The PX4IO boa rd has a built in Power Supply which can connect to up to 18 volts.

2. Insert the white PAP

- 02

- VS 2 pin connector with the black and red wires coming out of it into the mating power connector you soldered in previously on the PX4IO board.

3. Battery Plus is the( red wire) and should be soldered to your battery red power lead /

connector.
4. Battery Ground is the(black wire) and should be soldered to your battery black battery (Ground) lead / connector.5. The main power inputs of your ESC’s will also need to connect to these wires and to a battery connector.

6. A Power Distribution board can also be used.

2. Connect your PPM

- Sum RC receiver’s 3 wire cable to the end of the 9 x 3 angle connector that is nearest the edge of the PX4IO board with the signal wire furthest from the board and the ground closest to the board.

3. Wire the PX4 boards servo out signals to your Servo / ESC control inputs.

1. The ESCs BEC or a separate UBEC can supply servo power to the Servos via the PX4’s

Servo connector BUSS

1. Run the 3 wire servo cables from the ESC (and its built in BEC) and Servos to the
3 x 9 Servo Connector on the PX4IO board.

2. Or, clip the power lead on the ESC and run power and ground from a separate UBEC to the bottom pins of the Servo connector.

2. The PX4IO board connector for Servo 1 is at the edge of the connector next to the Battery power in wires.

3. Insert the Servo and Motor ESC signal wires arranged progressively from that edge, (1,2,3,4,etc).

4. You can put the ESC / Servo Signal wires into a single inline connector with the correct
numb er of pins for your Plane.

5. The ESC / Servo Signal Wires / connector should be plugged into the top row (furthest from the board) of the PX4IO boards 3 x 9 Servo Connector.

4. Note, the cable that is supplied in the plastic envelope with the UBLOX GPS which ha s white 6 pin connectors on both ends is not the correct cable for the PX4FMU board.

1. The correct longer cable is provided in a separate envelope and has a 5 pin “beige” connector on one end and a 6 pin white connector on the other end.

2. Plug the correct GP S cable’s white 6 pin connector into the 6 pin socket on the GPS.

3. Plug the beige 5 pin connector into the PX4FMU board’s 5 pin GPS socket which is next to the 15 pin DF13 Mini connector.

5. Plug the 2 pin connector attached to the lead supplied with the buzze r into the buzzer socket
on the side of the PX4FMU board that has the SD card holder on it.

6. Connect the “Safety Button” to the Safety button connector on the PX4IO board on the opposite side of the board from the Battery pads. The PX4 must have its “Safety ” mechanism disengaged before it can be armed.

 PX4 Safety Button LED Indications:

o Fast Blinking indicates: Error Condition, Safety cannot be disengaged. Possibly not
calibrated or sensor error.

o Slow Blinking indicates: Safe condition. Safety can be diseng aged by depressing Safety
Button for 5 seconds.

o LED Continuously on indicates: Safety has been disengaged. Depending on your parameter settings, throttle may be armed with Throttle down and to the right. For details on throttle arming see: Arming Throttle

.

o When the LED is continuously on indicating Safety Disengaged it may be toggled back to a Safety engaged condition by depressing the Safety button for 5 seconds.
Both th e Safety engaged and Safety disengaged conditions require the button to be held down for 5 seconds to toggle them. . This is a safety mechanism to prevent accidental disarming during flight and accidental arming during transportation. Using a 3DR telemetry radio with your PX4FMU plus PX4IO system.

1. You will need a 3DR Radio

.2. Plug the telemetry adapter cable’s large black connector into the 3DR radio as shown ab ove.

3. The telemetry radio is shown above incorrectly connected to the FMU USART2 socket at the
corner of the PX4IO board.

1. Correctly plug the telemetry adapter cable’s beige connector into the PX4IO boards

FMU UART5 socket.

2. FMU UART5 is the middle socket on the end of the PX4IO board as indicated by the red

arrow above.

3. (FMU UARTx) means a port that is pass through connected directly from the PX4IO
board to the PX4FMU. Separate Servo power for high power applications

1. Using a separate power supply to provid e power to the center servo power pins of the PX4IO
board.

1. If you are driving high power servos with your PX4IO board you will want to provide servo power separately.

2. In order to do this, remove the L1 Ferrite device circled in red on the image above.

3. The n run power from your separate power supply to one of the center pins of the Servo

Connector.

4. And run the ground from your separate power supply to one of the servo connector pins nearest the edge of the board. Using a Standard RC Radio Receiver with an 8 channel PPM Encoder

o You can use a standard radio receiver with an 8 channel PPM Encoder in place of the

PPM

- SUM receiver.

 An 8 Channel PPM Encoder is available from 3DRobotics

.

 Solder a 3×8 Right angle connector from the top into one end of the 8 Channel
PPM Encoder board.

 With the 3×8 connector up and facing away from you, solder a 3×1 Right angle connector on the right edge of the 8 Channel PPM Encoder board.

o Connect 5

- 8 output channels of your receiver to the inputs of the 8 Channel Encoder (signal wire furthest from board) with 5

- 8 female to female servo jumpers. Connect the PPM

- SUM output of the Encoder with a 3 wire cable to the PX4IO boards PPM sum input (1×3 connector).

Note: If you are using a 3DR PPM Encoder it is important to know that when you are calibrating your transmitter you will quite likely need to hook up your flight battery to the PX4IO because the USB port alone can’t supply enough power. Compatible remote control (RC) r eceivers PX4 is compatible with PPM remote control (RC) receivers, Futaba S.Bus receivers, and Spektrum DSM,DSM2, and DSM

- X Satellite receivers. For traditional single

- wire

- per

- channel (PWM) receivers a PPM encoder can be used to convert the receiver outpu ts to PPM

- SUM. Information about compatible receivers and how they are connected can be found in this wiki page

.

FRSky Taranis Transmitter



### APM2.x Wiring QuickStart

Overview

P lug female

- to

- female cables from the RC receiver into APM2’s inputs, and plug the servos (and motor controller for electric aircraft) into APM2’s outputs. What you’ll need:

 At least a 5

- channel RC unit. 7 channels or more is highly recommended

 Female

- to female cables for each channel you’ll be using. These are fine.

 For APM2.0 you will need a power source. For electric aircraft, this is usually the ESC. For gas/nitro powered planes, your radio will need its own battery/BEC. ArduPilot Mega normally gets its power from the RC system.

 For APM2.5 you can use the supplied APM Power Module for the power source. Warning:
You still need an ESC or BEC to power the servos

. Note: You can also power APM 2 from the USB cable. However, this will not power the RC output pins, so if you want to see servos move while testing APM 2 on the bench, you’ll need to connect a battery (through an ESC) to one of the out put channels. It’s fine to have both an ESC and the USB cable
connected at the same time.Exam ple Wiring Diagram plane with APM

Inputs

Connect your RC receiver to AP M2’s Inputs with female

- to

- female cables in the order shown above. Each channel that you want APM to control should be connected to an Input on the APM board. Typically, the Mode Switch (APM Input 8 for !Plane) is connected to any RC receiver channel that you have assigned to a three

- position toggle switch on your RC transmitter (for most people, that’s channel 5).

Note: These instructions are for Plane. Copter’s mode switch goes to APM input 5, not input 8 The ground (black) side of each connector should b e on the outside, closest to the edge of the board, as shown here with either straight or right

- angle connectors:

See also connecting the R adio Receiver

. Note: Elevons (combined ailerons/elevator, as used in flying wings) are also supported’ just connect them to the first two channels as you would to your RC receiver. You’ll tell APM to do elevon mixing in the Mission Planner setup process. If you’re flying a V

- tail, please see the VTAIL_OUTPUT option in the servo setup documentation

.Reassigning your RC transmitter stick channe ls:

 Although the default normal transmitter stick configuration is generally the best, Plane does allow you to reconfigure them.

 To reassign the RC transmitter sticks to other than the default channels:

o Connect your APM’s USB port to your computer and sta rt Mission Planner and Select the “Connect” button on the upper right..

o Select the “Configuration” tab then select “Advanced Params” and the Adv Parameter
List”.

o Scroll down to the “RCMAP_ROLL, RCMAP_PITCH, RCMAP_THROTTLE and RCMAP_YAW” parameters.

o These a llow you to directly assign which radio channel (1

- 8) is assigned to each of the major flight functions.

 This is useful when you have a flight transmitter with unusual channel assignments.

o Or which does not allow easy channel reassignment at the transmitt er

 Additional information on these parameters may be found (Here!) Outputs Plug your servos and other devices you want APM to control into the matching Output conn ectors as
shown below.

Four channel setup:

1. Aileron

2. Elevator

3. Throttle

4. RudderElevon setup. At this stage its not critical which channel is plugged into which elevon. They can be

swapped around later if needs be:

1. Starboard (right) elevon

2. Port (left) el evon 3. Throttle Powering the plane The easiest way to power the APM2.x is using a 3DR Power Module with a LiPo battery. The Power Module will not power servos and other peripherals. For more information/alternatives see Powering the APM2

. Power Input Single Supply
Power Options Nominal Abs MAX JP1 status
Power on Outpu t PWM connector 5.37V +

- 0.5 6V JP1 connected
Dual Supply
Power Options Nominal Abs MAX JP1 status
Power on Output PWM connector 5.00V +

- 0.5 6V JP1 open

Power on Input PWM connector 5.00V +

- 0.25 5.5V JP1 open

Note: If JP1 open, separate power is require d on both Input PWM and Output PWM. Warning: Do not exceed Abs MAX input voltages when connecting power supply or you will damage your board. Warning:Connecting USB when you have input voltages at the high end of the range (near Abs Max) can damage

the bo ard. Disconnect battery before connecting USB or test input voltages so they are within the normal specified range. Installing it in your plane When you place APM in your aircraft, it is very important that it face the right way. The GPS connector
should f ace forward, and the servo cables face back. The board must also be right side up, with the IMU shield at the top. Like this (note: there’s a little arrow on the bottom of the shield that point to the front, too, in case you need a reminder at the field):

When putting APM in your plane, it’s important to ensure that it’s solidly mounted and doesn’t move around in flight. It should also be as close as possible to level when the plane is in its flying orientation. Ideally, you’ll want to have it as close to the center of gravity as you can (that’s where vibration is the least) and mounted on foam tape onto a solid platform. Connecting GPS Module A GPS module provides enhanced positioning for autonomous flight. Connecting your GPS to your autopilot by followi ng these steps. 3DR GPS uBlox with Onboard Compass 3DR GPS uBlox with Onboard Compass is intended for use with APM 2.5 (for external compass). It provides enhanced compass performance because of the freedom to situate the GPS unit in an optimal position in dependent of the location of the APM. Place your GPS on the outside of your plane with a clear view of the sky, as far as possible from the motor and ESC, with the arrow facing forward.Connect the GPS module to the APM 2.6 using the two cables included with the GPS as shown below.

3DR GPS uBlox with Onboard Compass includes two connector cables: one 4

- position cable and one 5

- position

- to

- 6

- position cable. To connect the GPS module to APM 2.6, connect the GPS to the APM GPS port using the 5

- position

- to

- 6

- position cable; connect the GPS to the APM I2C port using the 4

- position
cable.

3DR GPS uBlox without Onboard Compass 3DR GPS uBlox without Onboard Compass is intended for use with APM 2.5. To install your GPS module without compass, mount to the outside of your plane with a clear view of the sky and connect to the APM 2.5 GPS port using the 5

- position

- to

- 6

- position connector cable.

Tips on mounting the GPS module

 It doesn’t matter which way the GPS module is oriented, as long as the square antenna side is facing up It’s best to mount the GPS as far away from radio transmission equipment (like your telemetry

or video transmitters) as possible.

 Ideally, the GPS module will have a clear view of the sky. On top of your plane is a good choice.

With equipment mounted:



### 3DR UBlox GPS + Compass Module

Overview
The 3DR UBlox GPS + Compass module is the recommended GPS for Pixhawk, PX4 and APM2.6 (and above) fl ight controllers using Plane, Rover and Copter. These come set

- up with the best known GPS configuration and have been thoroughly tested by tho usands of users.

Connecting the Autopilot Connecting to Pixhawk
Connect the GPS’s 6

- pin DF13 connector to the Pixhawk’s “GPS” port and the compass’s 4

- pin connector to the I2C port. Alternatively the compass can be first connected through an I2C splitter if other I2Cdevices are to be attached.

Note: As of Copter 3.2 and recent versio ns of Plane and Rover, a secondary GPS can be connected to the Pixhawk’s Serial 4/5 port. Limited testing suggests that a secondary GPS can reduce the likelihood that GPS glitches will affect the vehicle, but can also lead to sudden movements of the vehicl e when the primary GPS switches. Tip: On Copter we do not recommend using a second compass due to these sudden vehicle movements. If the parameters are set

- up as shown below, the flight controller will use the GPS with the higher number of satellites (Note : it will switch when one GPS has at least 2 more satellites than the other).

 GPS_AUTO_SWITCH = 1

 GPS_TYPE2 = 1If using Copter 3.3 or higher or recent versions of Plane/Rover then this parameter should also be set:

 SERIAL4_PROTOCOL = 5

Note:
The baud ra te is set by the UBlox driver (setting SERIAL4_BAUD = 38 is ignored).

Note: ArduPilot supports up to 3 compasses. However you cannot attach a secondary external compass to Pixhawk because there isn’t a spare port. Connecting to APM 2.x APM 2.6 is compatibl e with the 3DR UBlox GPS + Compass module

. To connect the GPS module to APM 2.6, attach the GPS port to the APM GPS port using the included 5

- position

- to

- 6

- position cable (use the top

- entry port, not the side

- entry port), and attach the GPS MAG port to the APM I 2 C port using the included 4

- position cable.

APM 2.5 and APM 2.0 have an internal compass (unlike APM 2.6) which must be disabled by cutting a trace before you can connect the 3DR UBlox GPS + Compass module (the video here shows how). Other than disabling the internal compass, connecting the UBlox is the same for APM2.0/APM2.5 as for

APM2.6.

Note:After connecting the external compass you will need to re

- calibrate the compass (if you had run this

procedure for the internal compass). Connecting to PX4

 To connect GPS part of the this module to PX4, connect the GPS port to the PX4FMU’s GPS

connector.

 Connect the compass lead on the module to the PX4IO’s I2C port.

 The PX4IO board I2C port is the 4 pin connector located on the board side opposite the Servo Out connectors in the second row of connectors in and next to the board mounting hole.

 When the external compass is plugged into the PX4IO boards I2C port, it is automatically
detected and used a nd the internal compass is disabled.



Next connect with the Mission Planner and go to INITIAL SETUP | Mandatory Hardware | Compass and set the Orientation to ROTATION_ROLL_180. Connecting to Erle

- Brain2

 Connect GPS 6 pin DF13 connector to the port labeled as “UART”

 Connect Compass 4 pin DF13 connector to one of the ports labeled as “I2C”An external compass is required (drivers are not yet available for the internal compass).

If using Copter 3.3 or higher or recent versions of Plane/Rover then this param eter should also be set:

 SERIAL4_PROTOCOL = 5

Note: The baud rate is set by the UBlox driver (setting SERIAL4_BAUD = 38 is ignored). Mounting the GPS Module This module permits the GPS to be mounted separately from the flight control module so that it can have the best clear (view) of the sky and allows the compass to be distanced from interfering magnetic
fields. Tip: The recommended orientation is to mount the module with the arrow facing toward the front of the
vehicle and in the same direction as the ar row on the autopilot. When mounting the GPS+Compass module:

 Place the module on the outside of your vehicle (in an elevated position if appropriate) with a clear view of the sky, as far as possible from the motors and ESCs, with the arrow facing
forward.

 D istance the module from DC power wiring and the batteries by at least 10cm. Use of a mast is highly recommended.

 Place the module clear of nearby iron containing metallic objects. ( Use nylon or non magnetic stainless steel hardware and nylon or aluminum standoffs to mount the module).

 Twist power and ground wires where possible.

Setup in Mission Planner Compass Calibration in Mission Planner explains the simplest way to calibrate a compass mounted in the recommended orientation (arrows for autopilot and compass facing to front of vehicle). Advanced Compass Setup contains more detailed instructions for calibrating a compass if, for example,
it has been mounted at some other orientation.
LED Indicators The 3DR GPS+Compass module has two LED indicators: one for power (solid red) and one for GPS lock (flashing blue).

LEDs: Behavior:

Power Solid red when powered

GPS lock Flashing blue when 3D GPS lock acquired

# Loading Firmw are onto

Pixhawk/APM2.x/PX4

Connect controller to computer

Once you’ve installed the Mission Planner onto your computer, connect the autopi lot board to your computer using the micro USB cable as shown below. Use a direct USB port on your computer (not a USB hub).

PixHawk HDMI Connection

### A PM USB Connection

PX4 USB Connection

Windows should automatically detect and install the correct driver software.

Connect to Mission Planner

Open the Mission Planner and select the COM port drop

- down on the upper

- right corner of the screen (near the Connect button). Select AUTO or the specific port for your board (PX4 FMU or Arduino Mega 2560). Set the Bau d rate to 115200 as shown. Don’t hit Connect just yet.

# Install firmware

On the Mission Planner’s Initial Setup | Install Firmware screen select the appropriate icon that matches your frame (i.e. Quad, Hexa). Answer Yes when it asks you “Are you
sure?”.

Mission Planner: Install Firmware Screen

After the Mission Planner detects which board you are using (i.e. Pixhawk) it will ask you to unplug the board, plug it back in and then press OK within a few seconds (during this brief period the bootloader accep ts requests to upload new firmware).

### Mission Planner: Install Firmware Prompt

If all goes well you will see some status appear on the bottom right including the words, “erase...”, “program...”, “verify..” and “Upload Done”. The firmware has been successfully uploaded to the board. Testing You can test the firmware is basically working by switching to the Mission Planner Flight Data screen and pressing the Connect button. The HUD should update as you tilt the board.

# Connect Mission Planner to AutoPilot

Setti ng up the connection

To establish a connection you must first choose the communication method/channel you want to use, and then set up the physical hardware and Windows device drivers. You can connect the PC and autopilot using USB cables, Telemetry Radios

, Bluetooth , IP

connections etc.

Note:

The driver for your connection hardware must be present on Windows as this makes your connection’s COM port and default data rate available to Mission Planner

.

Pixhawk US B Connection Connection using 3DR Radio

On Mission Planner , the connection and data rate are set up using the drop down boxes in the upper right portion of the screen.

Once you’ve attached the USB or Telemetry Radio, Windows will automatically assign your autopilot a COM port number, and that will show in the drop

- down menu (the actual number does not matter). The appropriate data rate for the connection is also set (typically the USB connection data rate is 11520 and the 3DR radio connection rate is 57600).

### Select the desired port and data rate and then press the Connect button to connect to

the autopilot. After connecting Mission Planner will download parameters from the autopilot and the button will change to Disconnect as shown:

Tip:

The “select port” dropdown also contains TCP or UDP port options that can be used to connect to an autopilot over a network.

# Troubleshooting

If Mission planner is unable to connect: Check that the correct baud rate is used for the selected method (115200 on USB or 576 00 on Radio/Telemetry) If using a COM port on Windows, check that the connection’s COM port exists in the Windows Device Manager’s list of serial ports. If using a USB port, try a different physical USB port if using a UDP or TCP connection, check that you r firewall is not blocking the IP traffic.



### You should also ensure that the autopilot controller board has appropriate ArduPilot firwmare installed and has booted correctly (on Pixhawk/PX4 there are useful LEDs
and Sounds which can tell you the state of the autopilot).

# First Flight

Gro und calibration

Set your transmitter mode switch to “Manual”. This is a safe mode in which to start up the system.

When you power on your board at the field, you should leave the plane motionless on the ground until the three colored LEDs stop flashing (ab out 30 seconds). That means that the gyros have been calibrated and the plane is ready to fly (assuming you also already have GPS lock).

After the ground start completes you should wait for GPS lock before flying. If you do
not wait for GPS lock the home l ocation will not be set correctly, and the barometric altimeter calibration will be incorrect. It should take less than two minutes to get lock. If you’re using the MediaTek module, the blue LED on the module will flash while it’s waiting for lock, then tu rn solid once it has it. Once that happens, the red LED on APM should stop flashing and turn solid. If the blue MediaTek LED turns solid but the red APM LED is still flashing, press the reset button on APM and once it reboots, the red LED should go solid.

Note: On the UBLOX GPS module itself the LED is off while acquiring satellites and on blinking when satellites have been acquired. The PX4 must have its “Safety” mechanism disengaged before it can be armed. 

### PX4 Safety Button LED Indications:

o 

### Fast Blinking indicates: Error Condition, Safety cannot be disengaged. Possibly not calibrated or sensor error.

o 

### Slow Blinking indicates: Safe condition. Safety can be disengaged by depressing Safety Button for 5 seconds.

o 

### LED Continuously on indicates: Safety has been d isengaged. PX4 flight controller may be armed with Throttle down and to the right.

o 

### When the LED is continuously on indicating Safety Disengaged it may be toggled back to a Safety engaged condition by depressing the Safety
button for 5 seconds.

Note:

Both the Safety engaged and Safety disengaged conditions require the button to be held down for 5 seconds to toggle them. This is a safety mechanism to prevent accidental disarming during flight and accidental arming during transportation.

# Setting the Home Pos ition

Tip: It is very important to acquire GPS lock in order for RTL, Loiter, Auto or any GPS dependent mode to work properly. For Plane the home position is initially established at the time the plane acquires its GPS lock. It is then continuously updated as long as the autopilot is disarmed. This means that if you execute an RTL, your plane will return to the location at which it armed. If the plane you arm is not a good return point then please setup a rally point instead. A rally point will be used in p reference to the home location for RTL. BEFORE EVERY FLIGHT: Before you take off, hold your aircraft in your hands and switch to FBWA mode, then pitch and tilt the plane it to confirm that the control surfaces move the correct way to return it to
level fli ght. (The ailerons and elevators will move; the rudder only coordinates turns with the ailerons in flight, so it won’t move much on the ground). This will ensure that you haven’t accidentally reversed a
channel. You should do this before every flight, just as you move your control surfaces with your RC transmitter to ensure that nothing’s reversed. Failing to do this is the #1 cause of crashes.



### Note:

As a safety measure, your throttle will only arm on the ground in Manual mode,
Stabilize or for an auto takeo ff in Auto mode. It will not come on in any other Auto mode until you are in motion in the air.

# First flight

It is highly recommended that you switch into either Stabilize or Fly By Wire mode and observe the behavior of the control surfaces. They should mo ve to return the plane to level when you pitch or roll it. If it isn’t rock solid, you can tune the gains by following
the instructions here

.
If you have no t tuned your PID gains then you may like to consider doing the first takeoff in AUTOTUNE mode. That will start the tuning process as soon as you takeoff.

# Second flight

For your second flight, change the third mode (position 3 of your RC mode switch) to

RTL in the Mission Planner’s mode setup page

.
This will test navigation. The aircraft should return to you and orbit overhead at a fixed
alti tude (which can be set with the Mission Planner ).

If it does not return crisply and circle overhead in a near

- perfect circle, you need to tune the autopilot a bit for your part icular airframe. This can usually be done by adjusting the Roll parameters, as described here

.
Once all this has checked out, you can program waypoint missions and test then in A uto
mode.

# Level Adjustment

You may find after flying your plane in FBWA that it has a tendency to turn in one direction and/or gains or loses height on a mid

- throttle setting with the transmitter sticks centered . If this happens, perform the following: 1) W ith your autopilot powered on the ground and connected to your mission planner, select FBWA on your transmitter, select the FLIGHT DATA tuning window and plot the nav roll and nav_pitch data. With your transmitter sticks centered , these should both be zero as shown in this screenshot. If they are not, you need to repeat your RC calibration or adjust your transmitter trims and repeat the FBWA flight test

If they are zero, then you need to adjust the AHRS_TRIM_X (roll) and AHRS_TRIM_Y (pitch) for the
differe nce in angle between the autopilot board and your planes attitude when flying straight and level. You can change these by going to CONFIG/TUNING | Full Parameter List and adjusting the parameters as
shown in the screenshot below.

### Warning:

These para meters are in radians (every 0.01 is about 0.6 of a degree) so adjust in increments of 0.01 initially. If the plane turns to the left, AHRS_TRIM_X should be increased. If the plane loses height with mid throttle, AHRS_TRIM_Y should be
increased.

# Arming y our plane

Before you can fly your plane you need to arm it. Arming the aircraft before flight has
two purposes:

 

### prevent the motor from turning when the pilot is not ready to fly (a safety feature)

 

### prevent takeoff before the autopilot is fully configured an d ready to fly

In past releases of APM:Plane arming was optional, and the requirement to arm (controlled by the ARMING_REQUIRED parameter) was disabled by default. This was changed for the 3.3.0 release to require arming by default.

The key thing that armi ng does is to enable the motor. You will not be able to start the motor (ie. control the throttle) until the aircraft is armed.

Note: If you have AHRS_EKF_USE enabled (you are using the EKF) then it is particularly important that you have arming enabled wi th arming checks enabled. Flying EKF without arming checks may cause a crash.

# Configuring Arming

There are three parameters which control how arming works:

 

### ARMING_REQUIRE: this controls whether an arming step is required. The default is 1, meaning that arm ing is required before takeoff. If set to 0 then arming is not required (the plane starts off armed).

 

### ARMING_CHECK: this controls what checks the autopilot does before arming is allowed. The default is 1, meaning all checks are done. Most users should leav e it at 1, as the arming checks are important to ensure the autopilot is ready.

 

### ARMING_DIS_RUD: This parameters allows you to disable rudder based arming. If you set this to 1 then you will only be able to arm via a ground station.

# How to Arm

When you are ready to fly you can ask Plane to arm. This can be done in two ways:

 

### Rudder Arming. Hold the rudder stick fully to the right and the throttle stick fully
down for 2 seconds.

 

### GCS Arming. Press the arming button on your ground station

# How to Disarm

Unlike A PM:Copter, plane does not have a way of disarming using the transmitter. The reason for this is that the copter method of disarming (left rudder and minimum throttle) is sometimes used by pilots while flying. There is too great a risk of an
accidental disa rm while flying.

To disarm you need to use one of the following methods:

 

### use a ground station to issue a disarm command

 

### use the safety switch on your aircraft (on Pixhawk)

 

### after an auto

- landing the plane will automatically disarm after 20 seconds if still on the ground (controlled by LAND_DISARMDELAY parameter)

Visual and Audible signals

APM:Plane will provide visual and audio clues to the arming state if your autopilot has
LEDs and a buzzer. The clues are:

 

### if the autopilot is disarmed, but is ready to arm then the large 3

- colour LED will be flashing green

 

### if the autopilot is armed and ready to fly the large 3

- colour LED is solid green

 

### when the autopilot is ready to arm it will play a “ready to arm” sound on the
buzzer

 

### when the autopilot is armed or disarmed it will play the corresponding sound

Arming Checks

B efore allowing arming the autopilot checks a set of conditions. All conditions must pass for arming to be allowed. If any condition fails then a message explaining what failed is set to the GCS.

### The chec ks performed are:

 

### Safety switch. The PX4 safety switch must be set to the safety

- off state before arming is allowed. This is either done by pressing the safety switch for 2 seconds until it stops flashing, or you can disable the use of the safety switch by setting BRD_SAFETY_ENABLE=0

 

### Barometer check. The barometer must be healthy (getting good data)

 

### Inertial Sensor Checks. The accelerometers and gyroscopes must all be healthy and all be calibrated. If you have more than one accel or gyro then they need to
b e consistent with each other.

 

### AHRS checks. The AHRS (attitude heading reference system) needs to be initialized and ready. Note that if you have the EKF enabled this may take up to
30 seconds after boot.

 

### Compass checks. All compasses must be configured and calibrated, and need to be consistent with each other (if you have more than one compass)

 

### GPS Checks. You need to have a 3D GPS fix.

 

### Battery checks. The battery voltage must be above the failsafe voltage (if configured)

 

### Airspeed checks. If you have config ured an airspeed sensor then the sensor needs to be working.

 

### Logging checks. The logging subsystem needs to be working (ie. a microSD must be fitted and working on PX4)

 

### RC Control checks. You need to not be in RC failsafe

Throttle output when disarmed

When the plane is disarmed the throttle channel will not respond to pilot input. There are two possible behaviours you can configure:

 

### ARMING_REQUIRE=1. When disarmed the minimum value for the throttle channel (normally RC3_MIN) will be sent to the throttle cha nnel

 

### ARMING_REQUIRE=2. When disarmed no pulses are sent to the throttle channel. Note that some ESCs will beep to complain that they are powered on without a control signal

# Diagnosing failure to arm

It can be frustrating if your plane refuses to arm. To di agnose arming issues follow this guide



### Check it is ready to arm If your board has a “ready to arm” LED (the large LED in the middle of the board on a Pixhawk) then that LED should be flashing green when the board is ready to arm. If it is flashing yellow t hen that indicates that one of the arming checks is not passing.



### Try arming Try sending an arm command with your GCS. If arming is refused then a message will be sent from the autopilot to the GCS indicating why it is refusing to arm.



### Rudder arming If you are using right

- rudder + zero

- throttle to arm and you don’t get a message on your GCS giving a arming failure reason then it may be that your RC calibration is a bit off and the autopilot is not quite seeing zero throttle or isn’t quite seeing full right r udder.

# Reasons for refusing to arm

When the autopilot refuses to arm it sends a STATUSTEXT MAVLink message to the GCS explaining why it is refusing. The possible reasons why the autopilot can refuse to arm

are:

 

### barometer not healthy. This is very rare. If it happens repeatedly then you may
have a barometer hardware fault.

 

### airspeed not healthy. If you have a airspeed sensor fitted and the autopilot is not getting an airspeed reading it will refuse to arm.

 

### logging not available. If your microSD card has faile d or is corrupt then logging won’t be available and you cannot arm.

 

### gyros not healthy. If the gyros have failed the autopilot will refuse to arm. This is rare, and if it happens repeatedly then you may have a hardware failure.

 

### gyros not calibrated. This ha ppens when the automatic gyro calibration at startup didn’t converge. Try rebooting the autopilot with the plane held still.

 

### accels not healthy. If the accelerometers have failed the autopilot will refuse to arm. Try recalibrating your accelerometers.

 

### GPS accuracy errors. There are 4 types of GPS arming errors that can be reported. They are “GPS vert vel error”, “GPS speed error”, “GPS horiz error”,
“GPS numsats”. Try moving your plane for better GPS reception or switching off any RF sources (such as a FPV transmitter) that may be interfering with your GPS.

 

### Mag yaw error. This happens when your compass is badly out of alignment. Check your compass orientation and re

- do your compass calibration or move your plane further away from any magnetic materials.

 

### EKF warmup. This happens when the EKF is still warming up. Wait another 10 seconds and try again.

 

### AHRS not healthy. This means the EKF is not healthy. If the error persists then try rebooting your board.

 

### 3D accel cal needed. This happens when you have not done a 3D accelerometer
calibration. 

### Inconsistent accelerometers. This happens when you have multiple IMUs (such

as the Pixhawk which has two) and they are not consistent. This can be caused by temperature changes. If the error doesn’t clear itself after a min ute you will need to redo your accelerometer calibration.

 

### Inconsistent gyros. This happens when you have multiple gyros and they are not reporting consistent values. If the error does not clear itself after 30 seconds then you will need to reboot.

 

### Limit er rors. The arming checks some of your parameter settings to make sure they are in a reasonable range. The checks are “LIM_ROLL_CD too small”, “LIM_PITCH_MAX too small”, “LIM_PITCH_MIN too large”, “invalid THR_FS_VALUE

# Overview

Fligh t controller accelerometers are sensitive to vibration. As accelerometer data is used to estimate vehicle position (along with barometer and GPS readings), excessive vibration can lead to poor performance in modes that rely on accurate position calculation . Vibration affects all vehicle types, but is most critical for the Copter (particularly in AltHold, Loiter, RTL, Guided, Position and AUTO flight modes).

These instructions explain how to measure the vibration levels. If you find they are out

- of

tolerance then follow the advice found on the First Time Set

- up sections Vibration Damping

.

# Copter

- 3.3/Plane 3.4 (and later versions)

Note: These changes are present starting in Copter

- 3.3 and Plane 3.4. The changes are not present in Rover at time of writing (Rover 2.5).

 Perform a regular flight (i.e. not just a gentle hover) of at least a few minutes and download the dataflash logs

.

 Using the Mission Planner or other GCS graph the VIBE message’s VibeX, VibeY and VibeZ
values. These show the standa rd deviation of the primary accelerometer’s output in m/s/s. The image below, taken from a 3DR IRIS, shows normal levels which are below 15m/s/s but occasionally peak to 30m/s/s. Maximum acceptable values appear to be below 60m/s/s (see second picture be low).

 Graph the Clip0, Clip1 and Clip2 values which increase each time one of the accelerometers reaches it’s maximum limit (16G). Ideally these should be zero for the whole flight but low numbers (<100) are likely ok especially if they occur during hard landings. A regularly increasingnumber through the log indicates a serious vibration problem that should be fixed

.

### This is an example of a vehicle that had position estimate problems due to high vibrations.

The algorithm for calculating the vibration levels can be seen in the AP_InertialSensor.cpp’s

### calc_vibration_and_clipping() method but in short it involves calculating the standard deviation of the accelerometer readings like this:

 capture the raw x, y and z accelerometer values from the primary IMU

 high

- pass filt er the raw values at 5hz to remove the vehicle’s movement and create a “accel_vibe_floor” for x,y and z axis.

 calculate the difference between the latest accel values and the accel_vibe_floor.

 square the above differences, filter at 2hz and then calculate the square root (for x, y and z). These final three values are what appear in the VIBE msg’s VibeX, Y and Z fields.

# Earlier firmware versions

 Connect your Pixhawk/Flight controller to the Mission Planner

 Go to the CONFIG/TUNING | Standard Params screen an d set the Log bitmask to
Default+IMU. This will enable the capture of the accelerometer data to the dataflash logs.

 Press the Write Params button

 Fly your copter in Stabilize mode and try to maintain a level hover (it doesn’t need to be perfectly stable or level)

 Disconnect the Lipo, reconnect your APM/PX4 to the mission planner

 Downloa d the dataflash logs and after the download has completed, use the Mission Planner’s “Review a Log” buttong to open the latest file in the log directory (it’s last digit will be the Log number you downloaded so in the example above we downloaded Log #1 so the filename will end in 1.log)

 When the Log Browser appears, scroll down until you find any IMU message. Click on the row’s AccX and push Graph this data Left button. Repeat for the AccY and AccZ columns to produce agraph like below.

 Check the scale on the left and ensure that your vibration levels for the AccX and AccY are
between

- 3 and +3. For AccZ the acceptable range is

- 15 to

- 5. If it is very close or over these limits you should refer back to the Vibration Damping page for possible solutions.

 After all the above is complete, go to the Mission Planner’s standard parameters page (you may need to press the Connect button again) and set the Log Bi tmask back to “Default”. This is important because especially on the APM logging requires significant CPU resources and it’s a waste to log these if they’re not really needed.

# Automatic Takeoff

B asic Instructions

The basic idea of aut omatic takeoff is for the autopilot to set the throttle to maximum and climb until a designated altitude is reached. To cause the plane to execute a takeoff, add a NAV_TAKEOFF command to your mission, usually as the first command. There are two parameters to this command

– the minimum pitch, and the takeoff altitude. The minimum pitch controls how steeply the aircraft will climb during the takeoff. A value of between 10 and 15 degrees is recommended for most aircraft. The takeoff
altitude controls the altit ude above home at which the takeoff is considered complete. Make sure that this is high enough that the aircraft can safely turn after takeoff. An altitude of 40 meters is good for a wide range of aircraft. During takeoff the wings will be held level to wi thin LEVEL_ROLL_LIMIT degrees. This prevents a sharp roll from causing the wings to hit the runway for ground takeoffs.
Note that the t akeoff direction is set from the direction the plane is pointing when the automatic takeoff command is started. So you need to point the plane in the right direction, then switch to AUTO mode. During the first stage of the takeoff the autopilot will use th e gyroscope as the principal mechanism for keeping the aircraft flying straight. After sufficient speed for a good GPS heading is reached the aircraft will switch to using the GPS ground track which allows it to account for a cross

- wind. You should try to launch into the wind whenever possible.



### Hand Launching A hand launch is a common method to launch smaller aircraft, such as foam gliders. Plane has a number of parameters that control how a hand launch is done. If you are planning to hand launch your aircr aft in AUTO mode then please look through these options carefully. The keys to a good hand launch are: if the propeller is behind your hand during launch then ensuring that the motor does not start until it is past your hand ensuring that the aircraft does not try to climb out too steeply The main parameters that control the hand launch are: TKOFF_THR_MINACC TKOFF_THR_DELAY TKOFF_THR_MINSPD TECS_PITCH_MAX When the auto takeoff mission command starts (usually by switching to AUTO mode) the autopilot

starts i n “throttle suppressed” mode. The throttle will not start until the conditions set by the TKOFF_THR_* parameters met. The TKOFF_THR_MINACC parameter controls the minimum forward acceleration of the aircraft before the throttle will engage. The forward acce leration comes from the throwing action of your arm as you launch the aircraft. You need to set this value high enough that the motor won’t start automatically when you are carrying the aircraft normally, but low enough that you can reliably trigger the

ac celeration with a normal throwing action. A value of around 15 m/s/s is good for most aircraft. The TKOFF_THR_DELAY parameter is a delay in 1/10 of a second units to hold off starting the motor
after the minimum acceleration is reached. This is meant to en sure that the propeller is past your hand before the motor starts. A value of at least 2 (which is 0.2 seconds) is recommended for a hand launch.The TKOFF_THR_MINSPD parameter is a minimum ground speed (as measured by the GPS) before the

motor starts. Thi s is an additional safety measure to ensure the aircraft is out of your hand before the motor starts. A value of 4m/s is recommended for a hand launch. Note that if your aircraft is a “tractor” type with the motor at the front then you may want to set

TKOF F_THR_DELAY and TKOFF_THR_MINSPD to zero, or use lower values. The final parameter you should think about is the TECS_PITCH_MAX parameter. That controls the maximum pitch which the autopilot will demand in auto flight. When set to a non

- zero value this

rep laces the LIM_PITCH_CD parameter for all auto

- throttle flight modes. Setting this parameter to a value which is small enough to ensure the aircraft can climb reliably at full throttle will make takeoff much more reliable. A value of 20 is good for most air craft.



### Catapult Launching The main differences between catapult launching and hand launching is that a catapult will usually give the aircraft a greater level of acceleration, and the risk involved is primarily that the propeller will strike the catapult f rame instead of hitting your hand. In most other ways a catapult launch is like a hand launch, and the same 4 key parameters apply. If your catapult is setup so that the motor cannot run until the aircraft is out of the frame of the catapult then you will need to choose the parameters to ensure there is sufficient delay. Often this means a higher value for TKOFF_THR_MINACC (say 20m/s/s) and a longer delay before the GPS ground speed is measured. Some experimentation may be needed, but a value of TKOFF_THR_D ELAY of 5 is likely to be good for many catapults.

# Automatic Landing

Configuring for Automatic Landing Plane can automatically land an aircraft, as part of a mission plan. To land the plane you need to add a NAV_LAND command to the end of your mission indicating the latitude, longitude and altitude of your desired touchdown point. In most cases, the altitude should be set to 0. During landing, the autopilot will shut down the throttle and hold the current heading when the plane reaches the flare point, controlled by the parameters described below. Key Parameters The key parameters that control automatic landing are:

 LAND_FLARE_ALT

 LAND_FLARE_SEC

 LAND_PITCH_CD

 TECS_LAND_ARSPD

 T ECS_LAND_SPDWGT The meaning and recommended value of each of these parameters is described below.



### Setting the Flare Point The “flare” is the final stage of the landing when the autopilot cuts the throttle and raises the pitch, increasing drag and slowing the aircraft to sink onto the ground. The appropriate time to flare depends on the type of aircraft, and is controlled by the LAND_FLARE_ALT and LAND_FLARE_SEC parameters. The primary control of the flare is the LAND_FLARE_SEC parameter . This is the time in seconds before the aircraft would hit the ground if it continued with its current descent rate. So if the plane is descending at 2 meters/second and you set the LAND_FLARE_SEC to 3 then the aircraft would flare at an
altitude of 6 met ers above the ground. By using a time to impact to control the flare the aircraft is able to flare at a higher altitude if it is descending quickly, and at a lower altitude if it is descending slowly. That helps ensure the flare is able to produce a smooth touchdown. The second control is LAND_FLARE_ALT. That is an altitude above the ground in meters at which the aircraft will flare, regardless of its descent rate. The appropriate values for these two parameters depends on how the autopilot is estimating it s altitude above the ground. If the autopilot has a good rangefinder ( such as LIDAR ) then you can safely choose quite small numbers, and flare close to the ground. That will generally produce a better landing. A value for LAND_FLARE_SEC of 1.5 and LAND_FLARE_ALT of 2 is a good place to start with a LiDAR. If you are relying solely on a barometer for landing altitude then you will probably need hi gher values, to account
for barometric error.



### Controlling the glide slope Another important factor in setting up the flare point is the glide slope. The glide slope is the ratio of the distance from the last waypoint to the landing point, and the height di fference between the last waypoint and the landing point. For example, if the landing point is 300 meters from the last waypoint, and the last waypoint is 30 meters above the ground then the glide slope is 10%. If the glide slope is too steep then the airc raft will not be able to flare in time to avoid crashing, plus the autopilot may not be able to keep the plane on the approach slope accurately. It is recommended thatyou start with a glide slope of at most 10%. What glide slope your plane can handle will depend on how

well your pitch controller tuning is, how good your TECS tuning is, and the landing speed you ask for. If you find your aircraft is not following the desired glide slope accurately then you should first check your pitch tuning in your logs, and ensure that the demanded and achieved pitch match within a couple of degrees during landing. If they don’t then look at the documentation on pitch tuning (or possibly re

run AUTOTUNE). If the demanded and achieved pitch do match then you should check y our TECS logs to ensure that the demanded and achieved airspeed are matching during landing. Have a look at the TECS tuning patch for more information. You should also be aware that many model aircraft can glide for long distances, and it may be that your requested glide slope and airspeed combination just isn’t achievable.



### Landing Airspeed Automatic landing is greatly assisted by the use of an airspeed sensor. When using an airspeed sensor the landing approach speed (the speed before the flare) is controll ed by the TECS_LAND_ARSPD parameter, in meters/second. You need to choose a value for TECS_LAND_ARSPD that is a bove the stall speed of your aircraft, but low enough that the aircraft is able to lose altitude and land in a reasonable distance. Note that as the stall speed is dependent on the weight of your aircraft you will need to adjust the landing speed if you
ch ange the aircraft’s weight significantly (such as by adding batteries or a camera).



### Controlling the approach During the landing approach the autopilot needs to balance the requested airspeed (set by TECS_LAND_ARSPD) and the requested glide slope and landin g position (set by the previous waypoint and final landing point). The default configuration tries to balance these two demands equally, but for some aircraft you may want to prioritize one over the other. The priority of airspeed control versus height con trol is set using the TECS_LAND_SPDWGT parameter. A value of 1 (the default) means a balance bet ween the two. A value closer to two gives a higher priority to airspeed and a value closer to zero gives a higher priority to height control. For example, if you are landing at a speed close to the stall speed you may wish to place a high priority on the a irspeed control. To do that you should set TECS_LAND_SPDWGT to a value close to 2, such as 1.9. If what you want in a landing is precision in the position where it lands then you should set TECS_LAND_SPDWGT to a low number, such as 0.2 or even 0.0. In that case the plane will still try to achieve the target landing airspeed by using the throttle, but it will not try to control airspeed with pitch. If you are landing a glider (or any aircraft without a motor) then you should set TECS_LAND_SPDWGT to
2.0, so t hat airspeed is the priority and pitch will be used to control airspeed.



### Controlling the flare The final stage of the landing is called the “flare”. During the flare the aircraft tries to retain a course along the line between the last waypoint and the lan ding waypoint, and it controls it’s height solely using a target descent rate. Once the flare is started the throttle is set to TH R_MIN (which is usually zero, meaning the motor is stopped). The main job of the flight controller in the flare is to try to achieve the descent rate specified in the TECS_LAND_SINK parameter. That defaults to 0.25 meters/second, which is a reasonable touchdown vertical speed for most models. To achieve that speed the TECS controller uses pitch control only as the

mo tor has been forced to zero. The primary parameters which affect the ability of the aircraft to achieve the desired descent rate are LAND_PITCH_CD

, TECS_LAND_DAMP and the main pitch tuning parameters.The LAND_PITCH_CD parame ter sets the minimum pitch target in the flare (in centi

- degrees). This

parameter is very airframe specific and is designed to prevent the nose of the aircraft being too far down on touchdown causing issues with damaging the landing gear or breaking a prop eller. For most aircraft this should be a small positive number (such as 300, meaning 3 degrees), but for some belly landing aircraft a small negative number can be good, to allow the nose to be kept down a small amount
to reduce the chance of stall if th e flare happens too far off the ground. Note that the actual pitch of the aircraft can be quite a bit above LAND_PITCH_CD as the TECS controller tries to control the descent rate. The maximum pitch is controlled by the TECS_PITCH_MAX parameter if

it is non

- zero, otherwise by the LIM_PITCH_MAX parameter. The TECS_LAND_DAMP parameter is a damping constant for the pitch control during. A larger number will cause the pitch demand to change more slowly. This parameter can be used to reduce issue s with sudden pitch changes when the flare happens.



### After the Flare After the plane flares it continues to navigate, but with zero throttle. The navigation direction is a line extrapolated forward through the landing point from the last waypoint. Note that the navigation roll will
be limited to LEVEL_ROLL_LIMIT (which defaults to 5 degrees) to prevent wing strike, so if there is a significant cross

- wind then it is likely that the aircraft will not be able to maintain the exact path. When the plane has stopped moving for LAND_DISARMDELAY seconds (default 20 seconds) it will
disarm the motor.



### Using a rangefinder If you have fitted a rangefinder to your aircraft then you can use it for much more accurate landing control. To allow the rangefinder to be used for landing you need to set the RNGFND_LANDING parameter to 1. When using a rangefinder for landing the altitude given by the rangefinder is used only in the landing approach and to determine the flare point, and is desig ned to allow the aircraft to more accurately follow the glide slope and to flare at the right time.

Note: The effectiveness of a rangefinder can depend on the surface you are flying over, so it is a good idea to do some low passes in a flight mode such as FBWA first, then examine the logs to check that the rangefinder is working correctly. Also note that if you have a longer range rangefinder then it is a very good idea to set the minimum range of the rangerfinder well above zero. For example, the PulsedLig ht Lidar has a typical range of over 40 meters, and when it gets false readings it tends to read ranges of less than 1 meter. Setting RNGFND_MIN_CM to 150 will discard any rangerfinder readings below 1.5 meters, and will greatly improve the robustness of the Lidar for landing.



### Improving the landing The key to a good landing is the autopilot knowing how far off the ground it is. With the default setup the only sensor available to detect altitude is the barometer. Unfortunately barometers suffer from three main types of error:

 barometric drift due to changes in atmospheric pressure

 barometric drift due to changes in the temper ature of the autopilot electronics

 barometric error due to local pressure changes from airflow around the barometer The ideal setup for good automatic landing is to have a Lidar . A Lidar can measure the distance to the ground very accurately, and doesn’t suffer from drift. If you have a Lidar installed you can enable its use for landing with RNGFND_LANDING=1.If a Lidar isn’t fitted then there are a few things you can do to mini mise barometric error problems with

auto

- land

 perform a barometer calibration after the electronics have warmed up. The easiest way to do this with a Pixhawk is to disarm the plane with the safety switch. When the plane is disarmed it
assumes it is on the ground and will zero the barometer to the current pressure.

 try to prevent direct airflow over the autopilot that could cause speed related pressure changes

 fly shorter flights, allowing for less time for airpressure changes. Check your logs and see if the landing is happening at zero altitude consistently With planes that belly land it can also work well to setup the landing with a shallow pitch (in LAND_PITCH_CD) and set a slightly higher altitude to flare at. That will only work if your stall speed is
lo w enough that gliding for a while will work reliably.



### Using DO_LAND_START Sometimes it is useful to trigger an automatic landing as part of an RTL (return to launch). To do this you need to do two things:

 add a DO_LAND_START mission item to your mission, just before the start of your landing

sequence

 set the RTL_AUTOLAND parameter to 1 or 2 The way it works is that when the plane enters an RTL it checks to see if the parameter RTL_AUTOLAND
is set to 1 or 2. If it is then the current mission i s searched for a mission item of type DO_LAND_START. If one is found then the plane will automatically enter AUTO mode and land, starting at the part of the mission just after the DO_LAND_START marker. The exact behaviour depends on the RTL_AUTOLAND value:

 If RTL_AUTOLAND=1 then the plane will first RTL as normal, then when it starts circling the return point (home or a rally point) it will then switch to the AUTO mission after the DO_LAND_START and land

 If RTL_AUTOLAND=2 then the plane will bypass the RTL completely and go straight to the landing sequence. You can optionally include more than one DO_LAND_START mission item in your mission. If that is done then the latitude/longitude of the DO_LAND_START mission items is used to choose which landing

sequence to use. The DO_LAND_START closest to the current location is used. This can be useful if you have multiple landing sequences for different wind conditions or different areas.



### How to manually abort an auto

- landing A landing

- abort mechanism is provided to a llow you to abort a landing sequence in a safe, controlled, and expected way. Custom abort behaviour can be pre

- programmed as part of the mission or you can use the default abort recovery mechanism. To enable, set param LAND_ABORT_THR=1.

Note:
This section describes the abort behaviour introduced in Plane 3.4.



### Abort triggers The are a number of ways trigger an auto

- landing abort (all of them will only work while currently executing a LAND waypoint mission item):

 Send the MAV_CMD_DO_GO_AROUND command (using a GCS). This will increment the mission index to the next command (the one after LAND) where you can customize any navigation behavior you want.

 Mode change . When switching out of AUTO mode while landing (for example to MANUAL/STABILIZE/FBWA) your mission index will automatically change depending on whichabort flight behavior you have configured (see below). If you were to switch out of and back into

AUTO quickly, then you would immediately start executing your alternate mission behavior.This
is useful for cases where you want to manually abort and then continue the planned landing when you’re ready. For example, you might switch to MANUAL/STABILIZE/FBWA in order to avoid an object on the runway and then go back into AUTO to restart the landing.

 Throttle br iefly > 95% . This will trigger one of the three abort flight behaviors while staying in
AUTO mode.



### Abort land flight behavior options The abort behaviour depends on the trigger method, your mission, and other factors.



### User

- defined abort sequence

If an abor t is triggered using the CMD_DO_GO_AROUND command, the mission will increment to the command after the LAND command, and continue as normal. As the command sequence after LAND is arbitrary, this approach allows a fully customized abort sequence. Tip:

A use ful mission item to put directly after LAND is the CONTINUE_AND_CHANGE_ALT mission item with
the fir st param either 0 or 1. This will cause the aircraft to climb to the desired altitude. If an abort is triggered by changing modes or increasing throttle to >95%, Plane will check if the command after LAND is CONTINUE_AND_CHANGE_ALT. If it is, then Plane wi ll execute that command,
and then continue the mission when it reaches the desired altitude. Otherwise Plane will follow the default abort sequence below.



### Fallback/default abort sequence
If an abort is triggered by changing modes (toggle out of AUTO to FB WA and then back to AUTO) or increasing throttle to >95% and CONTINUE_AND_CHANGE_ALT is not found after the LAND command, then Plane will attempt to auto

- climb to a safe altitude using best

- available information.
Plane uses TKOFF_THR_MAX for the throttle value. The target altitude and pitch used are the first values out of the following that are found/defined:

1. LAND command abort altitude (param 1).

2. TAKEOFF command altitude and pitch value.

3. Default altitude of 30m and 4 degree pitch (used if the LAND abort altitude not defined and the mission has no TAKEOFF command).
The climb

- out procedure is complete when the abort altitude is reached. Plane will then change the
mission index to allow for a predictable landing approach:

 Jump to a DO_LAND_START command if there is one in the mission.

 Otherwise decrement the mission index to restart the glide slope.

# Inverted Flight

The INVERTEDFLT_CH parameter allows you to configure a transmitter switch to enable inverted flight with APM. The default is zero, which means no inverted flight. To enable it, choose a RC input channel which is not being used for anything else, and setu p your transmitter to give a PWM value larger than 1750 when a previously unused 2 position switch is enabled, and a value well below 1750 when it is not
enabled. For example, if channel 7 is currently unused, and you set INVERTEDFLT_CH to 7, then if your transmitter sends 1900 on channel 7 the APM will flip the plane upside down and continue flying in whatever mode it is in, but with the plane inverted.



### Transmitter Setup Enabling inverted flight only changes how APM stabilises the plane. It will stabilise it with a roll of 180 degrees from normal whenever inverted flight is enabled. To get the most out of inverted flight it can be useful to also invert your transmitter elevator and rudder controls while your inverted flight switch is enabled. This should be possible with any good transmitter. For example, with the ER9X firmware on a Turnigy 9X transmitter you could use mixes like this:

CH01 +100% AIL

CH02 +100% ELE
*

- 100% FULL Switch(GEA)

CH03 +100% THR

CH04 +100% RUD
*

- 100% FULL Switch(G EA)

CH07 +100% MAX Switch(GEA) that would setup the elevator and rudder to invert when the GEAR switch is active, along with setting
CH7 to full.



### Interaction with flight modes Inverted flight can be used with any of the stabilized flight modes (which me ans anything but manual mode). That means you can switch on inverted flight during a mission and the plane will continue the mission inverted. Make sure you disable it before trying to land!



### Tips Here are some general tips about inverted flight

 Try it out in HIL simulation first to get used to it, and ensure your transmitter is setup right.

 make sure you have plenty of height before engaging or disengaging inverted flight. Depending on your airframe, you could lose a lot of height while flipping over, and i t may be that your airframe struggles to maintain height while inverted

# Stall Prevention

Basic Idea One of the most common ways that users crash is through a stall. A stall happens when the airflow over the wing is not sufficient to hold the aircraft in t he air. Stalls can happen at any speed, but the most common type of stall is a low speed stall, where the airflow is too slow to provide enough lift. The amount of airflow you need over the wing to hold the aircraft in the air depends (among other things) on the bank angle you are flying at. If you are banked over hard then you need to fly faster to get enough lift to stay in the air. This is because the lift is produced perpendicular to the wing, so when the wing is rolled over it provides only part of the lift to holding the aircraft up, and the rest of the lift goes into making the aircraft turn.
When the STALL_PREVE NTION parameter is set to 1 then two things are done:

 when in roll controlled modes the autopilot will monitor your demanded bank angle and airspeed and work out if you have sufficient margin above the stall speed to turn at the demanded bank angle. If yo u don’t then the turn will be limited to the safe limit, but it will always allow a bank of at least 25 degrees (to ensure you can still manoeuvre if your airspeed estimate is badly off).

 when in auto

- throttle modes the autopilot will also raise the minimu m airspeed in the TECS
system to the level at which the current demanded bank angle can be safely achieved. So it will
add more engine power or lower the nose to raise the airspeed so that the bank angle that the navigation controller is demanding can be achieved without a stall



### Configuring stall prevention There are two key parameters that control stall prevention:

 The STALL_PREVENTION parameter. If this is set to zero then no stall prevention is done. This may be useful if you have no airspe ed sensor and the synthetic airspeed estimate is not good enough

 The ARSPD_FBW_MIN parameter, which is the configured minimu m airspeed for level flight. It is this value that is scaled with the bank angle to calculate the safe airspeed for any demanded bank angle



### Affected modes The following modes are affected by the bank angle limiting of the stall prevention code:

 FBWA

 FBWB

 A UTOTUNE

 CIRCLE

 RTL

 AUTO

 CRUISE

 LOITER

 GUIDED

 TRAINING (from Plane 3.4) In each of these modes the aircraft is either calculating a desired bank angle for the navigation code, or the user is inputting a desired bank angle via the aileron stick. In both case s the stall prevention codewill limit the bank angle based on the amount of margin between ARSPD_FBW_MIN and the current

airspeed. The following modes are affected by the automatic speed increase in TECS when the bank angle is limited by stall prevention:

 CIRCLE

 RTL

 AUTO

 CRUISE

 LOITER

 GUIDED These are all of the “auto throttle” modes, where the TECS controller controls pitch and throttle.



### Example Usage An example of how stall prevention works is in AUTO mode when making a turn for an automated landing. The landing approach will aim for an airspeed of TECS_LAND_ARSPD , which is often quite low, and may be just above t he stall speed. If the final turn is sharp (it is often 90 degrees) the plane may be trying to perform a sharp turn while dropping speed for landing. That could induce a stall. The stall prevention code means two things happen:

 the initial turn is kept sha llow enough to prevent the stall

 the target airspeed is kept high enough during the turn to allow the turn to complete, after
which it is lowered



### Nose Down in FBWA and AUTOTUNE The FBWA mode has an additional special feature to help prevent straight line s talls. It is often difficult for a pilot to judge the airspeed of a plane when it is coming head on, and so many pilots find themselves flying too slow when they are trying to fly gently in FBWA mode. This is especially true if the ArduPilot pitch controll er is well tuned and manages to keep the nose up even when flying slowly. To make a level flight low speed stall less likely some additional down pitch is added in FBWA and AUTOTUNE modes based on the throttle position. The amount of down pitch added is ba sed on the STAB_PITCH_DOWN parameter, which defaults to 2 degrees. At zero throttle this full down pitch is
ad ded. If throttle is above TRIM_THROTTLE then no down pitch is added. Between those two values the down pitch is added in proportion to the throttle. This has the effect of slightly lowering the nose when you lower throttle in FBWA and AUTOTUNE modes, which makes the plane gain a bit of speed, and thus makes it less likely to stall. The value you need for STAB_PITCH_DOWN depends on how much drag your plane has. A very sleek model will need a smaller value. A high drag model will need a larger value.

# Instructions

In the screenshot below, a Copter mission starts with an auto takeoff to 20 meters attitude; then goes to WP 2 rising to 100 meters altitude on the way, then waits 10 seconds; the n the craft will proceed to WP 3 (descending to 50 meters altitude on the way), then returns to launch. Since the default altitude is 100 meters, the return to launch will be at 100 meters. After reaching the launch position, the craft will land. The miss ion assumes that the launch position is set at the home position.

Mission Planning Example



### You can enter waypoints and other commands (see the Mission commands section below for more information). In the dropdown menus on each row, select the command you want. The column heading will change to show you what data that command requires. Lat and Lon can be entered by clicking on the map. Altitude is relative to your launch altitude/home position, so if you set 100m, for example, it will fly 100m above you.

Default Alt is the default altitude when entering new waypoints. It’s also the altitude RTL (return to launch) mode will fly a t if you have Hold Default ALT checked; if you don’t have that checked, your aircraft will try to maintain the altitude it was at when you switched on RTL.

### Verify height means that the Mission Planner will use Google Earth topology data to adjust your

desi red altitude at each waypoint to reflect the height of the ground beneath. So if your waypoint is on a hill, if this option is selected the Mission Planner 

### will increase your ALT setting by the height of the hill. This is a good way to make sure you don’t crash into mountains!

Once you are done with your mission, select Write and it will be sent to APM and saved in EEPROM. You can confirm that it’s as you wanted by selecting Read

.

You can save multiple mission files to your local hard drive by selecting Sav e WP File or read
in files with Load WP File in the right

- click menu:

# Tips

 Prefetch: You can cache map data so you don’t need Internet access at the field. Click the
Prefetch button, and hold down Alt to draw a box to download the selected imagery of a
l ocation.

 Grid: This allows you to draw a polygon (right click) and automatically create waypoints over the selected area. Note that it does not do “island detection”, which means if you have a big polygon and a little one inside of that, the little one wil l not be excluded from the big one (see this for more). Also, in the case of any polygon that partialy doubles backs on itself (like the letter U), the open area in the center will be included as part of the flyover.

 Setting your home location to the current location is easy, just click Home Location above where you enter your home location, and it will set your home location to the current coordinates.

 You can measure the distance bet ween waypoints by right

- clicking at one end and selecting Measure Distance. Then right

- click on the other end and select Measure Distance again. A dialog box will open with the distance between the two points.

# Auto grid

You can also have the Mission Planne r 

### create a mission for you, which is useful for function like mapping missions, where the aircraft should just go back and forth in a “lawnmower” pattern over an area to collect photographs.

To do this, in the right

- click menu select Polygon and draw a box around the area you want to map. Then select Auto WP, Grid. Follow the dialog box process to select altitude and spacing.

The Mission Planner 

### will then generate a mission that looks something like this:

Mission Planner auto

- generated grid

# Mission comman ds

Mission Planner 

### provides a filtered list of the commands appropriate for the current vehicle type, and adds column headings for the parameters that need user

- supplied values. These include navigation commands to travel to waypoints and loiter in the vic inity, DO commands to execute specific actions (for example taking pictures), and condition commands that can control when
DO commands are able to run.

Example: LOITER_TURNS command with headings for number of turns, direction, and location to loiter

arou nd.



### The full set of mission commands supported by all ArduPilot platforms are listed in MAVLink
Mission Comm and Messages (MAV_CMD) . This includes the full name of each command (as defined in the protocol definition), information about which parameters are supported, and also the corresponding Mission Planner 

### column headings.

Overview The MAVLink protocol defin es a large number of MAV_CMD waypoint command types (sent in a MAVLink_mission_item_message). ArduPilot implements handling for the su bset of these commands
and command

- parameters that are most relevant and meaningful for each of the vehicles. Unsupported commands that are sent to a particular autopilot will simply be dropped.
This article lists and describes the commands and command

- par ameters that are supported on each of the vehicle types. Any parameter that is “grey” is not supported by the autopilot and will be ignored (they are still documented to make it clear which properties that are supported by the MAV_CMD protocol are not implemented by the vehicle.
Some commands and command

- parameters are not implemented because they are not relevant for particular vehicle types (for example “MAV_CMD_NAV_TAKEOFF” command makes sense for Plane and Copter but not Rover, and the pitch parameter only makes sense for Plane). There are also some potentially useful command

- parameters that are not handled because there is a limit to the message size, and a decision has been made to prioritise some parameters over others.

Note: There is additional information about the supported commands on Copter (from a Mission Planner perspective) in the Copter Mission Command List

. 

### Types of commands There are several different types of commands that can be used within missions: Navigation commands are used to control the movement of the vehicle, including takeoff,

moving to and around waypoints, changing altitude, and landing.

 DO commands are for auxiliary functions and do not affect the vehicle’s position (for example, setting the camera trigger distance, or setting a servo value).

 Condition com mands are used to delay DO commands until some condition is met, for example the UAV reaches a certain altitude or distance from the waypoint. During a mission at most one “Navigation” command and one “Do” or “Condition” command can be running at one time. A typical mission might set a waypoint (NAV command), add a CONDITION command that doesn’t complete until a certain distance from the destination ( MAV_CMD_CONDITION_DISTANCE ), and then add a number of DO commands that are executed sequentially (for example MAV_CMD_DO_SET_CAM_TRIGG_DIST to take pictures at regular intervals) when the condition completes.

Note: CONDITION and DO commands are associated with the preceding NAV command: if the UAV reaches the waypoint before these commands are executed, the next NAV command is loaded and they will be skipped.



### Frames of reference Many of the commands (in particular the NAV_ commands ) inclu de position/location information. The information is provided relative to a particular “frame of reference”, which is specified in the message’s
frame field. Copter and Rover Mission use MAV_CMD_DO_SET_HOME command to set the “home position” in the global coordinate frame (MAV_FRAME_GLOBAL), WGS84 coordinate system , where altitude is relative to mean sea level. All other commands use the MAV_FRAME_GLOBAL_RELATIVE_ALT frame, which uses the same latitude and longitude, but sets altitude as relative to the home position (home altitude = 0).
Plan e commands can additionally use MAV_FRAME_GLOBAL_TERRAIN_ALT frame of reference. This again has the same WGS84 frame of reference for latitude/Longitude, but specifies altitude relative to ground height (as defined in a terrain database).

Note:
The other f rame types defined in the MAVLink protocol (see MAV_FRAME ) are not supported for
mission commands.



### How accurate is the informat ion? If a command or parameter is marked as supported then it is likely (but not guaranteed) that it will behave as indicated. If a command or parameter is not listed (or marked as not supported) then it is extremely likely that it is not supported on Ardu Pilot. The reason for this is that the information was predominantly inferred by inspecting the command handlers for messages:

 The switch statem ent in AP_Mission::mavlink_to_mission_cmd was inspected to determine which commands are handled by all vehicle platforms, and which parameters from the message
are stored.

 The command handler switch for each vehicle type ( Plane

, Copter

, Rover ) tells us which commands are likely to be supported in each vehicle and which parameters are passed to the
handler. The above checks give a very accurate picture of what commands and parameters are not suppor ted. They gives a fairly accurate picture of what commands/parameters are likely to be supported . However this indication is not guaranteed to be accurate because a command handler could just throw away all the information (and we have not fully checked al l of these).In addition to the above checks, we have also merged information from the Copter Mission Command

List

. 

### How to interpret the commands parameters The parameters for each comm and are listed in a table. The parameters that are “greyed out” are not supported. The command field column (param name) uses “bold” text to indicate those parameters that are defined in the protocol (normal text is used for “empty” parameters).
This allow s users/developers to see both what is supported, and what protocol fields are not supported
in ArduPilot.



### Using this information with a GCS

Mission Planner (MP) exposes the full subset of commands and parameters supported by ArduPilot, filtered to display just those relevant to the currently connected vehicle. Mapping the MP commands to this documentation is easy, because it simply names commands using a cut

- down version of the full command name (e.g. DO_SET_SERVO rather than the full command name: MAV_CMD _DO_SET_SERVO). In addition, this document conveniently lists the column label used by Mission Planner alongside each of the parameters. Other GCSs (APM Planner 2, Tower etc.) may support some other subset of commands/parameters and use alternative names/l abels for them. In most cases the mapping should be obvious.



### Navigation commands Navigation commands are used to control the movement of the vehicle, including takeoff, moving to and around waypoints, and landing. NAV commands have the highest priority. An y DO_ and CONDITION_ commands that have not executed when a NAV command is loaded are skipped (for example, if a waypoint completes and the NAV command for another waypoint is loaded, and unexecuted DO/CONDITION commands associated with the first waypoint are dropped. MAV_CMD_NAV_WAYPOINT Supported by: Copter, Plane, Rover. Navigate to the specified position.
Plane The vehicle will fly to the specified latitude, longitude and altitude. The waypoint is considered “complete” when Plane is within the specified radius of the target location, at which point Plane processes the next command. The protocol additionally provides for the plane to circle the waypoint with a specified radius and direction for a specified time (Delay). These parameters are not support by Copter. Command parameters

Command
Field Mission

Planner Field Description

param1 Hold time at mission waypoint in decimal seconds (Copter/Rover only).

param2 Acceptance radius in meters (waypoint is complete when the plane is this close to the waypoi nt location (Plane only).

param3 0 to pass through the WP, if > 0 radius in meters to pass by WP. Positive value for clockwise orbit, negative value for counter

- clockwise orbit. Allows trajectory control.

param4 Desired yaw angle at waypoint target (ro tary wing).

param5 Lat Target latitudeparam6 Lon Target longitude

param7 Alt Target altitude
MAV_CMD_NAV_TAKEOFF Supported by: Copter, Plane (not Rover). Takeoff (either from ground or by hand

- launch). It should be the first command of nearly all Plan e and Copter missions.
Plane The plane climbs to the specified altitude (at the specified pitch/climb angle) before proceeding to the next waypoint. The plane is only attempting to climb at this point and can be pushed off its heading by wind. The pitch

va lue is the minimum climb angle the when using an airspeed sensor, and maximum angle when not using an airspeed sensor. Command parameters

Command Field Mission Planner Field Description

param1 Pitch Angle Pitch/climb angle in degrees (Plane only).

param2 Empty
param3 Empty

param4 Yaw angle (ignored if compass not present).

param5 Lat Latitude

param6 Lon Longitude

param7 Alt Altitude
MAV_CMD_NAV_LOITER_UNLIM Supported by: Copter, Plane (not Rover). Loiter at the specified location for an unlimited amount of time.
Plane Fly to the specified location and then loiter there indefinitely

— where loiter means “circle the waypoint”. If zero is specified for a latitude/longitude/altitude parameter then the current location value for the parameter will be u sed. YOu can also specify the radius and direction for the loiter. The mission will not proceed past this command while in AUTO mode. In order to break out of this command you need to change the mode (i.e. to MANUAL). If there are subsequent commands then you can continue the mission at the next command, if the Copter MIS_RESTART parameter is set to resume, by switching back to AUTO mode (otherwise the mission will restart). Command parameters

Command
Field Mission

Planner Field Description

param1 Empty
param2 Empty

param3 Dir 1=CW Radius around waypoint, in meters. Specify as a positive value to loiter clockwise, negative to move counter

- clockwise.

param4 Desired yaw angle.

param5 Lat Target latitude. If zero, the vehicle will loiter at the current latitude.

param6 Lon Target longitude. If zero, the vehicle will loiter at the current longitude.

param7 Alt Target altitude. If zero, the vehicle will loiter at the current altitude.MAV_CMD_NAV_LOITER_TURNS

Supported by: Copter, Plane (not Rover).

Loi ter (circle) the specified location for a specified number of turns.
Plane Loiter (circle) the specified location for a specified number of turns at the given radius, and then proceed to the next command. If zero is specified for a latitude/longitude/altit ude parameter then the current location value for the parameter will be used. Command parameters

Command
Field Mission

Planner Field Description

param1 Turns Number of turns (N x 360°)

param2 Empty

param3 Radius Radius around waypoint, in meters. Speci fy as a positive value to loiter clockwise, negative to move counter

- clockwise.

param4 Desired yaw angle.

param5 Lat Target latitude. If zero, the vehicle will loiter at the current latitude.

param6 Lon Target longitude. If zero, the vehicle will loite r at the current longitude.

param7 Alt Target altitude. If zero, the vehicle will loiter at the current altitude.
MAV_CMD_NAV_LOITER_TIME Supported by: Copter, Plane (not Rover). Loiter at the specified location for a set time (in seconds).
Plane Fly to the specified location and then loiter there for the specified number of seconds

— where loiter means “circle the waypoint”. The timer starts when the waypoint is reached; when it expires the waypoint is complete. If zero is specified for a latitude/longit ude/altitude parameter then the current location value for the parameter will be used. You can also specify the radius and direction for the loiter. The radius of loiter is set in the WP_LOITER_RAD parameter.



### Command parameters

Command
Field Mission

Planne r Field Description

param1 Time (s) Time to loiter at waypoint (seconds

– decimal)

param2 Empty

param3 Dir 1=CW Radius around waypoint, in meters. Specify as a positive value to loiter clockwise, negative to move counter

- clockwise.

param4 Desired yaw angle.

param5 Lat Target latitude. If zero, the vehicle will loiter at the current latitude.

param6 Lon Target longitude. If zero, the vehicle will loiter at the current longitude.

param7 Alt Target altitude. If zero, the vehicle will loiter at the cur rent altitude.
MAV_CMD_NAV_RETURN_TO_LAUNCH Supported by: Copter, Plane, Rover.
Return to the home location or the nearest Rally Point , if closer. The home location is where the vehicle was last armed (or when it first gets GPS lock after arming if the vehicle configuration allows this).#HW TODO / Questions

– Randy: Check that copter still uses RTL_ALT parameter and doesn’t try to send

information about height in the package.
Plane
Return to the home location (or the nearest Rally Point if closer) and then “Loiter” (circle the point). The home location is where the vehicle was last armed (or when it first gets GPS lock after arming if the
vehicle confi guration allows this). If the return is to a rally point, the plane will loiter at the position and altitude set in the rally point. If the return is to the home location, then the parameter ALT_HOLD_RTL is used for the loiter height (default 100m). The radius of the loiter is defined in the parameter WP_LOITER_RAD

. This command takes no parameters and generally should be the last command in the mission. Command parameters

Command Field Mission Planner Field Description

param1 Empty
param2 Empty
param3 Empty

param4 Empty

p aram5 Empty
param6 Empty

param7 Empty
MAV_CMD_NAV_LAND Supported by: Copter, Plane (not Rover). Land the vehicle at the current or a specified location.
Plane The plane will land at it’s current location or at the (non

- zero) lat/lon coordinates provi ded. Information on the parameters used to control the landing are provided in LAND flight mode

. #HW TODO

– Please confirm Plane does fly to lat/lon as indicated and that the link above is correct description. Should we integrate that description here?. Command parameters

Command Field Mission Planner Field Description

param1 Abort Alt Altitude to climb to if landing is aborted (From Plane 3.4)

param2 Empty
param3 Empty

param4 Desired yaw an gle.

param5 Lat Latitude

param6 Long Longitude

param7 Alt Altitude
MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT Supported by: Plane (not Copter, Rover). Continue on the current course and climb/descend to specified altitude. Move to the next command
when the de sired altitude is reached.
Plane Continue on the current course and climb/descend to specified altitude. Move to the next command
when the desired altitude is reached.

Note:In Plane 3.4 (and later) the param1 value sets how close the vehicle altitude must be to target altitude

for command completion. Command parameters

Command
Field Mission

Planner
Field Description

param1 TBD Climb or Descend (0 = Neutral, command completes when within 5m of this

command’s altitude, 1 = Climbing, command completes when a t or above this command’s altitude, 2 = Descending, command completes when at or below
this command’s altitude. Introduced in Plane 3.4.

param2 Empty
param3 Empty

param4 Empty

param5 Empty
param6 Empty

param7 Alt Target altitude
MAV_CMD_NAV_SPL INE_WAYPOINT Supported by: Copter (not Plane or Rover). Navigate to the target location using a spline path. MAV_CMD_NAV_GUIDED_ENABLE Supported by: Copter (not Plane or Rover).
Enable GUIDED mode to hand over control to an external controller.
See also MAV_CMD_DO_GUIDED_LIMITS for information on how to apply time, altitude and distance
limits on the external control. MAV_CMD_NAV_AL TITUDE_WAIT Supported by: Plane (not Copter or Rover). Mission command to wait for an altitude or downwards vertical speed.
Plane Mission command to wait for an altitude or downwards vertical speed. This is meant for high altitude balloon launches, allowi ng the aircraft to be idle until either an altitude is reached or a negative vertical speed is reached (indicating early balloon burst). The wiggle time is how often to wiggle the control surfaces to prevent them seizing up. Command parameters

Command Fiel d Mission Planner Field Description

param1 ? Altitude (m)

param2 ? Descent speed (m/s)

param3 ? Wiggle Time (s)

param4 Empty

param5 Empty
param6 Empty

param7 Empty
MAV_CMD_NAV_LOITER_TO_ALT Supported by: Plane (not Copter or Rover).Begin loite r at the specified Latitude and Longitude. If Lat=Lon=0, then loiter at the current position.

Don’t consider the navigation command complete (don’t leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non

- ze ro the aircraft will not leave the loiter until heading toward the next waypoint.
Plane
This command enables auto

- tuning on Plane. Command parameters

Command
Field Mission Planner

Field Description

param1 Heading Heading Required (0 = False)

param2 Radiu s Radius in meters. If positive loiter clockwise, negative counter

clockwise, 0 means no change to standard loiter.

param3 Empty
param4 Empty

param5 Lat Latitude.

param6 Long Longitude

param7 Alt Altitude
MAV_CMD_DO_JUMP Supported by: Copter, Plane , Rover. Jump to the specified command in the mission list. The jump command can be repeated either a specified number of times before continuing the mission, or it can be repeated indefinitely. Tip: Despite the name, this command is really a “NAV_” comman d rather than a “DO_” command. Conditional commands like CONDITION_DELAY don’t affect DO_JUMP (it will always perform the jump as soon as it reaches the command).

Note:

 This command can be called a maximum number of 15 times in a mission, after which new

D O_JUMP commands are ignored. The maximum number changed from 3 to 15 in AC 3.3.

 The command was introduced in/works reliably from AC3.2 Command parameters

Command
Field Mission

Planner
Field Description

param1 WP# The command index/sequence number of the command to jump to.

param2 Repeat# Number of times that the DO_JUMP command will execute before moving to the next sequential command. If the value is zero the next command will execute immediately. A value of

- 1 will cause the command to repeat
indefinit ely.

param3 Empty

param4 Empty

param5 Empty
param6 Empty

param7 Empty Mission planner screenshotsCopter: Mission Planner Settings for DO_JUMP command

In the example above the vehicle would fly back

- and

- forth between waypoints #1 and #2 a tota l of 3 times before flying on to waypoint #4.
Conditional commands Conditional commands control the execution of _DO_ commands. For example, a conditional command can prevent DO commands executing based on a time delay, until the vehicle is at a certain al titude, or at a specified distance from the next target position. A conditional command may not complete before reaching the next waypoint. In this case, any unexecuted _DO_ commands associated with the last waypoint will be skipped. MAV_CMD_CONDITION_DELA Y Supported by: Copter, Plane, Rover. After reaching a waypoint, delay the execution of the next conditional “_DO_” command for the specified number of seconds (e.g. MAV_CMD_DO_SET_ROI ).

Note: This command does not stop the vehicle. If the vehicle reaches the next waypoint before the delay timer completes, the delayed “_DO_” commands will never trigger. Command parameters

Command Field Mi ssion Planner Field Description

param1 Time (sec) Delay in seconds (decimal).

param2 Empty
param3 Empty

param4 Empty

param5 Empty
param6 Empty
param7 Empty Mission planner screenshots

Copter: Mission Planner Settings for CONDITION_DELAY comm and In the example above, Command #4 (DO_SET_ROI) is delayed so that it starts 5 seconds after the vehicle has passed Waypoint #2. MAV_CMD_CONDITION_CHANGE_ALT Supported by: Copter, Plane (not Rover).Ascend/descend at a specified rate to a given altitude (will override the value used in the following

Waypoint). Any “_DO_” commands associated with the waypoint will be delayed until the desired
altitude is reached. #HW TODO / Questions: Is this the same for plane and copter (confirm). What is the MP value f or param 1 (ascent/descent rate) Command parameters

Command Field Mission Planner Field Description

param1 Rate (cm/sec) Descent / Ascend rate (m/s).

param2 Empty
param3 Empty

param4 Empty

param5 Empty
param6 Empty

param7 Alt Target altitude

M AV_CMD_CONDITION_DISTANCE Supported by: Copter, Plane, Rover. Delays the start of the next “_DO_” command until the vehicle is within the specified number of meters of the next waypoint.

Note: This command does not stop the vehicle: it only affects DO comm ands. Command parameters

Command
Field Mission Planner

Field Description

param1 Dist (m) Distance from the next waypoint before DO commands are executed (meters).

param2 Empty
param3 Empty
param4 Empty

param5 Empty
param6 Empty

param7 Empty

M ission planner screenshots

Copter: Mission Planner Settings for CONDITION_DISTANCE command In the example above, Command #4 (DO_SET_ROI) is delayed so that it only starts once the vehicle is within 50m of waypoint #5. MAV_CMD_CONDITION_YAWSupported by: Copter (not Plane or Rover).

Point (yaw) the nose of the vehicle towards a specified heading.
DO commands The “DO” or “Now” commands are executed once to perform some action. All the DO commands associated with a waypoint are executed immediately. MAV_CMD_ DO_SET_MODE Supported by: Copter, Plane, Rover. Set system mode (preflight, armed, disarmed etc.) #HW TODO / Question

– I this implemented (NOT in MP for copter, is in MP for Plane). Command parameters

Command
Field Mission Planner

Field Description

param 1 Mode, as defined by MAV_MODE

param2 Custom mode

– this is system specific, please refer to the individual autopilot specifications for details.

param3 Empty

param4 Empty

param5 Empty
param6 Empty

param7 Empty
MAV_CMD_DO_CHANGE_SPEED Supported by: Copter, Plane, Rover. Change the target horizontal speed and/or throttle of the vehicle. The changes will be used until they are explicitly changed again or the device is rebooted.
Plane Change the target horizontal speed (airspeed or groundspeed) and/or the vehicle’s throttle. Command parameters

Command
Field Mission Planner

Field Description

param1 Type (0=as 1=gs) Speed type (0=Airspeed, 1=Ground Speed).

param2 Speed (m/s) Targe t speed (m/s). A value of

- 1 indicates no change.

param3 Throttle(%) Throttle as a percentage (0

- 100%). A value of

- 1 indicates no change.

param4 Empty

param5 Empty
param6 Empty

param7 Empty
MAV_CMD_DO_SET_HOME Supported by: Copter, Plane, Rover. Sets the home location either as the current location or at the location specified in the command.

Note:

 For Plane and Rover, if a good GPS fix cannot be obtained the location specified in the command
is used. For Copter, the command will also try to use the current position if all the location parameters

are set to 0. The location information in the command is only used if it is close to the EKF origin. Command parameters

Command Field Mission Planner Field Description

param1 Current Set home location:

1 =Set home as current location. 2=Use location specified in message parameters.

param2 Empty
param3 Empty

param4 Empty

param5 Lat Target home latitude (if param1=2)

param6 Lon Target home longitude (if param1=2)

param7 Alt Target home altitude (if param1=2)
Mission planner screenshots

Copter: Mission Planner Settings for DO_SET_HOME command MAV_CMD_DO_SET_RELAY Supported by: Copter, Plane, Rover.

Set a Relay pin’s voltage high (on) or low (off). #HW TODO / Question

– is “toggling supported” using

- 1 in the setting? Some docs indicate this, but no information. “Toggling the Relay will turn an off relay on and vice versa” Command parameters

C ommand Field Mission Planner Field Description

param1 Relay No Relay number.

param2 off(0)/on(1) Set relay state: 1: Set relay high/on (3.3V on Pixhawk, 5V on APM). 0: Set relay low/off (0v)

param3 Empty
param4 Empty

param5 Empty
param6 Empty

pa ram7 EmptyMission planner screenshots

Mission Planner Settings for DO_SET_RELAY command

MAV_CMD_DO_REPEAT_RELAY Supported by: Copter, Plane, Rover. Toggle the Relay pin’s voltage/state a specified number of times with a given period. Toggling the Relay will turn an off relay on and vice versa Command parameters

Command Field Mission Planner Field Description

param1 Relay No Relay number

. param2 Repeat # Cycle count

– the number of times the relay should be toggled

param3 Delay(s) Cycle time (seconds, decimal)

– time between each toggle.

param4 Empty

param5 Empty
param6 Empty

param7 Empty

Mission planner screenshots

Mi ssion Planner Settings for DO_RELAY_REPEAT command

In the example above, assuming the relay was off to begin with, it would be set high and then after 3 seconds it would be toggled low again. MAV_CMD_DO_SET_SERVO Supported by: Copter, Plane, Rover.

Set a given servo pin output to a specific PWM value. Command parameters

Command Field Mission Planner Field Description

param1 Ser No Servo number

– ta rget servo output pin/channel number.

param2 PWM PWM value to output, in microseconds (typically 1000 to 2000).

param3 Empty

param4 Empty

param5 Empty
param6 Empty

param7 EmptyMission planner screenshots

Mission Planner Settings for D O_SET_SERVO command

In the example above, the servo attached to output channel 8 would be moved to PWM 1700 (servos generally accept PWM values between 1000 and 2000). MAV_CMD_DO_REPEAT_SERVO Supported by: Copter, Plane, Rover. Cycle a servo PWM output pin between its mid

- position value and a specified PWM value, for a given number of cycles and with a set period.
The mid

- position value is specified in the RCn_TRIM parameter for the channel (RC8_TRIM in the screenshot below). The default value is 1500.. Command parameters

Command
Field Mission Planner

Field Description

param1 Ser No Servo number

– target servo output pin/channel.

param2 PWM PWM val ue to output, in microseconds (typically 1000 to 2000).

param3 Repeat # Cycle count

– number of times to move the servo to the specified
PWM value

param4 Delay (s) Cycle time (seconds)

– the delay in seconds between each servo

movement.
param5 Empty

p aram6 Empty

param7 Empty

Mission planner screenshots

Mission Planner Settings for DO_REPEAT_SERVO command

In the example above, the servo attached to output channel 8 would be moved to PWM 1700, then after 4 second, back to mid, after another 4 seconds it would be moved to 1700 again, then finally after 4
more seconds it would be moved back to mid. MAV_CMD_DO_LAND_START Supported by: Plane (not Copter, Rover). Mission command to prepare for a landing.
Plane Mission command to prepare for a lan ding.This is used as a marker in a mission to tell the autopilot where a sequence of mission items that

represents a landing starts. It may also be sent via a COMMAND_LONG to trigger a landing, in which case the nearest (geographically) landing sequence i n the mission will be used. The latitude/longitude are not used.

Note: General information on landing a plane is provided in the topic Automatic Landing

. Command parameters

Command
Field Mi ssion Planner

Field Description

param1 Empty
param2 Empty
param3 Empty

param4 Empty

param5 Lat Latitude used to help find the closest landing sequence, or zero if
not needed.

param6 Long Longitude used to help find the closest landing sequence, o r zero if
not needed.

param7 Empty
MAV_CMD_DO_SET_ROI Supported by: Copter, Plane, Rover. Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicles control system to control the vehicle attitude and the attitude of various sensors such as

cameras. #HW TODO / Questions

– What is the frame

– altitude above home or above terrain or relative to
vehicle? #HW TODO / Questions

– Is behaviour on all vehicles the same (except for Yaw). If so, merge 3 sections
below.
Plane
Points the camera gimbal at the “region of interest”. After setting the ROI, the camera will continue to follow it until the end of the mission, unless it is changed or cleared by setting another ROI. Clearing the ROI is achieved by setting a later DO_SET_ROI command with all zero for param5

– param7 (Lat, Lon and Alt). #HW TODO / QUESTION

– confirm behaviour is as above for plane and rover. The code looks like this only works with a camera mount, and it doesn’t try to align using the vehicle itself. Does it continue to point at the target across waypoints as for copter? If so, then probably can just have one section for this. Command parameters

Command
Field Mission

Planner Field Description

param1 Region of interest mode. (see MAV_ROI enum) // 0 = no roi, 1 = next waypoint, 2 = waypoint number, 3 = fixed location, 4 = given target (not supported)

param2 MISSION index/ tar get ID. (see MAV_ROI enum)

param3 ROI index (allows a vehicle to manage multiple ROI’s)

param4 Emptyparam5 Lat Latitude (x) of the fixed ROI

param6 Long Longitude (y) of the fixed ROI

param7 Alt Altitude of the fixed ROI
MAV_CMD_DO_DIGICAM_CONFIGU RE Supported by: Copter, Plane, Rover. Configure an on

- board camera controller system. The parameters are forwarded to an on

- board camera controller system (like the 3DR Camera Control
Board ), if one is present. Command parameters

Command
Field Mission Planner

Field Description

param1 Mode Set camera mode: 1: ProgramAuto 2: Aperture Priority
3: Shu tter Priority
4: Manual 5: IntelligentAuto 6: SuperiorAuto

param2 Shutter Speed Shutter speed (seconds divisor). So if the speed is 1/60 seconds, the value entered would be 60. Slowest shutter trigger supported is 1
second.

param3 Aperture Aperture: F st op number

param4 ISO ISO number e.g. 80, 100, 200, etc.

param5 ExposureMode Exposure type enumerator
param6 CommandID Command Identity

param7 Engine Cut

- Off Main engine cut

- off time before camera trigger in seconds/10 (0

means no cut

- off).
MAV_CMD_DO_ DIGICAM_CONTROL Supported by: Copter, Plane, Rover.
AC3.3: Control an on

- board camera controller system (like the 3DR Camera Control Board ). Currently/BEFORE AC3.3: Trigger the camera shutter once. This command takes no ad ditional
arguments. Command parameters The parameters below reflect the supported fields in AC3.3. In general if a command field is sent as 0 it is ignored. All parameters are ignored prior to AC3.3.

Command Field Mission Planner Field Description

param1 On/Off Session control (on/off or show/hide lens): 0: Turn off the camera / hide the lens 1: Turn on the camera /Show the lens

param2 Zoom Position Zoom’s absolute position. 2x, 3x, 10x, etc.

param3 Zoom Step Zooming step value to offset zoom from the cu rrent position

param4 Focus Lock Focus Locking, Unlocking or Re

- locking: 0: Ignore1: Unlock
2: Lock

param5 Shutter Cmd Shooting Command. Any non

- zero value triggers the camera.

param6 CommandID Command Identity

param7 Empty

Mission planner screensho ts

Mission Planner Settings for DO_DIGICAM_CONTROL command.

MAV_CMD_DO_MOUNT_CONTROL Supported by: Copter, Plane, Rover.
Mission command to control a camera or antenna mount. This command allows you to specify a roll, pitch and yaw angle which wi ll be sent to the camera gimbal

. This can be used to point the camera in specific directions at various times in the mission.

Note:

S upported from AC3.3, Plane 3.4 Command parameters

Command Field Mission Planner Field Description

param1 Pitch, in degrees.

param2 Roll, in degrees.

param3 Yaw, in degrees.

param4 reserved

param5 reserved

param6 reserved

param7 MAV_MOUNT_MODE enum value.

Mission planner screenshots

Mission Planner Settings for DO_MOUNT_CONTROL command

MAV_CMD_DO_SET_CAM_TRIGG_DIST Supported by: Copter, Plane, Rover. Trigger th e camera shutter at regular distance intervals. This command is useful in camera survey missions

. Note:In AC3.1.5 (and earlier) versions this command cannot be shu t

- off. The camera will continue to be

triggered repeatedly even after the mission has been ended. In AC3.2 (and higher) providing a distance of zero will stop the camera shutter from being triggered. Command parameters

Command
Field Mission Planner

Field D escription

param1 Dist (m) Camera trigger distance interval (meters). Zero to turn off distance triggering.

param2 Empty
param3 Empty

param4 Empty

param5 Empty
param6 Empty

param7 Empt y

Mission planner screenshots

Mission Planner Set tings for DO_SET_CAM_TRIGG_DIST command

The above configuration above will cause the camera shutter to trigger after every 5m that the vehicle
travels. MAV_CMD_DO_FENCE_ENABLE Supported by: Plane (not Copter or Rover).
Mission command to enable the GeoFen ce. Plane
Mission command to enable the GeoFence

. Note: At time of writing (May 2015) this command is not available in Mission Planner. Command parameters

Command Field Mission Planner Field Descriptio n
param1 Set GeoFence enable state (0=disable, 1=enable).

param2 Empty
param3 Empty

param4 Empty

param5 Empty
param6 Empty

param7 Empty
MAV_CMD_DO_PARACHUTE Supported by: Copter (not Plane or Rover). Mission command to trigger a parachute (i f enabled).MAV_CMD_DO_INVERTED_FLIGHT

Supported by: Plane (not Copter or Rover). Change to/from inverted flight.
Plane Change between normal and inverted flight

. Command parameters

Co mmand Field Mission Planner Field Description

param1 0=normal, 1=inverted Set flight type:
0: normal
1: inverted

param2 Empty
param3 Empty

param4 Empty

param5 Empty
param6 Empty

param7 Empty
MAV_CMD_DO_GRIPPER Supported by: Copter (not Plane or Rover). Mission command to operate EPM gripper. MAV_CMD_DO_GUIDED_LIMITS Supported by: Copter (not Plane or Rover).
Set limits for external control. MAV_CMD_DO_AUTOTUNE_ENABLE Supported by: Plane (not Copter or Rover). Enable/disable autotune.
Plane
Thi s command sets the Plane to AUTOTUNE mode. Command parameters

Command Field Mission Planner Field Description

param1 ? Enable/disable autotune (1: enable, 0:disable)

param2 Empty
param3 Em pty
param4 Empty

param5 Empty
param6 Empty

param7 Empty

<!

– #HW TODO

– Waypoint option bitmask

– what to say about this? Note, hidden as a comment in source for this page Waypoint option bitmask

– not yet available in the Mission Planner

bit 0 Alt itude is stored 0: Absolute 1: Relative

bit 1 Change Alt between WP 0: Gradually 1: ASAP

bit 2

bit 3 Req.to hit WP.alt to continue 0: No 1: Yes

bit 4 Relative to Home 0: No 1: Yesbit 5

bit 6

bit 7 Move to next Command 0: YES 1: Loiter unti l commanded

# Rally Points

Overview Ordinarily when a plane or copter enters Return to Launch (RTL) mode (typically triggered by an autopilot failsafe ), the default behavior is to return to the Home point , but there are often cases when
that can be undesirable. For example it may be an area full of people or property and a system running in RTL mode may very likely be in a state that merits extreme caution! It is also possib le that the flight plan is large enough that should the aircraft enter RTL mode it is undesirable to traverse all the way back to the point of takeoff. For this reason we now support the creation of multiple Rally Points. Should an aircraft enter RTL and Rally Points have been defined then it will proceed to the closest Rally Point, rather than proceeding to the Home position. Plane will then loiter at that location, and Copter will perform an automated landing
there.

A flight plan with Rally Points. Rall y Points are denoted with Purple place markers. Mousing over a Rally

Point will give its loiter altitude (as in the middle point above).



### Setting Up Rally Points The following steps are for specifying Rally Points in Mission Planner:1. Rally Point latitude a nd longitude.To set a Rally Point’s location, right click on the Flight Plan map, and select Rally Points > Set Rally Point on the resulting pop

- up menu (note that this ONLY

work in the Flight Plan screen, not the Flight Data screen):

2. The Rally loiter al titudes need to be specified (note that the default altitude for Rally Points is the default waypoint altitude value):3. Repeat for all desired Rally points!

4. Upload to the vehicle by selecting Rally Points > Upload from the right

- click popup menu
The fol lowing should be considered when using Rally Points:

1. If using a geofence : ensure the Rally Points you intend to use at your event are inside the geofence.

2. Make sure Rally Point altitudes are high enough to clear terrain and buildings.

3. Because of the limited flash memory size on the APM hardware the number of Rally Points is restricted to 10 on Plane and 6 on Copter

— this limit may be expanded on other platforms such
as PX4 and Pixhawk in the future.

4. On Plane, loiter radius for a Rally Point is the same as all other loiter points; determined by
the WP_LOITER _RAD parameter.
5. The ALT_HOLD_RTL / RTL_ALT parameters are NOT used with Rally Points! The aircraft will transit to the Rally Point at the altitude specified when adding that point.The following MAVLink parameters control Rally Point behavior:

1. RALLY_LIMIT_KM is the maximum distance a Rally Point may be from the aircraft to be
considered for an RTL event. If all Rally Points are greater than this distance fr om the aircraft, then the Home location is used for RTL events (at altitude ALT_HOLD_RTL ) unless Home is farther away than the neare st Rally Point

— in which case the nearest Rally point is used. This parameter is to prevent fly offs if Rally Points have been specified for multiple flying fields. This parameter can be disabled if set to 0.

2. RALLY_TOTAL is the number of Rally Points currently specified. This parameter will be set for you by your ground control station (e.g., Mission Planner) when you add and remove Ra lly

Points. IT IS HIGHLY UNLIKELY YOU WANT TO SET THIS PARAMETER MANUALLY AND IT IS

PROBABLY UNSAFE TO DO SO

. RALLY_TOTAL should be 0 if you have specified no Rally Points
and in this case the Home location will be used for RTL events.

### Example Flight

Flight in which RTL was commanded near waypoint 4. Plane began loitering about the southernmost Rally Point.

# Geotagging Images with Mission Planner

Overview

Geo

- tagging images makes it easier to photo

- merge the many pictu res taken during a camera mission

, and is important for applications including photogrammetry, orthopho to generation, 3D terrain modeling etc.
Mission Planner provides two methods for geotagging your photos from a mission log:

1. CAM messages from dataflash log ArduPilot can trigger a camera during pre

- programmed missions or by RC activation using the DO_DIGIC AM_CONTROL or DO_SET_CAM_TRIGG_DIST commands. Corresponding CAM messages are stored in the dataflash log, and can be used by Mission Planner to add accurate geotag information to images.

2. Time offset (image timestamp to log timestamp)
This method uses the t ime difference between the camera internal clock and system clock to determine where in the log each image was taken and get the GPS information. Typically users
must tune the offset value in order to find a sensible result. Tip:
This method is less accura te. It is used when there is no connection between camera and autopilot.

Note: Even if your camera has a built

- in GPS you may find this approach provide more accurate information
than the built

- in GPS.



### Geotagging images
Common pre

- steps Open Mission Plann er and press Ctrl+F . This will open a hidden screen like the one shown
below.

 Mission Planner: Temp Screen (Ctrl +F) Click the button Geo ref images . It will give you access to the Geo Tagging tool

 Mission Planner: Geo Ref Images Screen

 Click the button Browse Log and select the log ( .tlog or .log) of the flight related to the shooting

session.

 Click the button Browse Directory and select the folder where your aerial pictures were downloaded from your camera. Notice that the camera picture folder can con tain other files apart from the pictures. However in terms of pictures, it must contain just the ones belonging to the flight. The next steps depend on whether you’re using CAM Messages or a time offset. CAM messages In order to process CAM messages, the m ission file had to be defined to use remote camera trigger by means of any of the available mission commands (CAM_TRIGG_DISTANCE, DO_DIGICAM_CONTROL, etc).

 Select the CAM Message method if it is not selected in the Geotag Mode section.

 Enter Shutter Lag va lue (in milliseconds) if you know it. If not leave it with 0

 Check that Log offsets are correct according to your log version (usually these are OK)

 Enter FOV information if needed

 Select Use AMSL Alt checkbox if you want absolute altitude. Otherwise, unch eck

 Click Pre

- process If pre

- processing works correctly, you will see Done displayed at the end of the Process Messages Area

.Note:

The most common problem in this processing mode is having a discrepancy between the number of CAM messages in log and the number of pictures in the folder. If the tool finds that they are different, it will output an error message and abort. The final step is to “sanity check” the proposed picture location using the Location Kml button (See

Common Post

- steps below).



### Time offset
Tip: If you haven’t flown yet, one useful trick is to synchronize camera and system time.

 Select the Time Offset method if it is not se lected in the Geotag Mode section.

 Click on Estimate Offset button The tool will calculate (as explained in previous section) the time difference between the first picture and the first GPS time in the log.

 Copy the calculated offset printed in the Process Messages Area and paste it into the field Seconds offsetTake a look at the following picture:

 Click Pre

- process If pre

- processing works correctly, you will see Done displayed at the end of the Process Messages Area

. Note: The most common problem when u sing this method is the use of an inaccurate time offset. Remember that the estimated time offset is just a starting point!

The Geotag tool will output a warning if pictures are discovered that are not found in the autopilot log

– see picture below:

Mis sion Planner: Images not found in log at specified offset

The final step is to “sanity check” the proposed picture location using the Location Kml button (See

Common Post

- steps below). If the proposed locations are not correct, add or subtract some seconds to
the Offset Time and repeat.Common post

- steps

The remaining steps are to check that proposed picture locations are acceptable and wri te location information to the picture’s EXIF data:

 Click on the Location Kml button. Google Earth will open and show the proposed picture locations (as shown below):

 Check that they are OK. If you used CAM Message mode, there shouldn’t be any problem (i If there is, just order pictures alphabetically and check that the first picture in the list is also the oldest one). If you used Time Offset , just try adding or subtracting seconds to time offset.

 If everything is OK, click on GeoTag Images button and wai t to see the processing message Geo tagging FINISHED. Geotagged files can be found in geotagged folder inside the original pictures folder
Interface overview
The Mission Planner Geo Ref Images screen is shown below:Files selection

This is where the user has to select the log location and camera pictures folder Geotag mode As explained above, there are two options. CAM Messages and Time offset. Time offset estimation and shutter lag This section is only relevant if Time Offset mode has been selected.
The time offset needs to be estimated by comparing the first picture time and the first GPS time in the log. Once the user clicks the Estimate Offset button, the tool will calculate time offset and print the
result in the Process Messages section at the botto m of the window: Offset Estimation = 1st_Picture_Time

- 1st_GPS_Time_Logged

Notes:

 If CAM Message is selected, the Shutter Lag option is available. Note that GPS positions are stored at 5Hz by default (if using 3DR GPS) so they are recorded every 200ms.

 If Shutter Lag is less than 100ms, then GPS position is taken from current CAM Message.

 If Shutter Lag is bigger than 100ms, the GPS position is taken from 200ms ahead in log. Item offsets in log This section allows the user to tell the tool where specific i nformation can be found in the log. There are three messages whose offsets need to be defined

 CAM

 GPS

 ATT Tip: Item offsets are preset to the values for the last stable APM release. Example of how to find out item offset in a message line within a log

Lets take a look at the GPS Line Format definition at the beginning of a log: FMT, 130, 45, GPS, BIHBcLLeeEefI, Status,TimeMS,Week,NSats,HDop,La6t,Lng,RelAlt,Alt,Spd,GCrs,VZ,T
The field with the number 1 is the one after the Units

- definition

- word.
In our case, the Units

- definition

- word is BIHBcLLeeEefI. So the field with number 1 is Status
From this we should have:

TimeMS = 2
Week = 3

Lat = 6

... FOV and altitude reference This is where the user can define the Field of View (FOV) and orientation information. Th is information is incorporated into the result files but it is not used or stored in the picture EXIF data.
The AMSL Alt checkbox allows to select either AGL Altitude (Above Ground Level) or AMSL Altitude (Above Mean Sea Level).
Action buttons

 Pre

- process

– When this button is clicked, Geotag tool will try to extract and calculate pictures positions

 Location Kml

– When this button is clicked, Geotag tool will open Google Earth and show pictures position on a map so the user can check their correct positioni ng.

 GeoTag Images

– If everything was correct in previous steps and pictures are well positioned in the map, this button will write the position information in the EXIF data of every picture

# Mission Analysis

Diagnosing problems using Logs

Log T ypes (Dataflash vs tlogs) There are two ways to record your flight data. With some exceptions, the two methods record very similar data but in different ways:

 Dataflash logs use the Pixhawk (or APM2.x) onboard dataflash memory, which you can download after the flight. On Plane and Rover dataflash logs are created soon after start

- up. On Copter they are created a fter you first arm the copter.

 Telemetry logs (also known as “tlogs”) are recorded by the Mission Planner (or other ground station) when you connec t ArduPilot to your computer via a telemetry link

. If you are not yet familiar with the basics of these log files, first review the introduct ory pages to understand where these logs are stored and how you can download and view the information held
within them.



### Mechanical Failures Common mechanical failures include a motor or ESC failure ( including ESC sync failures ), the propeller slipping or coming off, etc. These appear in the log as a sudden divergence in the desired roll and pitch vs the vehicles actual roll and pitch. This discrepancy is most clearly visible in the da taflash logs by graphing the ATT message’s Roll

- In vs Roll and Pitch

- In vs Pitch and to a lesser extent in the NavYaw vs

Yaw.

In the example above the vehicle’s actual roll (“Roll”) closely follows the desired roll (“Roll

- In”) for the first part of the l og but then suddenly diverges. The flight controller wanted the roll to remain level (0 roll) but it was unable to likely meaning a mechanical failure. This is very different from a softwarefailure in which the flight controller freaked out and for some strange reason suddenly wanted the

copter up

- side

- down because in such cases the desired roll would be also be crazy and actual roll would
follow.

Extra notes:

 tlogs are generally more difficult to use in this case because although we have nav_roll and

na v_pitch which hold the desired roll and pitch, they are only updated when in RTL, Loiter or Auto flight modes.

 in AC3.1 (and higher) Roll

- In and Pitch

- In only hold the desired roll and pitch while in stabilize
mode. When in an autopilot mode you must look at the NTUN messages’s DRol and DPit
columns



### Vibrations High vibrations cause the Copter’s accelerometer based altitude and horizontal position estimates to drift far off from reality which leads to problems with alt hold (normally rocketing into the sky) or Loiter (drifting). Vibrations are best viewed by graphing the dataflash’s IMU message’s AccX

, AccY and AccZ values. The AccX and AccY values (primarily used for horizontal position control) should be between

- 3 and +3 m/s/s
and the AccZ should be betw een

- 15 and

- 5 m/s/s. The accelerometer values will change momentarily as the copter moves up and down which is why it is better to pull the data from a portion of the flight where the copter was mostly stationary but even with a copter that is moving you can still see the vibration levels by comparing the difference between the top and bottom of the “grass”. an occasional blade of grass going over the lines is ok but if it’s sustained then it’s likely a real vibration problem. The below graph shows accep table vibration levels.

Tlog’s RAW_IMU xacc , yacc and zacc can also be used but their update is much slower (generally less than 10hz) than the dataflash log (50hz) so it becomes more difficult to see whether the changes in
accelerometer values are due t o the copter moving or are just vibrations. If using tlogs the scale is in milli

- Gs so the acceptable range for xacc and yacc is

- 300 ~ +300, and for zacc

is

- 500 ~

- 1500. Note that in the image below the values appear out of that range which perhaps
indi cates a vibration problem although this user did not complain of AltHold or Loiter problems so it ismore likely that these variations were because the copter was not in a stable hover and the update rate

was low.



### Compass interference

Interference from t he power distribution board, motors, battery, esc and other electrical devices near the APM or PX4 can throw off the compass heading which can lead to circling (aka “toilet bowling”) or even the copter flying off in completely the wrong direction. Graphin g the tlog’s mag_field (found under “CUSTOM”) and throttle (found under VFR_HUD) values are the easiest way to quickly see the amount
of interference. In the graph’s below shows an acceptable amount of magnetic interference. You can see the mag_field
fluc tuates when the throttle is raised but only moves around by about 10% ~ 20%. Below 30%
interference is acceptable. Between 30% ~ 60% is in the grey zone where it might be ok (some users are ok, some are not) and really bad magnetic interference will show up as jumps of over 60% when the
throttle is raised.

Extra Notes:

 The length of the mag_field can be anywhere from 120 ~ 550 depending upon where in the world the vehicle is but it is normally around 330.

 The magnetic interference as a percentage of the total mag field is also displayed at the end of the compassmot set

- up procedure.

 Dataflash log’s COMPASS message hold the compass’s raw x, y and z axis values (called MagX, MagY, MagZ) which are equivalent to the tlog’s RAW_IMU xmag, ymag and zmag fields. It’s possible to calculate the mag

- field length by first loading the dataflash log file into excel, filtering by the COMPASS message and then calculating the mag

- field using the formula mag_field =sqrt(MagX^2, MagY^2, MagZ^2). Note that the COMPASS mess age is not enabled by default in

the dataflash logs because it runs at 50hz and does affect CPU performance a bit.

 Another general thing to check re the compass is the offsets which should bet between

- 150 ~

150. These are found in the tlog’s SENSOR_OFFSE T group as mag_ofs_x

, mag_ofs_y

, mag_ofs_z and in the dataflash’s COMPASS message as OfsX

, OfsY

, OfsZ

. They can also be seen in the
parameters as COMPASS_OFS_X

, COMPASS_OFS_Y

, COMPASS_OFS_Z

.

 The image above it shows a short spike at the beginning of the g raph but this can be ignored because it’s before the throttle is raised so it’s probably just as the user plugged in some other
electrical device.



### GPS glitches When in autopilot modes (Loiter, RTL, AUTO) position errors from the GPS can cause Copter to thi nk that it’s suddenly in the wrong position and lead to aggressive flying to correct the perceived

error. These “glitches” show up in both the tlogs and dataflash logs as an decrease in the number of
satellites visible and an increase in the hdop

. If using tlogs graph the the you can do this by graphing the GPS_RAW_IT group’s “eph” and “satellites_visible” values. An hdop value of 1.5 (displayed as 150) or lower is very good. Ov er 2.0 (i.e. 200) indicates a bad position value. The number of satellites falling below 9 is also bad. A significant change in these two values often accompanies a GPS position change.

In the Dataflash logs’s GPS message you will find the “HDop” and “ NSats” columns. Note the hdop values are in the correct units in the dataflash (i.e. not 100x too big like in the tlogs).AC 3.1 includes GPS Glitch detection which attempts to ignore glitch es by sanity checking the positions.



### Power Problems (BrownOuts, etc) The introduction of the 3dr power module has made it much easier for people to provide a reliable power supply to their APM/PX4. This has led to a massive reduction in the number of brow n

- outs reported but they do still occur. They can normally be reconised by the logs suddenly ending while the copter is still in the air (i.e. barometer or inerital navigation altitude is still well above zero). Try graphing the:

 Dataflash log’s CTUN mess age’s Baro Alt

 Dataflash log’s GPS message’s RelAlt (the combined accelerometer + barometer altitude estimate)

 Tlog’s VFR_HUD alt (the combined accelerometer + barometer altitude estimate)

 Tlog’s GLOBAL_POSITION relative_alt

Changes in the board voltage can also be a sign of a power problem. Variations of 0.10 to 0.15 volts are
normal. Beyond that could be a sign that other devices sharing the power source with the APM are causing ripples in the power supply that could lead to a brown

- out or other weird behaviour. The board voltage can be graphed using:

 Dataflash CURRENT message’s VCC Tlog HWSTATUS’s Vcc

In the image directly below shows the board voltage sinking by 0.15V when the throttle is raised. This is generally not a good thing but because it’s only 0.15V it’s probably ok. The 2nd graph below (a dataflash graph from a different user’s log) shows a more random variation in voltage but also up to 0.15V which is typical.



### Unexpected ERRORS including Failsafes When unexpected behavior from the fl ight controller occurs (especially when the user complains that the copter no longer responded to their input) it is often caused by one of the failsafes being triggered. There are 5 failsafes that can be activated: Throttle Failsafe, GPS Failsafe, GCS Fa ilsafe (ground station failsafe), Battery Failsafe and the Fence. The easiest way to find these is to look in the dataflash logs and filter the 1st column by “ERR”.The Subsys (aka Sub

- system) gives the area that generated the error and the ECode (aka Er ror Code)

tells you what the error was specifically. The very limited number of subsystems and error codes can be found at the bottom of the Copter defines.h file

. Sub Systems / Error Codes 1: Main (never used)
2: Radio ECode 1: “Late Frame” which means the APM’s onboard ppm encoder did not provide an update for at
least 2 seconds ECode 0: error resolved which means the ppm encoder started providing data again 3: Compass ECode 1: the compass failed to initialise (likely a hardware issue) ECode 2: failure while trying to read a single value from the compass (probably a hardware issue)
ECode 0: above errors resolved 4: Optical flow Ecode 1: failed to initialise ( likely a hardware issue)
5: Throttle failsafe ECode 1: throttle dropped below FS_THR_VALUE meaning likely loss of contact between RX/TX ECode 0: above error resolve meaning RX/TX contact likely restored 6: Battery failsafe ECode 1: battery voltage dropped below LOW_VOLT or total battery capacity used exceeded BATT_CAPACITY
7: GPS failsafe
ECode 1: GPS lock lost for at least 5 seconds
ECode 0: GPS lock restored 8: GCS (Ground station) failsafe ECode 1: updates from ground station joystick lost for at least 5 seconds ECode 0: updates from ground station restored

9: Fence
ECode 1: altitude fence breached
ECode 2: circular fence breached
ECode 3: both altitude and circular fences breachedECode 0: vehicle is back within the fences

10: Flight Mode
ECode 0 ~ 10: t he vehicle was unable to enter the desired flight mode (0=Stabilize, 1=Acro, 2=AltHold, 3=Auto, 4=Guided, 5=Loiter, 6=RTL, 7=Circle, 8=Position, 9=Land, 10=OF_Loiter)

11: GPS
ECode 2: GPS Glitch
ECode 0: GPS Glitch cleared
12: Crash Check
ECode 1: Crash de tected 13: Flip ECode 2: Flip abandoned (because of 2 second timeout)

14: AutoTune ECode 2: Bad Gains (failed to determine proper gains)
15: Parachute ECode 2: Too low to deploy parachute 16: EKF/InertialNav Check

ECode 2: Bad Variance
ECode 0: Bad Varianc e cleared 17: EKF/InertialNav Failsafe ECode 2: EKF Failsafe triggered 18: Baro glitch ECode 2: Baro glitch ECode 0: Baro glitch cleared

# Mission Planner Telemetry Logs

When and where tlogs are created Tlogs are recordings of the MAVLink telemetry messag es sent between the APM/PX and the ground station and are automatically created the moment you press the connect button on the mission planner. Files of the format YYYY

- MM

- DD hh

- mm

- ss.tlog appear in the “logs” subfolder in your Mission
Planner installation folder or to the location you select in the Planner options [Config/Tuning] [Planner]. Besides the “.tlog” files, “.rlog” files are also created. These contain all the .tlog data plus additional debug output from the mission planner. but cannot be parse d or played back so they should be ignored.



### Setting the datarate The desired rate at which data is sent from the APM/PX to the ground station can be controlled through the mission planner’s Software > Planner screen’s Telemetry drop

- downs. Because all dat a sent over the telemetry link is also recorded in the tlog, this also controls the rate of data saved to the tlogs. Note that especially on Copter, due to CPU resource limitations, the actual rate of the data sent and saved may be lower than the rate requ ested.



### Playing back missions If you are using wireless telemetry and have connected to to APM via the Mission Planner, your flight data will automatically recorded. You can play back these logs by doing the following:

 Open the mission planner’s Flight D ata screen click on the Telemetry Logs tab

 Press “Load Log” and find the flight’s tlog file

 Press “Play”

You can also jump to the point of interest in the log using the slider and control the speed of the playback with the predefined Speed buttons.
While the log is replaying, the HUD will move and the vehicles location on the map will update as it did during the flight. Individual data values can be seen through the Status tab and you can even display them in a graph by clicking on the “Tuning” checkbox under the map and then double clicking on the data legend to bring up a box from which you can choose exactly which data fields are graphed as
shown below. This will show the recorded data changing as the flight progresses.

### Creating 3d images of the fli ght path

You can create KMZ files by doing this:

 Open the mission planner’s Flight Data screen

 Click on the Telemetry Logs tab

 Press the “Tlog > Kml or Graph” button

 Press the “Create KML + GPX” button

 select the flight tlogA .kmz and .kml file will be created along side the original .tlog and this can be opened in google earth to

interactively view the 3d flight path. You can open the kmz file in Google Earth to view the flight or path. Just double click the file or drag it and drop into Google Earth.The different flight modes used during the flight will appear as different colored tracks. You can change

some details about how the flight paths are displayed including their color and whether the paths extend to the ground by doing this:

 Find the log f ile’s name in the “Places” pane on the left. It should appear in a “Temporary
Places” folder.

 Right click on an individual path and select “Properties” to open the Edit Path window.

 The color can be changed on the “Style, Color” tab

 The area below the pat h can be removed (added) on the “Altitude” tab by un

- checking (checking) “Extend path to ground”



### Extracting parameters and Waypoints You can extract the parameters and waypoints from the tlog by following the same steps as for creating the KML file except that at the last step select “Extract Params” or “Extract WPs”. Extract Params will cause a .param file to be created along side the tlog. This file is tab separated and contains a full list of parameters (in the same order as they appear in the eeprom) a long with their values during the flight. This can be opened in excel or a text editor. Extract WPs will create one or more .txt files containing any missions uploaded to the APM/PX4. These files can be opened in the Mission Planner by switching to the F light Plan screen, right

- mouse

- button clicking on the map and selecting “File Load/Save”, “Load WP File”.



### Graphing data from a flight Data from the flight can be graphed by doing the following: Open the mission planner’s Flight Data screen

 Click on the Tel emetry Logs tab

 Press the “Tlog > Kml or Graph” button

 Press the “Graph Log” button

 select the flight tlog

 When the “Graph This” screen appears, use the left or right mouse button to click on the checkboxes beside the items you wish to graph. Note that the items are grouped into categories like “RC_CHANNELS” and “RAW_IMU” although it’s still often difficult to find exactly the item you wish to graph

 If you use the left mouse button the scale for the item will appear on the left of the graph. If

you use the right mouse button it will appear on the right

 Click the checkbox multiple times to cycle through all the possible colours

 Change the zoom of the graph with your mouse’s middle wheel, by select an area of the graph
with the left mouse button held down or by right

- mouse

- button clicking on the graph and selecting “Set Scale To Default”

# Downloading and Analyzing Data Logs in

Mission Planner

Downloading logs via MAVLink This method is available in AC3.2 (or higher).

 Connect your vehicle to the mission planner using the micro USB cable

 Open the Mission Planner’s Flight Data screen

 On the bottom left, select the “DataFlash Logs” tab and push the “Download DataFlash Log Via
Mavlink” buttonThen, select the log you want to download. This will save that log to your MissionPlanner/logs directory,

in a folder named after the vehicle type, such as QUADCOPTER. Automatic Analysis of logs

The simplest analysis is to generate a basic automated report that will highlight common problem areas. For that, click on “Log Analysis” and select a log that you’ve already saved to the MissionPlanner/logs directory. They will be in folders named after the vehicle type, such as QUADCOPTER or ROVER. Onceyou pick the log you want, it will generate a report that looks like t his:

Manually review a log For more detailed analysis, click on “Review a Log” and select a log that you’ve already saved to the MissionPlanner/logs directory. Once again, they will be in folders named after the vehicle type, such as
QUADCOPTER or ROVER . Once you pick the log you want, you will get charts such as the below. The
basic format of the dataflash is:

 Line numbers appear on the very left side of the viewer

 Software version and board type appear at the top

 FMT messages are next which tell the mi ssion planner the column headers for each message
type

 PARM rows which show each parameter (in the order in which they appear in the eeprom) along with their value at the beginning of the flight

 Flight data messages including GPS, IMU, etc.Graph any flig ht data by first clicking on the appropriate row, you should see the column headers update

appropriately. Next find the column you wish to graph, click on it and then push the “Graph this data” button. In the example above the ATT’s Roll

- In and Roll data h ave been graphed. The mouse’s scroll wheel can be used to zoom in or out. You may also select an area of the graph to zoom in on it. Zoom out by right

- mouse

- button clicking and selecting “Set Scale to Default”. Here’s a mini tutorial on using this feature. You may also filter on just the first column (the flight data message type) by clicking on the first column and selecting the message type from the drop

- down. This is very useful especially for viewing the different flight modes (called “MODE” messages) used during the mission. Click the firstcolumn again but press “Cancel” to clear the filter.

Setting what data you want recorded The LOG_BITMASK paramet er controls what message types are recorded in the dataflash. Recent versions of the mission planner and ardupilot allow individual messages to be enabled/disabled from the MP’s Config/Tuning, Standard Params screen.Earlier versions of MP/ardupilot all ow selecting the message using a drop

- down as shown below.

Message Details (Copter specific)



### ATT (attitude information):

RollIn The pilot’s desired roll angle in centi

- degrees (roll left is negative, right is positive)

Roll The vehicle’s actual roll in centi

- degrees (roll left is negative, right is positive)

PitchIn The pilot’s desired pitch angle in centi

- degrees (pitch forward is negative, pitch back is positive)

Pitch The vehicle’s actual pitch angle in centi

- degrees (roll left is negative, right is positive)

YawIn Tthe pilot’s desired yaw rate as a number from

- 4500 ~ 4500 (not in deg/sec, clockwise is positive)

Yaw The vehicles actual heading in centi

- degrees with 0 = north

NavYaw The desired heading in centi

- degrees



### ATUN (auto tune overview):

Axis: 0 = Roll, 1 = Pitch

TuneStep 0 = Returning towards Level (before or after a test), 1 = Testing (i.e. performing a twitch to

test response), 2 = Updating gains (twitch completed and gains adjusted)

RateMin Minimum recorded rate during this test

Ra teMax Maximum recorded rate during this test

RPGain Rate P gain value being tested

RDGain Rate D gain value being tested

SPGain Stabilize P gain being tested

### ATDE (auto tune step details):

Angle Angle of the copter in centi

- degrees for the axis being t estedx

Rate Rate of rotation of the copter for the axis being tested



### CAM (time and position when camera shutter was activated):

GPSTime The GPS reported time since epoch in milliseconds

Lat The accelerometer + GPS latitude estimate

Lng The acceleromete r + GPS longitude estimate

Alt The accelerometer + barometer estimated altitude in cm above ground

Roll The vehicle roll angle in centi

- degrees

Pitch The vehicle pitch angle in centi

- degrees

Yaw The vehicle’s heading in centi

- degrees



### CMD (commands rec eived from the ground station or executed as part of a mission):

CTot The total number of commands in the mission

CNum This command’s number in the mission (0 is always home, 1 is the first command, etc)

CId The mavlink message id

Copt The option parameter (used for many different purposes)

Prm1 The command’s parameter (used for many different purposes)

Alt The command’s altitude in meters

Lat The command’s latitude position

Lng The command’s longitude position



### COMPASS (raw compass, offset and compassmot compensation values):

Field Description

MagX, MagY. MagZ Raw magnetic field values for x, y and z axis
OfsX, OfsY, OfsZ Raw magnetic offsets (will only change if COMPASS_LEARN parameter is 1)
MOfsX, MOfsY, MOfsZ Compassmot compensation for throttle or current



### CURRENT (battery voltage, current and board voltage information):

FIELD DESCRIPTION

Thr Pilot input throttle from 0 ~ 1000

ThrInt Integrated throttle (i.e. sum of total throttle output for th is flight)

Volt Battery voltage in volts * 100

Curr Current drawn from the battery in amps * 100

Vcc Board voltage

CurrTot Total current drawn from battery



### CTUN (throttle and altitude information):

FIELD DESCRIPTION

ThrIn The pilot’s throttle in as a number from 0 to 1000SonAlt The altitude above ground according to the sonar

BarAlt The altitude above ground according to the barometer

WPAlt The desired altitude while in AltHold, Loiter, RTL or Auto flight modes

NavThr Not used

AngBst Throttle in crease (from 0 ~ 1000) as a result of the copter leaning over (automatically added to all pilot and autopilot throttle to reduce altitude loss while leaning)

CRate Accelerometer + baro climb rate estimate in cm/s

ThrOut Final throttle output sent to the motors (from 0 ~ 1000). Normally equal to ThrIn+AngBst while
in stabilize mode.

DCRate Pilot desired climb rate in cm/s
D32, DU32 (single data values which are either signed 32bit integers or unsigned 32bit integers):

FIELD DESCRIPTION

id Identification number for the variable. There are only two possible values:

 7 = bit mask of internal state. The meaning of individual bits can be found in Copter.cpps’s definition of the ap structure

.

 9 = simple mode’s initial heading in centi

- degrees
EKF (Extended Kalman Filter ): Log information here (Dev Wik i). Overview here

. 

### ERR (an error message): SubSystem and Error codes listed below

Error DESC RIPTION

1: Main (never used)

2: Radio ECode 1: “Late Frame” which means the APM’s onboard ppm encoder did not

provide an update for at least 2 seconds ECode 0: error resolved which means the ppm encoder started providing data again

3: Compass ECode 1 : the compass failed to initialise (likely a hardware issue)

ECode 2: failure while trying to read a single value from the compass (probably a hardware issue)
ECode 0: above errors resolved
4: Optical flow Ecode 1: failed to initialise (likely a hardware issue)

5: Throttle failsafe ECode 1: throttle dropped below FS_THR_VALUE meaning likely loss of contact

between RX/TX ECode 0: above error resolve meaning RX/TX contact likely restored

6: Battery failsafe ECode 1: battery voltage dropped below LOW_VOLT o r total battery capacity used

exceeded BATT_CAPACITY

7: GPS failsafe ECode 1: GPS lock lost for at least 5 seconds

ECode 0: GPS lock restored
8: GCS (Ground station) failsafe ECode 1: updates from ground station joystick lost for at least 5 seconds

ECo de 0: updates from ground station restored

9: Fence ECode 1: altitude fence breachedECode 2: circular fence breached
ECode 3: both altitude and circular fences breached
ECode 0: vehicle is back within the fences

10: Flight Mode ECode 0 ~ 17: the vehicle was unable to enter the desired flight mode

(0=Stabilize, 1=Acro, 2=AltHold, 3=Auto, 4=Guided, 5=Loiter, 6=RTL, 7=Circle, 8=Position, 9=Land, 10=OF_Loiter, 11=Drift, 13=Sport, 14=Flip, 15=AutoTune, 16=PosHold, 17=Brake)

11: GPS ECode 2: GPS Glitch

ECode 0: GPS Glitch cleared

12: Crash Check ECode 1: Crash detected EV: (an event number) . The full list of possible events can be found in defines.h but the most common

are:

Event
Number DESCRIPTION

10 Armed

11 Disarmed

15 Auto Armed (pilot has raised throttle above zero and autopilot is free to take control of

throttle)

16 TakeOff

18 Land Complete

25 Set Home (home location coordinates have been capture)



### GPS:

FIELD DESCRIPTION

Status 0 = no GPS, 1 = GPS but no fix, 2 = GPS with 2D fix, 3 = GPS with 3D fix

Time The GPS reported time since epoch in milliseconds

NSats The number of satellites current being used

HDop : A measure of gps precision (1.5 is good, >2.0 is not so good)

Lat Lattitude according to the GPS

Lng Longitude according to the GPS

RelAlt Accelerometer + Baro altitude in meters

Alt GPS reported altitu de (not used by the flight controller)

SPD Horizontal ground speed in m/s

GCrs Ground course in degrees (0 = north)



### IMU (accelerometer and gyro information):

FIELD DESCRIPTION
GyrX, GyrY, GyrZ The raw gyro rotation rates in degrees/second

AccX, AccY, AccZ The raw accelerometer values in m/s/s
Mode (flight mode):

FIELD DESCRIPTION

Mode The flight mode displayed as a string (i.e. STABILIZE, LOITER, etc)ThrCrs Throttle cruise (from 0 ~ 1000) which is the autopilot’s best guess as to what throttle is r equired

to maintain a stable hover NTUN (navigation information):



### FIELD DESCRIPTION

WPDst Distance to the next waypoint (or loiter target) in cm. Only updated while in Loiter, RTL, Auto flight modes.

WPBrg Bearing to the next waypoint in degrees

PErX D istance to intermediate target between copter and the next waypoint in the latitude direction

PErY Distance to intermediate target between copter and the next waypoint in the longitude
direction

DVelX Desired velocity in cm/s in the latitude direction

DVelY Desired velocity in cm/s in the longitude direction

VelX Actual accelerometer + gps velocity estimate in the latitude direction

VelY Actual accelerometer + gps velocity estimate in the longitude direction

DAcX Desired acceleration in cm/s/s in th e latitude direction

DAcY Desired acceleration in cm/s/s in the longitude direction

DRol Desired roll angle in centi

- degrees

DPit Desired pitch angle in centi

- degrees PM (performance monitoring):

Field DESCRIPTION

RenCnt DCM renormalization count

– a high number may indicate problems in DCM (extremely rare)

RenBlw DCM renormalization blow

- up count

– how many times DCM had to completely rebuild the DCM matrix since the last PM. Normally innocuous but a number that constantly grows may be
an indicatio n that DCM is having troubles calculating the attitude (extremely rare)

FixCnt The number of GPS fixes received since the last PM message was received (it’s hard to imagine how this would be useful)

NLon Number of long running main loops (i.e. loops that take more than 5% longer than the 10ms they should)

NLoop The total number of loops since the last PM message was displayed. Normally 1000 and allows you to calculate the percentage of slow running loops which should never be higher than 15%.

MaxT The m aximum time that any loop took since the last PM message. This should be close to 10,000 but will be up to 6,000,000 during the interval where the motors are armed

PMT A number that increments each time a heart beat is received from the ground station

I2CErr The number of I2C errors since the last PM message. Any I2C errors may indicate a problem on the I2C bus which may in turn slow down the main loop and cause performance problems.



### RCOUT (pwm output to individual RC outputs):
RC1, RC2, etc : pwm comm and sent from flight controller to the esc/motor/RC outputViewing KMZ FILES

When you download the dataflash log files from the APM/PX4 it will automatically create a KMZ file (file with extension .kmz). This file can be opened with Google Earth (just doub le click the file) to view your flight in Google Earth.

# Optional Hardware

# 3DR Radio v2

Overview
The 3DR Radio is the easiest way to setup a telemetry connection between your APM/P ixhawk and a ground station. It is small, light and inexpensive, and typically allows ranges of better than 300m “out of the box” (the range can be extended to several kilometres with the use of a patch antenna on the ground). The radio uses open source firmware which has been specially designed to work well with MAVLink packets and to be integrated with the Mission Planner, Copter, Rover and Plane. The radios can be either 915Mhz or 433Mhz and you s hould purchase the model which is appropriate for your country/region

. The main features of the 3DR Radio are listed below (see the Advanced Configuration for more information):

 Very small size

 Light weig ht (under 4 grams without antenna)

 Available in 900MHz or 433MHz (v2 only) variants

 Receiver sensitivity to

- 121 dBm

 Transmit power up to 20dBm (100mW)

 Transparent serial link

 Air data rates up to 250kbps

 MAVLink protocol framing and status reporting

 Frequ ency hopping spread spectrum (FHSS)

 Adaptive time division multiplexing (TDM)

 Support for LBT and AFA

 Configurable duty cycle

 Built

- in error correcting code (can correct up to 25% data bit errors)

 Demonstrated range of several kilometres with a small omni antenna

 Can be used with a bi

- directional amplifier for even more range

 Open source firmware

 AT commands for radio configuration

 RT commands for remote radio configuration

 Adaptive flow control when used with APM

 Based on HM

- TRP radio modules, with Si1000 8051 micro

- controller and Si4432 radio module

Status LEDs The 3DR Radios have 2 status LEDs, one red and one green. The meaning of the different LED states is:

 Green LED blinking

– searching for another radio

 Green LED solid

– link is established with anot her radio

 Red LED flashing

– transmitting data

 Red LED solid

– in firmware update mode Connecting the radios The 3DR Radio v2 has interchangeable air and ground modules, meaning that you use them as a pair but it does not matter which one goes on the vehic le and which remains on the ground.
The radio has a micro

- USB port, and a DF13 six

- position port. The following sections explain how to connect these to flight controllers and ground stations.Connecting to Pixhawk

Use the 6 pin DF13 connector that should have come with the radio to connect the 3DR radio to your Pixhawk’s “Telem 1” (“Telem 2” or “Serial 4/5” can also be used but the default recommendation is “Telem1”).

Connecting to APM2.x
Use the 6

- to

- 5 pin DF13 connector to connect the 3DR radio to your APM2’s Telem port. Because of the
limited nu mber of serial ports on the APM2.x, the telemetry radio cannot be used while the board is also plugged in with the micro USB port.Connecting to a PC

Connecting the 3DR radio to your Windows PC is as simple as connecting the micro USB cable (which
should have been included with the radio) to your PC. The necessary drivers should be installed automatically and the radio will appear as a new “USB Serial Port” in the Windows Device Manager under Ports (COM & LPT). The Mission Planner’s COM Port selection dro p

- down should also contain the same new COM port.

To connect the radios:

 Select the new COM port, set the baud rate drop down (which appears between the COM port and Connect buttons) to 57600.

 Press the Connect button and if the two radios connect succes sfully you should be able to lean your vehicle left and right and see it’s attitude update on the MP’s Flight Data screen’s artificial
horizon. Connecting to an Android tablet Connecting the 3DR radio to an Android tablet using the L shaped micro USB cable (which should have been included with the radio). Then follow the directions in your preferred Ground Station app

.

Configuring using the Mission Planner APM Mission Planner supports configuring your 3DR radios using a simple GUI interface. Tip:Many users will not need to configure their radios! One case where you might do so is when you use

your vehicle with o thers

— in which case you will need to specify different radio channels (Net ID). To make changes:

 Connect one of the 3DR radios to your computer using the micro USB cable.

 Power the radio attached to the vehicle by plugging in the vehicle’s battery.

 Open the Mission Planner and go to the Initial Setup >> Optional Hardware >> 3DR Radio page.

 Select the correct COM port and set the baud rate to 57600. Ensure the “Connect” button is in a disconnected state as shown in the image below..

 Press the Load Settings button and both the Local and Remote areas should fill in with values including the firmware Version

 The most common entry to change is the Net ID. The default is 25 for all 3DR radios but if you plan to fly in an area with other pilots who may be using the same radio it is best to change this
to another number.

 After making changes, click the Copy Required Items to Remote and press Save Settings Other parameters you may choose to update:

 Baud (default 57) : the rate at which the mission planner or vehic le communicates with the local radio. “57” = 57600 bits per second.

 Air Speed (default 64) : the rate at which the two radios will communicate with each other. “64” = 64kbps (kilobits per second). Setting a lower rate will increase the range of the radio b ut reduce the rate of data (i.e. the amount of data that can be sent in a given time) across the link.

 ECC (default is “on”): controls whether error correction is on or off. When on “12/24 Golay error correcting code” is used which involves sending a 16 bi t CRC byte along with the data to ensure that bad data is thrown away. Unfortunately this also halves the data rate across the link but it isrecommended to leave ECC on especially when when the vehicle is far from home base because

transmission errors inc rease greatly with distance.

 MAVlink (default is “MAVLink”) : this controls whether the transmission is optimised for MAVLink packets or not. Set to “Low Latency” if using a joystick or an android tablet’s virtual joystick to manually fly the vehicle. Note that information on the radio signal strength (rssi) and error rate is only sent if this parameter is set to it’s default, “MAVLink”.

 Tx Power (default 20) : the transmission power where 1=1.3milliWats, 2=1.5mW, 5=3.2mW,
8=6.3mW,11=12.5mW, 14=25mW, 17=50m W, 20=100mW. This should be set to conform with your local regulations. Some per

- country information is below

.

 Duty Cycle (default 100) : the maximum percentage of time that the radio will transmit packets. Some regions of the world allow for higher transmit power or more frequencies if you have a duty cycle below a given threshold. So for example in Europe you can transmit on a wider rang e of frequencies in the 433 band if your duty cycle is below 10%. Telemetry traffic is quite ‘bursty’, so the average transmit time is not generally high. When you set a duty cycle below 100% then your available bandwidth will be reduced, so you will find it will only work well for telemetry at higher air speeds. A radio can be set to receive only by setting it’s Duty Cycle to zero.

 Max Window (default 33) : ensure the GCS can send a packet to the vehicle ever 33msec. This should be kept as a low number (li ke 33) when the “MAVLink” setting is “Low Latency”

 LBT Rssi (default 0) : holds the threshold used for “listen before talk” which allows it to comply with some country’s regulatory requirements. When non

- zero the radio listens for quiet period
of time wher e no signals from other radios are received before transmitting. This parameter holds the receiver signal strength below which the airwaves are considered “quiet”. If this param is set to zero then LBT is disabled. Setting this to 25 (the min) is

- 121 dBm. Each increment above 25 raises the threshold by about 0.5dB so for example 40 equals a signal strength of 7.5dB. The full formula is: signal_dBm = (RSSI / 1.9)

- 127 The LBT implementation in the 3DR radio uses a minimum listen time of 5ms, plus randomis ed listen time as per the European 9.2.2.2 rules. Note that in many regions you need to implement LBT in conjunction with AFA (Adaptive Frequency Agility). The 3DR Radio implements AFA as long as you have NUM_CHANNELS set to more than 1. Expected range Typ ical range achieved with the 3DR radios using standard configuration and antenna is around 500m, but the range varies a lot depending on noise sources and antenna setup. Diagnosing range issues The first thing you should do when diagnosing range issues is the “one meter test”. Setup the two radios one meter apart and look at the local and remote RSSI. You should get a value of over 190 for a standard 3DR radio. If you don’t then your antennas may be faulty or your radios may have been damaged. If you
have e ver run the radios without an antenna attached them the radio may have been damaged. If that test passes then have a look at your local and remote RSSI and noise from a flight. See the advanced setup page for detailed information on diagnosing range issues using telemetry logs. Improving the range The range can be improved by:

 Using a sm all “patch antenna” on the ground like this flat patch antenna or this Yagi antenna perhaps mounted on an Antenna Tracker

 Replace at least one of the two 3DR radios with a higher powered RFD900

 Reduce the AirRate parameter which will increase range but at the expense of the rate of the
data transfer.The graph below shows the ground and remote receiver strength vs dist ance from home (in meters) for

a test flight of a 3DR radio on a SkyFun plane. The ground based radio was attached to a 3.5dB flat patch antenna. The SkyFun had a small ‘wire’ antenna. The graph shows the vehicle reached a distance of nearly 3km and the li nk was completely maintained throughout the flight.

Although anecdotal, another user provided a Tlog showing a good link kept while the vehicle was 4.5km from the base station, using default radio settings for a 3DR 900 radio. The plane used a small omni antenna, and a 8dB patch antenna on the ground station. Support for different countries/regions It is very important that you configure your 3DR Radios to comply with your regional/country regulations for frequency, hopping channels and power levels. The table below provides links to the applicable standards for users without any special license. If you are have an application specific license or have a HAM license then you should know what rules are applicable to you.

Note: Compliance is your responsibili ty. The 3DR radio is a ‘DIY’ radio part and you need to ensure what whatever you build meets local regulations. Please check your local rules carefully.

Region Radio

Model Settings Standard

USA 3DR 900 MIN_FREQ: 902000 MAX_FREQ: 928000 NUM_CHANNELS=50 FCC 15.247

Canada 3DR 900 MIN_FREQ: 902000 MAX_FREQ: 928000 NUM_CHANNELS=50 RSS

- 210 Annex 8.1

Australia 3DR 900 MIN_FREQ: 915000 MAX_FREQ: 928000 NUM_CHANNELS>=20 LIPD

- 2000 item 52

Australia 3DR 433 MIN_FREQ: 433050 MAX_FREQ: 434790

TXPOWER<=14 LIPD

- 2000 i tem 17

Europe (most countries) 3DR 433 MIN_FREQ: 434040 MAX_FREQ: 434790 ETSI EN300 220 7.2.3TXPOWER<8 NUM_CHANNELS>30

Europe (most countries) 3DR 433 MIN_FREQ: 433050 MAX_FREQ: 434790

TXPOWER< 8 DUTY_CYCLE 10 ETSI EN300 220 7.2.3

United Kingdom 3DR 43 3 MIN_FREQ: 433050 MAX_FREQ: 434790

TXPOWER<8 DUTY_CYCLE 10 IR2030/1/10

New Zeala nd 3DR 900 MIN_FREQ: 921000 MAX_FREQ: 928000 Notice 2007, Schedule 1

New Zealand 3DR 433 MIN_FREQ: 433050 MAX_FREQ: 434790 Notice 2007, Schedule 1

Brazil 3DR 433 MIN_FREQ: 433000 MAX_FREQ: 435000

TXPOWER<=8 ANATEL

– Resolução no 506/2008

Brazil 3DR 900 MIN_FREQ: 902000 MAX_FREQ: 907500 NUM_CHANNELS>=11 ANATEL

– Resolução no 506/2008

Brazil 3DR 900 MIN_FREQ: 915000 MAX_FREQ: 928000 NUM_CHANNELS>=26 ANATEL

– Resolução no 506/2008

Argentina 3DR 900 MIN_FREQ: 902000 MAX_FREQ: 928000 Comisión Nacional de Comunicaciones

South Africa 3DR 433 MIN_FREQ: 433050 MAX_FREQ: 434790

TXPOWER<=10mW 2008 RR 5.138, Government Gazette No 31127,Notice

No 713 of 2008 and Government Gazette No 31290,Notice No 926 of 2008 refer

# Mission Planner Bluetooth Connectivity

Connecting to the Pixhawk or APM2.x The 3DR blue tooth data link comes with both a DF13 6 pin and 6

- to

- 5 pin connector which make it easy to connect to the Pixhawk Telem1 or APM2.x’s Telem ports. Note that for the Pixhawk, although Telem1 is the recommendation, Telem2 or even Serial 4/5 will work.

Once you have connected the Bluetooth data link you can power up the board. It is OK to use USB connected power while using the Bluetooth module connected to the APM or PixHawk as the USB connection can supply enough power BUT YOU MUST USE A WALL WART with Micro or Mini USB).
Bluetooth data link’s LEDs:

 R ed LED blinks at 1hz : device is working, not connected

 Red LED blinks at 0.5z : pairing

 Red LED solid : connected Quick Start connecting with Mission Planner If you are familiar with Bluetooth, search for Bluetooth Device HC

- 05 or 6 (some may have Linvor as well) , Pair with device (code 1234 or 0000) check it’s properties and look at the services tab. Make sure SPP com port box is checked (only there if your Bluetooth device is active) Look in Device Manager (Windows) and make sure there is a Com Port for the Bluetooth and in the com port properties set the baud rate to 57600 (note the Com Port number).

Note: For use with Mission Planner on the Configure/Tuning tab make sure and UNCHECK the box Reset on

USB Connect :The default Baud Rate for the 3DR Bl uetooth Module is 57600 (most other modules are 9600) Be sure

when you connect it is at 57600 and for the new Com Port you saw in Device Manager. When you power up the PixHawk or APM with the Bluetooth the module will flash at 1hz the red LED
when not conn ected. When Paring it will flash at .5 Hz and when connected it will be steady on. And your done! You can now use your Bluetooth telemetry for up to about 50m range. (your range may vary depending on back ground noise and conditions in your area) If you ha ve problems connecting or you don’t know Bluetooth very well or you want to change the default Baud Rate or Device Name, read on for the step by step process. Step

- by

- Step connecting with Mission Planner

Many PCs and Laptops have bluetooth adapters built in but if not then you can use a generic USB Bluetooth dongle (pic above) or use an additional 3DR Bluetooth Data Link connected via an FTDI Cable

. After first making sure your Pixhawk/APM2 is powered on, and your PC’s bluetooth dongle is plugged in and installed, click on the Windows task bar’s little up triangle (aka “show hidden icons”) whi ch should be on the bottom right of the screen.The “hidden icons box” should appear. Right

- mouse

- button

- click on the BlueTooth icon and select
“show Bluetooth devices”

Windows should bring up the devices box. Any devices you may already have connect ed by Bluetooth will be in this box. If you have not connected any BT devices before this box will be empty. Select “Add a
device”.

Windows will search for BT devices for you. If you have any BT devices turned on they will show up here (like perhaps your cell phone) ignore any other devices and select the HC

- 05 or HC

- 06 (or Linvor) .Select Paring using device code.

Enter the device code (1234 or 0000) this is the default code.

Once paired right click the device and select “properties” The check box for Comm Port SPP should be checked (also note the com port number).

In device manager select Com Ports Choose the comm port you noted in the above step. Right click and select “properties” Change baud rate to 57600 Once again start Mission Planner and go to the Configure/Tuning tab and make sure you UNCHECK thebox “Reset on USB connect”

Your Bluetooth device should now be ready and you can connect to the proper port at the proper baud rate of 57600 (red LED steady on and not flashing) Connecting From your Android ground station These instructions will show you how to connect to your vehicle from AndroPilot or DroidPlanner 2 running on NExus 7 tablet using the Bluetooth module. Open the Android device’s settings application and turn Bluetooth connecti vity ON (usually by sliding a slider to the right). In the same settings screen click on “Bluetooth” which should cause a list of AVAILABLE DEVICES to appear
Power the vehicle and the “HC

- 06” device should appear. Click on it and enter “1234” or “0000” a s the PIN to pair with the device, then select OK. The device will appear under “PAIRED DEVICES” If using DroidPlanner:

 open the Droid Planner settings, and select Telemetry Connection Type, Bluetooth.

 In the main DroidPlanner interface, select Connect, an d select the paired Bluetooth device. If using AndroPilot:

 a “bluetooth” button should appear on the screen, click it When live data appears on the screen, you’re ready to start mission planning. How to Change Baud Rate, Device Name and Device PIN
You will need a FTDI to USB cable to change any of the configurations of the device (not supplied) It is not necessary to change anything in order for your BT device to function properly it will function quite well as supplied. This is for reference and your conve nience only! To change the above you need a “Terminal” emulator program. You can not use “Putty” (a popular serial port tool) because it will not accept “line” commands. The Bluetooth Modules read the input at a rate of once per second therefore you must use an emulator that will allow you to input an entire line before hitting “send”. You can use the Arduino IDE to send commands to the com port if you are familiar with
that. I use “Advanced Serial Port Terminal” but any terminal emulator that allows you to type in a line of text before hitting send will work just a good. Change the baud rate
The index after the command AT+BAUD corresponds to the following baud rate:

1

— - 1200bps

2

— - 2400bps

3

— - 4800bps

4

— - 9600bps

5

— - 19200bps6

— - 38400bps

7

— - 57600bps

8

— - 115200 bps There are additional baud rates. Warning! do not set these baud rates unless you have a special fast UART chip. If you don’t know do not use these rates they are beyond the standard PC UART speed and once set you will loose communication with the devic e and the only way to contact the device after that will be with a high speed UART. (these are for reference only)

9

— - 230400bps

A

— - 460800bps

B

— - 921600bps

C

— - 1382400bps The change of Baud rate takes effect immediately after the command is sent. So if you w ant to keep configuring the Bluetooth module, you need to set the Baud rate of your terminal program to the new Baud rate the Bluetooth is using. To test it, send AT again, you should receive ‘OK’ Change the Device Name This example show you how to change the name of the Bluetooth module to Ardupilot: In the terminal program, send the command (case sensitive): AT+NAMEArdupilot The Bluetooth should reply:

OKsetname Change the Device PIN The following example shows how to change the pairing code to 5566 In th e terminal program, send the command (case sensitive):

AT+PIN5566 The Bluetooth should reply:

OKsetPIN Troubleshooting You can test the device by making a loopback from TX to RX.

Open your terminal program select the correct comm port and in terminal typ e anything you like. If you see the test displayed then your device is working properly. If you do not see the text you typed and you have selected the correct comm port and your device is paired and connected (red LED solid on not flashing) then you may h ave a problem with your device. Specs
Dimensions : 1.4” x 0.6” x 0.17” Weight 9.6 g (0.3 oz) Operation voltage: 3.6 to 6 V I/O level: 3.3 VTypical

- 80dBm sensitivity

Up to +4dBm RF transmit power UART interface with programmable baud rate
Default baud rat e: 57600 Supported baud rates: 1200, 2400, 4800, 9600, 19200,38400, 57600, 115200, 230400, 460800 Pairing code: 1234 or 0000

Auto

- connect to the last device on power as default Permit pairing device to connect as default Integrated antenna Range: 50 m

# FrS ky Telemetry

Overview This article explains a number of approaches for getting information from the autopilot to an FrSky transmitter (including the Taranis).

Native FrSky Telemetry Support ArduPilot provides a driver that can directly output the FrSky p rotocol. This section explains how you can connect and configure a Pixhawk to communicate with a D

- Receiver or X

- Receiver.

Note:

 This feature is only officially supported on the Pixhawk (running AC3.2 or higher) but there is a
DIY solution for the APM2.x here

.

 These instructions are largely based upon information from the Pixhawk website

.

 T hese instructions were written and tested for OpenTX 2.0.x. They have been re

- validated against OpenTx 2.1.3 and AC 3.3.2.

D

- Receiver setup

For the D

- Receiver setup you will need:

 A FrSky D telemetry capable transmitter , such as such as the Taranis which runs the OpenTX open source transmitter software

. A FrSky D telemetry capable receiver , such as such as the FrSky D4R

- II (HobbyKing)

Tip: FrSky D telemetry capable transmitter/receiver sets are available like this one from 3DRobotics

 A cable to connect the Pixhawk to the D telemetry capable receiver ( cable options are liste d
below ).

D

- Receiver cables Craft and Theory Pixhawk to FrSky Telemetry Cable (D4R

- II receiver)
The Pixhawk to FrSky Telemetry Cable (D4R

- II receiver ) from Craft and Theory is a cost effective “turnkey” cable solution.

Craft and Theory: Pixhawk to FrSky D4R

- II receiver cable

DIY Cable for D receivers You can make your own cable using the following components:

 TTL

- to

- RS232 converter such as the FrSky FUL

- 1 which is sold by many retailers including these on ebay

.

 DF13 6 position connector which will be cut and soldered to the TTL

- to

- RS232 converter

 Molex Picoblade 4 position telemetry wire which will be cut and soldered to the TTL

- to

- RS232 converter (sh ould be included with the receiver)

X

- Receiver setupFor the X

- Receiver setup you will need:

 A FrSky X telemetry capable transmitter , such as the Taranis which runs the OpenTX open
source transmitter software

.

 A FrSky X telemetry capable receiver , such as the FrSky X4R, X4RSB, X6R or X8R (HobbyKing) Tip: FrSky X telemetry capable transmitter/receiver sets are available like this one from HobbyKing

 An X

- receiver telemetry cable ( cable options are listed below ).

X

- Receiver cables
Craft and T heory Pixhawk to FrSky Telemetry Cables Craft and Theory supply cost

- effective all

- in

- one X

- receiver cables with different connectors for the

various X

- receivers:

 Pixhawk to FrSky Telemetry Cable (X4R, X4RSB)

Craft and Theory: Pixhawk to FrSky X4R/X4RSB receiver cable Pixhawk to FrSky Telemetry Cable ( X6R, X8R, FLVSS) :

Craft and Theory: Pixhawk to FrSky X6R and X8R receiver cableDIY Cable for X receivers

You can make your own cable using the following components:

 TTL

- to

- RS232 converter such as the FrSky FUL

- 1 which is sold by many retailers including these on ebay

.

 SP C cable such as SPC Cable

 DF13 6 position connector which will be cut and soldered to the T TL

- to

- RS232 converter

 Molex Picoblade 4 position telemetry wire which will be cu t and soldered to the TTL

- to

- RS232 converter (should be included with the receiver) FrSky Telemetry setup in Mission Planner To enable the FrSky Telemetry output on the Pixhawk’s Telem2 port, please connect with the Mission
Planner and then open the Config /Tuning | Full Parameter List page and set the SERIAL2_PROTOCOL parameter to “3” for D

- Receiver and “4” for X

- Receiver.

Note: The information above is for ArduCopter 3.3. Prior to AC3.2 the values are 2 for D

- Receiver and 3 for X

Receiver.

Tip: SERIAL2_BA UD and SERIAL1_BAUD are not necessary for FrSky telemetry

– it is a static value for D

- Port (9600) and S

- port (57600).

Transmitter set

- up Please refer to the OpenTX manual for how to control which values from the telemetry feed will be displayed on the transmitter’s screen.

Note:If upgrading to OpenTx 2.1 you will need to replace your OpenTx 2.0 configuration and “d iscover” your

sensors. There are other minor “oddities”

– for example T1 (flight mode) and Tt2 (number of sats) are both called TEMP (switching mode helps you identify which is which).

Protocol information This section outlines what values are being sent over the telemetry link, and how they are encoded.

Note: The list below is produced by code observation, and is not fully complete.
Taranis telemetry
screen identifier FRSKY_ID_ Description

T1 TEMP1 send control_mode as Temperature 1 (TEMP1)

T2 TEMP2 se nd number of GPS satellites and GPS status. For example: 73 means 7 satellite and 3D lock

FUEL FUEL Send battery remaining

Vfas VFAS Send battery voltage

CURR CURRENT Send current consumption

Hdg GPS_COURS_BP Send heading in degrees based on AHRS and n ot
GPS GPS lat/long ? Is transmitted normally
Spd GPS_SPEED_BP/AP GPS speed

Alt FRSKY_ID_BARO_ALT_BP/AP Barometer altitude

GAlt FRSKY_ID_GPS_ALT_BP/AP GPS altitude

Other available values:
Taranis telemetry screen
identifier FRSKY_ID_ Description

RS SI Transmitter data

Batt, time Consumption (maybe mAh used?)CONS

SWR

A1 Receiver voltage (not very useful since is always around 4

- 5V).

Missing: Taranis telemetry
screen identifier FRSKY_ID_ Description

GPS date&time Note: These were logge d as some fixed date&time in the year 2000 on my Taranis SD card. Reviewing if this is a logging issue or a telemetry issue.
AccelX,Y,Z

CELLS

RPM
Air speed
Vertical speed

Hardware solutions
This section contains hardware

- only MAVLink to FrS ky converter solutions. Please feel free to add your own solutions ( or ask us to ). APM MavLink to FrSky SmartPort Converter (Airborne Projects) Airborne Project’s APM MavLink to FrSky SmartPort Converter converts MAVLink messages to FrSkySmartPort format. It can directly be connected to the Taranis Radio. You only have to load the
Taranis teleme try modules and configure in Mission Planner. No soldering required!

Airborne Projects: APM MavLink to FrSky SmartPort Converter
The converter includes all needed cables. It features a hardware modified version of the Arduino Nano and be powered directly from the Taranis receiver.
For more information see the QuickStart Guide (www.airborneprojects.com). APM MavLink to FrSky SmartPort Converter (MavLink_FrSkySPo rt)The open source MavLink_FrSkySPort project uses the Teensy USB Development board to convert

MAVLink messages to FrSkySmartPort format so that ArduPilot telemetry can be displayed on a n FrSky

transmitter.

# Power Modules (landing page)

Overview The Pixhawk and APM 2.x have a dedicated connector for attaching the 3DR Power Module (PM). This is
useful because it:

 Provides a stable 5.37V and 2.25Amp power supply which reduces the chances of a brown

- out

 Allows monitoring of the battery’s voltage and current and triggering a return

- to

- launch when the voltage becomes low or the total power consumed during the flight approaches the battery’s capacity

 Allows the autopilot firmware to more accurately compensate for the interference on the compass from other components The PM accepts a maximum input voltage of 18V (up to 4 S Lipo battery) and maximum current of 90Amps. When used with an APM the full 90Amp current sensing range can be used, with the PX4/Pixhawks up to 60Amps can be measured. There is more general information on powering in Powering the Pixhawk and Powering the APM2

. Warning: The Power Module’s maximum input voltage i s 18V. This is the maximum allowed by the on

- board regulator. (4 cell LiPo max). Warning: The Power Module does not have sufficient power for servos or high current devices such as FPV

transmitters.

 The power module does provide sufficient power for the Pi xhawk/APM, your receiver and a small electronic module such as a PPM encoder or 3DR telemetry radio.

 You may “control” servos from signal pins, but the servos must be powered by a separate ESC.

Connecting the PM to a flight controller board

The 6

- pos cab le plugs into the 6

- pos connector on both the Power Module and Pixhawk/APM.Pixhawk Power Port

APM2.x Power Port

Your battery connects to the Power Module’s male connector, and its female connector plugs into your
ESC or Power Distribution Board.

Note:

AP M 2.x Power Module Notes:

 You should normally remove the APM’s JP1 jumper when using the Power Module so that only your APM board and your receiver are powered from the Power Module’s on

- board regulator and not from your ESCs.

o Removing the jumper allows y ou to use the APM’s servo output rail to distribute power from your ESC’s BEC or separate UBEC to any servos or external equipment.

o If you are using servos, plug an ESC BEC or stand alone UBEC power wire and ground wire into two of the power and ground pin s on the APM’s servo output rail to provide a common power and ground bus for servo power.

 You can leave the jumper present if you are using ESCs that have no BECs or if all the ESC BECs power wires are cut and you are not powering any servos from the serv o out rail.

 You can also individually power each servo from each individual ESC

- BEC.

o Simply run the power and ground from each ESC

- BEC individually and directly to each servo (very handy for multicopters). Setup through Mission Planner Battery measurement is set up in the Mission Planner’s INITIAL SETUP | Optional Hardware | Battery

Monitor screenMission Planner: Battery Monitor Configuration

1. Enable voltage and current sensing by selecting:

o Monitor: Voltage and Current

o Sensor: 3DR Power Module

o APM ver: Pixhawk (or whatever board you are using)

o Battery Capacity: Fill in the your battery capacity in mAh

2. Low Battery Alert from ground station:

o If you wish the Mission Planner to alert you verbally when your battery is low check the “MP Alert on Low Battery” checkbox and enter the warning you wish to hear (it will be read out by a computerized voice), the voltage level and finally the percentage of remaining current.

oCalibrating the voltage reading

You can check that the APM/PX4 is correctly measuring t he voltage of the battery by:

3. Check the voltage of your lipo battery with a hand

- held volt meter or a power analyzer

4. Connect your APM/PX4 to your computer and plug in the lipo battery

5. Check the voltage through the mission planner’s INITIAL SETUP | Optional Hardware | Battery

Monitor screen or on the Flight Data screen’s HUD or Status tab.

If you find the voltage is not correct (i.e . if off from the hand

- held volt meter’s reading by more than perhaps 0.2V) you can correct the APM/PX4’s reading by doing the following:

6. On the mission planner’s INITIAL SETUP | Optional Hardware | Battery Monitor screen set the
“Sensor” to “Other”.

7. Enter the voltage according to the hand

- held volt meter in the “Measured Battery Voltage” field8. Press tab or click out of the field and the “Voltage Divider (Calced)” value will update and the “Battery voltage (Calced)” should now equal the measured voltage

# L IDAR

- Lite Rangefinder

Connecting to the Pixhawk via I2C Warning: If you have a LIDAR

- Lite that has a manufacture date label prior to February 2015 there are I2C interface communications issues that will cause unreliable operation of the sensor with Pixha wk and will cause your vehicle to crash . When using these versions of LIDAR

- Lite please use the PWM alternative listed
below for best results. The cable is configured with a 6

- position Molex CLIK Mate connector on one end and tinned leads on the opposite e nd. You will need to solder the tinned ends to a modified DF13 4

- pin I2C cable as shown
below. The power to the rangefinder should be supplied from a separate external BEC as shown in the diagram
below.

LIDAR

- Lite/Pixhawk Connection Diagram

Note: The low pass filter shown in the diagram is required for first generation hardware (for hardware with manufacture dates prior to February 2015)

– a schematic and PCB design are provided here . These should not be required in later versions of the LIDAR Lite (at which point the diagram will change to this
and will have this circuit diagram ). You may wish to also purchase an I2C splitter board so that you can continue to connect an external GPS/Compass module

. Note: It is important to ensure that the ground from the BEC is connected to the ground on th e servo rail. Connecting to Pixhawk via PWMAs of the 3.3.x release of Plane and Copter you can connect your Lidar via PWM as an alternative to I2C.

This works around a number of bugs in the I2C interface for the Lidar. The bugs include generating spurious pulses on the I2C bus and lockups of the Lidar in flight. To connect via PWM you need to connect 4 pins on the Lidar to the PWM rail of the Pixhawk. The
connections are as follows:

LIDAR

- Lite Pin Pixhawk Pin

J1 CH6 Out V+

J2 CH6 Out Signal (internal pin 55)

J3 CH5 Out Signal (internal pin 54)

J4 (not used)

J5 (not used)

J6 Ch6 Out Ground

You need a resistor between J3 and ground. The exact value of the resistor isn’t critical, somewhere between 200 Ohm and 1kOhm will do. Testing for the developm ent of the driver was done with a 470 Ohm resistor. The resistor is what tells the Lidar to start taking a reading, so connecting a resistor between pin 3 and ground tells the Lidar to go into continuous acquisition mode. Here’s a picture of the necessary cable, with the resistor shown before being covered by heat

- shrink tubing:You then need the following parameters set to enable the PWM driver:

 RNGFND_TYPE = 5

 RNGFND_STOP_PIN = 55

 BRD_PWM_COUNT = 4

 RNGFND_SCALING = 1

 RNGFND_OFFSET = 0 The use of pin 55 as the stop pin is just a suggestion, not a requirement. It connects to the enable pin on the Lidar, and allows the driver to reset the Lidar if it stops providing readings. The use of pin 54 for the PWM signal is required, and only FMU AUX5 (pin 54) can b e used due to the internal timer routing of the Pixhawk.

Note : when using LIDAR

- Lite in PWM mode please keep the following in mind:

1. You need to have a battery/ESC plugged in. (in PWM mode, the LIDAR

- Lite gets its power from the servo rail, which is powered by the ESC)

2. On the ground station side, APMPlanner currently does not display the data, but Mission Planner does. Fixes are on the way.

3. Make sure the LIDAR is not right on a table and is at least 20cm or so from the nearest surface. Otherwise, it will dis play 0 distance (which is correct!)

4. By default, on Copter if you have the LIDAR enabled, it will check LIDAR range on startup. To pass the check, lift the vehicle up at least 50cm. Don’t tip it over too much because the check is a bit sensitive, it needs to see a range of between 50cm ~ 2m but nothing longer than 2m. If it sees a range longer than that, it’ll never pass unless you reboot the board (nicer solution to this coming soon!). The check can be disabled by setting ARMING_CHECK to Skip Param/Sonar

. Optional Power Saving When using the PWM driver you can optionally set RNGFND_PWRRNG to a terrain height in meters above which the Lidar will be disabled to save power. When the terrain data indicates that the vehicle is above that height the RNGFND_STOP _PIN will be used to disable the Lidar. This saves around 100mA of

current. Your GCS must provide terrain data for this to work. Setup in Mission PlannerTo configure Copter, Plane or Rover to use the LIDAR

- Lite, please first connect with the Mission Planner

and then open the Config/Tuning | Full Parameter List page and set: RNGFND_TYPE to “3′′ if using an APM2, or “4” if using a PX4 or Pixhawk.
Set the RNG FND_MAX_CM parameter to 4000 (40m). This parameter represents the maximum distance
in centimeters that the LiDAR is reliable over

— when ignoring “0” distance readings in the driver, a
value of 4000 should work well in almost all conditions. RNGFND_MIN_CM should be set to 20cm. Below that distance you will still get readings, but they may be inaccurate (the optics can start to introduce parallax error if the sensor picks up signal from specular reflections rather than directly from a return signal).

Testi ng the sensor Distances read by the sensor can be seen in the Mission Planner’s Flight Data screen’s Status tab. Look closely for “sonarrange”.

# Minim OSD Quick Installation Guide

Overview To connect to Pixhawk, use this DF13 6

- pin cable to connect to the TELEM2 port. To connect to APM 2.5 and 2.6, use a 5

- pin splitter cable that allows the telemetry port to be connected to both a 3DR Radio
and the MinimOSD.

Basic wiring Diagram The orignal MinimOSD’s power setup provides two stages to avoid noises coming from servos attached to your ArduPilot boards. Those noises could introduce some glitches on video signal. The independent analog powering from a dedicated battery will heat the board considerably, but the video is the most clean as possible from MAX7456. Maybe you don’t need to use the two sta ges. The way those noises would impact on the video signal will vary depending on a chain of aspects like servo’s brand, model, cables length, etc. So, try yourself and see if it’s important for your setup. Here is the basic diagram which uses two stages a pproach of MinimOSD b oard:Optional setup for critical cooling conditions

(Hardware V0.1 and 1.0 only) The second stage regulator from the MinimOSD boards earlier than V1.1 gets too hot on 12V video setups. If your frame has not a good air flow for cooli ng the OSD board you may want to feed the OSD entirely from APM. Probably it will add some noises from servos, but you’ll be more safe by this way:

# Autopilot Hardware Options

# Pixhawk Overview

Specifications

 Processor

o 32

- bit ARM Cortex M4 core wit h FPU

o 168 Mhz/256 KB RAM/2 MB Flash

o 32

- bit failsafe co

- processor

 Sensors

o MPU6000 as main accel and gyro

o ST Micro 16

- bit gyroscope

o ST Micro 14

- bit accelerometer/compass (magnetometer)

o MEAS barometer

 Power

o Ideal diode controller with automatic failover

o Ser vo rail high

- power (7 V) and high

- current ready

o All peripheral outputs over

- current protected, all inputs ESC protected

 Interfaces

o 5x UART serial ports, 1 high

- power capable, 2x with HW flow control

o Spektrum DSM/DSM2/DSM

- X Satellite input

o Futaba S.BUS inp ut (output not yet implemented)

o PPM sum signal

o RSSI (PWM or voltage) input

o I2C, SPI, 2x CAN, USB

o 3.3 and 6.6 ADC inputs

 Dimensions

o Weight 38 g (1.3 oz)

o Width 50 mm (2.0”)

o Height 15.5 mm (.6”)

o Length 81.5 mm (3.2”) Pixhawk connector assignmentsPixhawk top connectorsPixhawk PWM connectors for servos and ESCs and PPM

- SUM in and SBUS out

Pixhawk connector diagramFor all connectors pin 1 is on the right in the above image

Serial 1 (Telem 1) and Serial 2 (Telem 2) Pins: 6 = GND, 5 = RTS, 4 = CTS, 3 = RX, 2 = TX, 1 = 5V. Pixhawk connector pin assignments TELEM1, TELEM2 ports

Pin Signal Volt
1 (red) VCC +5V
2 (blk) TX (OUT) +3.3V
3 (blk) RX (IN) +3.3V
4 (blk) CTS +3.3V
5 (blk) RTS +3.3V
6 (blk) GND GND

GPS port

Pin Signal Volt
1 (red) VCC +5V
2 (blk) TX (OUT) +3.3V
3 (blk) RX (IN) +3.3V
4 (blk) CAN2 TX +3.3V
5 (blk) CAN2 RX +3.3V
6 (blk) GND GND
SERIAL 4/5 port

– due to space constraints two ports are on one connector.

Pin Signal Volt
1 (red) VCC +5V2 (blk) TX (#4) +3.3V

3 (blk) RX (# 4) +3.3V
4 (blk) TX (#5) +3.3V
5 (blk) RX (#5) +3.3V
6 (blk) GND GND

ADC 6.6V

Pin Signal Volt
1 (red) VCC +5V
2 (blk) ADC IN up to +6.6V
3 (blk) GND GND

ADC 3.3V

Pin Signal Volt
1 (red) VCC +5V
2 (blk) ADC IN up to +3.3V
3 (blk) GND GND
4 (blk) ADC IN up to +3.3V
5 (blk) GND GND

I2C

Pin Signal Volt
1 (red) VCC +5V
2 (blk) SCL +3.3 (pullups)
3 (blk) SDA +3.3 (pullups)
4 (blk) GND GND

CAN

Pin Signal Volt
1 (red) VCC +5V
2 (blk) CAN_H +12V
3 (blk) CAN_L +12V
4 (blk) GND GND

Console Port The system’s serial console runs on the port labeled SERIAL4/5. The pinout is standard serial pinout, to connect to a standard FTDI cable (3.3V, but its 5V tolerant).

Pixhawk FTDI

1 +5V (red) N/C

2 Tx N/C

3 Rx N/C

4 Tx 5 Rx (yellow)

5 Rx 4 Tx (o range)

6 GND 1 GND (black)Pixhawk system features

 The Pixhawk flight controller is a further evolution of the PX4 flight controller system. Pixhawk
consists of a PX4

- FMU controller and a PX4

- IO integrated on a single board with additional IO, Memory and other features.

 It is highly optimized to provide control and automation for APM flight navigation software with high performance and capacity. Pixhawk allows current APM and PX4 operators to seamlessly transition to this system and lowers the barriers to entry for new users.

 The NuttX real

- time operating system, features high performance, flexibility, and reliability for controlling any autonomous vehicle.

 A Unix/Linux

- like programming environment, Integrated multithreading and autopilot functions
such as Lua scripting of missions and flight behavior provide powerful development capabilities.

 A custom PX4 driver layer ensures tight timing across all processes.

 New peripheral options will include a digital airspeed sensor, support for an external multi

- colo r LED indicator and an external compass.

 All peripherals are automatically detected and configured.

 A very powerful 32

- bit processor with an additional failsafe backup controller and extensive

memory.

o STM32F427 32

- bit primary microcontroller: 168 MHz, 252 MIPS, Cortex M4 core with a floating point unit.

o Two megabytes of Flash program memory and 256 kilobytes of RAM.

o STM32F103 backup failsafe 32

- bit co

- processor provides for manual recovery and has its own power supply.

o Socket for a plug in micro SD memory card for data logging and other uses.

 Advanced sensor profile

o 3 axis 16

- bit ST Micro L3GD20H gyro for determining orientation.

o 3 axis 14

- bit accelerometer and compass for determining outside influences
and compass heading.

o Provision for external compass w ith automatic switch

- over if desired.

o MEAS MS5611 barometric pressure sensor for determining altitude.

o Built in voltage and current sensing for battery condition determination.

o Connection for an externally mountable UBLOX LEA GPS for determining absolute

p osition.

 Extensive I/O interfaces with dedicated connectors

o Fourteen PWM servo or ESC speed control outputs.

o Five UART (serial ports), one high

- power capable, 2x with HW flow control.

o Two CAN I/O ports (one with internal 3.3V transceiver, one on expansion connector)

o Spektrum DSM / DSM2 / DSM

- X® Satellite reciever compatible input: Permits use of Spektrum RC Transmitters.

o Futaba S.BUS® compatible input and output.

o PPM sum signal input.

o RSSI (PWM or voltage) input.

o I2C and SPI serial ports.

o Two 3.3 volt and one 6.6 volt Analog inputs.

o Internal microUSB port and external microUSB port extension.

o Contains its own on board microcontroller and stacks with the FMU.

 Comprehensive power system with redundancy and extensive protection.

o The Pixhawk is supplied with a n in line power supply with voltage and current sensor
outputs.o Ideal diode controller with redundant power supply inputs and automatic fail

- over.

o Servo rail high

- power (max. 10V) and high

- current (10A+) ready.

o All peripheral outputs are over

- current prote cted and all inputs ESD protected.

o The provided external safety button enables safe motor activation / deactivation.

o LED status indicators and driver for high brightness external multicolored LED to indicate flight status.

o High

- power, multi

- tone piezo audi o indicator also informs of current flight status.

o Available high performance UBLOX GPS plus external compass in protective case.

o Weight: 38g (1.31oz), Width: 50mm (1.96′′), Thickness: 15.5mm (.613′′), Length: 81.5mm (3.21′′) Comparison of PX4

- FMU

- IO and Pixhawk
The new PX4 Pixhawk module is an evolution of the exis ting FMU and IO modules and is completely compatible.

 The PX4 FMU and IO stack is very small (the size of an 8 ch R C receiver) and very densely packed, Pixhawk has more space, more serial ports and more PWM outputs.

 There are two groups of servo connectors, one main group of 8 outputs wired through the backup processor, and an auxiliary group of 6 outputs directly wire d to the main processor.

 The port labeled “RC” can take normal PPM sum or Futaba S.Bus inputs and the port labeled “SB” can read RSSI our output S.Bus to servos.

 A Spektrum satellite compatible port is on top (labeled SPKT/DSM).

 The basic operation is the same, and the software is shared.

 Inside Pixhawk a FMUv2 and an IOv2 do their duties on a single board (and developers will find that the software will refer to FMUv2 and IOv2)

 The PX4 / Pixhawk system has more than 10 times the CPU performance and memory of the
APM and a lot more as well.

 14 PWM outputs (Pixhawk) vs. 12 PWM outputs (PX4)

 All Pixhawk PWM outputs on servo connectors (PX4: 8 on servo, 4 on 15 pin DF13 connector)

 5 serial ports vs. 4 (with some double functionality, so only 3 in some configura tions on old version)

 256 KB RAM and 2 MB flash vs 192 KB RAM and 1 MB flash (old)

 Modernized sensor suite (latest generation)

 High

- power buzzer driver (old: VBAT driven, not as loud)

 High

- power multicolor led (old: only external BlinkM support)

 Support fo r panel

- mounted USB extension (old: not present)

 Revised, improved power architecture

 Better protection on all input / output pins against shorts and over voltage

 Better sensing of power rails (internal and external, e.g. servo voltage)

 Support for Spektru m Satellite pairing (needed some manual wiring work in v1, but also
software

- supported)

 No more solid state relays on v2 (was not really used)

 Connectors easier to disconnect in case, as the surrounding plastic helps to place the fingers correctly (more on this in a separate post)

 Case prevents one

- off failure operation of servo connectors

 The new unit is consirably larger, has the same height, but offers in general more handling

convenience.

 External power supply similar to existing 3DR power brick (every unit comes with a free module). Both generations offer the same backup / override processor that allows failover to manual if

the autopilot fails in fixed wing setups.

 For software developers the differences are nicely abstracted in the PX4 middleware, and can be sensed / configured at runtime. Connecting and disconnecting DF13 connectors Pixhawk analog input pins This section lists the analog pins available on the Pixhawk. These are virtual pins, defined in the
firmware.
Virtual Pin 2 and Power connector P in 4 and Virtual Pin 2 : power management connector voltage pin, accepts up to 3.3V, usually attached to 3DR power brick with 10.1:1 scaling
Virtual Pin 3 and Power connector Pin 3 : power management connector current pin, accepts up to 3.3V, usually attache d to 3DR power brick with 17:1 scaling Virtual Pin 4 and (No connector Pin) : VCC 5V rail sensing. This virtual pin reads the voltage on the 5V supply rail. It is used to provide the HWSTATUS.Vcc reading that ground stations use to display 5V status
Virtual Pin 13 and ADC 3.3V connector Pin 4 : This takes a max of 3.3V. May be used for sonar or other analog sensor.
Virtual Pin 14 and ADC 3.3V connector Pin 2 : This takes a max of 3.3V. May be used for second sonar or other analog sensor.
Virtual Pin 15 and ADC 6.6V connector Pin 2 : analog airspeed sensor port. This has 2:1 scaling builtin, so can take up to 6.6v analog inputs. Usually used for analog airspeed, but may be used for analog sonar or other analog sensors.

Virtual Pin 102 : Servo power rail voltage. This is an internal measurement of the servo rail voltage made by the IO board within the Pixhawk. It has 3:1 scaling, allowing it to measure up to 9.9V.
Virtual Pin 103 : RSSI (Received Signal Strength Input) input pin voltage (SBus connector output pin). This is the voltage measured by the RSSI input pin on the SBUS

- out connector (the bottom pin of the 2nd last servo connector on the 14 connector servo rail). Can alternatively serve as SBus out but not yetimplemented.

Pixhawk digital inputs
The Pixhawk digital output pins on the FMU servo rail (the “AUX” pins) can also be used as digital input pins, using the same pin numbers as are used for outputs. This can be used for options that allow for digital input pins, such as the AUTO_TRIGGER_PIN in Rover.

T he same rules for setting up BRD_PWM_COUNT apply for digital inputs and digital outputs. Pixhawk digital outputs (Virtual Pins 50

– 55) The Pixhawk has no dedicated digital output pins on its DF13 connectors, but you can assign up to 6 of
the “AUX SERVO” c onnectors to be digital outputs. These are the first 6 of the 14 three

- pin servo connectors on the end of the board. They are marked as AUX servo pins 1

– 6 on the silkscreen as seen
above. To set the number of these pins that are available as digital outputs, set the BRD_PWM_COUNT parameter. On Pixhawk this defaults to 4, which means the first 4 AUX connectors are for servos (PWM) and the last 2 are for digital outputs. If you set BRD_PWM_CO UNT to 0 then you would have 6 digital outputs and still have 8 PWM outputs on the rest of the connector. The 6 possible pins are available for PIN variables as pin numbers 50 to 55 inclusive. So if you have BRD_PWM_COUNT at the default value of 4, then th e two digital output pins will be pin numbers 54 and

55. In summary: If BRD_PWM_CNT= 2 then

50 = RC9

51 = RC10

52 = Aux 3

53 = Aux 4

54 = Aux 5

55 = Aux 6 If BRD_PWM_CNT= 4 then

50 = RC9

51 = RC10

52 = RC11

53 = RC12

54 = Aux 5

55 = Aux 6 If BRD_PWM_CNT= 6 then

50 = RC9

51 = RC10

52 = RC11

53 = RC12

54 = RC13

55 = RC14