Skip to content

Commit

Permalink
FlightTaskOrbit: reset approach if radius gets changed
Browse files Browse the repository at this point in the history
  • Loading branch information
MaEtUgR committed Jul 8, 2020
1 parent 09ab15b commit 76ee312
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/flight_tasks/tasks/Orbit/FlightTaskOrbit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ bool FlightTaskOrbit::setRadius(float r)
_v = sign(_v) * sqrtf(_acceleration_max * r);
}

if (fabs(_r - r) > FLT_EPSILON) {
_circle_approach_line.reset();
}

_r = r;
return true;
}
Expand Down

0 comments on commit 76ee312

Please sign in to comment.