Skip to content

Latest commit

 

History

History
123 lines (87 loc) · 19.7 KB

README.md

File metadata and controls

123 lines (87 loc) · 19.7 KB

GPS&罗盘

PX4 supports global navigation satellite systems (GNSS) (including GPS, GLONASS, Galileo, BeiDou, QZSS and SBAS) using receivers that communicate via the u-blox, MTK Ashtech or Emlid protocols, or via UAVCAN. 它还支持 实时动态(RTK)GPS接收器 ,它将 GPS 系统扩展到厘米级精度。

PX4 can be used with the following compass parts (magnetometers): Bosch BMM 150 MEMS (via I2C bus), HMC5883 / HMC5983 (I2C or SPI), IST8310 (I2C) and LIS3MDL (I2C or SPI). Up to 4 internal or external magnetometers can be connected, though 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.

GPS + Compass

:::tip When using Pixhawk-series flight controllers, we recommend using a combined GPS + Compass mounted as far away from the motor/ESC power supply lines as possible - typically on a pedestal or wing (for fixed-wing). The internal compass may be useful on larger vehicles (e.g. VTOL) where it is possible to reduce electromagnetic interference by mounting the Pixhawk a long way from power supply lines. On small vehicles an external compass is almost always required. :::

Supported GPS and/or Compass

Device GPS Compass RTK GPS Yaw Output Dual FP9 GPS Heading
Hobbyking u-blox Neo-M8N GPS with Compass M8N
mRo GPS u-blox Neo-M8N Dual Compass M8N LIS3MDL, IST8310
Drotek DP0804 (and other Drotek u-blox GPS/Compasses) M9N LIS3MDL
Emlid Reach M+ - PX4 only supports "ordinary" GPS with this module. RTK support is expected in the near future.
Holybro Micro M8N GPS Module M8N IST8310
Holybro Nano Ublox M8 5883 GPS Module UBX-M8030 QMC5883
Holybro Pix32 M8N GPS Module M8N IST8310
Holybro Pixhawk 4 GPS Module (10 pin) M8N IST8310
Holybro Pixhawk 4 2nd GPS Module (6 pin) M8N IST8310
Hex Here GNSS GPS (M8N) (discontinued) M8N HMC5983, LIS3MDL
Hex Here2 GNSS GPS (M8N) M8N ICM20948
Zubax GNSS 2 MAX-M8Q LIS3MDL
Avionics Anonymous UAVCAN GNSS/Mag SAM-M8Q MMC5983MA
3DR u-blox GPS with Compass kit (discontinued) LEA-6H
CUAV C-RTK GPS M8P/M8N
Drotek XL RTK GPS M8U LIS3MDL
Femtones MINI2 Receiver FB672, FB6A0
Freefly RTK GPS F9P IST8310
Here+ RTK GPS M8P HMC5983
Holybro H-RTK F9P GNSS F9P IST8310
Holybro H-RTK M8P GNSS M8P IST8310
SparkFun GPS-RTK2 Board - ZED-F9P F9P
Drotek SIRIUS RTK GNSS ROVER (F9P) F9P RM3100
mRo u-blox ZED-F9 RTK L1/L2 GPS F9P
Trimble MB-Two F9P
Avionics Anonymous UAVCAN Magnetometer

:::note

  • ✓ or a specific part number indicate that a features is supported, while ✗ or empty show that the feature is not supported. "?" indicates "unknown".
  • Where possible and relevant the part name is used (i.e. ✓ in the GPS column indicates that a GPS module is present but the part is not known).
  • Avionics Anonymous UAVCAN Magnetometer is a compass (not a GPS).
  • Some RTK modules can only be used in a particular role (base or rover), while others can be used interchangeably. :::

Hardware Setup

Instructions for connecting the GPS (and compass, if present) are usually provided by the manufacturer (at least for more common Autopilot Hardware).

Pixhawk Series controllers typicaly have a clearly labeled port for connecting the GPS, and the compass is connected to either the I2C or SPI port/bus (depending on the device).

The Zubax GNSS 2 and Avionics Anonymous GNSS/Mag can also be connected via UAVCAN.

:::warning Pay attention to pinout when connecting the GPS module. While these are all software-compatible, there are several different pin orderings. :::

Configuration

The "standard" GPS/compass configuration is provided below. Additional device-specific configuration may be provided in PX4 or manufacturer device documentation (e.g. Trimble MB-Two > Configuration).

Configuring the Primary GPS

GPS configuration on Pixhawk is handled transparently for the user - simply connect the GPS module to the port labeled GPS and everything should work.

:::note The default Serial Port Configuration works for most devices. If you are using the Trimble MB-Two you will need to modify the configuration to explicitly set the rate to 115200 baud. :::

Configuring a Secondary GPS (Dual GPS System)

To use a secondary GPS, attach it to any free port, and then perform a Serial Port Configuration to assign GPS_2_CONFIG to the selected port.

The following steps show how to configure a secondary GPS on the TELEM 2 port in QGroundControl:

  1. Find and set the parameter GPS_2_CONFIG to TELEM 2.
  • Open QGroundControl and navigate to the Vehicle Setup > Parameters section.
  • 选择 GPS 选项卡(1),然后打开 GPS_2_CONFIG 参数(2),并从下拉列表(3) 中选择 TELEM 2QGC 串口实例
  1. Reboot the vehicle in order to make the other parameters visible.
  2. 选择 串口 选项卡,并打开 SER_TEL2_BAUD 参数 (TELEM 2端口波特率):将其设置为 AutoQGC 串口波特率实例

After setting up the second GPS port:

  1. Configure the ECL/EKF2 estimator to blend data from both GPS systems. For detailed instructions see: Using the ECL EKF > Dual Receivers.

Configuring GPS as Yaw/Heading Source

GPS can be used as a source for yaw fusion when using modules where yaw output is supported by the device (e.g. Trimble MB-Two) or when using some RTK GPS Setups with Dual u-blox F9P.

When using GPS for yaw fusion you will need to configure the following parameters:

Parameter Setting
GPS_YAW_OFFSET The angle made by the baseline (the line between the two GPS antennas) relative to the vehicle x-axis (front/back axis, as shown here).
EKF2_AID_MASK Set bit position 7 "GPS yaw fusion" to 1 (i.e. add 128 to the parameter value).

:::tip

  • If using this feature, all other configuration should be setup up as normal (e.g. RTK Positioning). :::

Compass Configuration

Compass calibration is covered in: Compass Configuration. The process is straightforward and will calibrate all connected magnetometers.

Additional configuration can be performed using the CALMAGx parameters (where x=0-3). Generally you will not need to modify these as compasses are autodetected, prioritised and are all calibrated at the same time (a possible exception is CAL_MAGx_EN which might be used to disable an internal compass). You may however wish to read them, as they will let you know which magnetometers are internal or external (CAL_MAGx_EN) and which is being uses as the main heading source (CAL_MAG_PRIME).

Developer Information