From bd76c307687b7a2808d6404d0da13b0bea40c3de Mon Sep 17 00:00:00 2001 From: VMsunghwan Date: Sat, 15 Jan 2022 15:13:44 +0900 Subject: [PATCH] AP_NavEKF2 : correct variable typo receverPosDownMax -> receiverPosDownMax receverPosDownMin -> receiverPosDownMin --- libraries/AP_NavEKF2/AP_NavEKF2_RngBcnFusion.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_RngBcnFusion.cpp b/libraries/AP_NavEKF2/AP_NavEKF2_RngBcnFusion.cpp index b218c711d6..aea70455a6 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_RngBcnFusion.cpp +++ b/libraries/AP_NavEKF2/AP_NavEKF2_RngBcnFusion.cpp @@ -323,18 +323,18 @@ void NavEKF2_core::FuseRngBcnStatic() ftype delta = receiverPos.z - bcnMidPosD; // calcuate the two hypothesis for our vertical position - ftype receverPosDownMax; - ftype receverPosDownMin; + ftype receiverPosDownMax; + ftype receiverPosDownMin; if (delta >= 0.0f) { - receverPosDownMax = receiverPos.z; - receverPosDownMin = receiverPos.z - 2.0f * delta; + receiverPosDownMax = receiverPos.z; + receiverPosDownMin = receiverPos.z - 2.0f * delta; } else { - receverPosDownMax = receiverPos.z - 2.0f * delta; - receverPosDownMin = receiverPos.z; + receiverPosDownMax = receiverPos.z - 2.0f * delta; + receiverPosDownMin = receiverPos.z; } - bcnPosOffsetMax = stateStruct.position.z - receverPosDownMin; - bcnPosOffsetMin = stateStruct.position.z - receverPosDownMax; + bcnPosOffsetMax = stateStruct.position.z - receiverPosDownMin; + bcnPosOffsetMin = stateStruct.position.z - receiverPosDownMax; } else { // We are using the beacons as the primary height reference, so don't modify their vertical position bcnPosOffset = 0.0f;