Skip to content

Commit

Permalink
test: add test for ctor with Celestial
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-liang3 committed Dec 16, 2024
1 parent 3b270a3 commit 56c76fb
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <OpenSpaceToolkit/Mathematics/Object/Vector.hpp>

#include <OpenSpaceToolkit/Physics/Environment.hpp>
#include <OpenSpaceToolkit/Physics/Environment/Object/Celestial/Earth.hpp>
#include <OpenSpaceToolkit/Physics/Time/Duration.hpp>
#include <OpenSpaceToolkit/Physics/Unit/Derived.hpp>
Expand All @@ -28,6 +29,7 @@ using ostk::mathematics::object::Vector6d;
using ostk::physics::coordinate::Frame;
using ostk::physics::coordinate::Position;
using ostk::physics::coordinate::Velocity;
using ostk::physics::Environment;
using ostk::physics::environment::gravitational::Earth;
using ostk::physics::environment::object::celestial::Sun;
using ostk::physics::time::DateTime;
Expand Down Expand Up @@ -748,6 +750,13 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Trajectory_Orbit_Model_Kepler_COE, FrozenO
EXPECT_NEAR(coe.getAop().inDegrees(), non_critical_aop.inDegrees(), 1e-10);
}

// Construct with Celestial
{
COE coe = COE::FrozenOrbit(semiMajorAxis, Environment::Default().accessCelestialObjectWithName("Earth"));

EXPECT_TRUE(coe.isDefined());
}

{
{
// No SMA provided
Expand Down

0 comments on commit 56c76fb

Please sign in to comment.