fix(sensor_airspeed_sim): use vehicle_attitude_groudtruth (#29878)

* fix(sensor_airspeed_sim): use vehicle_attitude_groudtruth

Don't use the EKF estimated attitude.
Use the groundtruth one like with the other inputs:
- local pos
- global pos

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@auterion.com>

* chore(sih): rename SensorAirspeedSim groundtruth subscribers

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@auterion.com>

---------

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@auterion.com>
This commit is contained in:
Beniamino Pozzan authored and GitHub committed 2026-11-25 10:11:13 +01:00
1 parent 6ba78c3452
commit 5e9be2a6d5
2 files changed
+8 -8

No files matched your search

@@ -77,19 +77,19 @@ void SensorAirspeedSim::Run()
updateParams();
}
if (_vehicle_local_position_sub.updated() && _vehicle_global_position_sub.updated()
&& _vehicle_attitude_sub.updated()) {
if (_vehicle_local_position_groundtruth_sub.updated() && _vehicle_global_position_groundtruth_sub.updated()
&& _vehicle_attitude_groundtruth_sub.updated()) {
_failure_config.update();
vehicle_local_position_s lpos{};
_vehicle_local_position_sub.copy(&lpos);
_vehicle_local_position_groundtruth_sub.copy(&lpos);
vehicle_global_position_s gpos{};
_vehicle_global_position_sub.copy(&gpos);
_vehicle_global_position_groundtruth_sub.copy(&gpos);
vehicle_attitude_s attitude{};
_vehicle_attitude_sub.copy(&attitude);
_vehicle_attitude_groundtruth_sub.copy(&attitude);
Vector3f local_velocity = Vector3f{lpos.vx, lpos.vy, lpos.vz};
Vector3f body_velocity = Dcmf{Quatf{attitude.q}} .transpose() * local_velocity;
@@ -84,9 +84,9 @@ private:
void Run() override;
uORB::SubscriptionInterval _parameter_update_sub{ORB_ID(parameter_update), 1_s};
uORB::Subscription _vehicle_attitude_sub{ORB_ID(vehicle_attitude)};
uORB::Subscription _vehicle_global_position_sub{ORB_ID(vehicle_global_position_groundtruth)};
uORB::Subscription _vehicle_local_position_sub{ORB_ID(vehicle_local_position_groundtruth)};
uORB::Subscription _vehicle_attitude_groundtruth_sub{ORB_ID(vehicle_attitude_groundtruth)};
uORB::Subscription _vehicle_global_position_groundtruth_sub{ORB_ID(vehicle_global_position_groundtruth)};
uORB::Subscription _vehicle_local_position_groundtruth_sub{ORB_ID(vehicle_local_position_groundtruth)};
uORB::PublicationMulti<differential_pressure_s> _differential_pressure_pub{ORB_ID(differential_pressure)};