Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Distances vs Positons v2 #282

Merged
merged 62 commits into from
Jan 19, 2023
Merged
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
54b0914
ENH: define Motor.nozzlePosition and Motor.centerOfMass relative to u…
MateusStano Jun 19, 2022
0f927c8
ENH: replace NoseCone.distanceToCM with NoseCone.position, relative t…
giovaniceotto Nov 11, 2022
63213c8
ENH: replace Fins.distanceToCM with Fins.position, relative to rocket…
giovaniceotto Nov 11, 2022
9e4ab40
ENH: replace Tail.distanceToCM with Tail.position, relative to rocket…
giovaniceotto Nov 11, 2022
b9d432f
ENH: change from distance to position relative to rocket reference frame
giovaniceotto Nov 11, 2022
a8e9288
ENH: support for distance to position changes in the Flight class
giovaniceotto Nov 11, 2022
26d7964
STY: apply black style
giovaniceotto Nov 11, 2022
e5a91c7
ENH: Create EmptyMotor class
giovaniceotto Nov 16, 2022
2a99467
MAINT: Better define motor's coordinate systems
giovaniceotto Nov 16, 2022
c366b56
MAINT: Better define aerodynamic surfaces local coordinate systems
giovaniceotto Nov 16, 2022
de215c5
ENH: create AeroSurfaces class to hold aerodynamic surfaces and their…
giovaniceotto Nov 16, 2022
967120d
ENH: implement addMotor and coordinate system orientation
giovaniceotto Nov 16, 2022
3feeb3b
ENH: update Flight class to deal with new Rocket coordinate system
giovaniceotto Nov 16, 2022
da024b6
DOC: first update to Getting Started Notebook with new coordinate sys…
giovaniceotto Nov 16, 2022
412ea15
bug: fixed missing cpPosition initialization
MateusStano Nov 17, 2022
26e4fd4
Squashed commit of the following:
Gui-FernandesBR Nov 19, 2022
7e806b2
TST: conftest.py refactored to dist. vs posit.
Gui-FernandesBR Nov 19, 2022
c88fb13
TST: solidmotor tests refactored dist vs pos
Gui-FernandesBR Nov 19, 2022
0b4667c
TST: Fix 80% of test_rocket tests
Gui-FernandesBR Nov 19, 2022
4a0dc3d
tst: fixed rocket nosecone tests
MateusStano Nov 19, 2022
b1f90a7
tst: fixed flight tests
MateusStano Nov 19, 2022
6c4a306
tst: fixed acceptance tests
MateusStano Nov 19, 2022
fd8de97
TST: adding tests for aerosurfaces methods
Gui-FernandesBR Nov 20, 2022
68e9726
BUG: correct wrong f string tail method
Gui-FernandesBR Nov 20, 2022
ba54749
BUG: fix Environment.exportEnvironment()
Gui-FernandesBR Nov 20, 2022
65fe9d7
MAINT: specifying input types in utmToGeodesic
Gui-FernandesBR Nov 20, 2022
d591d52
MAINT: specifying input and retuning Nones
Gui-FernandesBR Nov 20, 2022
a014dba
TST: Add additional cases to test_environment
Gui-FernandesBR Nov 20, 2022
40baf0b
TST: Create test for environment analysis
Gui-FernandesBR Nov 20, 2022
2199195
TST: Create tests for Function class
Gui-FernandesBR Nov 20, 2022
1218179
MAINT: removing undesired comments
Gui-FernandesBR Nov 20, 2022
a847089
Fix code style issues with Black
lint-action Nov 20, 2022
06344e0
TST: add nozzlePosition argument value for consistency
giovaniceotto Nov 29, 2022
94cd379
Fix code style issues with Black
lint-action Nov 29, 2022
fe2dd87
Merge pull request #305 from RocketPy-Team/tst/adjusting_test_distanc…
giovaniceotto Nov 29, 2022
4d8c7fd
enh: remove() and pop() methods
MateusStano Dec 22, 2022
b5e16fc
maint: Update notebooks to new coordinate system
MateusStano Dec 22, 2022
6470e81
tst: added coordinate system tests
MateusStano Dec 22, 2022
32702c3
Update rocketpy/AeroSurfaces.py
MateusStano Dec 23, 2022
a9b859c
tst: fixed motor grains position
MateusStano Dec 23, 2022
de6be57
bug: made notebook images link to google drive images
MateusStano Dec 23, 2022
a94f52a
Merge branch 'beta/v1.0.0' into enh/distances-vs-positons-v2
MateusStano Dec 29, 2022
23d98d4
MAINT: revert type hint and improve docs
Gui-FernandesBR Dec 31, 2022
916cc50
ENH: moving fixtures to the conftest.py
Gui-FernandesBR Dec 31, 2022
49d4b75
MAINT: improve docstrings for tests
Gui-FernandesBR Dec 31, 2022
cc1dc04
TST: Improved tests for info returned
Gui-FernandesBR Dec 31, 2022
bd7d88f
MAINT: closing and cleaning files after tests
Gui-FernandesBR Dec 31, 2022
27422af
Merge branch 'enh/distances-vs-positons-v2' into tst/new_env_func_aer…
Gui-FernandesBR Dec 31, 2022
db990f9
Fix code style issues with Black
lint-action Dec 31, 2022
4bb94f6
maint: removed anotations
MateusStano Jan 4, 2023
b352ac7
enh: added envanalysis import
MateusStano Jan 4, 2023
51c7cbf
maint: sort imports
MateusStano Jan 4, 2023
65a28f7
bug: fix Function np.inf call with int or float defined Functions
MateusStano Jan 4, 2023
8473947
TST: set EnvAnalysis tests as slow option
Gui-FernandesBR Jan 4, 2023
8f9e370
maint: run black on notebooks
MateusStano Jan 4, 2023
1664395
Merge branch 'beta/v1.0.0' into enh/distances-vs-positons-v2
MateusStano Jan 8, 2023
8920c41
Merge branch 'beta/v1.0.0' into enh/distances-vs-positons-v2
MateusStano Jan 9, 2023
e6cf871
Merge branch 'enh/distances-vs-positons-v2' into tst/new_env_func_aer…
MateusStano Jan 10, 2023
dda3ce5
Fix code style issues with Black
lint-action Jan 10, 2023
d83e7eb
Merge pull request #306 from RocketPy-Team/tst/new_env_func_aero_tests
MateusStano Jan 18, 2023
03f1dc4
remaining merging conflicts
MateusStano Jan 19, 2023
7c14e54
bug: fix b and c geometrical parameters calculation
MateusStano Jan 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
TST: adding tests for aerosurfaces methods
Gui-FernandesBR committed Nov 20, 2022
commit fd8de9714677adec0166adda43fd5952e7c6700d
14 changes: 14 additions & 0 deletions tests/test_rocket.py
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
import pytest

from rocketpy import Rocket, SolidMotor
from rocketpy.AeroSurfaces import NoseCone


@patch("matplotlib.pyplot.show")
@@ -81,7 +82,16 @@ def mainTrigger(p, y):

static_margin = test_rocket.staticMargin(0)

# Check if allInfo and static_method methods are working properly
assert test_rocket.allInfo() == None or not abs(static_margin - 2.05) < 0.01
# Check if NoseCone allInfo() is working properly
assert NoseCone.allInfo() == None
# Check if FinSet allInfo() is working properly
assert FinSet.allInfo() == None
# Check if Tail allInfo() is working properly
assert Tail.allInfo() == None
# Check if draw method is working properly
assert FinSet.draw() == None


@patch("matplotlib.pyplot.show")
@@ -160,6 +170,7 @@ def mainTrigger(p, y):
static_margin = test_rocket.staticMargin(0)

assert test_rocket.allInfo() == None or not abs(static_margin - 2.30) < 0.01
assert FinSet.draw() == None


@patch("matplotlib.pyplot.show")
@@ -410,6 +421,9 @@ def test_add_trapezoidal_fins_sweep_length(
# Check rocket's center of pressure (just double checking)
assert translate - rocket.cpPosition == pytest.approx(expected_cpz_cm, 0.01)

# Check if AeroSurfaces.__getitem__() works
assert isinstance(rocket.aerodynamicSurfaces.__getitem__(0)[0], NoseCone)


def test_add_fins_assert_cp_cm_plus_fins(rocket, dimensionless_rocket, m):
rocket.addTrapezoidalFins(