AC_WP_Nav_OA: origin_loc & dest_loc should use _terrain_alt_oabak
This commit is contained in:
parent
ef95bf088c
commit
fb789a07ce
@ -80,8 +80,8 @@ bool AC_WPNav_OA::update_wpnav()
|
||||
}
|
||||
|
||||
// convert origin and destination to Locations and pass into oa
|
||||
const Location origin_loc(_origin_oabak, _terrain_alt ? Location::AltFrame::ABOVE_TERRAIN : Location::AltFrame::ABOVE_ORIGIN);
|
||||
const Location destination_loc(_destination_oabak, _terrain_alt ? Location::AltFrame::ABOVE_TERRAIN : Location::AltFrame::ABOVE_ORIGIN);
|
||||
const Location origin_loc(_origin_oabak, _terrain_alt_oabak ? Location::AltFrame::ABOVE_TERRAIN : Location::AltFrame::ABOVE_ORIGIN);
|
||||
const Location destination_loc(_destination_oabak, _terrain_alt_oabak ? Location::AltFrame::ABOVE_TERRAIN : Location::AltFrame::ABOVE_ORIGIN);
|
||||
Location oa_origin_new, oa_destination_new;
|
||||
const AP_OAPathPlanner::OA_RetState oa_retstate = oa_ptr->mission_avoidance(current_loc, origin_loc, destination_loc, oa_origin_new, oa_destination_new);
|
||||
switch (oa_retstate) {
|
||||
|
Loading…
Reference in New Issue
Block a user