Browse Source

use double precision floats in test

main
cinnaboot 4 years ago
parent
commit
f3d792897a
  1. 4
      tests/orbit_test.cpp

4
tests/orbit_test.cpp

@ -82,12 +82,12 @@ TEST_CASE("orbital elements to state vectors, example 3.2", "[orbits]")
REQUIRE_THAT(M[2][2], WithinAbs( 0.4478, 1e-4));
// rotate perifocal state vectors to IJK coordinates
glm::vec3 r_pos = M * pos;
glm::dvec3 r_pos = M * pos;
REQUIRE_THAT(r_pos.x, WithinAbs(-4394.0, 0.2));
REQUIRE_THAT(r_pos.y, WithinAbs( 1410.3, 0.1));
REQUIRE_THAT(r_pos.z, WithinAbs(-5647.7, 0.1));
glm::vec3 r_vel = M * vel;
glm::dvec3 r_vel = M * vel;
REQUIRE_THAT(r_vel.x, WithinAbs(-8.2715, 0.1));
REQUIRE_THAT(r_vel.y, WithinAbs(-4.3852, 0.1));
REQUIRE_THAT(r_vel.z, WithinAbs( 2.5794, 0.1));

Loading…
Cancel
Save