diff --git a/src/modules/simulation/sensor_airspeed_sim/SensorAirspeedSim.cpp b/src/modules/simulation/sensor_airspeed_sim/SensorAirspeedSim.cpp index be9999f5ff2..1efd7506728 100644 --- a/src/modules/simulation/sensor_airspeed_sim/SensorAirspeedSim.cpp +++ b/src/modules/simulation/sensor_airspeed_sim/SensorAirspeedSim.cpp @@ -77,21 +77,21 @@ 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()) { updateFailureConfig(); if (!_airspeed_disconnected) { 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; diff --git a/src/modules/simulation/sensor_airspeed_sim/SensorAirspeedSim.hpp b/src/modules/simulation/sensor_airspeed_sim/SensorAirspeedSim.hpp index ed592bda4d1..2e47715b0bc 100644 --- a/src/modules/simulation/sensor_airspeed_sim/SensorAirspeedSim.hpp +++ b/src/modules/simulation/sensor_airspeed_sim/SensorAirspeedSim.hpp @@ -86,9 +86,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_groundtruth)}; - 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_pub{ORB_ID(differential_pressure)};