From fe3a243d85990aaeb95358b147ec4efae753ea2c Mon Sep 17 00:00:00 2001 From: Gui-FernandesBR Date: Mon, 3 Mar 2025 22:47:26 -0300 Subject: [PATCH 1/2] BUG: update flight simulation logic to include burn start time in conditions --- rocketpy/simulation/flight.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) From 4d5339e5c057bd1c500233ef477423bd77f132ae Mon Sep 17 00:00:00 2001 From: Gui-FernandesBR Date: Tue, 4 Mar 2025 10:39:36 -0300 Subject: [PATCH 2/2] DEV: updates changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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