mag_calib_ukf

Calibrate magnetometer using UKF Online calibration of the magnetometer sensor using an UKF approach. It is required to redirect the magnetometer measurements to this module before using them in your estimation filters. In order to do that, define the mag id for your filter (for example AHRS_MLKF_MAG_ID for the mlkf ahrs filter) to MAG_CALIB_UKF_ID. For more information see TRICAL project page (https://www.github.com/sfwa/TRICAL).

Defines

Name

Value

Description

[AHRS/INS]_XXX_MAG_ID

MAG_CALIB_UKF_ID

Select correct input mag for your estimation filter (AHRS or INS), replace XXX by your filter name as defined in sw/airborne/modules/core/abi_sender_ids.h

Section MAG_CALIB_UKF

MAG_CALIB_UKF_

Name

Value

Description

NORM

1.0f

Measurement norm of magnetometer

NOISE_RMS

2e-1f

Noise RMS of magnetometer

ABI_BIND_ID

ABI_BROADCAST

Bind to a specific source for input data, broadcast ID by default

INITIAL_STATE

0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0

Initial state to be used by filter. There is an option to send the state from settings, after which the state will be send through the PAYLOAD_FLOAT message.

HOTSTART

TRUE

Read calibration on initialization and Write calibration periodically to file (only for Linux-based boards)

HOTSTART_SAVE_FILE

/data/ftp/internal_000/mag_ukf_calib.txt

Hotstart save file (only for Linux-based boards)

VERBOSE

FALSE

Enable terminal verbose mode (only for Linux-based boards)

Sections