Astro
0.0.0
A C++ library for space dynamics
|
Orbit class container. More...
#include <Orbit.hxx>
Inherited by Astro::Body.
Public Member Functions | |
Orbit () | |
Orbit (Orbit const &)=default | |
Orbit (Orbit &&)=default | |
Orbit & | operator= (const Orbit &)=default |
Orbit & | operator= (Orbit &&)=default |
Cartesian const & | cartesian () const |
void | set_cartesian (Real r_x, Real r_y, Real r_z, Real v_x, Real v_y, Real v_z) |
void | cartesian (Vector3 const &t_r, Vector3 const &t_v) |
void | cartesian (Cartesian const &t_cart) |
Keplerian const & | keplerian () const |
void | keplerian (Real t_a, Real t_e, Real t_i, Real t_Omega, Real t_omega) |
void | keplerian (Keplerian const &t_kepl) |
Equinoctial const & | equinoctial () const |
void | set_equinoctial (Real t_p, Real t_f, Real t_g, Real t_h, Real t_k) |
void | set_equinoctial (Equinoctial const &t_equi) |
Quaternionic const & | quaternionic () const |
void | set_quaternionic (Real t_q_1, Real t_q_2, Real t_q_3, Real t_q_4) |
void | set_quaternionic (Quaternion const &t_quat) |
Anomaly const & | anomaly () const |
void | anomaly (Anomaly const &t_anom) |
Type | type () const |
void | type (Real e) |
Factor | factor () const |
void | factor (Factor t_factor) |
Real | mu () const |
void | mu (Real t_mu) |
std::string | info () const |
void | info (std::ostream &os) |
void | reset () |
Rotation | keplerian_to_reference () const |
Rotation | equinoctial_to_reference () const |
Rotation | cartesian_to_frenet_rtn () const |
Rotation | equinoctial_to_frenet_rtn () const |
Vector3 | cartesian_rtn_to_xyz (Vector3 const &vec) const |
Vector3 | equinoctial_rtn_to_xyz (Vector3 const &vec) const |
Vector3 | cartesian_xyz_to_rtn (Vector3 const &vec) const |
Vector3 | equinoctial_xyz_to_rtn (Vector3 const &vec) const |
Protected Attributes | |
Cartesian | m_cart |
Keplerian | m_kepl |
Equinoctial | m_equi |
Quaternionic | m_quat |
Anomaly | m_anom |
Type | m_type {Type::UNDEFINED} |
Factor | m_factor {Factor::UNDEFINED} |
Real | m_mu {QUIET_NAN} |
Private Types | |
using | Cartesian = OrbitalElements::Cartesian |
using | Keplerian = OrbitalElements::Keplerian |
using | Equinoctial = OrbitalElements::Equinoctial |
using | Quaternionic = OrbitalElements::Quaternionic |
using | Anomaly = OrbitalElements::Anomaly |
The Orbit class container is used to store the orbital elements of an object in space. The class provides methods for setting and getting the orbital elements in various representations, such as cartesian, keplerian, equinoctial, and quaternionic. The class also provides methods for converting between these representations.
|
private |
|
private |
|
private |
|
private |
|
private |
|
inline |
Class constructor for the astro object.
|
default |
Enable the default astro copy constructor.
|
default |
Enable the default astro move constructor.
|
inline |
Get the orbital anomalies.
|
inline |
Set the orbital anomalies.
[in] | t_anom | The orbital anomalies. |
|
inline |
Get the cartesian orbital elements.
|
inline |
Set the cartesian orbital elements.
[in] | t_cart | The cartesian orbital elements. |
Set the cartesian orbital elements.
[in] | t_r | The position vector \( \mathbf{r} \). |
[in] | t_v | The velocity vector \( \mathbf{v} \). |
Transform a vector in the Frent-Serret frame of the orbit (radial, tangential, normal) to a vector in the cartesian frame through the cartesian orbital elements.
[in] | vec | The vector in Frenet-Serret frame. |
|
inline |
Compute the Frenet-Serret frame of the orbit (radial, tangential, normal) through the cartesian orbital elements.
Transform a vector in the cartesian frame to a vector in the Frent-Serret frame of the orbit (radial, tangential, normal) through the cartesian orbital elements.
[in] | vec | The vector in the cartesian frame. |
|
inline |
Get the equinoctial orbital elements.
Transform a vector in the Frent-Serret frame of the orbit (radial, tangential, normal) to a vector in the cartesian frame through the equinoctial orbital elements.
[in] | vec | The vector in Frenet-Serret frame. |
|
inline |
Compute the Frenet-Serret frame of the orbit (radial, tangential, normal) through the equinoctial orbital elements.
|
inline |
Compute the rotation matrix of the orbital plane through the equinoctial orbital elements.
Transform a vector in the cartesian frame to a vector in the Frent-Serret frame of the orbit (radial, tangential, normal) through the equinoctial orbital elements.
[in] | vec | The vector in the cartesian frame. |
|
inline |
Get the posigrade (+1)/retrograde (-1) factor \( I \).
|
inline |
Set the posigrade (+1)/retrograde (-1) factor \( I \).
[in] | t_factor | The posigrade (+1)/retrograde (-1) factor \( I \). |
|
inline |
Print the orbit information on a string.
|
inline |
Print the orbit information on a stream.
[in,out] | os | Output stream. |
|
inline |
Get the keplerian orbital elements.
|
inline |
Set the keplerian orbital elements.
[in] | t_kepl | The keplerian orbital elements. |
Set the keplerian orbital elements.
[in] | t_a | The semi-major axis \( a \). |
[in] | t_e | The eccentricity \( e \). |
[in] | t_i | The inclination \( i \). |
[in] | t_Omega | The longitude of the ascending node \( \Omega \). |
[in] | t_omega | The argument of periapsis \( \omega \). |
|
inline |
Compute the rotation matrix of the orbital plane through the keplerian orbital elements.
|
inline |
Get the gravitational constant of the central body.
|
inline |
Set the gravitational constant of the central body.
[in] | t_mu | The gravitational constant of the central body. |
Enable the default astro assignment operator.
Enable the default astro move assignment operator.
|
inline |
Get the quaternionic orbital elements.
|
inline |
Reset the orbit parameters to undefined values.
|
inline |
Set the cartesian orbital elements.
[in] | r_x | Position vector \( x \)-axis component. |
[in] | r_y | Position vector \( y \)-axis component. |
[in] | r_z | Position vector \( z \)-axis component. |
[in] | v_x | Velocity vector \( x \)-axis component. |
[in] | v_y | Velocity vector \( y \)-axis component. |
[in] | v_z | Velocity vector \( z \)-axis component. |
|
inline |
Set the equinoctial orbital elements.
[in] | t_equi | The equinoctial orbital elements. |
Set the (modified) equinoctial orbit parameters.
[in] | t_p | The semi-latus rectum \( p \). |
[in] | t_f | The \( x \)-axis component of the eccentricity vector in the orbital frame. |
[in] | t_g | The \( y \)-axis component of the eccentricity vector in the orbital frame. |
[in] | t_h | The \( x \)-axis component of the node vector in the orbital frame. |
[in] | t_k | The \( y \)-axis component of the node vector in the orbital frame. |
|
inline |
Set the quaternionic orbital elements.
[in] | t_quat | The quaternion vector. |
Set the quaternionic orbital elements.
[in] | t_q_1 | The first quaternionic orbit parameter. |
[in] | t_q_2 | The second quaternionic orbit parameter. |
[in] | t_q_3 | The third quaternionic orbit parameter. |
[in] | t_q_4 | The fourth quaternionic orbit parameter. |
|
inline |
Get the type of the orbit.
|
inline |
Set the type of the orbit.
[in] | e | The eccentricity of the orbit. |
|
protected |
Equinoctial orbit parameters.
|
protected |
Orbit posigrade (+1)/retrograde (-1) factor.
|
protected |
Quaternionic orbit parameters.