Skip to content

Commit

Permalink
ENH: improves initialization of time and state variables in Flight class
Browse files Browse the repository at this point in the history
  • Loading branch information
Gui-FernandesBR committed Aug 3, 2024
1 parent cd60b8a commit 59e44c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Attention: The newest changes should be on top -->
### Changed

-
- ENH: Initial solution from flights gets previous results [#568](https://github.com/RocketPy-Team/RocketPy/pull/568)
- DOC: New Environment class docs pages [#644](https://github.com/RocketPy-Team/RocketPy/pull/644)

### Fixed
Expand Down
1 change: 1 addition & 0 deletions rocketpy/simulation/flight.py
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,7 @@ def __init_flight_state(self):
elif isinstance(self.initial_solution, Flight):
# Initialize time and state variables based on last solution of
# previous flight
self.solution = self.initial_solution.solution[:-1]

Check warning on line 1104 in rocketpy/simulation/flight.py

View check run for this annotation

Codecov / codecov/patch

rocketpy/simulation/flight.py#L1104

Added line #L1104 was not covered by tests
self.initial_solution = self.initial_solution.solution[-1]
# Set unused monitors
self.out_of_rail_state = self.initial_solution[1:]
Expand Down

0 comments on commit 59e44c6

Please sign in to comment.