Autopilot

Note

This topic consists of a summary of the information available on the page Getting Started - PX4.

Introduction

PX4 is the professional open source autopilot, developed by both world-class developers from industry and academia, and supported by the active world wide community. The PX4 can run on multiple flight controll boards. Deserving highlight flight open hardware controllers of the PixHawk series, running PX4 on NuttX OS [1].

Given the options available on the market, Pixhawk 1 was chosen as an autopilot for its best cost benefit for the project.

The Pixhawk operate in several types of vehicle, from racing drones and cargo to land and submersible vehicles. In this article we will focus on aircraft application, where the Pixhawk operate as a general use flight controller, responsible for the acquisition, conditioning and processing of signals from the aircraft’s sensors and for controlling the aircraft’s actuators.

Pixhawk offers a development environment compatible with Unix and Linux systems, favoring the development of software applications. The Pixhawk system has multithreading capabilities, that is, it can perform several tasks simultaneously without interfering with the other through the sharing of process resources. Moreover, it has integrated autopilot functions with detailed logs missions and flight behavior [2].

Given the options available on the market, Pixhawk 1 was chosen as an autopilot for its best cost benefit for the project.

Basic Concepts

This topic introduces some basics concepts about unmanned aerial vehicles (UAV) and the use of PX4 platform.

Unmanned Aerial Vehicle (UAV or drone)

A UAV is any types of aircraft that can be controlled on the 3 axes of freedom and do not need a pilot on board to be guided, being able to be controlled remotely or autonomously.

The “brain” of a drone is called autopilot, an instrument responsible for controlling the aircraft’s flight path. Referring to UAVs, the autopilot consists of flight control software running on specific hardware for the same function.

Ground Control Station (GCS)

A Ground Control Station (GCS) is a control platform, usually a software application running on a computer on the ground, which communicates with UAVs for wireless telemetry and provides human operators control of the aircraft.

The ground station delivers to the controller several data in real time on the performance and position of UAVs and can even serve as a “virtual cockpit”, providing many of the same instruments that a pilot would have if he were flying an airplane. However, Ground Control software is normally used for planning, uploading flight missions and defining flight parameters.

There are more than ten different ground control stations. In the area of UAV control, the main controllers are Mission Planner, APM Planner 2, MAVProxy, QGroundControl e UgCS. For Tablet / Smartphone, there is Tower (DroidPlanner 3), MAVPilot, AndroPilot e SidePilot. [4]

Dronecode Platform

PX4 is part of the Dronecode Plataform, a complete platform for drone development, under an open source license the community. It includes, among other things, the PX4 flight stack, QGroundControl ground control station, the Dronecode SDK and the Dronecode Camera Manager. [3]

Sensors

The PX4 based system uses several sensors to determine vehicle state (these being essential for stabilization and to enable autonomous control). The vehicle states include: position, heading, speed, airspeed, orientation (attitude), rates of rotation in different directions, battery level, etc.

The system minimally requires a gyroscope, accelerometer, magnetometer (compass), barometer and an airspeed sensor for the case of fixed wing (project case). A GPS or other positioning system is also required to activate all automatic modes and some assisted modes.

Pixhawk series flight controllers come with a minimum set of sensors incorporated. Additional/external sensors can be connected to the controller.

GPS & Compass

The PX4 supports several receivers and compasses (magnetometers) of the Global Navigation Satellite System (GNSS). It also supports Real Time Kinematic (RTK) GPS Receivers, optimizing GPS systems to centimeter level accuracy.

Note

Pixhawk series controllers include an internal compass, but we recommend using an external Compass + GPS module, which is mounted as far as possible from power supply lines to reduce electromagnetic interference.

The PX4 supports the connection of up to 4 internal or external magnetometers, although only one will actually be used as a heading source. The system automatically chooses the best available compass based on their internal priority (external magnetometers have a higher priority). If the primary compass fails in-flight, it will failover to the next one. If it fails before flight, arming will be denied.

More information and the list of supported GPS/Compass can be found at GPS/Compass.

Airspeed

Tip

Airspeed sensors are highly recommended for the safe operation of a fixed wing UAV or VTOL (Vertical Take-Off and Landing).

The flight of a fixed wing UAV depends on the airspeed, since this guarantees its support in flight and not the speed in relation to the ground. The autopilot has no other means to detect stall (loss of lift of the aircraft), for this reason air speed sensors are highly recommended.

More information and the list of supported Airspeed sensors can be found at Airspeed sensors.

Distance (telemeter)

Distance sensors provide real-time distance measurement. It can be optical, when based on a focusing mechanism, or ultrasonic (ecotelemeter or acoustic rangefinder), when using sound reflections. They are used for improved landing behaviour, terrain following, collision prevention, warning of regulatory height limits, etc.

The PX4 supports a wide variety of distance sensors, using different technologies and supporting different features. More information and the list of supported distance sensors can be found at More information and the list of supported distance sensors can be found at Distance sensors.

Optica Flow

PX4Flow is an optical flow smart camera that can track motion, and has as integrated sonar sensor. PX4 blends the sensor output with information from other position sources (e.g. GPS) to provide a more accurate position lock. This sensor can be used indoors, when no GPS signal is available.

Most of its applications are directed to rotary-wing aircraft.

Pixhawk Specifications

  • Processor
    • 32-bit ARM Cortex M4 core with FPU
    • 168 Mhz/256 KB RAM/2 MB Flash
    • 32-bit failsafe co-processor
  • Sensors
    • MPU6000 as main accel and gyro
    • ST Micro 16-bit gyroscope
    • ST Micro 14-bit accelerometer/compass (magnetometer)
    • MEAS barometer
  • Power
    • Ideal diode controller with automatic failover
    • Servo rail high-power (7 V) and high-current ready
    • All peripheral outputs over-current protected, all inputs ESD protected
  • Interface
    • 5x UART serial ports, 1 high-power capable, 2 with HW flow control
    • Spektrum DSM/DSM2/DSM-X Satellite input
    • Futaba S.BUS input (output not yet implemented)
    • PPM sum signal
    • RSSI (PWM or voltage) input
    • I2C, SPI, 2x CAN, USB
    • 3.3V and 6.6V ADC inputs
  • Dimensions
    • Weight 38 g (1.3 oz)
    • Width 50 mm (2.0”)
    • Height 15.5 mm (.6”)
    • Length 81.5 mm (3.2”)
  • Included items
    • 1 x SanDisk Ultra micro SD Card (8GB)
    • 1 x MRC0225- Cable [3-Pins DF-13] to Switch+LED
    • 1 x MRC0224- Cable [2-Pins DF-13] to Buzzer
    • 1 x I2C Splitter
    • 2 x MRC0213- Cable [6-Pins JST-GH] to [6-Pins DF-13], (Telemetry Radio, Power module and Extra)
    • 1 x MRC0216- Cable [6-Pins DF-13] to [6-Pins DF-13], (For legacy products)
    • 4 x Damping Foams
    • 3 x Decals “APM Rover”, “APM Copter” and “APM Plane”

More information

[1]PX4 Autopilot User Guide. docs.px4.io
[2]Para mais informações a respeito de Multithreading (arquitetura computacional).
[3]Eduardo Moura Cirilo Rocha. 2017. Desenvolvimento de um sistema com veículos aéreos não-tripulados autônomos, Universidade de Brasília, Brasil.
[4]Choosing a Ground Station - Conter documentation. ardupilot.org