mirror of https://github.com/ArduPilot/ardupilot
Sub: allow NavEKFs to be compiled out
This commit is contained in:
parent
797aa51025
commit
6092a415a5
|
@ -546,13 +546,17 @@ const AP_Param::Info Sub::var_info[] = {
|
|||
GOBJECT(rcmap, "RCMAP_", RCMapper),
|
||||
#endif
|
||||
|
||||
#if HAL_NAVEKF2_AVAILABLE
|
||||
// @Group: EK2_
|
||||
// @Path: ../libraries/AP_NavEKF2/AP_NavEKF2.cpp
|
||||
GOBJECTN(ahrs.EKF2, NavEKF2, "EK2_", NavEKF2),
|
||||
#endif
|
||||
|
||||
#if HAL_NAVEKF3_AVAILABLE
|
||||
// @Group: EK3_
|
||||
// @Path: ../libraries/AP_NavEKF3/AP_NavEKF3.cpp
|
||||
GOBJECTN(ahrs.EKF3, NavEKF3, "EK3_", NavEKF3),
|
||||
#endif
|
||||
|
||||
// @Group: MIS_
|
||||
// @Path: ../libraries/AP_Mission/AP_Mission.cpp
|
||||
|
|
|
@ -154,11 +154,19 @@ void Sub::init_ardupilot()
|
|||
// We only have onboard baro
|
||||
// No external underwater depth sensor detected
|
||||
barometer.set_primary_baro(0);
|
||||
#if HAL_NAVEKF2_AVAILABLE
|
||||
ahrs.EKF2.set_baro_alt_noise(10.0f); // Readings won't correspond with rest of INS
|
||||
#endif
|
||||
#if HAL_NAVEKF3_AVAILABLE
|
||||
ahrs.EKF3.set_baro_alt_noise(10.0f);
|
||||
#endif
|
||||
} else {
|
||||
#if HAL_NAVEKF2_AVAILABLE
|
||||
ahrs.EKF2.set_baro_alt_noise(0.1f);
|
||||
#endif
|
||||
#if HAL_NAVEKF3_AVAILABLE
|
||||
ahrs.EKF3.set_baro_alt_noise(0.1f);
|
||||
#endif
|
||||
}
|
||||
|
||||
leak_detector.init();
|
||||
|
|
Loading…
Reference in New Issue