Skip to content

Commit e32e304

Browse files
committed
TST: re-measure what the convention change moves, on current develop
Rebasing onto a50d07d dropped the nozzle gyration half, which reached develop as #1188, and left the sign convention and its documentation. What follows is measured on that base rather than carried over from the old one. The stand-in rocket in test_generalized_eom.py yielded (component, position) for aerodynamic_surfaces, and #1129 made that a triple. Its factor is 1.0 here, which is what Components.add defaults to, and u_dot_generalized binds it as unused, so it cannot move the result. The Defiance acceptance flight, against the measured 9308.32 m AGL: develop a50d07d 9243.8350 m 0.6928 % with the convention 9247.9733 m 0.6483 % Its impact point moves further than the 3 m the test allows, so the two references follow the flight: x from 1609.40 to 1550.23 and y from 87.03 to 104.80. Max speed and max acceleration stay inside the 1 percent the test gives them, at 443.99 against 444.24 and 10356.62 against 10400.76. Four expectations in test_flight.py move at apogee, all of them values the file says were copied from a run rather than derived. Measured again here: moments (-0.652606, -0.734029, -2.115675e-14), forces (2.266124, -2.014696, -0.818709), velocity (-11.634095, 16.695945, -0.000173) and acceleration (0.073233, -0.062635, -9.614299). The first three are what this branch recorded four weeks ago, so #1188 landing did not disturb them. Whole suite on this branch: 2655 passed, 10 failed, against 2644 passed and the same 10 on develop at a50d07d. Those ten want optional dependencies this machine does not have. ruff and ruff format are clean and pylint is 10.00 with exit 0. Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
1 parent bc239f6 commit e32e304

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

‎tests/acceptance/test_defiance_rocket.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
MAX_RELATIVE_APOGEE_ERROR = 0.01
1212
REFERENCE_MAX_SPEED = 444.24
1313
REFERENCE_MAX_ACCELERATION = 10400.76
14-
REFERENCE_IMPACT_X = 1609.40
15-
REFERENCE_IMPACT_Y = 87.03
14+
REFERENCE_IMPACT_X = 1550.23
15+
REFERENCE_IMPACT_Y = 104.80
1616
REFERENCE_METRIC_RELATIVE_TOLERANCE = 0.01
1717
REFERENCE_IMPACT_ABSOLUTE_TOLERANCE = 3.0
1818

‎tests/unit/simulation/test_flight.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def test_export_sensor_data(flight_calisto_with_sensors):
352352
[
353353
("t_initial", (0.25886, -0.649623, 0)),
354354
("out_of_rail_time", (0.792028, -1.987634, 0)),
355-
("apogee_time", (-0.519917, -0.734918, -1.005368e-18)),
355+
("apogee_time", (-0.652606, -0.734029, -2.115675e-14)),
356356
("t_final", (0, 0, 0)),
357357
],
358358
)
@@ -391,7 +391,7 @@ def test_aerodynamic_moments(flight_calisto_custom_wind, flight_time, expected_v
391391
[
392392
("t_initial", (1.654150, 0.659142, -0.067103)),
393393
("out_of_rail_time", (5.052628, 2.013361, -1.75370)),
394-
("apogee_time", (2.322999, -1.643037, -0.950316)),
394+
("apogee_time", (2.266124, -2.014696, -0.818709)),
395395
("t_final", (-0.019802, 0.012030, 159.051604)),
396396
],
397397
)
@@ -432,7 +432,7 @@ def test_aerodynamic_forces(flight_calisto_custom_wind, flight_time, expected_va
432432
("out_of_rail_time", (0, 2.248540, 25.700928)),
433433
(
434434
"apogee_time",
435-
(-14.593411, 15.743567, -0.000409),
435+
(-11.634095, 16.695945, -0.000173),
436436
),
437437
("t_final", (5, 2, -5.660155)),
438438
],
@@ -471,7 +471,7 @@ def test_velocities(flight_calisto_custom_wind, flight_time, expected_values):
471471
[
472472
("t_initial", (0, 0, 0)),
473473
("out_of_rail_time", (0, 7.8067, 89.2315)),
474-
("apogee_time", (0.07649, -0.053530, -9.620037)),
474+
("apogee_time", (0.073233, -0.062635, -9.614299)),
475475
("t_final", (0, 0, 0.0019548)),
476476
],
477477
)

‎tests/unit/simulation/test_generalized_eom.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ def __init__(
8383
self.nozzle_gyration_tensor = Matrix([[0, 0, 0], [0, 0, 0], [0, 0, 0]])
8484
self._inertia = Matrix(inertia)
8585
surface = _Surface(forces_and_moments)
86-
self.aerodynamic_surfaces = [(surface, None)]
86+
# (component, position, ref_factor) since #1129. The factor is 1.0,
87+
# which is Components.add's own default, and u_dot_generalized does
88+
# not read it.
89+
self.aerodynamic_surfaces = [(surface, None, 1.0)]
8790
self.surfaces_cp_to_cdm = {surface: Vector(cp)}
8891

8992
def get_inertia_tensor_at_time(self, _t):

0 commit comments

Comments
 (0)