MAVLINKHUD

Overview

The IMU parameter group (often appearing as INS_ in the full parameter list) configures the global behavior of the Inertial Measurement Units.

This group handles physical offsets and timing constants that apply to all internal sensors.

Key Concepts

1. Lever-Arm Compensation (IMU_POS_X/Y/Z)

Defines the distance (in meters) from the center of gravity (CG) of the vehicle to the physical location of the IMU chip on the circuit board.

  • Importance: If the IMU is far from the CG (e.g., on the tail of a long drone), the centripetal acceleration during a turn will bias the EKF. Setting these offsets allows the math to "shift" the measurement back to the CG.

2. Sample Rate (IMU_SAMPLE_RATE)

Defines the internal frequency (Hz) at which raw sensor data is pulled from the IMU hardware.

  • Standard: 1000Hz (1kHz).
  • High-End: 2000Hz or 4000Hz (reduces aliasing on high-vibration frames).

Parameter Breakdown

  • IMU_POS_X/Y/Z: Physical offset from CG (meters).
  • IMU_SAMPLE_RATE: Internal hardware sampling frequency.

Developer Notes

  • Library: libraries/AP_InertialSensor.
  • Alias: In most firmwares, these are mapped to INS_POS_... and INS_GYRO_RATE.

IMU_POS: IMU Offsets

Description

XYZ position of the IMU accelerometer relative to the body frame origin.

Values

  • Units: m
  • Format: Vector3 (X, Y, Z)
  • Default: 0, 0, 0

Description

This parameter is used in SITL (Software In The Loop) simulation only. It defines the physical location of the simulated IMU sensor relative to the center of the simulated vehicle.

  • Purpose: Used to simulate "lever arm" effects. When the vehicle rotates, an IMU not at the center of rotation measures centripetal and tangential acceleration. Setting this parameter allows developers to verify that the EKF (Extended Kalman Filter) correctly compensates for these offsets.
  • X: Forward offset (positive forward).
  • Y: Right offset (positive right).
  • Z: Down offset (positive down).

Source Code

ardupilot/libraries/SITL/SITL.cpp

IMU_SAMPLE_RATE: IMU Sample Rate

Description

Sets the sample rate for the Inertial Measurement Unit (IMU) on the AP_Periph node.

Values

  • Range: 0 to 1000
  • Units: Hz
  • Default: 0

Description

This parameter configures the loop rate of the Inertial Sensor driver on the peripheral.

  • 0: Use the driver's default rate.
  • >0: Force a specific sample rate in Hz. Higher rates allow for better vibration filtering (if the hardware supports it) but consume more CPU resources on the peripheral microcontroller.

Source Code

ardupilot/Tools/AP_Periph/Parameters.cpp