FlightTaskOrbit: reset approach if radius gets changed

This commit is contained in:
Matthias Grob 2020-07-08 18:49:46 +02:00 committed by Julian Kent
parent e9498064ef
commit 9ba2539e60
1 changed files with 4 additions and 0 deletions

View File

@ -130,6 +130,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;
}