diff --git a/CHANGELOG.md b/CHANGELOG.md index 876de3847..09e2b4b7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,7 @@ Attention: The newest changes should be on top --> ### Fixed -- +- BUG: update flight simulation logic to include burn start time [#778](https://github.com/RocketPy-Team/RocketPy/pull/778) ## [v1.8.0] - 2025-01-20 diff --git a/rocketpy/simulation/flight.py b/rocketpy/simulation/flight.py index c46066a08..035323533 100644 --- a/rocketpy/simulation/flight.py +++ b/rocketpy/simulation/flight.py @@ -1451,7 +1451,7 @@ def u_dot(self, t, u, post_processing=False): # pylint: disable=too-many-locals # Determine lift force and moment R1, R2, M1, M2, M3 = 0, 0, 0, 0, 0 # Determine current behavior - if t < self.rocket.motor.burn_out_time: + if self.rocket.motor.burn_start_time < t < self.rocket.motor.burn_out_time: # Motor burning # Retrieve important motor quantities # Inertias @@ -1788,7 +1788,7 @@ def u_dot_generalized(self, t, u, post_processing=False): # pylint: disable=too speed_of_sound = self.env.speed_of_sound.get_value_opt(z) free_stream_mach = free_stream_speed / speed_of_sound - if t < self.rocket.motor.burn_out_time: + if self.rocket.motor.burn_start_time < t < self.rocket.motor.burn_out_time: drag_coeff = self.rocket.power_on_drag.get_value_opt(free_stream_mach) else: drag_coeff = self.rocket.power_off_drag.get_value_opt(free_stream_mach)