diff --git a/rocketserializer/components/motor.py b/rocketserializer/components/motor.py index 7ad1c04..a8d9fcf 100644 --- a/rocketserializer/components/motor.py +++ b/rocketserializer/components/motor.py @@ -50,7 +50,10 @@ def search_motor(bs, datapoints, data_labels): logger.info("Collected motor geometry: motor length and motor radius.") # get motor mass properties - total_propellant_mass, motor_dry_mass, _ = __get_motor_mass(datapoints, data_labels) + total_propellant_mass, _, _ = __get_motor_mass(datapoints, data_labels) + # The rocket mass, center of mass and inertia are all taken at burnout, so + # they already include the motor casing. + motor_dry_mass = 0 center_of_dry_mass = 0 dry_inertia = (0, 0, 0) # impossible to retrieve from .ork file diff --git a/tests/acceptance/test_ork_extractor.py b/tests/acceptance/test_ork_extractor.py index ccc577d..7b45345 100644 --- a/tests/acceptance/test_ork_extractor.py +++ b/tests/acceptance/test_ork_extractor.py @@ -54,6 +54,9 @@ def test_ork_extractor(expected_results_file, fixture, request): if not math.isnan(inertia[0]): assert inertia[2] < inertia[0] + # the rocket mass already includes the motor casing + assert settings["motors"]["dry_mass"] == expected_results["motors"]["dry_mass"] + # remove sensitive keys settings, expected_results = remove_sensitive_keys(settings, expected_results)