diff --git a/src/modules/simulation/sensor_airspeed_sim/SensorAirspeedSim.cpp b/src/modules/simulation/sensor_airspeed_sim/SensorAirspeedSim.cpp index 65c3f6db349..7497887e795 100644 --- a/src/modules/simulation/sensor_airspeed_sim/SensorAirspeedSim.cpp +++ b/src/modules/simulation/sensor_airspeed_sim/SensorAirspeedSim.cpp @@ -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; diff --git a/src/modules/simulation/sensor_airspeed_sim/SensorAirspeedSim.hpp b/src/modules/simulation/sensor_airspeed_sim/SensorAirspeedSim.hpp index daa742c21bf..963d72d2dfd 100644 --- a/src/modules/simulation/sensor_airspeed_sim/SensorAirspeedSim.hpp +++ b/src/modules/simulation/sensor_airspeed_sim/SensorAirspeedSim.hpp @@ -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_pub{ORB_ID(differential_pressure)};