Astro  0.0.0
A C++ library for space dynamics
Loading...
Searching...
No Matches
Astro::Body Class Reference

Astronomical body class container. More...

#include <Body.hxx>

Inherits Astro::Orbit.

Public Member Functions

 Body ()
 
 Body (Body const &)=default
 
 Body (Body &&)=default
 
Bodyoperator= (const Body &)=default
 
Bodyoperator= (Body &&)=default
 
Real mass () const
 
void mass (Real t_mass)
 
MatrixA equinoctial_eom_A () const
 
VectorB equinoctial_eom_b () const
 
Vector6 cartesian_eom (Vector3 const &thrust_rtn) const
 
Vector6 cartesian_eom (Real thrust_rad, Real thrust_tan, Real thrust_nor) const
 
Vector6 equinoctial_eom (Vector3 const &thrust) const
 
Vector6 equinoctial_eom (Real thrust_rad, Real thrust_tan, Real thrust_nor) const
 
- Public Member Functions inherited from Astro::Orbit
 Orbit ()
 
 Orbit (Orbit const &)=default
 
 Orbit (Orbit &&)=default
 
Orbitoperator= (const Orbit &)=default
 
Orbitoperator= (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
 

Private Types

using MatrixA = Eigen::Matrix<Real, 6, 3>
 
using VectorB = Eigen::Vector<Real, 6>
 

Private Attributes

Real m_mass {QUIET_NAN}
 

Additional Inherited Members

- Protected Attributes inherited from Astro::Orbit
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}
 

Detailed Description

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.

Member Typedef Documentation

◆ MatrixA

using Astro::Body::MatrixA = Eigen::Matrix<Real, 6, 3>
private

Matrix \( \mathbf{A} \in \mathbb{R}^{6 \times 3}\).

◆ VectorB

using Astro::Body::VectorB = Eigen::Vector<Real, 6>
private

Vector \( \mathbf{b} \in \mathbb{R}^{6 \times 1}\).

Constructor & Destructor Documentation

◆ Body() [1/3]

Astro::Body::Body ( )
inline

Class constructor for the astronomical body object.

◆ Body() [2/3]

Astro::Body::Body ( Body const & )
default

Enable the default astronomical body copy constructor.

◆ Body() [3/3]

Astro::Body::Body ( Body && )
default

Enable the default astronomical body move constructor.

Member Function Documentation

◆ cartesian_eom() [1/2]

Vector6 Astro::Body::cartesian_eom ( Real thrust_rad,
Real thrust_tan,
Real thrust_nor ) const
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 \).

Parameters
[in]thrust_radThe radial thrust component.
[in]thrust_tanThe tangential thrust component.
[in]thrust_norThe normal thrust component.
Returns
The vector of the first-order cartesian equations of orbital motion.

◆ cartesian_eom() [2/2]

Vector6 Astro::Body::cartesian_eom ( Vector3 const & thrust_rtn) const
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 \).

Parameters
[in]thrust_rtnThe thrust components vector.
Returns
The vector of the first-order cartesian equations of orbital motion.

◆ equinoctial_eom() [1/2]

Vector6 Astro::Body::equinoctial_eom ( Real thrust_rad,
Real thrust_tan,
Real thrust_nor ) const
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 \).

Parameters
[in]thrust_radThe radial component of the thrust.
[in]thrust_tanThe tangential component of the thrust.
[in]thrust_norThe normal component of the thrust.
Returns
The system of first-order modified equinoctial equations of orbital motion.

◆ equinoctial_eom() [2/2]

Vector6 Astro::Body::equinoctial_eom ( Vector3 const & thrust) const
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 \).

Parameters
[in]thrustThe components (radial, tangential, normal) of the thrust.
Returns
The system of first-order modified equinoctial equations of orbital motion.

◆ equinoctial_eom_A()

MatrixA Astro::Body::equinoctial_eom_A ( ) const
inline

Compute the matrix of the first-order modified equinoctial equations of orbital motion as

\[ A = \begin{bmatrix} 0 & 2\sqrt{\displaystyle\frac{p}{\mu}} & 0 \\ \sqrt{p}\sin(L) & \sqrt{\displaystyle\frac{p}{\mu}}\left[(w+1)\cos(L)+f\right] & -\sqrt{\displaystyle\frac{p}{\mu}}(h\sin(L)-k\cos(L)) \\ -\sqrt{p}\cos(L) & \sqrt{\displaystyle\frac{p}{\mu}}\left[(w+1)\sin(L)+g\right] & \sqrt{\displaystyle\frac{p}{\mu}}(h\cos(L)+k\sin(L)) \\ 0 & 0 & \displaystyle\frac{\sqrt{p}}{2}\displaystyle\frac{s^2\cos(L)}{2} \\ 0 & 0 & \displaystyle\frac{\sqrt{p}}{2}\displaystyle\frac{s^2\sin(L)}{2} \\ 0 & 0 & \displaystyle\frac{\sqrt{p}}{2}(h\sin(L)-k\cos(L)) \end{bmatrix} \text{.} \]

Returns
The matrix \( \mathbf{A} \).

◆ equinoctial_eom_b()

VectorB Astro::Body::equinoctial_eom_b ( ) const
inline

Compute the vector of the first-order modified equinoctial equations of orbital motion as

\[ \mathbf{b} = \left[0, 0, 0, 0, 0, \sqrt{\mu p} \left(\displaystyle\frac{w}{p}\right)^2 \right]^\top \text{.} \]

Returns
The vector \( \mathbf{b} \).

◆ mass() [1/2]

Real Astro::Body::mass ( ) const
inline

Get the mass of the astronomical body.

Returns
The mass of the astronomical body.

◆ mass() [2/2]

void Astro::Body::mass ( Real t_mass)
inline

Set the mass of the astronomical body.

Parameters
[in]t_massThe mass of

◆ operator=() [1/2]

Body & Astro::Body::operator= ( Body && )
default

Enable the default astronomical body move assignment operator.

◆ operator=() [2/2]

Body & Astro::Body::operator= ( const Body & )
default

Enable the default astronomical body assignment operator.

Member Data Documentation

◆ m_mass

Real Astro::Body::m_mass {QUIET_NAN}
private

Mass of the astronomical body.


The documentation for this class was generated from the following file: