mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_AHRS: rename is_ext_nav_used_for_yaw to using_noncompass_for_yaw
This commit is contained in:
parent
0edfd2634f
commit
e7be608a4a
@ -2314,11 +2314,11 @@ bool AP_AHRS::attitudes_consistent(char *failure_msg, const uint8_t failure_msg_
|
|||||||
|
|
||||||
// Check vs DCM yaw if this vehicle could use DCM in flight
|
// Check vs DCM yaw if this vehicle could use DCM in flight
|
||||||
// and if not using an external yaw source (DCM does not support external yaw sources)
|
// and if not using an external yaw source (DCM does not support external yaw sources)
|
||||||
bool using_external_yaw = false;
|
bool using_noncompass_for_yaw = false;
|
||||||
#if HAL_NAVEKF3_AVAILABLE
|
#if HAL_NAVEKF3_AVAILABLE
|
||||||
using_external_yaw = ekf_type() == EKFType::THREE && EKF3.using_external_yaw();
|
using_noncompass_for_yaw = (ekf_type() == EKFType::THREE) && EKF3.using_noncompass_for_yaw();
|
||||||
#endif
|
#endif
|
||||||
if (!always_use_EKF() && !using_external_yaw) {
|
if (!always_use_EKF() && !using_noncompass_for_yaw) {
|
||||||
Vector3f angle_diff;
|
Vector3f angle_diff;
|
||||||
primary_quat.angular_difference(dcm_quat).to_axis_angle(angle_diff);
|
primary_quat.angular_difference(dcm_quat).to_axis_angle(angle_diff);
|
||||||
const float yaw_diff = fabsf(angle_diff.z);
|
const float yaw_diff = fabsf(angle_diff.z);
|
||||||
@ -3022,8 +3022,8 @@ void AP_AHRS::Log_Write()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// check whether compass can be bypassed for arming check in case when external navigation data is available
|
// check if non-compass sensor is providing yaw. Allows compass pre-arm checks to be bypassed
|
||||||
bool AP_AHRS::is_ext_nav_used_for_yaw(void) const
|
bool AP_AHRS::using_noncompass_for_yaw(void) const
|
||||||
{
|
{
|
||||||
switch (active_EKF_type()) {
|
switch (active_EKF_type()) {
|
||||||
#if HAL_NAVEKF2_AVAILABLE
|
#if HAL_NAVEKF2_AVAILABLE
|
||||||
@ -3033,7 +3033,7 @@ bool AP_AHRS::is_ext_nav_used_for_yaw(void) const
|
|||||||
case EKFType::NONE:
|
case EKFType::NONE:
|
||||||
#if HAL_NAVEKF3_AVAILABLE
|
#if HAL_NAVEKF3_AVAILABLE
|
||||||
case EKFType::THREE:
|
case EKFType::THREE:
|
||||||
return EKF3.using_external_yaw();
|
return EKF3.using_noncompass_for_yaw();
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
||||||
case EKFType::SIM:
|
case EKFType::SIM:
|
||||||
|
@ -326,8 +326,8 @@ public:
|
|||||||
|
|
||||||
void Log_Write();
|
void Log_Write();
|
||||||
|
|
||||||
// check whether external navigation is providing yaw. Allows compass pre-arm checks to be bypassed
|
// check if non-compass sensor is providing yaw. Allows compass pre-arm checks to be bypassed
|
||||||
bool is_ext_nav_used_for_yaw(void) const override;
|
bool using_noncompass_for_yaw(void) const override;
|
||||||
|
|
||||||
// set and save the ALT_M_NSE parameter value
|
// set and save the ALT_M_NSE parameter value
|
||||||
void set_alt_measurement_noise(float noise) override;
|
void set_alt_measurement_noise(float noise) override;
|
||||||
|
@ -90,8 +90,8 @@ public:
|
|||||||
// see if EKF lane switching is possible to avoid EKF failsafe
|
// see if EKF lane switching is possible to avoid EKF failsafe
|
||||||
virtual void check_lane_switch(void) {}
|
virtual void check_lane_switch(void) {}
|
||||||
|
|
||||||
// check whether external navigation is providing yaw. Allows compass pre-arm checks to be bypassed
|
// check if non-compass sensor is providing yaw. Allows compass pre-arm checks to be bypassed
|
||||||
virtual bool is_ext_nav_used_for_yaw(void) const { return false; }
|
virtual bool using_noncompass_for_yaw(void) const { return false; }
|
||||||
|
|
||||||
// request EKF yaw reset to try and avoid the need for an EKF lane switch or failsafe
|
// request EKF yaw reset to try and avoid the need for an EKF lane switch or failsafe
|
||||||
virtual void request_yaw_reset(void) {}
|
virtual void request_yaw_reset(void) {}
|
||||||
|
Loading…
Reference in New Issue
Block a user