From b9a97a454880a3ffbb7194c9807304dfbea0899e Mon Sep 17 00:00:00 2001 From: MateusStano Date: Mon, 15 Apr 2024 15:06:01 +0200 Subject: [PATCH] ENH: add warning for improper time_overshoot --- rocketpy/simulation/flight.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rocketpy/simulation/flight.py b/rocketpy/simulation/flight.py index ef1b54bbe..178fdf4a0 100644 --- a/rocketpy/simulation/flight.py +++ b/rocketpy/simulation/flight.py @@ -609,6 +609,13 @@ def __init__( # Controller initialization self._controllers = self.rocket._controllers[:] if self._controllers: + if self.time_overshoot == True: + warnings.warn( + "time_overshoot is set to True, but controllers are present. " + "Controllers will not work properly. " + "Consider setting time_overshoot=False in the Flight object " + "to use controllers." + ) # reset controllable object to initial state (only airbrakes for now) for air_brakes in self.rocket.air_brakes: air_brakes.reset()