diff --git a/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp b/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp index 4714f5198a..6749f9ba7b 100644 --- a/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp +++ b/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp @@ -740,6 +740,11 @@ bool AP_AHRS_NavEKF::get_relative_position_D(float &posD) const uint8_t AP_AHRS_NavEKF::ekf_type(void) const { uint8_t type = _ekf_type; +#if CONFIG_HAL_BOARD == HAL_BOARD_SITL + if (type == EKF_TYPE_SITL) { + return type; + } +#endif if ((always_use_EKF() && (type == 0)) || (type == 1) || (type > 3)) { type = 2; }