mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-15 11:50:35 +08:00
mission: add heading towards ROI mode for multicopters
This commit is contained in:
committed by
Daniel Agar
parent
7a42424411
commit
a6ce2b320c
@@ -1018,6 +1018,12 @@ Mission::heading_sp_update()
|
||||
point_to_latlon[0] = _navigator->get_home_position()->lat;
|
||||
point_to_latlon[1] = _navigator->get_home_position()->lon;
|
||||
|
||||
} else if (_param_yawmode.get() == MISSION_YAWMODE_TO_ROI
|
||||
&& _navigator->get_vroi()->mode == vehicle_roi_s::VEHICLE_ROI_LOCATION) {
|
||||
/* target location is ROI */
|
||||
point_to_latlon[0] = _navigator->get_vroi()->lat;
|
||||
point_to_latlon[1] = _navigator->get_vroi()->lon;
|
||||
|
||||
} else {
|
||||
/* target location is next (current) waypoint */
|
||||
point_to_latlon[0] = pos_sp_triplet->current.lat;
|
||||
|
||||
Reference in New Issue
Block a user