41 #include <airspeed/airspeed.h> 96 _tas_gate = gate_size;
97 _wind_estimator.set_tas_gate(gate_size);
103 void set_airspeed_scale_manual(
float airspeed_scale_manual);
118 bool _wind_estimator_scale_estimation_on{
false};
119 float _airspeed_scale_manual{1.0f};
122 bool _in_fixed_wing_flight{
false};
126 float _EAS_scale{1.0f};
128 uint64_t _time_last_airspeed{0};
131 bool _data_stopped_failed{
false};
135 float _tas_gate{1.0f};
136 bool _innovations_check_failed{
false};
137 float _tas_innov_threshold{1.0};
138 float _tas_innov_integ_threshold{-1.0};
139 uint64_t _time_last_aspd_innov_check{0};
140 uint64_t _time_last_tas_pass{0};
141 uint64_t _time_last_tas_fail{0};
142 float _apsd_innov_integ_state{0.0f};
143 static constexpr uint64_t TAS_INNOV_FAIL_DELAY{1_s};
144 uint64_t _time_wind_estimator_initialized{0};
147 bool _load_factor_check_failed{
false};
148 float _airspeed_stall{8.0f};
149 float _load_factor_ratio{0.5f};
152 bool _airspeed_valid{
false};
153 int _checks_fail_delay{3};
154 int _checks_clear_delay{3};
155 bool _airspeed_failing{
false};
156 uint64_t _time_checks_passed{0};
157 uint64_t _time_checks_failed{0};
161 void update_wind_estimator(
const uint64_t timestamp,
float airspeed_true_raw,
bool lpos_valid,
float lpos_vx,
164 float lpos_evh,
float lpos_evv,
const float att_q[4]);
165 void update_EAS_scale();
166 void update_EAS_TAS(
float air_pressure_pa,
float air_temperature_celsius);
167 void check_airspeed_innovation(uint64_t timestamp,
float estimator_status_vel_test_ratio,
168 float estimator_status_mag_test_ratio);
169 void check_load_factor(
float accel_z);
170 void update_airspeed_valid_status(
const uint64_t timestamp);
void set_wind_estimator_beta_noise(float beta_var)
void set_wind_estimator_tas_scale_p_noise(float tas_scale_sigma)
void set_wind_estimator_tas_noise(float tas_sigma)
void set_wind_estimator_wind_p_noise(float wind_sigma)
void set_checks_fail_delay(float checks_fail_delay)
void set_wind_estimator_tas_gate(uint8_t gate_size)
A wind and airspeed scale estimator.
void set_airspeed_stall(float airspeed_stall)
void set_checks_clear_delay(float checks_clear_delay)
void update_in_fixed_wing_flight(bool in_fixed_wing_flight)
Vector2< float > Vector2f
uint64_t airspeed_timestamp
__BEGIN_DECLS typedef uint64_t hrt_abstime
Absolute time, in microsecond units.
float airspeed_indicated_raw
Vector3< float > Vector3f
bool get_airspeed_valid()
Quaternion< float > Quatf
void set_tas_innov_threshold(float tas_innov_threshold)
bool in_fixed_wing_flight
float air_temperature_celsius
void set_tas_innov_integ_threshold(float tas_innov_integ_threshold)
void set_wind_estimator_scale_estimation_on(bool scale_estimation_on)
void set_wind_estimator_beta_gate(uint8_t gate_size)