mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-13 22:43:39 +08:00
replace IAS with EAS in FW attitude controller (#14868)
The EAS is the calibrated airspeed corrected with a scaling factor to account for sensor error/placement of pitot. Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -235,7 +235,7 @@ FixedwingAttitudeControl::vehicle_land_detected_poll()
|
||||
float FixedwingAttitudeControl::get_airspeed_and_update_scaling()
|
||||
{
|
||||
_airspeed_validated_sub.update();
|
||||
const bool airspeed_valid = PX4_ISFINITE(_airspeed_validated_sub.get().indicated_airspeed_m_s)
|
||||
const bool airspeed_valid = PX4_ISFINITE(_airspeed_validated_sub.get().equivalent_airspeed_m_s)
|
||||
&& (hrt_elapsed_time(&_airspeed_validated_sub.get().timestamp) < 1_s);
|
||||
|
||||
// if no airspeed measurement is available out best guess is to use the trim airspeed
|
||||
@@ -243,7 +243,7 @@ float FixedwingAttitudeControl::get_airspeed_and_update_scaling()
|
||||
|
||||
if ((_param_fw_arsp_mode.get() == 0) && airspeed_valid) {
|
||||
/* prevent numerical drama by requiring 0.5 m/s minimal speed */
|
||||
airspeed = math::max(0.5f, _airspeed_validated_sub.get().indicated_airspeed_m_s);
|
||||
airspeed = math::max(0.5f, _airspeed_validated_sub.get().equivalent_airspeed_m_s);
|
||||
|
||||
} else {
|
||||
// VTOL: if we have no airspeed available and we are in hover mode then assume the lowest airspeed possible
|
||||
|
||||
Reference in New Issue
Block a user