Skip to content

Commit ead9219

Browse files
Merge branch 'master' into develop
2 parents 5ced96d + 1e955ba commit ead9219

File tree

8 files changed

+44
-6
lines changed

8 files changed

+44
-6
lines changed

.pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ disable=raw-checker-failed,
435435
use-implicit-booleaness-not-comparison-to-zero,
436436
no-else-return,
437437
inconsistent-return-statements,
438+
unspecified-encoding,
438439

439440
# Enable the message, report, category or checker with the given id(s). You can
440441
# either give multiple identifier separated by comma (,) or put this option

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ straightforward as possible.
4747
- BUG: fin_flutter_analysis doesn't find any fin set [#510](https://github.com/RocketPy-Team/RocketPy/pull/510)
4848
- FIX: EmptyMotor is breaking the Rocket.draw() method [#516](https://github.com/RocketPy-Team/RocketPy/pull/516)
4949
- BUG: 3D trajectory plot not labeling axes [#533](https://github.com/RocketPy-Team/RocketPy/pull/533)
50+
-
51+
52+
## [v1.1.5] - 2024-01-21
53+
54+
You can install this version by running `pip install rocketpy==1.1.5`
55+
56+
### Fixed
57+
58+
- BUG: Parachute Pressures not being Set before All Info. [#534](https://github.com/RocketPy-Team/RocketPy/pull/534)
5059
- BUG: Invalid Arguments on Two Dimensional Discretize. [#521](https://github.com/RocketPy-Team/RocketPy/pull/521)
5160

5261
## [v1.1.4] - 2023-12-07

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
author = "RocketPy Team"
2525

2626
# The full version, including alpha/beta/rc tags
27-
release = "1.1.4"
27+
release = "1.1.5"
2828

2929

3030
# -- General configuration ---------------------------------------------------

docs/user/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you want to choose a specific version to guarantee compatibility, you may ins
1919

2020
.. code-block:: shell
2121
22-
pip install rocketpy==1.1.4
22+
pip install rocketpy==1.1.5
2323
2424
2525
Optional Installation Method: ``conda``

rocketpy/plots/flight_plots.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,6 @@ def pressure_signals(self):
826826
if len(self.flight.parachute_events) > 0:
827827
for parachute in self.flight.rocket.parachutes:
828828
print("\nParachute: ", parachute.name)
829-
self.flight._calculate_pressure_signal()
830829
parachute.noise_signal_function()
831830
parachute.noisy_pressure_signal_function()
832831
parachute.clean_pressure_signal_function()

rocketpy/simulation/flight.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,7 @@ def __init__(
10651065
)
10661066

10671067
self.t_final = self.t
1068+
self._calculate_pressure_signal()
10681069
if verbose:
10691070
print("Simulation Completed at Time: {:3.4f} s".format(self.t))
10701071

@@ -3094,8 +3095,8 @@ def export_pressures(self, file_name, time_step):
30943095
else:
30953096
for parachute in self.rocket.parachutes:
30963097
for t in time_points:
3097-
p_cl = parachute.clean_pressure_signal(t)
3098-
p_ns = parachute.noisy_pressure_signal(t)
3098+
p_cl = parachute.clean_pressure_signal_function(t)
3099+
p_ns = parachute.noisy_pressure_signal_function(t)
30993100
file.write(f"{t:f}, {p_cl:.5f}, {p_ns:.5f}\n")
31003101
# We need to save only 1 parachute data
31013102
break

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
setuptools.setup(
2525
name="rocketpy",
26-
version="1.1.4",
26+
version="1.1.5",
2727
install_requires=necessary_require,
2828
extras_require={
2929
"env_analysis": env_analysis_require,

tests/test_flight.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,3 +779,31 @@ def test_aerodynamic_moments(flight_calisto_custom_wind, flight_time, expected_v
779779
test.M2(t),
780780
test.M3(t),
781781
), f"Assertion error for moment vector at {expected_attr}."
782+
783+
784+
def test_export_pressures(flight_calisto_robust):
785+
"""Tests if the method Flight.export_pressures is working as intended.
786+
787+
Parameters
788+
----------
789+
flight_calisto_robust : Flight
790+
Flight object to be tested. See the conftest.py file for more info
791+
regarding this pytest fixture.
792+
"""
793+
file_name = "pressures.csv"
794+
time_step = 0.5
795+
parachute = flight_calisto_robust.rocket.parachutes[0]
796+
797+
flight_calisto_robust.export_pressures(file_name, time_step)
798+
799+
with open(file_name, "r") as file:
800+
contents = file.read()
801+
802+
expected_data = ""
803+
for t in np.arange(0, flight_calisto_robust.t_final, time_step):
804+
p_cl = parachute.clean_pressure_signal_function(t)
805+
p_ns = parachute.noisy_pressure_signal_function(t)
806+
expected_data += f"{t:f}, {p_cl:.5f}, {p_ns:.5f}\n"
807+
808+
assert contents == expected_data
809+
os.remove(file_name)

0 commit comments

Comments
 (0)