Skip to content

Commit

Permalink
ENH: add warning for improper time_overshoot
Browse files Browse the repository at this point in the history
  • Loading branch information
MateusStano committed Apr 15, 2024
1 parent 830ea15 commit b9a97a4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rocketpy/simulation/flight.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit b9a97a4

Please sign in to comment.