Skip to content

Commit

Permalink
VTOL GPSF: fix fixed bank loiter (#12778)
Browse files Browse the repository at this point in the history
* GPS Failsafe fix for VTOL
* navigator: use new uORB API for VTOL publication
  • Loading branch information
ThomasRigi authored and julianoes committed Oct 16, 2019
1 parent 412c364 commit 17c17f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/modules/navigator/gpsfailure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) &&
Expand Down
2 changes: 1 addition & 1 deletion src/modules/navigator/gpsfailure.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class GpsFailure : public MissionBlock, public ModuleParams
hrt_abstime _timestamp_activation{0}; //*< timestamp when this mode was activated */

uORB::Publication<vehicle_attitude_setpoint_s> _att_sp_pub{ORB_ID(vehicle_attitude_setpoint)};

uORB::Publication<vehicle_attitude_setpoint_s> _fw_virtual_att_sp_pub{ORB_ID(fw_virtual_attitude_setpoint)};
/**
* Set the GPSF item
*/
Expand Down

0 comments on commit 17c17f2

Please sign in to comment.