AP_AHRS: eliminate AP::ahrs().get_location

This commit is contained in:
Peter Barker 2021-08-27 13:04:58 +10:00 committed by Andrew Tridgell
parent 09f1a3da8a
commit cc514af158
2 changed files with 0 additions and 37 deletions

View File

@ -2661,37 +2661,6 @@ void AP_AHRS::set_terrain_hgt_stable(bool stable)
#endif
}
// get_location - updates the provided location with the latest calculated location
// returns true on success (i.e. the backend knows it's latest position), false on failure
bool AP_AHRS::get_location(struct Location &loc) const
{
switch (active_EKF_type()) {
case EKFType::NONE:
return get_position(loc);
#if HAL_NAVEKF2_AVAILABLE
case EKFType::TWO:
return EKF2.getLLH(loc);
#endif
#if HAL_NAVEKF3_AVAILABLE
case EKFType::THREE:
return EKF3.getLLH(loc);
#endif
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
case EKFType::SIM:
return get_position(loc);
#endif
#if HAL_EXTERNAL_AHRS_ENABLED
case EKFType::EXTERNAL:
return get_position(loc);
#endif
}
return false;
}
// return the innovations for the primariy EKF
// boolean false is returned if innovations are not available
bool AP_AHRS::get_innovations(Vector3f &velInnov, Vector3f &posInnov, Vector3f &magInnov, float &tasInnov, float &yawInnov) const

View File

@ -270,12 +270,6 @@ public:
// this is not related to terrain following
void set_terrain_hgt_stable(bool stable) override;
// get_location - updates the provided location with the latest
// calculated location including absolute altitude
// returns true on success (i.e. the EKF knows it's latest
// position), false on failure
bool get_location(struct Location &loc) const;
// return the innovations for the specified instance
// An out of range instance (eg -1) returns data for the primary instance
bool get_innovations(Vector3f &velInnov, Vector3f &posInnov, Vector3f &magInnov, float &tasInnov, float &yawInnov) const override;