Mission: for tangential loiter exit, set current position setpoint typ to position

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer 2020-12-22 21:42:12 +01:00 committed by Roman Bapst
parent 4b21c0c49e
commit cb78ba34d7

View File

@ -441,7 +441,9 @@ MissionBlock::is_mission_item_reached()
bearing += inner_angle;
}
// Replace current setpoint lat/lon with tangent coordinate
// set typ to position, will get set to loiter in the fw position controller once close
// and replace current setpoint lat/lon with tangent coordinate
curr_sp.type = position_setpoint_s::SETPOINT_TYPE_POSITION;
waypoint_from_heading_and_distance(curr_sp.lat, curr_sp.lon,
bearing, fabsf(curr_sp.loiter_radius),
&curr_sp.lat, &curr_sp.lon);