Astro
0.0.0
A C++ library for space dynamics
|
The namespace for the orbital elements definition and conversion.
Classes | |
struct | Anomaly |
Structure container for the orbital anomalies. More... | |
struct | Cartesian |
Structure container for the cartesian orbital elements. More... | |
struct | Equinoctial |
Struct container for the (modified) equinoctial orbital elements. More... | |
struct | Keplerian |
Structure container for the (modified) Keplerian orbital elements. More... | |
struct | Quaternionic |
Structure container for the quaternionic orbital elements. More... | |
void Astro::OrbitalElements::cartesian_to_keplerian | ( | Cartesian const & | cart, |
Real | mu, | ||
Keplerian & | kepl ) |
Convert the cartesian state (position and velocity) vectors to the keplerian orbital elements.
[in] | cart | The cartesian state (position and velocity) vectors. |
[in] | mu | The gravitational parameter. |
[out] | kepl | The keplerian orbital elements. |
Compute the mean anomaly \( M \) from the eccentric anomaly \( E \) as
\[ M = E - e\sin(E) \text{.} \]
[in] | E | The eccentric anomaly \( E \). |
[in] | kepl | The keplerian orbital elements. |
Compute the true anomaly \( \nu \) from the eccentric anomaly \( E \) as
\[ \tan\left(\frac{\nu - E}{2}\right) = \displaystyle\frac{\sin(E)}{\beta - \cos(E)} \text{,} \]
with \( \beta = \displaystyle\frac{1 + \sqrt{1 - e^2}}{e} \). That is equivalent to
\[ \nu = E + 2\arctan\left(\frac{\sin(E)}{\beta - \cos(E)}\right) \text{.} \]
[in] | E | The eccentric anomaly \( E \). |
[in] | kepl | The keplerian orbital elements. |
void Astro::OrbitalElements::equinoctial_to_cartesian | ( | Equinoctial const & | equi, |
Anomaly const & | anom, | ||
Factor | I, | ||
Real | mu, | ||
Cartesian & | cart ) |
Convert the equinoctial orbital elements to cartesian state (position and velocity) vectors.
[in] | equi | The equinoctial orbital elements. |
[in] | anom | The orbital anomalies. |
[in] | I | The posigrade (+1)/retrograde (-1) factor. |
[in] | mu | The gravitational parameter. |
[out] | cart | The cartesian state (position and velocity) vectors. |
void Astro::OrbitalElements::equinoctial_to_cartesian | ( | Equinoctial const & | equi, |
Anomaly const & | anom, | ||
Real | mu, | ||
Cartesian & | cart ) |
Convert the equinoctial orbital elements to the cartesian state (position and velocity) vectors.
[in] | equi | The equinoctial orbital elements. |
[in] | anom | The orbital anomalies. |
[in] | mu | The gravitational parameter. |
[out] | cart | The cartesian state (position and velocity) vectors. |
void Astro::OrbitalElements::equinoctial_to_keplerian | ( | Equinoctial const & | equi, |
Keplerian & | kepl ) |
Convert the equinoctial orbital elements to the keplerian orbital elements.
[in] | equi | The equinoctial orbital elements. |
[in] | I | The posigrade (+1)/retrograde (-1) factor. |
[out] | kepl | The keplerian orbital elements. |
Compute the mean anomaly \( M \) from the hyperbolic anomaly \( H \) as
\[ M = e\sinh(H) - H \text{.} \]
[in] | H | The hyperbolic anomaly \( H \). |
[in] | kepl | The keplerian orbital elements. |
Compute the true anomaly \( \nu \) from the hyperbolic anomaly \( H \) as
\[ \nu = 2\arctan\left(\sqrt{\frac{e + 1}{e - 1}}\tanh\left(\frac{H}{2}\right)\right) \text{.} \]
[in] | H | The hyperbolic anomaly \( H \). |
[in] | kepl | The keplerian orbital elements. |
void Astro::OrbitalElements::keplerian_to_cartesian | ( | Keplerian const & | kepl, |
Anomaly const & | anom, | ||
Real | mu, | ||
Cartesian & | cart ) |
Convert the keplerian orbital elements to the cartesian state (position and velocity) vectors.
[in] | kepl | The keplerian orbital elements. |
[in] | anom | The orbital anomalies. |
[in] | mu | The gravitational parameter. |
[out] | cart | The cartesian state (position and velocity) vectors. |
void Astro::OrbitalElements::keplerian_to_equinoctial | ( | Keplerian const & | kepl, |
Factor | I, | ||
Equinoctial & | equi ) |
Convert the keplerian orbital elements to the equinoctial orbital elements.
[in] | kepl | The keplerian orbital elements. |
[in] | I | The posigrade (+1)/retrograde (-1) factor. |
[out] | equi | The equinoctial orbital elements. |
Compute the mean longitude \( \lambda \) from the true longitude \( L \) as
\[ \lambda = L - \nu + M \text{.} \]
[in] | L | The true longitude \( L \). |
[in] | nu | The true anomaly \( \nu \). |
[in] | M | The mean anomaly \( M \). |
Compute the true anomaly \( \nu \) from the true longitude \( L \) as
\[ \nu = L - \omega - I\Omega \text{.} \]
[in] | L | The true longitude \( L \). |
[in] | kepl | The keplerian orbital elements. |
[in] | I | The posigrade (+1)/retrograde (-1) factor. |
Compute the true longitude \( L \) from the mean longitude \( \lambda \) as
\[ L = \lambda + \nu - M \text{.} \]
[in] | lambda | The mean longitude \( \lambda \). |
[in] | nu | The true anomaly \( \nu \). |
[in] | M | The mean anomaly \( M \). |
Compute the mean anomaly \( M \) from the mean longitude \( \lambda \) as
\[ M = \lambda - \omega - I\Omega \text{.} \]
[in] | lambda | The mean longitude \( \lambda \). |
[in] | kepl | The keplerian orbital elements. |
[in] | I | The posigrade (+1)/retrograde (-1) factor. |
Compute the eccentric anomaly \( E \) from the mean anomaly \( M \) through a the solution of the nonlinear equation \( E = M + e\sin(E) \) for \( E \). The solution is found through a basic Newton method.
[in] | M | The mean anomaly \( M \). |
[in] | kepl | The keplerian orbital elements. |
Compute the mean anomaly \( M \) from the mean anomaly \( M \) as \( M = e\sinh(H) - H \text{.} \). The solution is found through a basic Newton method.
[in] | M | The mean anomaly \( M \). |
[in] | kepl | The keplerian orbital elements. |
Compute the mean longitude \( \lambda \) from the mean anomaly \( M \) as
\[ \lambda = M + \omega + I\Omega \text{.} \]
[in] | M | The mean anomaly \( M \). |
[in] | kepl | The keplerian orbital elements. |
[in] | I | The posigrade (+1)/retrograde (-1) factor. |
Compute the true anomaly \( \nu \) from the eccentric anomaly \( E \) as
\[ \tan\left(\frac{\nu - E}{2}\right) = \displaystyle\frac{\sin(\nu)}{\beta + \cos(\nu)} \text{,} \]
with \( \beta = \displaystyle\frac{1 + \sqrt{1 - e^2}}{e} \). That is equivalent to
\[ E = \nu - 2\arctan\left(\frac{\sin(\nu)}{\beta + \cos(\nu)}\right) \text{.} \]
[in] | nu | The true anomaly \( \nu \). |
[in] | kepl | The keplerian orbital elements. |
Compute the true longitude \( L \) from the true anomaly \( \nu \) as
\[ L = \nu + \omega + I\Omega \text{.} \]
[in] | nu | The true anomaly \( \nu \). |
[in] | kepl | The keplerian orbital elements. |
[in] | I | The posigrade (+1)/retrograde (-1) factor. |
Compute the mean anomaly \( M \) from the eccentric anomaly \( E \) as
\[ M = \nu - 2\arctan\left(\frac{\sin(\nu)}{\beta + \cos(\nu)}\right) - \displaystyle\frac{e\sqrt{1 - e^2}\sin(\nu)}{1 + e\cos(\nu)} \text{,} \]
with \( \beta = \displaystyle\frac{1 + \sqrt{1 - e^2}}{e} \). That is equivalent to
[in] | nu | The true anomaly \( \nu \). |
[in] | kepl | The keplerian orbital elements. |