13#ifndef ASTRO_ORBITALELEMENTS_HH
14#define ASTRO_ORBITALELEMENTS_HH
23 POSIGRADE = 1, UNDEFINED = 0, RETROGRADE = -1
28 UNDEFINED = 0, HYPERBOLIC = 1, ELLIPTIC = 2, CIRCULAR = 3, PARABOLIC = 4
92 r(r_x, r_y, r_z),
v(v_x, v_y, v_z) {}
120 vec << this->r, this->v;
129 std::ostringstream os;
131 "r = " << this->r.transpose() <<
" (UA)" << std::endl <<
132 "v = " << this->v.transpose() <<
" (UA/day)" << std::endl;
154 #define CMD "Astro::OrbitalElements::Cartesian::sanity_check(...): "
156 if (!(this->r.allFinite())) {
160 if (!(this->v.allFinite())) {
184 return ((this->v.cross(this->h()) / mu) - (this->r / this->r.norm())).norm();
195 Vector3 spherical_coordinates()
const
197 Real r = this->r.norm();
198 Real theta = std::acos(this->r.z() /
r);
199 Real phi = std::atan2(this->r.y(), this->r.x());
260 :
a(t_kepl(0)),
e(t_kepl(1)),
i(t_kepl(2)),
Omega(t_kepl(3)),
omega(t_kepl(4))
290 vec << this->a, this->e, this->i, this->Omega, this->omega;
299 std::ostringstream os;
301 "a : semi-major axis = " << this->a <<
" (UA)" << std::endl <<
302 "e : eccentricity = " << this->e <<
" (-)" << std::endl <<
303 "i : inclination = " << this->i <<
" (rad) = " <<
Rad_To_Deg(this->i) <<
" (deg)" << std::endl <<
304 "Ω : right ascension … = " << this->Omega <<
" (rad) = " <<
Rad_To_Deg(this->Omega) <<
" (deg)" << std::endl <<
305 "ω : arg. of periapsis = " << this->omega <<
" (rad) = " <<
Rad_To_Deg(this->omega) <<
" (deg)" << std::endl;
335 #define CMD "Astro::OrbitalElements::Keplerian::sanity_check(...): "
337 if (!std::isfinite(this->a) && this->a > 0.0) {
341 if (!std::isfinite(this->e) && this->e > 0.0 && this->e < 1.0) {
345 if (!std::isfinite(this->i)) {
349 if (!std::isfinite(this->Omega)) {
350 ASTRO_WARNING(
CMD "invalid right ascension of the ascending node, Ω = " << this->Omega <<
".");
353 if (!std::isfinite(this->omega)) {
354 ASTRO_WARNING(
CMD "invalid argument of periapsis, ω = " << this->omega <<
".");
372 #define CMD "Astro::OrbitalElements::Keplerian::is_singular(...): "
375 if (std::abs(
i) < tol_i && std::abs(
i -
PI) < tol_i) {
379 if (std::abs(this->e) < tol_e || std::abs(this->e - 1.0) < tol_e) {
404 Real u()
const {
return this->omega + this->Omega;}
410 Real p()
const {
return this->a * (1.0 - this->e * this->e);}
461 :
p(t_p),
f(t_f),
g(t_g),
h(t_h),
k(t_k) {}
469 :
p(t_equi(0)),
f(t_equi(1)),
g(t_equi(2)),
h(t_equi(3)),
k(t_equi(4))
498 vec << this->p, this->f, this->g, this->h, this->k;
507 std::ostringstream os;
509 "p : semi-latus rectum = " << this->p <<
" (UA)" << std::endl <<
510 "f : x-axis ecc. vector = " << this->f <<
" (-)" << std::endl <<
511 "g : y-axis ecc. vector = " << this->g <<
" (-)" << std::endl <<
512 "h : x-axis node vector = " << this->h <<
" (-)" << std::endl <<
513 "k : y-axis node vector = " << this->k <<
" (-)" << std::endl;
540 #define CMD "Astro::OrbitalElements::Keplerian::sanity_check(...): "
542 if (!std::isfinite(this->p) && this->p > 0.0) {
546 if (!std::isfinite(this->f)) {
547 ASTRO_WARNING(
CMD "invalid x-axis component of the eccentricity vector, f = " << this->f <<
".");
550 if (!std::isfinite(this->g)) {
551 ASTRO_WARNING(
CMD "invalid y-axis component of the eccentricity vector, g = " << this->g <<
".");
554 if (!std::isfinite(this->h)) {
555 ASTRO_WARNING(
CMD "invalid x-axis component of the node vector, h = " << this->h <<
".");
558 if (!std::isfinite(this->k)) {
559 ASTRO_WARNING(
CMD "invalid y-axis component of the node vector, k = " << this->k <<
".");
579 #define CMD "Astro::OrbitalElements::Keplerian::is_singular(...): "
609 Real s_L{std::sin(L)}, c_L{std::cos(L)};
610 return std::atan2(this->h*s_L - this->k*c_L, this->h*c_L + this->k*s_L);
617 Real a()
const {
return this->p / (1.0 - this->f*this->f - this->g*this->g);}
623 Real e()
const {
return std::sqrt(this->f*this->f + this->g*this->g);}
631 Real h2{this->h * this->h}, k2{this->k * this->k};
632 return std::atan2(2.0*std::sqrt(h2 + k2), 1.0 - h2 - k2);
642 this->g*this->h - this->f*this->k,
643 this->f*this->h + this->g*this->k
651 Real Omega()
const {
return std::atan2(this->k, this->h);}
698 :
q(t_q_1, t_q_2, t_q_3, t_q_4) {}
726 vec << this->q.x(), this->q.y(), this->q.z(), this->q.w();
736 r << 1.0 - 2.0*(
q.y()*
q.y() +
q.z()*
q.z()),
737 2.0*(
q.x()*
q.y() -
q.z()*
q.w()),
738 2.0*(
q.x()*
q.z() +
q.y()*
q.w()),
739 2.0*(
q.x()*
q.y() +
q.z()*
q.w()),
740 1.0 - 2.0*(
q.x()*
q.x() +
q.z()*
q.z()),
741 2.0*(
q.y()*
q.z() -
q.x()*
q.w()),
742 2.0*(
q.x()*
q.z() -
q.y()*
q.w()),
743 2.0*(
q.y()*
q.z() +
q.x()*
q.w()),
744 1.0 - 2.0*(
q.x()*
q.x() +
q.y()*
q.y());
753 std::ostringstream os;
755 "q¹ : 1st parameter = " << this->q.x() <<
" (-)" << std::endl <<
756 "q² : 2nd parameter = " << this->q.y() <<
" (-)" << std::endl <<
757 "q³ : 3rd parameter = " << this->q.z() <<
" (-)" << std::endl <<
758 "q⁴ : 4th parameter = " << this->q.w() <<
" (-)" << std::endl;
779 #define CMD "Astro::OrbitalElements::Quaternionic::sanity_check(...): "
781 if (!(std::isfinite(this->q.x()) && std::isfinite(this->q.y()) &&
782 std::isfinite(this->q.z()) && std::isfinite(this->q.w()))) {
807 Real beta{(1.0 + std::sqrt(1.0 - e*e)) / e};
808 return AngleInRange(nu - 2.0 * std::atan(std::sin(nu) / (beta + std::cos(nu))) -
809 (e * std::sqrt(1.0 - e*e) * std::sin(nu)) / (1.0 + e * std::cos(nu)));
840 Real beta{(1.0 + std::sqrt(1.0 - kepl.
e*kepl.
e)) / kepl.
e};
841 return AngleInRange(nu - 2.0 * std::atan(std::sin(nu) / (beta + std::cos(nu))));
867 #define CMD "Astro::OrbitalElements::Anomaly::M_to_E(...): "
874 for (
Integer k{0}; k < 100; ++k)
876 dE = (E - e * std::sin(E) - M) / (1.0 - e * std::cos(E));
878 E -= std::max(std::min(dE, 0.1), -0.1);
884 ", dE = " << dE <<
", M = " << M <<
", e = " << e <<
".");
917 #define CMD "Astro::OrbitalElements::Anomaly::M_to_H(...): "
920 Real e{kepl.
e}, abs_M{M > 0 ? M : -M};
921 Real dH{0.0}, H{5.0*e-2.5 > abs_M ? std::pow(6.0*abs_M/e, 1.0/3.0) : std::log(2.0*abs_M/e)};
922 for (
Integer k{0}; k < 100; ++k)
924 dH = (e * std::sinh(H) - H - abs_M) / (e * std::cosh(H) - 1.0);
931 ", dH = " << dH <<
", M = " << M <<
", e = " << e <<
".");
965 Real beta{(1.0 + std::sqrt(1.0 - e*e)) / e};
966 return AngleInRange(E + 2.0 * std::atan(std::sin(E) / (beta - std::cos(E))));
1022 return AngleInRange(2.0*std::atan(std::sqrt((kepl.
e+1.0)/(kepl.
e-1.0)) * std::tanh(H/2.0)));
1150 template<
bool Hyperbolic = false>
1156 this->M =
nu_to_M(this->nu, kepl);
1157 this->E =
nu_to_E(this->nu, kepl);
1158 this->L =
nu_to_L(this->nu, kepl, I);
1161 if constexpr (Hyperbolic) {this->H =
M_to_H(this->M, kepl);}
1172 template<
bool Hyperbolic = false>
1177 this->E =
M_to_E(t_M, kepl);
1178 this->nu =
E_to_nu(this->E, kepl);
1180 this->L =
nu_to_L(this->nu, kepl, I);
1183 if constexpr (Hyperbolic) {this->H =
M_to_H(this->M, kepl);}
1199 template<
bool Hyperbolic = false>
1204 this->nu =
E_to_nu(t_E, kepl);
1205 this->M =
E_to_M(t_E, kepl);
1207 this->L =
nu_to_L(this->nu, kepl, I);
1210 if constexpr (Hyperbolic) {this->H =
M_to_H(this->M, kepl);}
1223 template<
bool Hyperbolic = false>
1226 #define CMD "Astro::OrbitalElements::Anomaly::L(...): "
1232 CMD "conversion error, L = " << t_L <<
" ≠ " << this->L <<
".");
1247 template<
bool Hyperbolic = false>
1250 #define CMD "Astro::OrbitalElements::Anomaly::lambda(...): "
1256 CMD "conversion error, lambda = " << t_lambda <<
" ≠ " << this->lambda <<
".");
1272 #define CMD "Astro::OrbitalElements::Anomaly::H(...): "
1277 CMD "conversion error, H = " << t_H <<
" ≠ " << this->H <<
".");
1287 std::ostringstream os;
1289 "v : true anomaly = " << this->nu <<
" (rad) = " <<
Rad_To_Deg(this->nu) <<
" (deg)" << std::endl <<
1290 "M : mean anomaly = " << this->M <<
" (rad) = " <<
Rad_To_Deg(this->M) <<
" (deg)" << std::endl <<
1291 "E : eccentric anomaly = " << this->E <<
" (rad) = " <<
Rad_To_Deg(this->E) <<
" (deg)" << std::endl <<
1292 "L : true longitude = " << this->L <<
" (rad) = " <<
Rad_To_Deg(this->L) <<
" (deg)" << std::endl <<
1293 "λ : mean longitude = " << this->lambda <<
" (rad) = " <<
Rad_To_Deg(this->lambda) <<
" (deg)" << std::endl <<
1294 "H : hyperbolic anomaly = " << this->H <<
" (rad) = " <<
Rad_To_Deg(this->H) <<
" (deg)" << std::endl;
1322 template<
bool Hyperbolic = false>
1325 #define CMD "Astro::OrbitalElements::Anomaly::sanity_check(...): "
1327 if (!(std::isfinite(this->nu))) {
1331 if (!(std::isfinite(this->M))) {
1335 if (!(std::isfinite(this->E))) {
1339 if (!(std::isfinite(this->L))) {
1343 if (!(std::isfinite(this->lambda))) {
1347 if constexpr (Hyperbolic) {
1348 if (!(std::isfinite(this->H))) {
1369 #define CMD "Astro::OrbitalElements::cartesian_to_keplerian(...): "
1377 Real r_norm{r.norm()};
1381 Real r_dot_v{r.dot(v)};
1384 Vector3 e_vec{1.0/mu*((v.squaredNorm() - mu/r_norm)*r - r_dot_v*v)};
1385 Real e{e_vec.norm()};
1388 Vector3 n_vec{(Vector3::UnitZ().cross(h_vec)).normalized()};
1391 Real i{std::acos(h_vec.z() / h_vec.norm())};
1397 Real Omega{std::acos(n_vec.x())};
1398 if (n_vec.y() < 0.0) {Omega = 2.0*
PI - Omega;}
1401 Real omega{std::acos(n_vec.dot(e_vec)/e)};
1402 if (e_vec.z() < 0.0) {omega = 2.0*
PI - omega;}
1405 Real nu{std::acos(e_vec.dot(r) / (e * r_norm))};
1406 if (r_dot_v < 0.0) {nu = 2.0*
PI - nu;}
1408 if (std::abs(e) <
EPSILON_LOW) {omega = nu = 0.0;}
1411 Real a{1.0 / (2.0/r_norm - v.squaredNorm()/mu)};
1436 #define CMD "Astro::OrbitalElements::keplerian_to_cartesian(...): "
1442 Real const & e{kepl.
e};
1443 Real const & i{kepl.
i};
1451 Real r{p/(1.0 + e*std::cos(nu))};
1454 Vector3 r_vec(r*std::cos(nu), r*std::sin(nu), 0.0);
1455 Vector3 v_vec(-std::sin(nu), e + std::cos(nu), 0.0);
1456 v_vec *= std::sqrt(mu/p);
1460 R_z << std::cos(Omega), std::sin(Omega), 0.0,
1461 -std::sin(Omega), std::cos(Omega), 0.0,
1463 R_i << 1.0, 0.0, 0.0,
1464 0.0, std::cos(i), std::sin(i),
1465 0.0, -std::sin(i), std::cos(i);
1466 R_h << std::cos(omega), std::sin(omega), 0.0,
1467 -std::sin(omega), std::cos(omega), 0.0,
1469 R = (R_h*R_i*R_z).transpose();
1490 #define CMD "Astro::OrbitalElements::equinoctial_to_cartesian(...): "
1496 Real const & f{equi.
f};
1497 Real const & g{equi.
g};
1498 Real const & h{equi.
h};
1499 Real const & k{equi.
k};
1500 Real const & p{equi.
p};
1503 Real c_L{std::cos(L)}, s_L{std::sin(L)};
1504 Real alpha_2{h*h - k*k};
1505 Real s_2{1.0 + h*h + k*k};
1506 Real w{1.0 + f*c_L + g*s_L};
1512 tmp * (c_L + alpha_2*c_L + 2.0*h*k*s_L),
1513 tmp * (s_L - alpha_2*s_L + 2.0*h*k*c_L),
1514 2.0*tmp * (h*s_L - k*c_L);
1516 tmp = -1.0/s_2 * std::sqrt(mu/p);
1518 tmp * ( s_L + alpha_2*s_L - 2.0*h*k*c_L + g - 2.0*f*h*k + alpha_2*g),
1519 tmp * (-c_L + alpha_2*c_L + 2.0*h*k*s_L - f + 2.0*g*h*k - alpha_2*f),
1520 2.0*tmp * (-h*c_L - k*s_L + f*h - g*k);
1535 #define CMD "Astro::OrbitalElements::keplerian_to_equinoctial(...): "
1541 Real const & e{kepl.
e};
1542 Real const & i{kepl.
i};
1550 Real omega_plus_Omega{omega +
static_cast<Real>(I)*Omega};
1551 equi.
f = e*std::cos(omega_plus_Omega);
1554 equi.
g = e*std::sin(omega_plus_Omega);
1557 Real tmp{std::tan(i/2.0)};
1558 if (I == Factor::RETROGRADE) {tmp = 1.0/tmp;}
1559 equi.
h = tmp*std::cos(Omega);
1560 equi.
k = tmp*std::sin(Omega);
1578 #define CMD "Astro::OrbitalElements::cartesian_to_equinoctial(...): "
1588 Real r_dot_v{r.dot(v)};
1589 Real r_norm{r.norm()};
1590 Vector3 r_unit(r.normalized());
1593 Real h_norm{hvec.norm()};
1594 Vector3 h_unit(hvec.normalized());
1596 Vector3 v_unit((r_norm*v - r_dot_v*r_unit)/h_norm);
1598 Real p{h_norm*h_norm/mu};
1600 Real k{h_unit.x()/(1.0 + h_unit.z())};
1601 Real h{-h_unit.y()/(1.0 + h_unit.z())};
1605 Real s2{1.0 + hh + kk};
1608 Vector3 ecc(v.cross(hvec)/mu - r_unit);
1610 Vector3 f_unit(1.0 - kk + hh, tkh, -2.0*k);
1611 Vector3 g_unit(tkh, 1.0 + kk - hh, 2.0*h);
1617 Real f{ecc.dot(f_unit)};
1618 Real g{ecc.dot(g_unit)};
1620 Real L{std::atan2(r_unit.y() - v_unit.x(), r_unit.x() + v_unit.y())};
1648 #define CMD "Astro::OrbitalElements::equinoctial_to_cartesian(...): "
1661 Real c_L{std::cos(L)}, s_L{std::sin(L)};
1662 Real h2{h*h}, k2{k*k}, hk{h*k};
1663 Real bf{p / ((1.0+f*c_L+g*s_L) * (1.0+h2+k2))};
1664 Real x{bf*c_L}, y{bf*s_L};
1665 Real bf1{std::sqrt(mu/p) / (1.0+h2+k2)};
1666 Real c_Lf{bf1 * (c_L+f)};
1667 Real s_Lg{bf1 * (s_L+g)};
1671 (1.0+h2-k2)*x + 2.0*
static_cast<Real>(I)*hk*y,
1672 static_cast<Real>(I)*(1.0-h2+k2)*y + 2.0*hk*x,
1673 2.0*(h*y-
static_cast<Real>(I)*k*x);
1675 static_cast<Real>(I)*2.0*hk*c_Lf - (1.0+h2-k2)*s_Lg,
1676 static_cast<Real>(I)*(1.0-h2+k2)*c_Lf - 2.0*hk*s_Lg,
1677 2.0*(h*c_Lf +
static_cast<Real>(I)*k*s_Lg);
1692 #define CMD "Astro::OrbitalElements::equinoctial_to_keplerian(...): "
#define ASTRO_ASSERT(COND, MSG)
Definition Astro.hh:43
#define ASTRO_WARNING(MSG)
Definition Astro.hh:52
#define ASTRO_ERROR(MSG)
Definition Astro.hh:32
#define ASTRO_ASSERT_WARNING(COND, MSG)
Definition Astro.hh:60
The namespace for the orbital elements definition and conversion.
Definition OrbitalElements.hh:37
Real E_to_nu(Real const E, Real const e)
Definition OrbitalElements.hh:963
Real E_to_M(Real const E, Real const e)
Definition OrbitalElements.hh:993
Real nu_to_L(Real const nu, Keplerian const &kepl, Factor const I)
Definition OrbitalElements.hh:852
Real cartesian_to_keplerian(Cartesian const &cart, Real const mu, Keplerian &kepl)
Definition OrbitalElements.hh:1367
Real L_to_nu(Real const L, Keplerian const &kepl, Factor const I)
Definition OrbitalElements.hh:1045
Real nu_to_E(Real const nu, Keplerian const &kepl)
Definition OrbitalElements.hh:838
Real M_to_lambda(Real const M, Keplerian const &kepl, Factor const I)
Definition OrbitalElements.hh:946
Real M_to_E(Real M, Real const e)
Definition OrbitalElements.hh:865
Real H_to_M(Real const H, Keplerian const &kepl)
Definition OrbitalElements.hh:1032
void equinoctial_to_keplerian(Equinoctial const &equi, Keplerian &kepl)
Definition OrbitalElements.hh:1690
Real lambda_to_M(Real const lambda, Keplerian const &kepl, Factor const I)
Definition OrbitalElements.hh:1071
Real cartesian_to_equinoctial(Cartesian const &cart, Real const mu, Equinoctial &equi)
Definition OrbitalElements.hh:1576
void keplerian_to_cartesian(Keplerian const &kepl, Real const nu, Real const mu, Cartesian &cart)
Definition OrbitalElements.hh:1434
Real lambda_to_L(Real const lambda, Real const nu, Real const M)
Definition OrbitalElements.hh:1084
void equinoctial_to_cartesian(Equinoctial const &equi, Real const L, Real const mu, Cartesian &cart)
Definition OrbitalElements.hh:1487
Real nu_to_M(Real const nu, Real const e)
Definition OrbitalElements.hh:805
Real H_to_nu(Real const H, Keplerian const &kepl)
Definition OrbitalElements.hh:1020
Real M_to_H(Real const M, Keplerian const &kepl)
Definition OrbitalElements.hh:914
Real L_to_lambda(Real const L, Real const nu, Real const M)
Definition OrbitalElements.hh:1058
void keplerian_to_equinoctial(Keplerian const &kepl, Factor const I, Equinoctial &equi)
Definition OrbitalElements.hh:1533
The namespace for the Astro library.
Definition Astro.hh:73
static Real const PI
Definition Utilities.hh:60
Eigen::Matrix< Real, 3, 3 > Matrix3
Definition Astro.hh:94
Eigen::Quaternion< Real > Quaternion
Definition Astro.hh:112
static Real const EPSILON_HIGH
Definition Astro.hh:130
int Integer
Definition Astro.hh:85
Eigen::Vector< Real, 5 > Vector5
Definition Astro.hh:97
static Vector3 const NAN_VEC3
Definition Astro.hh:152
Eigen::Matrix< Real, 3, 3 > Rotation
Definition Astro.hh:111
static Real const EPSILON_LOW
Definition Astro.hh:132
static Real const QUIET_NAN
Definition Astro.hh:134
Real AngleInRange(Real x)
Definition Utilities.hh:88
Eigen::Vector< Real, 6 > Vector6
Definition Astro.hh:99
Real Rad_To_Deg(Real x)
Definition Utilities.hh:80
static Vector4 const NAN_VEC4
Definition Astro.hh:160
Eigen::Vector< Real, 4 > Vector4
Definition Astro.hh:95
double Real
Definition Astro.hh:84
enum class Type :Integer { UNDEFINED=0, HYPERBOLIC=1, ELLIPTIC=2, CIRCULAR=3, PARABOLIC=4 } Type
Definition OrbitalElements.hh:27
enum class Factor :Integer { POSIGRADE=1, UNDEFINED=0, RETROGRADE=-1 } Factor
Definition OrbitalElements.hh:22
Eigen::Vector< Real, 3 > Vector3
Definition Astro.hh:93
static Real const PIMUL2
Definition Utilities.hh:61
static Real const EPSILON_MEDIUM
Definition Astro.hh:131
void set_H(Real const t_H, Keplerian const &kepl, Factor const I)
Set the hyperbolic anomaly .
Definition OrbitalElements.hh:1270
void info(std::ostream &os)
Definition OrbitalElements.hh:1302
bool sanity_check() const
Definition OrbitalElements.hh:1323
void set_E(Real t_E, Keplerian const &kepl, Factor const I)
Set the eccentric anomaly .
Definition OrbitalElements.hh:1200
std::string info() const
Definition OrbitalElements.hh:1286
Real H
Definition OrbitalElements.hh:1114
Real nu
Definition OrbitalElements.hh:1111
void set_lambda(Real t_lambda, Keplerian const &kepl, Factor const I)
Set the mean longitude .
Definition OrbitalElements.hh:1248
Anomaly()
Definition OrbitalElements.hh:1121
Real lambda
Definition OrbitalElements.hh:1116
void reset()
Definition OrbitalElements.hh:1307
Anomaly & operator=(Anomaly &&)=default
Anomaly & operator=(const Anomaly &)=default
void set_M(Real t_M, Keplerian const &kepl, Factor const I)
Definition OrbitalElements.hh:1173
void set_nu(Real t_nu, Keplerian const &kepl, Factor const I)
Definition OrbitalElements.hh:1151
Anomaly(Anomaly const &)=default
Real E
Definition OrbitalElements.hh:1113
Real L
Definition OrbitalElements.hh:1115
Real M
Definition OrbitalElements.hh:1112
Anomaly(Anomaly &&)=default
void set_L(Real t_L, Keplerian const &kepl, Factor const I)
Set the true longitude .
Definition OrbitalElements.hh:1224
Structure container for the cartesian orbital elements.
Definition OrbitalElements.hh:59
void info(std::ostream &os)
Definition OrbitalElements.hh:140
Cartesian(Cartesian const &)=default
Vector3 v
Definition OrbitalElements.hh:61
void reset()
Definition OrbitalElements.hh:145
Cartesian(Cartesian &&)=default
Cartesian()
Definition OrbitalElements.hh:66
Cartesian & operator=(Cartesian &&)=default
Cartesian(Vector3 const &t_r, Vector3 const &t_v)
Definition OrbitalElements.hh:73
Cartesian(Vector6 const &t_cart)
Definition OrbitalElements.hh:80
bool sanity_check() const
Definition OrbitalElements.hh:153
Vector6 vector() const
Definition OrbitalElements.hh:118
Cartesian(Real r_x, Real r_y, Real r_z, Real v_x, Real v_y, Real v_z)
Definition OrbitalElements.hh:91
Vector3 h() const
Definition OrbitalElements.hh:173
Vector3 r
Definition OrbitalElements.hh:60
std::string info() const
Definition OrbitalElements.hh:128
Cartesian & operator=(const Cartesian &)=default
Struct container for the (modified) equinoctial orbital elements.
Definition OrbitalElements.hh:439
Real Omega() const
Definition OrbitalElements.hh:651
Real h
Definition OrbitalElements.hh:443
Vector5 vector() const
Definition OrbitalElements.hh:496
Real g
Definition OrbitalElements.hh:442
bool is_singular(Real tol_i=EPSILON_LOW) const
Definition OrbitalElements.hh:577
Real a() const
Definition OrbitalElements.hh:617
Equinoctial & operator=(Equinoctial &&)=default
Equinoctial(Vector5 const &t_equi)
Definition OrbitalElements.hh:468
Real omega() const
Definition OrbitalElements.hh:639
Real p
Definition OrbitalElements.hh:440
Real u(Real L) const
Definition OrbitalElements.hh:607
Real e() const
Definition OrbitalElements.hh:623
Real f
Definition OrbitalElements.hh:441
std::string info() const
Definition OrbitalElements.hh:506
bool sanity_check() const
Definition OrbitalElements.hh:538
void reset()
Definition OrbitalElements.hh:526
Real i() const
Definition OrbitalElements.hh:629
void info(std::ostream &os)
Definition OrbitalElements.hh:521
Equinoctial(Real const t_p, Real const t_f, Real const t_g, Real const t_h, Real const t_k)
Definition OrbitalElements.hh:460
Equinoctial(Equinoctial const &)=default
Equinoctial(Equinoctial &&)=default
Equinoctial & operator=(const Equinoctial &)=default
Real k
Definition OrbitalElements.hh:444
Equinoctial()
Definition OrbitalElements.hh:450
bool is_nonsingular(Real tol_i=EPSILON_LOW) const
Definition OrbitalElements.hh:596
Structure container for the (modified) Keplerian orbital elements.
Definition OrbitalElements.hh:230
Keplerian(Keplerian const &)=default
Real i
Definition OrbitalElements.hh:233
Keplerian(Real const t_a, Real const t_e, Real const t_i, Real const t_Omega, Real const t_omega)
Definition OrbitalElements.hh:250
std::string info() const
Definition OrbitalElements.hh:298
Keplerian(Keplerian &&)=default
Real p() const
Definition OrbitalElements.hh:410
Vector5 vector() const
Definition OrbitalElements.hh:287
bool is_nonsingular(Real tol_i=EPSILON_LOW, Real tol_e=EPSILON_LOW) const
Definition OrbitalElements.hh:395
void reset()
Definition OrbitalElements.hh:318
Real omega
Definition OrbitalElements.hh:235
Keplerian(Vector5 const &t_kepl)
Definition OrbitalElements.hh:259
Keplerian & operator=(Keplerian &&)=default
Keplerian & operator=(const Keplerian &)=default
Real e
Definition OrbitalElements.hh:232
Real Omega
Definition OrbitalElements.hh:234
void info(std::ostream &os)
Definition OrbitalElements.hh:313
Real a
Definition OrbitalElements.hh:231
bool sanity_check() const
Definition OrbitalElements.hh:333
Real u() const
Definition OrbitalElements.hh:404
Keplerian()
Definition OrbitalElements.hh:240
bool is_singular(Real tol_i=EPSILON_LOW, Real tol_e=EPSILON_LOW) const
Definition OrbitalElements.hh:370
Quaternionic()
Definition OrbitalElements.hh:682
Quaternionic(Quaternion const &t_q)
Definition OrbitalElements.hh:688
void reset()
Definition OrbitalElements.hh:771
Quaternionic(Quaternionic &&)=default
Vector4 vector() const
Definition OrbitalElements.hh:724
Quaternion q
Definition OrbitalElements.hh:677
Quaternionic & operator=(const Quaternionic &)=default
std::string info() const
Definition OrbitalElements.hh:752
bool sanity_check() const
Definition OrbitalElements.hh:777
Quaternionic & operator=(Quaternionic &&)=default
void info(std::ostream &os)
Definition OrbitalElements.hh:766
Quaternionic(Real const t_q_1, Real const t_q_2, Real const t_q_3, Real const t_q_4)
Definition OrbitalElements.hh:697
Rotation rotation() const
Definition OrbitalElements.hh:734
Quaternionic(Quaternionic const &)=default