diff --git a/src/modules/navigator/gpsfailure.cpp b/src/modules/navigator/gpsfailure.cpp index ff0785bec82d..9bfdd93659f3 100644 --- a/src/modules/navigator/gpsfailure.cpp +++ b/src/modules/navigator/gpsfailure.cpp @@ -93,7 +93,13 @@ GpsFailure::on_active() q.copyTo(att_sp.q_d); att_sp.q_d_valid = true; - _att_sp_pub.publish(att_sp); + if (_navigator->get_vstatus()->is_vtol) { + _fw_virtual_att_sp_pub.publish(att_sp); + + } else { + _att_sp_pub.publish(att_sp); + + } /* Measure time */ if ((_param_nav_gpsf_lt.get() > FLT_EPSILON) && diff --git a/src/modules/navigator/gpsfailure.h b/src/modules/navigator/gpsfailure.h index d956dfba5379..536f55b27969 100644 --- a/src/modules/navigator/gpsfailure.h +++ b/src/modules/navigator/gpsfailure.h @@ -76,7 +76,7 @@ class GpsFailure : public MissionBlock, public ModuleParams hrt_abstime _timestamp_activation{0}; //*< timestamp when this mode was activated */ uORB::Publication _att_sp_pub{ORB_ID(vehicle_attitude_setpoint)}; - + uORB::Publication _fw_virtual_att_sp_pub{ORB_ID(fw_virtual_attitude_setpoint)}; /** * Set the GPSF item */