10 #if CONFIG_HAL_BOARD == HAL_BOARD_SITL 28 const float airspeed_ratio = 1.9936f;
29 const float airspeed_offset = 2013.0f;
44 airspeed = 340.29409348 * sqrt(5 * (pow((tube_pressure /
SSL_AIR_PRESSURE + 1), 2.0/7.0) - 1.0));
50 airspeed2 = 340.29409348 * sqrt(5 * (pow((tube_pressure /
SSL_AIR_PRESSURE + 1), 2.0/7.0) - 1.0));
53 float airspeed_pressure = (airspeed *
airspeed) / airspeed_ratio;
54 float airspeed2_pressure = (airspeed2 * airspeed2) / airspeed_ratio;
60 float airspeed_raw = airspeed_pressure + airspeed_offset;
61 float airspeed2_raw = airspeed2_pressure + airspeed_offset;
62 if (airspeed_raw / 4 > 0xFFFF) {
66 if (airspeed2_raw / 4 > 0xFFFF) {
72 uint32_t best_time_delta_wind = 200;
73 uint8_t best_index_wind = 0;
101 if (best_time_delta_wind < 200) {
uint32_t delayed_time_wind
AP_Float arspd2_fail_pressure
void _update_airspeed(float airspeed)
uint16_t airspeed_2_pin_value
AP_Float arspd_fail_pressure
bool is_zero(const T fVal1)
VectorN< readings_wind, wind_buffer_length > buffer_wind
float get_pressure(void) const
uint32_t last_store_time_wind
AP_Float arspd2_fail_pitot_pressure
uint16_t airspeed_pin_value
AP_Float arspd_fail_pitot_pressure
const AP_HAL::HAL & hal
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
static const uint8_t wind_buffer_length
VectorN< readings_wind, wind_buffer_length > buffer_wind_2