mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 05:00:35 +08:00
Airspeed Selector: repurpose wind estimator into an airspeed (selection, validation) module.
This new airspeed module does: -runns an airspeed validator for every airspeed sensor present, which checks measurement validity and estimates an airspeed scale -selects another airspeed sensor if for the current one a failure is detected -estimates airspeed with groundspeed-windspeed if no valid airspeed sensor is present -outputs airspeed_validated topic Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
committed by
Roman Bapst
parent
970e362e9a
commit
cedf14e2ba
@@ -283,7 +283,7 @@ private:
|
||||
uORB::Publication<sensor_bias_s> _sensor_bias_pub{ORB_ID(sensor_bias)};
|
||||
uORB::Publication<vehicle_attitude_s> _att_pub{ORB_ID(vehicle_attitude)};
|
||||
uORB::Publication<vehicle_odometry_s> _vehicle_odometry_pub{ORB_ID(vehicle_odometry)};
|
||||
uORB::Publication<wind_estimate_s> _wind_pub{ORB_ID(wind_estimate)};
|
||||
uORB::Publication<wind_estimate_s> _wind_pub{ORB_ID(wind_estimate), ORB_PRIO_DEFAULT};
|
||||
uORB::PublicationData<vehicle_global_position_s> _vehicle_global_position_pub{ORB_ID(vehicle_global_position)};
|
||||
uORB::PublicationData<vehicle_local_position_s> _vehicle_local_position_pub{ORB_ID(vehicle_local_position)};
|
||||
|
||||
@@ -1764,12 +1764,13 @@ bool Ekf2::publish_wind_estimate(const hrt_abstime ×tamp)
|
||||
_ekf.get_wind_velocity_var(wind_var);
|
||||
|
||||
// Publish wind estimate
|
||||
wind_estimate_s wind_estimate;
|
||||
wind_estimate_s wind_estimate{};
|
||||
wind_estimate.timestamp = timestamp;
|
||||
wind_estimate.windspeed_north = velNE_wind[0];
|
||||
wind_estimate.windspeed_east = velNE_wind[1];
|
||||
wind_estimate.variance_north = wind_var[0];
|
||||
wind_estimate.variance_east = wind_var[1];
|
||||
wind_estimate.tas_scale = 1.0f; //fix to 1 as scale not estimated in ekf
|
||||
|
||||
_wind_pub.publish(wind_estimate);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user