mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 22:33:34 +08:00
ekf2: add kconfig option to enable/disable external vision fusion
This commit is contained in:
@@ -166,11 +166,11 @@ Likelihood Ekf::estimateInertialNavFallingLikelihood() const
|
||||
enum class ReferenceType { PRESSURE, GNSS, GROUND };
|
||||
|
||||
struct {
|
||||
ReferenceType ref_type;
|
||||
float innov;
|
||||
float innov_var;
|
||||
bool failed_min;
|
||||
bool failed_lim;
|
||||
ReferenceType ref_type{};
|
||||
float innov{0.f};
|
||||
float innov_var{0.f};
|
||||
bool failed_min{false};
|
||||
bool failed_lim{false};
|
||||
} checks[6] {};
|
||||
|
||||
if (_control_status.flags.baro_hgt) {
|
||||
@@ -189,6 +189,7 @@ Likelihood Ekf::estimateInertialNavFallingLikelihood() const
|
||||
checks[3] = {ReferenceType::GROUND, _aid_src_rng_hgt.innovation, _aid_src_rng_hgt.innovation_variance};
|
||||
}
|
||||
|
||||
#if defined(CONFIG_EKF2_EXTERNAL_VISION)
|
||||
if (_control_status.flags.ev_hgt) {
|
||||
checks[4] = {ReferenceType::GROUND, _aid_src_ev_hgt.innovation, _aid_src_ev_hgt.innovation_variance};
|
||||
}
|
||||
@@ -196,6 +197,7 @@ Likelihood Ekf::estimateInertialNavFallingLikelihood() const
|
||||
if (_control_status.flags.ev_vel) {
|
||||
checks[5] = {ReferenceType::GROUND, _aid_src_ev_vel.innovation[2], _aid_src_ev_vel.innovation_variance[2]};
|
||||
}
|
||||
#endif // CONFIG_EKF2_EXTERNAL_VISION
|
||||
|
||||
// Compute the check based on innovation ratio for all the sources
|
||||
for (unsigned i = 0; i < 6; i++) {
|
||||
|
||||
Reference in New Issue
Block a user