Skip to content

Commit 7b46e9b

Browse files
committed
MNT: corrections to test_flight_3dof.py
- MNT: corrected doc string to represent correct orientation - MNT: improved tolerance of check on quaternion derivative which should be ideally very small when axes are aligned
1 parent 11912f3 commit 7b46e9b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/unit/simulation/test_flight_3dof.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def test_weathercock_aligned_no_evolution(example_plain_env, point_mass_rocket):
252252
simulation_mode="3 DOF",
253253
weathercock_coeff=1.0,
254254
)
255-
# Body pointing in -x direction (into the wind for vx=50)
255+
# Body pointing in +x direction (into the wind for vx=50)
256256
# Quaternion for 90 degree rotation about y-axis uses half-angle:
257257
# e0=cos(90°/2)=cos(45°), e2=sin(90°/2)=sin(45°)
258258
sqrt2_2 = np.sqrt(2) / 2
@@ -263,4 +263,4 @@ def test_weathercock_aligned_no_evolution(example_plain_env, point_mass_rocket):
263263
# With alignment, quaternion derivatives should be very small
264264
e_dot = result[6:10]
265265
e_dot_magnitude = sum(ed**2 for ed in e_dot) ** 0.5
266-
assert e_dot_magnitude < 0.1, "Quaternion derivatives should be small when aligned"
266+
assert e_dot_magnitude < 1e-8, "Quaternion derivatives should be very small when aligned"

0 commit comments

Comments
 (0)