Browse Source

test: Tighten eccentricity tolerances for parabolic boundary cases

- Near-parabolic (e=0.999) eccentricity tolerance: 1e-2 → 1e-3
- Highly hyperbolic (e=10.0) eccentricity tolerance: 1e-2 → 1e-3
- Validates improvements from PARABOLIC_TOLERANCE and near-parabolic handling
- All 82 tests passing (239,633 assertions)
main
cinnaboot 5 months ago
parent
commit
b21a668b7c
  1. 4
      tests/test_cartesian_to_elements_extreme.cpp

4
tests/test_cartesian_to_elements_extreme.cpp

@ -104,7 +104,7 @@ TEST_CASE("Cartesian to Elements - Edge Cases", "[orbital_mechanics]") {
OrbitalElements recovered = cartesian_to_orbital_elements(position, velocity, M_sun);
REQUIRE_THAT(recovered.eccentricity, WithinAbs(0.999, 1e-2));
REQUIRE_THAT(recovered.eccentricity, WithinAbs(0.999, 1e-3));
// Semi-major axis poorly conditioned for e≈1, skip test
}
@ -161,7 +161,7 @@ TEST_CASE("Cartesian to Elements - Edge Cases", "[orbital_mechanics]") {
OrbitalElements recovered = cartesian_to_orbital_elements(position, velocity, M_sun);
REQUIRE_THAT(recovered.eccentricity, WithinAbs(10.0, 1e-2));
REQUIRE_THAT(recovered.eccentricity, WithinAbs(10.0, 1e-3));
REQUIRE_THAT(recovered.semi_major_axis, WithinAbs(-1.0e10, 1e8));
}

Loading…
Cancel
Save