Skip to content

Commit 3718411

Browse files
CopilotaZira371
andcommitted
Use appropriately named constant for weathercock apogee difference
Co-authored-by: aZira371 <[email protected]>
1 parent a5214f1 commit 3718411

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/acceptance/test_3dof_flight.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@
3131
MAX_LATERAL_TO_ALTITUDE_RATIO = 0.5 # Max lateral displacement vs altitude ratio
3232
QUATERNION_CHANGE_TOLERANCE = 0.1 # Max quaternion change without weathercocking
3333
WEATHERCOCK_COEFFICIENTS = [0.0, 0.5, 1.0, 2.0] # Test weathercock coefficients
34-
WEATHERCOCK_RANGE_THRESHOLD = 1.0 # Minimum apogee difference (meters)
35-
LATERAL_INCREASE_THRESHOLD = 0.5 # Minimum lateral increase (meters)
34+
WEATHERCOCK_APOGEE_DIFFERENCE = 0.5 # Minimum apogee difference due to weathercocking (meters)
35+
WEATHERCOCK_RANGE_THRESHOLD = 1.0 # Minimum range of apogees across coefficients (meters)
36+
LATERAL_INCREASE_THRESHOLD = 0.5 # Minimum lateral displacement increase (meters)
3637
# LAUNCH_INCLINATION and LAUNCH_HEADING imported from flight_fixtures
3738
MASS_TOLERANCE = 0.001 # kg
3839
THRUST_TOLERANCE = 1e-6 # N
@@ -165,8 +166,9 @@ def test_3dof_weathercocking_affects_trajectory(
165166

166167
# They should be reasonably close but not identical
167168
apogee_difference = abs(apogee_no_wc - apogee_with_wc)
168-
assert apogee_difference > LATERAL_INCREASE_THRESHOLD, (
169-
f"Weathercocking should affect apogee altitude (difference: {apogee_difference:.2f} m)"
169+
assert apogee_difference > WEATHERCOCK_APOGEE_DIFFERENCE, (
170+
f"Weathercocking should affect apogee altitude (difference: {apogee_difference:.2f} m, "
171+
f"threshold: {WEATHERCOCK_APOGEE_DIFFERENCE} m)"
170172
)
171173

172174
# Both should still be in reasonable range

0 commit comments

Comments
 (0)