Astro
0.0.0
A C++ library for space dynamics
|
Astronomical body class container. More...
#include <Body.hh>
Public Types | |
using | Anomaly = OrbitalElements::Anomaly |
Public Member Functions | |
Body () | |
Body (std::string const &t_name, Real const t_mass, Real const t_radius=0.0) | |
Body (Body const &)=default | |
Body (Body &&)=default | |
Body & | operator= (const Body &)=default |
Body & | operator= (Body &&)=default |
std::string | name () const |
void | name (std::string const &t_name) |
Orbit const & | orbit () const |
Orbit & | set_orbit () |
Anomaly const & | epoch_anomaly () const |
Anomaly & | set_epoch_anomaly () |
void | set_epoch_anomaly (Anomaly const &t_epoch_anomaly) |
Anomaly | anomaly (Real const t) const |
Real | epoch () const |
void | set_epoch (Real const t_epoch) |
Real | mass () const |
void | mass (Real const t_mass) |
Real | radius () const |
void | radius (Real const t_radius) |
Vector6 | cartesian_state () const |
Vector6 | cartesian_state (Real const t) const |
Vector3 | cartesian_position (Real const t) const |
Vector3 | cartesian_velocity (Real const t) const |
void | set_cartesian_state (Vector6 const &cart) |
Vector6 | keplerian_state (Real const t) const |
void | set_keplerian_state (Vector6 const &state) |
Vector6 | equinoctial_state (Real const t) const |
void | set_equinoctial_state (Vector6 const &state) |
template<typename T> | |
Eigen::Matrix< T, 6, 1 > | cartesian_eom (Eigen::Matrix< T, 6, 1 > const &x, Eigen::Matrix< T, 3, 1 > const &thrust_rtn) const |
Vector6 | keplerian_eom (Vector6 const &x, Vector3 const &thrust) const |
Vector6 | equinoctial_eom (Vector6 const &x, Vector3 const &thrust) const |
Vector6 | equinoctial_eom (Vector6 const &x, Real thrust_rad, Real thrust_tan, Real thrust_nor) const |
template<Coordinates IntCoords, Coordinates OutCoords = Coordinates::CARTESIAN, Integer S> | |
bool | integrate (Sandals::RungeKutta< Real, S, 6, 0 > &rk, VectorX const &t_mesh, Vector6 const &ics, Sandals::Solution< Real, 6, 0 > &sol, bool const adaptive=false) |
Private Attributes | |
std::string | m_name {"(undefined)"} |
Real | m_epoch {0.0} |
Anomaly | m_epoch_anom |
Orbit | m_orbit |
Real | m_radius {QUIET_NAN} |
Real | m_mass {QUIET_NAN} |
The astronomical body class container is used to model the properties of an astronomical body in space. The class provides methods for setting and getting the mass of the body, as well as its orbit parameters.
|
inline |
Class constructor for the astronomical body object.
|
inline |
Class constructor for the astronomical body object with a given mass.
[in] | t_mass | The mass of the astronomical body. |
|
default |
Enable the default astronomical body copy constructor.
|
default |
Enable the default astronomical body move constructor.
Compute the anomalies at a given time.
[in] | t | The time \( t \). |
|
inline |
Compute the vector of the first-order cartesian equations of orbital motion given the thrust vector components \( \mathbf{t} = [t_{\text{rad}}, t_{\text{tan}}, t_{\text{nor}}]^\top \).
[in] | x | The cartesian state vector \( \mathbf{x} = [r_x, r_y, r_z, v_x, v_y, v_z]^\top \). |
[in] | thrust_rtn | The thrust components vector. |
Get the cartesian position vector of the astronomical body.
[in] | t | The time \( t \). |
|
inline |
Get the cartesian state vector of the astronomical body.
Get the cartesian state vector of the astronomical body.
[in] | t | The time \( t \). |
Get the cartesian velocity vector of the astronomical body.
[in] | t | The time \( t \). |
|
inline |
Get the epoch of the orbital elements (in days).
|
inline |
Get the orbital anomalies at the epoch.
|
inline |
Compute the system of first-order modified equinoctial equations of orbital motion given the thrust vector components \( \mathbf{t} = [t_{\text{rad}}, t_{\text{tan}}, t_{\text{nor}}]^\top \).
[in] | x | The modified equinoctial state vector \( \mathbf{x} = [p, f, g, h, k, L]^\top \). |
[in] | thrust_rad | The radial component of the thrust. |
[in] | thrust_tan | The tangential component of the thrust. |
[in] | thrust_nor | The normal component of the thrust. |
Compute the system of first-order modified equinoctial equations of orbital motion given the thrust vector components \( \mathbf{t} = [t_{\text{rad}}, t_{\text{tan}}, t_{\text{nor}}]^\top \).
[in] | x | The modified equinoctial state vector \( \mathbf{x} = [p, f, g, h, k, L]^\top \). |
[in] | thrust | The components (radial, tangential, normal) of the thrust. |
Get the equinoctial state vector of the astronomical body.
[in] | t | The time \( t \). |
|
inline |
Integrate the equations of motion using the Runge-Kutta method.
[in] | rk | The Runge-Kutta integrator. |
[in] | t_mesh | The time mesh for the integration. |
[in] | ics | The initial conditions for the integration (initial modified equinoctial state). |
[out] | sol | The solution object to store the results of the integration. |
S | The stages of the Runge-Kutta method. |
IntCoords | The coordinate system for the integration. |
OutCoords | The coordinate system for the output of the integration. |
Compute the vector of the first-order keplerian equations of orbital motion given the thrust vector components \( \mathbf{t} = [t_{\text{rad}}, t_{\text{tan}}, t_{\text{nor}}]^\top \).
[in] | x | The keplerian state vector \( \mathbf{x} = [a, e, i, \Omega, \omega, M]^\top \). |
[in] | thrust | The components (radial, tangential, normal) of the thrust. |
Get the keplerian state vector of the astronomical body at time \( t \).
[in] | t | The time \( t \). |
|
inline |
Get the mass of the astronomical body.
|
inline |
Set the mass of the astronomical body.
[in] | t_mass | The mass of |
|
inline |
Get the name of the astronomical body.
|
inline |
Set the name of the astronomical body.
[in] | t_name | The name of the astronomical body. |
Enable the default astronomical body move assignment operator.
Enable the default astronomical body assignment operator.
|
inline |
Get the orbit parameters of the astronomical body.
|
inline |
Get the radius of the astronomical body.
|
inline |
Set the radius of the astronomical body.
[in] | t_radius | The radius of the astronomical body. |
|
inline |
Set the cartesian state vector of the astronomical body.
[in] | cart | The cartesian state vector of the astronomical body. |
|
inline |
Set the epoch of the orbital elements (in days).
[in] | t_epoch | The epoch of the orbital elements (in days). |
|
inline |
Set the orbital anomalies at the epoch.
|
inline |
Set the orbital anomalies at the epoch.
[in] | t_epoch_anomaly | The orbital anomalies at the epoch. |
|
inline |
Set the equinoctial state vector of the astronomical body.
[in] | state | The equinoctial state vector of the astronomical body. |
|
inline |
Set the keplerian state vector of the astronomical body.
[in] | state | The keplerian state vector of the astronomical body. |
|
inline |
Set the orbit parameters of the astronomical body.
|
private |
Epoch of the orbital elements (in days).
|
private |
Orbital anomalies at the epoch.
|
private |
Name of the astronomical body.