mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-25 17:23:56 -04:00
AP_NavEKF3: style change in BCN mesurements
This commit is contained in:
parent
4d2f2a2aad
commit
48c5a9b9c5
@ -780,9 +780,9 @@ void NavEKF3_core::readRngBcnData()
|
||||
// Check if the range beacon data can be used to align the vehicle position
|
||||
if (imuSampleTime_ms - rngBcnLast3DmeasTime_ms < 250 && beaconVehiclePosErr < 1.0f && rngBcnAlignmentCompleted) {
|
||||
// check for consistency between the position reported by the beacon and the position from the 3-State alignment filter
|
||||
float posDiffSq = sq(receiverPos.x - beaconVehiclePosNED.x) + sq(receiverPos.y - beaconVehiclePosNED.y);
|
||||
float posDiffVar = sq(beaconVehiclePosErr) + receiverPosCov[0][0] + receiverPosCov[1][1];
|
||||
if (posDiffSq < 9.0f*posDiffVar) {
|
||||
const float posDiffSq = sq(receiverPos.x - beaconVehiclePosNED.x) + sq(receiverPos.y - beaconVehiclePosNED.y);
|
||||
const float posDiffVar = sq(beaconVehiclePosErr) + receiverPosCov[0][0] + receiverPosCov[1][1];
|
||||
if (posDiffSq < 9.0f * posDiffVar) {
|
||||
rngBcnGoodToAlign = true;
|
||||
// Set the EKF origin and magnetic field declination if not previously set
|
||||
if (!validOrigin && PV_AidingMode != AID_ABSOLUTE) {
|
||||
@ -812,7 +812,7 @@ void NavEKF3_core::readRngBcnData()
|
||||
}
|
||||
|
||||
// Check the buffer for measurements that have been overtaken by the fusion time horizon and need to be fused
|
||||
rngBcnDataToFuse = storedRangeBeacon.recall(rngBcnDataDelayed,imuDataDelayed.time_ms);
|
||||
rngBcnDataToFuse = storedRangeBeacon.recall(rngBcnDataDelayed, imuDataDelayed.time_ms);
|
||||
|
||||
// Correct the range beacon earth frame origin for estimated offset relative to the EKF earth frame origin
|
||||
if (rngBcnDataToFuse) {
|
||||
|
Loading…
Reference in New Issue
Block a user