forked from Archive/PX4-Autopilot
reset the position lock only if current triplet latitude and longitude
are valid
This commit is contained in:
parent
c4c3bbbfb0
commit
a18f3e5d45
|
@ -178,10 +178,12 @@ bool FlightTaskAuto::_evaluateTriplets()
|
|||
} else {
|
||||
tmp_target(0) = _lock_position_xy(0);
|
||||
tmp_target(1) = _lock_position_xy(1);
|
||||
_lock_position_xy.setAll(NAN);
|
||||
}
|
||||
|
||||
} else {
|
||||
// reset locked position if current lon and lat are valid
|
||||
_lock_position_xy.setAll(NAN);
|
||||
|
||||
// Convert from global to local frame.
|
||||
map_projection_project(&_reference_position,
|
||||
_sub_triplet_setpoint->get().current.lat, _sub_triplet_setpoint->get().current.lon, &tmp_target(0), &tmp_target(1));
|
||||
|
|
Loading…
Reference in New Issue