diff --git a/docs/conf.py b/docs/conf.py index b964c5fc3..9331a2f41 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -24,7 +24,7 @@ author = "RocketPy Team" # The full version, including alpha/beta/rc tags -release = "1.1.0" +release = "1.1.1" # -- General configuration --------------------------------------------------- diff --git a/docs/user/installation.rst b/docs/user/installation.rst index 25a224c72..8454156ca 100644 --- a/docs/user/installation.rst +++ b/docs/user/installation.rst @@ -19,7 +19,7 @@ If you want to choose a specific version to guarantee compatibility, you may ins .. code-block:: shell - pip install rocketpy==1.1.0 + pip install rocketpy==1.1.1 Optional Installation Method: ``conda`` diff --git a/rocketpy/rocket/rocket.py b/rocketpy/rocket/rocket.py index fd69f25d2..947c82acd 100644 --- a/rocketpy/rocket/rocket.py +++ b/rocketpy/rocket/rocket.py @@ -543,7 +543,6 @@ def evaluate_static_margin(self): self.static_margin.set_source( lambda time: (self.center_of_mass(time) - self.cp_position(0)) / (2 * self.radius) - * self._csys ) # Change sign if coordinate system is upside down self.static_margin *= self._csys diff --git a/setup.py b/setup.py index 414a27b74..85e184a02 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ setuptools.setup( name="rocketpy", - version="1.1.0", + version="1.1.1", install_requires=necessary_require, extras_require={ "env_analysis": env_analysis_require, diff --git a/tests/test_rocket.py b/tests/test_rocket.py index 160ab9aa4..acb131e1c 100644 --- a/tests/test_rocket.py +++ b/tests/test_rocket.py @@ -25,9 +25,8 @@ def test_aero_surfaces_infos( assert calisto_trapezoidal_fins.draw() == None -@patch("matplotlib.pyplot.show") def test_coordinate_system_orientation( - mock_show, calisto_nose_cone, cesaroni_m1670, calisto_trapezoidal_fins + calisto_nose_cone, cesaroni_m1670, calisto_trapezoidal_fins ): """Test if the coordinate system orientation is working properly. This test basically checks if the static margin is the same for the same rocket with @@ -35,8 +34,6 @@ def test_coordinate_system_orientation( Parameters ---------- - mock_show : mock - Mock of matplotlib.pyplot.show calisto_nose_cone : rocketpy.NoseCone Nose cone of the rocket cesaroni_m1670 : rocketpy.SolidMotor @@ -51,7 +48,7 @@ def test_coordinate_system_orientation( burn_time=3.9, dry_mass=1.815, dry_inertia=(0.125, 0.125, 0.002), - center_of_dry_mass_position=0.317, + center_of_dry_mass_position=-0.317, nozzle_position=0, grain_number=5, grain_density=1815, @@ -60,7 +57,7 @@ def test_coordinate_system_orientation( grain_separation=5 / 1000, grain_outer_radius=33 / 1000, grain_initial_height=120 / 1000, - grains_center_of_mass_position=0.397, + grains_center_of_mass_position=-0.397, grain_initial_inner_radius=15 / 1000, interpolation_method="linear", coordinate_system_orientation="combustion_chamber_to_nozzle", @@ -81,7 +78,7 @@ def test_coordinate_system_orientation( rocket_tail_to_nose.aerodynamic_surfaces.add(calisto_nose_cone, 1.160) rocket_tail_to_nose.aerodynamic_surfaces.add(calisto_trapezoidal_fins, -1.168) - static_margin_tail_to_nose = rocket_tail_to_nose.static_margin(0) + static_margin_tail_to_nose = rocket_tail_to_nose.static_margin rocket_nose_to_tail = Rocket( radius=0.0635, @@ -98,13 +95,9 @@ def test_coordinate_system_orientation( rocket_nose_to_tail.aerodynamic_surfaces.add(calisto_nose_cone, -1.160) rocket_nose_to_tail.aerodynamic_surfaces.add(calisto_trapezoidal_fins, 1.168) - static_margin_nose_to_tail = rocket_nose_to_tail.static_margin(0) + static_margin_nose_to_tail = rocket_nose_to_tail.static_margin - assert ( - rocket_tail_to_nose.all_info() == None - or rocket_nose_to_tail.all_info() == None - or not abs(static_margin_tail_to_nose - static_margin_nose_to_tail) < 0.0001 - ) + assert np.array_equal(static_margin_tail_to_nose, static_margin_nose_to_tail) @patch("matplotlib.pyplot.show")