mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-13 18:03:33 +08:00
Rename yaw_use_inhibit -> is_yaw_fusion_inhibited
Temp
This commit is contained in:
committed by
Mathieu Bresciani
parent
4cb2d1c645
commit
796afd5f98
@@ -380,7 +380,7 @@ private:
|
||||
bool _mag_decl_cov_reset{false}; ///< true after the fuseDeclination() function has been used to modify the earth field covariances after a magnetic field reset event.
|
||||
bool _synthetic_mag_z_active{false}; ///< true if we are generating synthetic magnetometer Z measurements
|
||||
|
||||
bool _yaw_use_inhibit{false}; ///< true when yaw sensor use is being inhibited
|
||||
bool _is_yaw_fusion_inhibited{false}; ///< true when yaw sensor use is being inhibited
|
||||
|
||||
SquareMatrix24f P; ///< state covariance matrix
|
||||
|
||||
|
||||
+1
-1
@@ -518,7 +518,7 @@ bool Ekf::resetMagHeading(const Vector3f &mag_init, bool increase_yaw_var, bool
|
||||
yaw_new_variance = sq(fmaxf(_params.mag_heading_noise, 1.0e-2f));
|
||||
}
|
||||
|
||||
} else if (_params.mag_fusion_type == MAG_FUSE_TYPE_INDOOR && _yaw_use_inhibit) {
|
||||
} else if (_params.mag_fusion_type == MAG_FUSE_TYPE_INDOOR && _is_yaw_fusion_inhibited) {
|
||||
// we are operating temporarily without knowing the earth frame yaw angle
|
||||
return true;
|
||||
|
||||
|
||||
+4
-4
@@ -52,7 +52,7 @@ void Ekf::controlMagFusion()
|
||||
if (_params.mag_fusion_type == MAG_FUSE_TYPE_NONE) {
|
||||
if (noOtherYawAidingThanMag())
|
||||
{
|
||||
_yaw_use_inhibit = true;
|
||||
_is_yaw_fusion_inhibited = true;
|
||||
fuseHeading();
|
||||
}
|
||||
return;
|
||||
@@ -156,7 +156,7 @@ void Ekf::runOnGroundYawReset()
|
||||
|
||||
bool Ekf::isYawResetAuthorized() const
|
||||
{
|
||||
return !_yaw_use_inhibit;
|
||||
return !_is_yaw_fusion_inhibited;
|
||||
}
|
||||
|
||||
bool Ekf::canResetMagHeading() const
|
||||
@@ -268,8 +268,8 @@ void Ekf::checkMagDeclRequired()
|
||||
|
||||
void Ekf::checkMagInhibition()
|
||||
{
|
||||
_yaw_use_inhibit = shouldInhibitMag();
|
||||
if (!_yaw_use_inhibit) {
|
||||
_is_yaw_fusion_inhibited = shouldInhibitMag();
|
||||
if (!_is_yaw_fusion_inhibited) {
|
||||
_mag_use_not_inhibit_us = _imu_sample_delayed.time_us;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -784,7 +784,7 @@ void Ekf::fuseHeading()
|
||||
|
||||
// handle special case where yaw measurement is unavailable
|
||||
bool fuse_zero_innov = false;
|
||||
if (_yaw_use_inhibit) {
|
||||
if (_is_yaw_fusion_inhibited) {
|
||||
// The yaw measurement cannot be trusted but we need to fuse something to prevent a badly
|
||||
// conditioned covariance matrix developing over time.
|
||||
if (!_control_status.flags.vehicle_at_rest) {
|
||||
@@ -851,7 +851,7 @@ void Ekf::fuseHeading()
|
||||
|
||||
// handle special case where yaw measurement is unavailable
|
||||
bool fuse_zero_innov = false;
|
||||
if (_yaw_use_inhibit) {
|
||||
if (_is_yaw_fusion_inhibited) {
|
||||
// The yaw measurement cannot be trusted but we need to fuse something to prevent a badly
|
||||
// conditioned covariance matrix developing over time.
|
||||
if (!_control_status.flags.vehicle_at_rest) {
|
||||
|
||||
Reference in New Issue
Block a user