mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 21:21:36 +08:00
ekf2: delete isYawResetAuthorized()
This commit is contained in:
@@ -851,7 +851,6 @@ private:
|
|||||||
float getTerrainVPos() const { return isTerrainEstimateValid() ? _terrain_vpos : _last_on_ground_posD; }
|
float getTerrainVPos() const { return isTerrainEstimateValid() ? _terrain_vpos : _last_on_ground_posD; }
|
||||||
|
|
||||||
void runOnGroundYawReset();
|
void runOnGroundYawReset();
|
||||||
bool isYawResetAuthorized() const { return !_is_yaw_fusion_inhibited; }
|
|
||||||
bool canResetMagHeading() const;
|
bool canResetMagHeading() const;
|
||||||
void runInAirYawReset(const Vector3f &mag);
|
void runInAirYawReset(const Vector3f &mag);
|
||||||
|
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ void Ekf::checkHaglYawResetReq()
|
|||||||
|
|
||||||
void Ekf::runOnGroundYawReset()
|
void Ekf::runOnGroundYawReset()
|
||||||
{
|
{
|
||||||
if (_mag_yaw_reset_req && isYawResetAuthorized()) {
|
if (_mag_yaw_reset_req && !_is_yaw_fusion_inhibited) {
|
||||||
const bool has_realigned_yaw = canResetMagHeading() ? resetMagHeading() : false;
|
const bool has_realigned_yaw = canResetMagHeading() ? resetMagHeading() : false;
|
||||||
|
|
||||||
if (has_realigned_yaw) {
|
if (has_realigned_yaw) {
|
||||||
@@ -180,7 +180,7 @@ bool Ekf::canResetMagHeading() const
|
|||||||
|
|
||||||
void Ekf::runInAirYawReset(const Vector3f &mag_sample)
|
void Ekf::runInAirYawReset(const Vector3f &mag_sample)
|
||||||
{
|
{
|
||||||
if (_mag_yaw_reset_req && isYawResetAuthorized()) {
|
if (_mag_yaw_reset_req && !_is_yaw_fusion_inhibited) {
|
||||||
bool has_realigned_yaw = false;
|
bool has_realigned_yaw = false;
|
||||||
|
|
||||||
if (_control_status.flags.gps && _control_status.flags.fixed_wing) {
|
if (_control_status.flags.gps && _control_status.flags.fixed_wing) {
|
||||||
|
|||||||
Reference in New Issue
Block a user