Skip to content

Commit

Permalink
AP_NavEKF3: tidy population of fusion reports
Browse files Browse the repository at this point in the history
simply take a refefence and use it
  • Loading branch information
peterbarker committed Feb 26, 2024
1 parent df3267c commit e9d065c
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions libraries/AP_NavEKF3/AP_NavEKF3_RngBcnFusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,12 @@ void NavEKF3_core::FuseRngBcn()

// Update the fusion report
if (rngBcn.fusionReport && rngBcn.dataDelayed.beacon_ID < dal.beacon()->count()) {
rngBcn.fusionReport[rngBcn.dataDelayed.beacon_ID].beaconPosNED = rngBcn.dataDelayed.beacon_posNED;
rngBcn.fusionReport[rngBcn.dataDelayed.beacon_ID].innov = rngBcn.innov;
rngBcn.fusionReport[rngBcn.dataDelayed.beacon_ID].innovVar = rngBcn.varInnov;
rngBcn.fusionReport[rngBcn.dataDelayed.beacon_ID].rng = rngBcn.dataDelayed.rng;
rngBcn.fusionReport[rngBcn.dataDelayed.beacon_ID].testRatio = rngBcn.testRatio;
auto &report = rngBcn.fusionReport[rngBcn.dataDelayed.beacon_ID];
report.beaconPosNED = rngBcn.dataDelayed.beacon_posNED;
report.innov = rngBcn.innov;
report.innovVar = rngBcn.varInnov;
report.rng = rngBcn.dataDelayed.rng;
report.testRatio = rngBcn.testRatio;
}
}
}
Expand Down Expand Up @@ -506,11 +507,12 @@ void NavEKF3_core::FuseRngBcnStatic()
}
// Update the fusion report
if (rngBcn.fusionReport && rngBcn.dataDelayed.beacon_ID < dal.beacon()->count()) {
rngBcn.fusionReport[rngBcn.dataDelayed.beacon_ID].beaconPosNED = rngBcn.dataDelayed.beacon_posNED;
rngBcn.fusionReport[rngBcn.dataDelayed.beacon_ID].innov = rngBcn.innov;
rngBcn.fusionReport[rngBcn.dataDelayed.beacon_ID].innovVar = rngBcn.varInnov;
rngBcn.fusionReport[rngBcn.dataDelayed.beacon_ID].rng = rngBcn.dataDelayed.rng;
rngBcn.fusionReport[rngBcn.dataDelayed.beacon_ID].testRatio = rngBcn.testRatio;
auto &report = rngBcn.fusionReport[rngBcn.dataDelayed.beacon_ID];
report.beaconPosNED = rngBcn.dataDelayed.beacon_posNED;
report.innov = rngBcn.innov;
report.innovVar = rngBcn.varInnov;
report.rng = rngBcn.dataDelayed.rng;
report.testRatio = rngBcn.testRatio;
}
}
}
Expand Down

0 comments on commit e9d065c

Please sign in to comment.