@@ -521,3 +521,37 @@ def test_freestream_speed_at_apogee(example_plain_env, calisto):
521521 test_flight .free_stream_speed (test_flight .apogee_time ), 0.0 , atol = soft_atol
522522 )
523523 assert np .isclose (test_flight .apogee_freestream_speed , 0.0 , atol = soft_atol )
524+
525+
526+ def test_rocket_csys_equivalence (
527+ flight_calisto_robust , flight_calisto_nose_to_tail_robust
528+ ):
529+ """Test the equivalence of the rocket coordinate systems between two
530+ different flight simulations.
531+
532+ Parameters
533+ ----------
534+ flight_calisto_robust : rocketpy.Flight
535+ Flight object to be tested. See the conftest.py file for more info.
536+ flight_calisto_nose_to_tail_robust : rocketpy.Flight
537+ Flight object to be tested. See the conftest.py file for more info.
538+ """
539+ assert np .isclose (
540+ flight_calisto_robust .apogee , flight_calisto_nose_to_tail_robust .apogee
541+ )
542+ assert np .isclose (
543+ flight_calisto_robust .apogee_time ,
544+ flight_calisto_nose_to_tail_robust .apogee_time ,
545+ )
546+ assert np .isclose (
547+ flight_calisto_robust .x_impact ,
548+ flight_calisto_nose_to_tail_robust .x_impact ,
549+ )
550+ assert np .isclose (
551+ flight_calisto_robust .y_impact ,
552+ flight_calisto_nose_to_tail_robust .y_impact ,
553+ )
554+ assert np .allclose (
555+ flight_calisto_robust .initial_solution ,
556+ flight_calisto_nose_to_tail_robust .initial_solution ,
557+ )
0 commit comments