INAV Accelerometer, compass and other sensors: CLI settings

Hardware selection, alignment and calibration values for the accelerometer, gyro, compass, barometer, pitot tube, rangefinder and optical flow, plus the attitude estimator (AHRS) and board alignment.

56 settings in INAV 9.1. Each range and value list is read from the release's src/main/fc/settings.yaml, each default from the release's settings.yaml, with each constant and C type resolved by INAV's own settings.rb against the SITL and flight-controller target headers, so a board's own config can still change it. Set one with set name = value, then save. Paste a diff all into the CLI checker to test it against any release.

SettingTypeRange or valuesDefault 8.09.09.1Notes
acc_hardware # uint8
global
13 valuesNONE, AUTO, MPU6000, MPU6500, MPU9250, BMI160, ICM20689, BMI088, ICM42605, BMI270, LSM6DXX, ICM45686, FAKE
AUTO ✓✓Δ Selection of acc hardware. See Wiki Sensor auto detect and hardware failure detection for more info
9.1: new values ICM45686
acc_lpf_hz # uint16
global
0 to 200 15 ✓✓✓ Software-based filter to remove mechanical vibrations from the accelerometer measurements. Value is cutoff frequency (Hz). For larger frames with bigger props set to lower value.
acc_lpf_type # uint8
global
PT1, BIQUAD BIQUAD ✓✓✓ Specifies the type of the software LPF of the acc signals. BIQUAD gives better filtering and more delay, PT1 less filtering and less delay, so use only on clean builds.
acc_notch_cutoff # uint8
global
1 to 255 1 ✓✓✓ Frequency of the software notch filter to remove mechanical vibrations from the accelerometer measurements. Value is cutoff frequency (Hz)
acc_notch_hz # uint8
global
0 to 255 0 ✓✓✓ Frequency of the software notch filter to remove mechanical vibrations from the accelerometer measurements. Value is center frequency (Hz)
acc_temp_correction # float
global
-50 to 51 0 —✓✓ Accelerometer temperature correction factor to compensate for acceleromter drift with changes in acceleromter temperature [cm/s2 per Degs C]. Internally limited to between -50 and 50. Typical setting for MPU6000 acceleromter is around 2.5. Setting to 51 initiates auto calibration which ends after 5 minutes or on first Arm.
accgain_x # int16
global
1 to 8192 4096 ✓✓✓ Calculated value after '6 position avanced calibration'. Uncalibrated value is 4096. See Wiki page.
accgain_y # int16
global
1 to 8192 4096 ✓✓✓ Calculated value after '6 position avanced calibration'. Uncalibrated value is 4096. See Wiki page.
accgain_z # int16
global
1 to 8192 4096 ✓✓✓ Calculated value after '6 position avanced calibration'. Uncalibrated value is 4096. See Wiki page.
acczero_x # int16
global
-32768 to 32767 0 ✓✓✓ Calculated value after '6 position avanced calibration'. See Wiki page.
acczero_y # int16
global
-32768 to 32767 0 ✓✓✓ Calculated value after '6 position avanced calibration'. See Wiki page.
acczero_z # int16
global
-32768 to 32767 0 ✓✓✓ Calculated value after '6 position avanced calibration'. See Wiki page.
ahrs_acc_ignore_rate # uint8
global
0 to 30 15 ✓✓✓ Total gyro rotation rate threshold [deg/s] before scaling to consider accelerometer trustworthy
ahrs_acc_ignore_slope # uint8
global
0 to 10 5 ✓✓✓ Half-width of the interval to gradually reduce accelerometer weight. Centered at `imu_acc_ignore_rate` (exactly 50% weight)
ahrs_dcm_ki # uint16
global
0 to 65535 50 ✓✓✓ Inertial Measurement Unit KI Gain for accelerometer measurements
ahrs_dcm_ki_mag # uint16
global
0 to 65535 50 ✓✓✓ Inertial Measurement Unit KI Gain for compass measurements
ahrs_dcm_kp # uint16
global
0 to 65535 2000 ✓✓✓ Inertial Measurement Unit KP Gain for accelerometer measurements
ahrs_dcm_kp_mag # uint16
global
0 to 65535 2000 ✓✓✓ Inertial Measurement Unit KP Gain for compass measurements
ahrs_gps_yaw_weight # uint16
global
0 to 500 100 ✓✓✓ Arhs gps yaw weight when mag is avaliable, 0 means no gps yaw, 100 means equal weight as compass
ahrs_gps_yaw_windcomp # uint8
global
OFF, ON ON ✓✓✓ Wind compensation in heading estimation from gps groundcourse(fixed wing only)
ahrs_inertia_comp_method # uint8
global
VELNED, TURNRATE, ADAPTIVE ADAPTIVE ✓✓✓ Inertia force compensation method when gps is avaliable, VELNED use the accleration from gps, TURNRATE calculates accleration by turnrate multiplied by speed, ADAPTIVE choose best result from two in each ahrs loop
align_board_pitch # int16
global
-1800 to 3600 0 ✓✓✓ Arbitrary board rotation in deci-degrees (0.1 degree), to allow mounting it sideways / upside down / rotated etc
align_board_roll # int16
global
-1800 to 3600 0 ✓✓✓ Arbitrary board rotation in deci-degrees (0.1 degree), to allow mounting it sideways / upside down / rotated etc
align_board_yaw # int16
global
-1800 to 3600 0 ✓✓✓ Arbitrary board rotation in deci-degrees (0.1 degree), to allow mounting it sideways / upside down / rotated etc
align_mag # uint8
global
9 valuesDEFAULT, CW0, CW90, CW180, CW270, CW0FLIP, CW90FLIP, CW180FLIP, CW270FLIP
DEFAULT
needs USE_MAG
✓✓✓ When running on non-default hardware or adding support for new sensors/sensor boards, these values are used for sensor orientation. When carefully understood, these values can also be used to rotate (in 90deg steps) or flip the board. Possible values are: DEFAULT, CW0_DEG, CW90_DEG, CW180_DEG, CW270_DEG, CW0_DEG_FLIP, CW90_DEG_FLIP, CW180_DEG_FLIP, CW270_DEG_FLIP.
align_mag_pitch # int16
global
-1800 to 3600 0
needs USE_MAG
✓✓✓ Same as align_mag_roll, but for the pitch axis.
align_mag_roll # int16
global
-1800 to 3600 0
needs USE_MAG
✓✓✓ Set the external mag alignment on the roll axis (in 0.1 degree steps). If this value is non-zero, the compass is assumed to be externally mounted and both the board and on-board compass alignent (align_mag) are ignored. See also align_mag_pitch and align_mag_yaw.
align_mag_yaw # int16
global
-1800 to 3600 0
needs USE_MAG
✓✓✓ Same as align_mag_roll, but for the yaw axis.
align_opflow # uint8
global
9 valuesDEFAULT, CW0, CW90, CW180, CW270, CW0FLIP, CW90FLIP, CW180FLIP, CW270FLIP
CW0FLIP
needs USE_OPFLOW
✓✓✓ Optical flow module alignment (default CW0_DEG_FLIP)
baro_cal_tolerance # uint16
global
0 to 1000 150
needs USE_BARO
✓✓✓ Baro calibration tolerance in cm. The default should allow the noisiest baro to complete calibration [cm].
baro_hardware # uint8
global
13 valuesNONE, AUTO, BMP085, MS5611, BMP280, MS5607, LPS25H, SPL06, BMP388, DPS310, B2SMPB, MSP, FAKE
AUTO
needs USE_BARO
✓✓✓ Selection of baro hardware. See Wiki Sensor auto detect and hardware failure detection for more info
baro_temp_correction # float
global
-50 to 51 0
needs USE_BARO
—✓✓ Baro temperature correction factor to compensate for Baro altitude drift with changes in Baro temperature [cm/Degs C]. Internally limited to between -50 and 50. Typical setting for BMP280 Baro is around 20. Setting to 51 initiates auto calibration which ends after 5 minutes or on first Arm.
gyro_to_use # uint8
global
0 to 2 0
needs USE_DUAL_GYRO
✓✓✓ On multi-gyro targets, allows to choose which gyro to use. 0 = first gyro, 1 = second gyro
gyro_zero_x # int16
global
-32768 to 32767 0 ✓✓✓ Calculated gyro zero calibration of axis X
gyro_zero_y # int16
global
-32768 to 32767 0 ✓✓✓ Calculated gyro zero calibration of axis Y
gyro_zero_z # int16
global
-32768 to 32767 0 ✓✓✓ Calculated gyro zero calibration of axis Z
init_gyro_cal # uint8
global
OFF, ON ON ✓✓✓ If defined to 'OFF', it will ignore the gyroscope calibration done at each startup. Instead, the gyroscope last calibration from when you calibrated will be used. It also means you don't have to keep the UAV stationary during a startup.
ins_gravity_cmss # float
global
0 to 2000 0.0 ✓✓✓ Calculated 1G of Acc axis Z to use in INS
mag_calibration_time # uint8
global
20 to 120 30
needs USE_MAG
✓✓✓ Adjust how long time the Calibration of mag will last.
mag_declination # int16
global
-18000 to 18000 0
needs USE_MAG
✓✓✓ Current location magnetic declination in format. For example, -6deg 37min = -637 for Japan. Leading zero in ddd not required. Get your local magnetic declination here: http://magnetic-declination.com/ . Not in use if inav_auto_mag_decl is turned on and you acquire valid GPS fix.
mag_hardware # uint8
global
17 valuesNONE, AUTO, HMC5883, AK8975, MAG3110, AK8963, IST8310, QMC5883, QMC5883P, MPU9250, IST8308, LIS3MDL, MSP, RM3100, VCM5883, MLX90393, FAKE
AUTO
needs USE_MAG
✓Δ✓ Selection of mag hardware. See Wiki Sensor auto detect and hardware failure detection for more info
9.0: new values QMC5883P
mag_to_use # uint8
global
0 to 1 0
needs USE_MAG, USE_DUAL_MAG
✓✓✓ Allow to chose between built-in and external compass sensor if they are connected to separate buses. Currently only for REVO target
maggain_x # int16
global
-32768 to 32767 1024
needs USE_MAG
✓✓✓ Magnetometer calibration X gain. If 1024, no calibration or calibration failed
maggain_y # int16
global
-32768 to 32767 1024
needs USE_MAG
✓✓✓ Magnetometer calibration Y gain. If 1024, no calibration or calibration failed
maggain_z # int16
global
-32768 to 32767 1024
needs USE_MAG
✓✓✓ Magnetometer calibration Z gain. If 1024, no calibration or calibration failed
magzero_x # int16
global
-32768 to 32767 0
needs USE_MAG
✓✓✓ Magnetometer calibration X offset. If its 0 none offset has been applied and calibration is failed.
magzero_y # int16
global
-32768 to 32767 0
needs USE_MAG
✓✓✓ Magnetometer calibration Y offset. If its 0 none offset has been applied and calibration is failed.
magzero_z # int16
global
-32768 to 32767 0
needs USE_MAG
✓✓✓ Magnetometer calibration Z offset. If its 0 none offset has been applied and calibration is failed.
opflow_hardware # uint8
global
NONE, CXOF, MSP, FAKE NONE
needs USE_OPFLOW
✓✓✓ Selection of OPFLOW hardware.
opflow_scale # float
global
0 to 10000 10.5
needs USE_OPFLOW
✓✓✓ Optical flow module scale factor
pitot_hardware # uint8
global
9 valuesNONE, AUTO, MS4525, ADC, VIRTUAL, FAKE, MSP, DLVR-L10D, MS5525
NONE
needs USE_PITOT
✓✓Δ Selection of pitot hardware. VIRTUAL only works if a GPS is enabled.
9.1: new values MS5525
pitot_lpf_milli_hz # uint16
global
0 to 50000 3000
needs USE_PITOT
✓Δ✓ Pitot tube lowpass filter cutoff frequency in milli Hz(0.001hz). Set as 0 to disable LPF Lower cutoff frequencies result in smoother response at expense of command control delay
9.0: max 10000 → 50000; default 350 → 3000
pitot_scale # float
global
0 to 100 1.0
needs USE_PITOT
✓✓✓ Pitot tube scale factor
rangefinder_hardware # uint8
global
12 valuesNONE, SRF10, VL53L0X, MSP, BENEWAKE, VL53L1X, US42, TOF10120_I2C, FAKE, TERARANGER_EVO, USD1_V0, NRA
NONE
needs USE_RANGEFINDER
✓✓✓ Selection of rangefinder hardware.
rangefinder_median_filter # uint8
global
OFF, ON OFF
needs USE_RANGEFINDER
✓✓✓ 3-point median filtering for rangefinder readouts
small_angle # uint8
global
0 to 180 25 ✓✓✓ If the aircraft tilt angle exceed this value the copter will refuse to arm.

✓ present, Δ changed in that release (hover for what changed), — not in that release. “needs USE_…” is the build option the setting is compiled with: a target that does not define it has no such setting.Descriptions are INAV's own, from settings.yaml.

Other sections

What changed between releases: 8.0 → 9.0 · 9.0 → 9.1. Machine-readable: params.json (9.1.0), GPL-3.0 like the firmware it comes from.