mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
AP_NavEKF3: beacon fusion checks source
This commit is contained in:
parent
8a56ce49be
commit
1263648d88
@ -14,16 +14,16 @@ void NavEKF3_core::SelectRngBcnFusion()
|
|||||||
// Determine if we need to fuse range beacon data on this time step
|
// Determine if we need to fuse range beacon data on this time step
|
||||||
if (rngBcnDataToFuse) {
|
if (rngBcnDataToFuse) {
|
||||||
if (PV_AidingMode == AID_ABSOLUTE) {
|
if (PV_AidingMode == AID_ABSOLUTE) {
|
||||||
if (!filterStatus.flags.using_gps && rngBcnAlignmentCompleted) {
|
if ((frontend->_sources.getPosXYSource() == AP_NavEKF_Source::SourceXY::BEACON) && rngBcnAlignmentCompleted) {
|
||||||
if (!bcnOriginEstInit) {
|
if (!bcnOriginEstInit) {
|
||||||
bcnOriginEstInit = true;
|
bcnOriginEstInit = true;
|
||||||
bcnPosOffsetNED.x = receiverPos.x - stateStruct.position.x;
|
bcnPosOffsetNED.x = receiverPos.x - stateStruct.position.x;
|
||||||
bcnPosOffsetNED.y = receiverPos.y - stateStruct.position.y;
|
bcnPosOffsetNED.y = receiverPos.y - stateStruct.position.y;
|
||||||
}
|
}
|
||||||
// If we aren't using GPS, then the beacons are used as the primary means of position reference
|
// beacons are used as the primary means of position reference
|
||||||
FuseRngBcn();
|
FuseRngBcn();
|
||||||
} else {
|
} else {
|
||||||
// If we are using GPS, then GPS is the primary reference, but we continue to use the beacon data
|
// If another source (i.e. GPS, ExtNav) is the primary reference, we continue to use the beacon data
|
||||||
// to calculate an independent position that is used to update the beacon position offset if we need to
|
// to calculate an independent position that is used to update the beacon position offset if we need to
|
||||||
// start using beacon data as the primary reference.
|
// start using beacon data as the primary reference.
|
||||||
FuseRngBcnStatic();
|
FuseRngBcnStatic();
|
||||||
|
Loading…
Reference in New Issue
Block a user