From 64a8153b684b7c4d969aaae8000f63e8d16a4e2b Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Sat, 21 May 2016 11:13:03 +1000 Subject: [PATCH] AP_NavEKF2: update function name The primary purpose of this function is re-alignment --- libraries/AP_NavEKF2/AP_NavEKF2_MagFusion.cpp | 6 +++--- libraries/AP_NavEKF2/AP_NavEKF2_core.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_MagFusion.cpp b/libraries/AP_NavEKF2/AP_NavEKF2_MagFusion.cpp index 5de93bab06..a3c68097ae 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_MagFusion.cpp +++ b/libraries/AP_NavEKF2/AP_NavEKF2_MagFusion.cpp @@ -60,7 +60,7 @@ void NavEKF2_core::controlMagYawReset() // In-Flight reset for vehicles that can use a zero sideslip assumption (Planes) // this is done to protect against unrecoverable heading alignment errors due to compass faults if (!firstMagYawInit && assume_zero_sideslip() && inFlight) { - alignYawGPS(); + realignYawGPS(); firstMagYawInit = true; } @@ -74,9 +74,9 @@ void NavEKF2_core::controlMagYawReset() } -// this function is used to do a forced alignment of the yaw angle to align with the horizontal velocity +// this function is used to do a forced re-alignment of the yaw angle to align with the horizontal velocity // vector from GPS. It is used to align the yaw angle after launch or takeoff. -void NavEKF2_core::alignYawGPS() +void NavEKF2_core::realignYawGPS() { // get quaternion from existing filter states and calculate roll, pitch and yaw angles Vector3f eulerAngles; diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_core.h b/libraries/AP_NavEKF2/AP_NavEKF2_core.h index f108a32b3f..1f62756821 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_core.h +++ b/libraries/AP_NavEKF2/AP_NavEKF2_core.h @@ -502,7 +502,7 @@ private: void SelectBetaFusion(); // force alignment of the yaw angle using GPS velocity data - void alignYawGPS(); + void realignYawGPS(); // initialise the earth magnetic field states using declination and current attitude and magnetometer meaasurements // and return attitude quaternion