Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: kyle-cochran <kyle.ray.cochran@gmail.com>
  • Loading branch information
vishwa2710 and kyle-cochran authored Oct 12, 2023
1 parent 875c99d commit 1964a68
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ Vector6d BrouwerLyddaneMean::Cartesian(
if ((coe.getEccentricity() > 0.99) || (coe.getEccentricity() < 0.0))
{
throw ostk::core::error::RuntimeError(
String::Format("BrouwerLyddaneMean is applicable only if 0.0 < Ecc: [{}] < 0.99.", coe.getEccentricity())
"BrouwerLyddaneMean is applicable only if 0.0 < Ecc: [{}] < 0.99.", coe.getEccentricity()
);

Check warning on line 90 in src/OpenSpaceToolkit/Astrodynamics/Trajectory/Orbit/Models/Kepler/BrouwerLyddaneMean.cpp

View check run for this annotation

Codecov / codecov/patch

src/OpenSpaceToolkit/Astrodynamics/Trajectory/Orbit/Models/Kepler/BrouwerLyddaneMean.cpp#L90

Added line #L90 was not covered by tests
}

const Real perigee = coe.getPeriapsisRadius().inMeters();
if (perigee < 3000000.0)
{
throw ostk::core::error::RuntimeError(
String::Format("BrouwerLyddaneMean is applicable only if Perigee radius: [{}] > 3000000.0 m.", perigee)
"BrouwerLyddaneMean is applicable only if Perigee radius: [{}] > 3000000.0 m.", perigee
);
}
if (perigee < 6378000.0)
Expand All @@ -111,9 +111,9 @@ Vector6d BrouwerLyddaneMean::Cartesian(
const Real inclination_degrees = coe.getInclination().inDegrees();
if (inclination_degrees > 180.0)
{
throw ostk::core::error::RuntimeError(String::Format(
throw ostk::core::error::RuntimeError(
"BrouwerLyddaneMean is applicable only if inclination: [{}] < 180.0 degrees.", inclination_degrees
));
);

Check warning on line 116 in src/OpenSpaceToolkit/Astrodynamics/Trajectory/Orbit/Models/Kepler/BrouwerLyddaneMean.cpp

View check run for this annotation

Codecov / codecov/patch

src/OpenSpaceToolkit/Astrodynamics/Trajectory/Orbit/Models/Kepler/BrouwerLyddaneMean.cpp#L116

Added line #L116 was not covered by tests
}

if ((58.80 < inclination_degrees && inclination_degrees < 65.78) ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ COE BrouwerLyddaneMeanLong::toCOE() const
if (eccdp > 0.99)
{
throw ostk::core::error::RuntimeError(
String::Format("BrouwerLyddaneMeanLong is applicable only if 0.0 < Ecc: [{}] < 0.99.", eccdp)
"BrouwerLyddaneMeanLong is applicable only if 0.0 < Ecc: [{}] < 0.99.", eccdp
);
}

const Real perigee = this->getPeriapsisRadius().inMeters();
if (perigee < 3000000.0)
{
throw ostk::core::error::RuntimeError(
String::Format("BrouwerLyddaneMeanLong is applicable only if Perigee radius: [{}] > 3000000.0 m.", perigee)
"BrouwerLyddaneMeanLong is applicable only if Perigee radius: [{}] > 3000000.0 m.", perigee
);
}
if (perigee < 6378000.0)
Expand All @@ -103,10 +103,10 @@ COE BrouwerLyddaneMeanLong::toCOE() const

if (incdp > Real::Pi())
{
throw ostk::core::error::RuntimeError(String::Format(
throw ostk::core::error::RuntimeError(
"BrouwerLyddaneMeanLong is applicable only if inclination: [{}] < 180.0 degrees.",
Angle::Radians(incdp).inDegrees()
));
);

Check warning on line 109 in src/OpenSpaceToolkit/Astrodynamics/Trajectory/Orbit/Models/Kepler/BrouwerLyddaneMeanLong.cpp

View check run for this annotation

Codecov / codecov/patch

src/OpenSpaceToolkit/Astrodynamics/Trajectory/Orbit/Models/Kepler/BrouwerLyddaneMeanLong.cpp#L108-L109

Added lines #L108 - L109 were not covered by tests
}

const Real bk2 = (1.0 / 2.0) * (j2 * ae * ae);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ COE BrouwerLyddaneMeanShort::toCOE() const

if ((incp < 0.0) || (incp > Real::Pi()))
{
throw ostk::core::error::RuntimeError(String::Format(
throw ostk::core::error::RuntimeError(
"BrouwerLyddaneMeanShort is applicable only if 0.0 < inclination: [{}] < 180.0 degrees.",
Angle::Radians(incp).inDegrees()
));
);
}

if (incp > 3.0543261909900763)
Expand Down Expand Up @@ -98,15 +98,15 @@ COE BrouwerLyddaneMeanShort::toCOE() const
if (eccp > 0.99)
{
throw ostk::core::error::RuntimeError(
String::Format("BrouwerLyddaneMeanShort is applicable only if 0.0 < Ecc: [{}] < 0.99.", eccp)
"BrouwerLyddaneMeanShort is applicable only if 0.0 < Ecc: [{}] < 0.99.", eccp
);
}

const Real perigee = this->getPeriapsisRadius().inMeters();
if (perigee < 3000000.0)
{
throw ostk::core::error::RuntimeError(
String::Format("BrouwerLyddaneMeanShort is applicable only if Perigee radius: [{}] > 3000000.0 m.", perigee)
"BrouwerLyddaneMeanShort is applicable only if Perigee radius: [{}] > 3000000.0 m.", perigee
);

Check warning on line 110 in src/OpenSpaceToolkit/Astrodynamics/Trajectory/Orbit/Models/Kepler/BrouwerLyddaneMeanShort.cpp

View check run for this annotation

Codecov / codecov/patch

src/OpenSpaceToolkit/Astrodynamics/Trajectory/Orbit/Models/Kepler/BrouwerLyddaneMeanShort.cpp#L110

Added line #L110 was not covered by tests
}
if (perigee < 6378000.0)
Expand Down

0 comments on commit 1964a68

Please sign in to comment.