mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-17 23:47:34 +08:00
ekf2: add param to enable synthetic mag Z fusion mode
This commit is contained in:
@@ -159,6 +159,7 @@ EKF2::EKF2(bool multi_mode, const px4::wq_config_t &config, bool replay_mode):
|
||||
_param_ekf2_pcoef_z(_params->static_pressure_coef_z),
|
||||
_param_ekf2_move_test(_params->is_moving_scaler),
|
||||
_param_ekf2_mag_check(_params->check_mag_strength),
|
||||
_param_ekf2_synthetic_mag_z(_params->synthesize_mag_z),
|
||||
_param_ekf2_gsf_tas_default(_params->EKFGSF_tas_default)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -495,6 +495,8 @@ private:
|
||||
|
||||
(ParamFloat<px4::params::EKF2_REQ_GPS_H>) _param_ekf2_req_gps_h, ///< Required GPS health time
|
||||
(ParamExtInt<px4::params::EKF2_MAG_CHECK>) _param_ekf2_mag_check, ///< Mag field strength check
|
||||
(ParamExtInt<px4::params::EKF2_SYNT_MAG_Z>)
|
||||
_param_ekf2_synthetic_mag_z, ///< Enables the use of a synthetic value for the Z axis of the magnetometer calculated from the 3D magnetic field vector at the location of the drone.
|
||||
|
||||
// Used by EKF-GSF experimental yaw estimator
|
||||
(ParamExtFloat<px4::params::EKF2_GSF_TAS>)
|
||||
|
||||
@@ -1326,6 +1326,20 @@ PARAM_DEFINE_FLOAT(EKF2_REQ_GPS_H, 10.0f);
|
||||
*/
|
||||
PARAM_DEFINE_INT32(EKF2_MAG_CHECK, 0);
|
||||
|
||||
/**
|
||||
* Enable synthetic magnetometer Z component measurement.
|
||||
*
|
||||
* Use for vehicles where the measured body Z magnetic field is subject to strong magnetic interference.
|
||||
* For magnetic heading fusion the magnetometer Z measurement will be replaced by a synthetic value calculated
|
||||
* using the knowledge of the 3D magnetic field vector at the location of the drone. Therefore, this parameter
|
||||
* will only have an effect if the global position of the drone is known.
|
||||
* For 3D mag fusion the magnetometer Z measurement will simply be ingored instead of fusing the synthetic value.
|
||||
*
|
||||
* @group EKF2
|
||||
* @boolean
|
||||
*/
|
||||
PARAM_DEFINE_INT32(EKF2_SYNT_MAG_Z, 0);
|
||||
|
||||
/**
|
||||
* Default value of true airspeed used in EKF-GSF AHRS calculation.
|
||||
* If no airspeed measurements are avalable, the EKF-GSF AHRS calculation will assume this value of true airspeed when compensating for centripetal acceleration during turns. Set to zero to disable centripetal acceleration compensation during fixed wing flight modes.
|
||||
|
||||
Reference in New Issue
Block a user