mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-26 01:17:51 +08:00
AirspeedValidator: pass vI as reference
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -72,7 +72,7 @@ AirspeedValidator::reset_airspeed_to_invalid(const uint64_t timestamp)
|
||||
|
||||
void
|
||||
AirspeedValidator::update_wind_estimator(const uint64_t time_now_usec, float airspeed_true_raw, bool lpos_valid,
|
||||
matrix::Vector3f vI, float lpos_evh, float lpos_evv, const float att_q[4])
|
||||
const matrix::Vector3f &vI, float lpos_evh, float lpos_evv, const float att_q[4])
|
||||
{
|
||||
_wind_estimator.update(time_now_usec);
|
||||
|
||||
@@ -111,7 +111,7 @@ AirspeedValidator::get_wind_estimator_states(uint64_t timestamp)
|
||||
}
|
||||
|
||||
void
|
||||
AirspeedValidator::update_CAS_scale_validated(bool lpos_valid, matrix::Vector3f vI, float airspeed_true_raw)
|
||||
AirspeedValidator::update_CAS_scale_validated(bool lpos_valid, const matrix::Vector3f &vI, float airspeed_true_raw)
|
||||
{
|
||||
if (!_in_fixed_wing_flight || !lpos_valid) {
|
||||
return;
|
||||
@@ -211,7 +211,7 @@ AirspeedValidator::check_airspeed_data_stuck(uint64_t time_now)
|
||||
|
||||
void
|
||||
AirspeedValidator::check_airspeed_innovation(uint64_t time_now, float estimator_status_vel_test_ratio,
|
||||
float estimator_status_mag_test_ratio, matrix::Vector3f vI)
|
||||
float estimator_status_mag_test_ratio, const matrix::Vector3f &vI)
|
||||
{
|
||||
// Check normalised innovation levels with requirement for continuous data and use of hysteresis
|
||||
// to prevent false triggering.
|
||||
|
||||
@@ -171,14 +171,15 @@ private:
|
||||
|
||||
void update_in_fixed_wing_flight(bool in_fixed_wing_flight) { _in_fixed_wing_flight = in_fixed_wing_flight; }
|
||||
|
||||
void update_wind_estimator(const uint64_t timestamp, float airspeed_true_raw, bool lpos_valid, matrix::Vector3f vI,
|
||||
void update_wind_estimator(const uint64_t timestamp, float airspeed_true_raw, bool lpos_valid,
|
||||
const matrix::Vector3f &vI,
|
||||
float lpos_evh, float lpos_evv, const float att_q[4]);
|
||||
void update_CAS_scale_validated(bool lpos_valid, matrix::Vector3f vI, float airspeed_true_raw);
|
||||
void update_CAS_scale_validated(bool lpos_valid, const matrix::Vector3f &vI, float airspeed_true_raw);
|
||||
void update_CAS_scale_applied();
|
||||
void update_CAS_TAS(float air_pressure_pa, float air_temperature_celsius);
|
||||
void check_airspeed_data_stuck(uint64_t timestamp);
|
||||
void check_airspeed_innovation(uint64_t timestamp, float estimator_status_vel_test_ratio,
|
||||
float estimator_status_mag_test_ratio, matrix::Vector3f vI);
|
||||
float estimator_status_mag_test_ratio, const matrix::Vector3f &vI);
|
||||
void check_load_factor(float accel_z);
|
||||
void update_airspeed_valid_status(const uint64_t timestamp);
|
||||
void reset();
|
||||
|
||||
Reference in New Issue
Block a user