mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
FlightTaskAuto: use built in matrix comparison
which corresponds to fabsf(a(0) - b(0)) < 1e-4f for each element.
This commit is contained in:
parent
26845d9746
commit
925e776a00
@ -422,9 +422,7 @@ bool FlightTaskAuto::_evaluateTriplets()
|
||||
|| (_next_was_valid != _sub_triplet_setpoint.get().next.valid);
|
||||
|
||||
if (_triplet_target.isAllFinite()
|
||||
&& fabsf(_triplet_target(0) - tmp_target(0)) < 0.001f
|
||||
&& fabsf(_triplet_target(1) - tmp_target(1)) < 0.001f
|
||||
&& fabsf(_triplet_target(2) - tmp_target(2)) < 0.001f
|
||||
&& (_triplet_target == tmp_target)
|
||||
&& !prev_next_validity_changed) {
|
||||
// Nothing has changed: just keep old waypoints.
|
||||
triplet_update = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user