Sensor Hardware & Setup
This section describes the mandatory and optional sensors and their setup/configuration.
Overview
PX4-based systems use sensors to determine vehicle state (needed for stabilization and to enable autonomous control). The vehicle states include: position/altitude, heading, speed, airspeed, orientation (attitude), rates of rotation in different directions, battery level, and so on.
PX4 minimally requires a gyroscope, accelerometer, magnetometer (compass), and barometer. Fixed-wing and VTOL-vehicles should also include an airspeed sensor. A GPS or other positioning system is needed to enable all automatic modes, and some manual/assisted modes.
Pixhawk Series flight controllers already have the minimum set of sensors (other controller platforms often do too). Additional/external sensors can be attached to the controller — an external GPS and compass are recommended, along with an airspeed sensor for VTOL and Fixed wing vehicles.
Sensor Topics
Mandatory (included in Pixhawk series FCs):
- Accelerometer — Measures changing acceleration.
- Gyroscope — Measures orientation.
- Magnetometer (Compass) — Measures heading/direction. External compass recommended!
- Barometers — Measures altitude (via air pressure).
Recommended:
- Airspeed Sensors — Measures airspeed. Recommended for VTOL and Fixed-wing.
- GNSS (GPS) — Measures global position. Needed for missions, and some other automatic and manual/assisted modes.
- RTK GNSS (GPS) — GNSS with centimetre-level accuracy.
Optional:
- Distance Sensors (Rangefinders) — Measures distance to target. Aids landing and terrain following.
- Optical Flow — Measures velocity. Aids velocity estimation without global position.
- Tachometers (Revolution Counters) — Only used for logging.
Other optional:
- IMU/Compass Factory Calibration — Save calibration settings to persistent storage.
- Sensor Thermal Compensation — Compensate sensors for temperature variations.