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

Orbit class container. More...

#include <Orbit.hxx>

Inherited by Astro::Body.

Public Member Functions

 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
 

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
 

Detailed Description

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.

Member Typedef Documentation

◆ Anomaly

◆ Cartesian

◆ Equinoctial

◆ Keplerian

◆ Quaternionic

Constructor & Destructor Documentation

◆ Orbit() [1/3]

Astro::Orbit::Orbit ( )
inline

Class constructor for the astro object.

◆ Orbit() [2/3]

Astro::Orbit::Orbit ( Orbit const & )
default

Enable the default astro copy constructor.

◆ Orbit() [3/3]

Astro::Orbit::Orbit ( Orbit && )
default

Enable the default astro move constructor.

Member Function Documentation

◆ anomaly() [1/2]

Anomaly const & Astro::Orbit::anomaly ( ) const
inline

Get the orbital anomalies.

Returns
The orbital anomalies.

◆ anomaly() [2/2]

void Astro::Orbit::anomaly ( Anomaly const & t_anom)
inline

Set the orbital anomalies.

Parameters
[in]t_anomThe orbital anomalies.

◆ cartesian() [1/3]

Cartesian const & Astro::Orbit::cartesian ( ) const
inline

Get the cartesian orbital elements.

Returns
The cartesian orbital elements.

◆ cartesian() [2/3]

void Astro::Orbit::cartesian ( Cartesian const & t_cart)
inline

Set the cartesian orbital elements.

Parameters
[in]t_cartThe cartesian orbital elements.

◆ cartesian() [3/3]

void Astro::Orbit::cartesian ( Vector3 const & t_r,
Vector3 const & t_v )
inline

Set the cartesian orbital elements.

Parameters
[in]t_rThe position vector \( \mathbf{r} \).
[in]t_vThe velocity vector \( \mathbf{v} \).

◆ cartesian_rtn_to_xyz()

Vector3 Astro::Orbit::cartesian_rtn_to_xyz ( Vector3 const & vec) const
inline

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.

Parameters
[in]vecThe vector in Frenet-Serret frame.
Returns
The vector in the cartesian frame.

◆ cartesian_to_frenet_rtn()

Rotation Astro::Orbit::cartesian_to_frenet_rtn ( ) const
inline

Compute the Frenet-Serret frame of the orbit (radial, tangential, normal) through the cartesian orbital elements.

Returns
The Frenet-Serret frame of the orbit.

◆ cartesian_xyz_to_rtn()

Vector3 Astro::Orbit::cartesian_xyz_to_rtn ( Vector3 const & vec) const
inline

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.

Parameters
[in]vecThe vector in the cartesian frame.
Returns
The vector in the Frenet-Serret frame.

◆ equinoctial()

Equinoctial const & Astro::Orbit::equinoctial ( ) const
inline

Get the equinoctial orbital elements.

Returns
The equinoctial orbital elements.

◆ equinoctial_rtn_to_xyz()

Vector3 Astro::Orbit::equinoctial_rtn_to_xyz ( Vector3 const & vec) const
inline

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.

Parameters
[in]vecThe vector in Frenet-Serret frame.
Returns
The vector in the cartesian frame.

◆ equinoctial_to_frenet_rtn()

Rotation Astro::Orbit::equinoctial_to_frenet_rtn ( ) const
inline

Compute the Frenet-Serret frame of the orbit (radial, tangential, normal) through the equinoctial orbital elements.

Returns
The Frenet-Serret frame of the orbit.

◆ equinoctial_to_reference()

Rotation Astro::Orbit::equinoctial_to_reference ( ) const
inline

Compute the rotation matrix of the orbital plane through the equinoctial orbital elements.

Returns
The rotation matrix of the orbital plane.

◆ equinoctial_xyz_to_rtn()

Vector3 Astro::Orbit::equinoctial_xyz_to_rtn ( Vector3 const & vec) const
inline

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.

Parameters
[in]vecThe vector in the cartesian frame.
Returns
The vector in the Frenet-Serret frame.

◆ factor() [1/2]

Factor Astro::Orbit::factor ( ) const
inline

Get the posigrade (+1)/retrograde (-1) factor \( I \).

Returns
The posigrade (+1)/retrograde (-1) factor \( I \).

◆ factor() [2/2]

void Astro::Orbit::factor ( Factor t_factor)
inline

Set the posigrade (+1)/retrograde (-1) factor \( I \).

Parameters
[in]t_factorThe posigrade (+1)/retrograde (-1) factor \( I \).

◆ info() [1/2]

std::string Astro::Orbit::info ( ) const
inline

Print the orbit information on a string.

Returns
The orbit information string.

◆ info() [2/2]

void Astro::Orbit::info ( std::ostream & os)
inline

Print the orbit information on a stream.

Parameters
[in,out]osOutput stream.

◆ keplerian() [1/3]

Keplerian const & Astro::Orbit::keplerian ( ) const
inline

Get the keplerian orbital elements.

Returns
The keplerian orbital elements.

◆ keplerian() [2/3]

void Astro::Orbit::keplerian ( Keplerian const & t_kepl)
inline

Set the keplerian orbital elements.

Parameters
[in]t_keplThe keplerian orbital elements.

◆ keplerian() [3/3]

void Astro::Orbit::keplerian ( Real t_a,
Real t_e,
Real t_i,
Real t_Omega,
Real t_omega )
inline

Set the keplerian orbital elements.

Parameters
[in]t_aThe semi-major axis \( a \).
[in]t_eThe eccentricity \( e \).
[in]t_iThe inclination \( i \).
[in]t_OmegaThe longitude of the ascending node \( \Omega \).
[in]t_omegaThe argument of periapsis \( \omega \).

◆ keplerian_to_reference()

Rotation Astro::Orbit::keplerian_to_reference ( ) const
inline

Compute the rotation matrix of the orbital plane through the keplerian orbital elements.

Returns
The rotation matrix of the orbital plane.

◆ mu() [1/2]

Real Astro::Orbit::mu ( ) const
inline

Get the gravitational constant of the central body.

Returns
The gravitational constant of the central body.

◆ mu() [2/2]

void Astro::Orbit::mu ( Real t_mu)
inline

Set the gravitational constant of the central body.

Parameters
[in]t_muThe gravitational constant of the central body.

◆ operator=() [1/2]

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

Enable the default astro assignment operator.

◆ operator=() [2/2]

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

Enable the default astro move assignment operator.

◆ quaternionic()

Quaternionic const & Astro::Orbit::quaternionic ( ) const
inline

Get the quaternionic orbital elements.

Returns
The quaternionic orbital elements.

◆ reset()

void Astro::Orbit::reset ( )
inline

Reset the orbit parameters to undefined values.

◆ set_cartesian()

void Astro::Orbit::set_cartesian ( Real r_x,
Real r_y,
Real r_z,
Real v_x,
Real v_y,
Real v_z )
inline

Set the cartesian orbital elements.

Parameters
[in]r_xPosition vector \( x \)-axis component.
[in]r_yPosition vector \( y \)-axis component.
[in]r_zPosition vector \( z \)-axis component.
[in]v_xVelocity vector \( x \)-axis component.
[in]v_yVelocity vector \( y \)-axis component.
[in]v_zVelocity vector \( z \)-axis component.

◆ set_equinoctial() [1/2]

void Astro::Orbit::set_equinoctial ( Equinoctial const & t_equi)
inline

Set the equinoctial orbital elements.

Parameters
[in]t_equiThe equinoctial orbital elements.

◆ set_equinoctial() [2/2]

void Astro::Orbit::set_equinoctial ( Real t_p,
Real t_f,
Real t_g,
Real t_h,
Real t_k )
inline

Set the (modified) equinoctial orbit parameters.

Parameters
[in]t_pThe semi-latus rectum \( p \).
[in]t_fThe \( x \)-axis component of the eccentricity vector in the orbital frame.
[in]t_gThe \( y \)-axis component of the eccentricity vector in the orbital frame.
[in]t_hThe \( x \)-axis component of the node vector in the orbital frame.
[in]t_kThe \( y \)-axis component of the node vector in the orbital frame.

◆ set_quaternionic() [1/2]

void Astro::Orbit::set_quaternionic ( Quaternion const & t_quat)
inline

Set the quaternionic orbital elements.

Parameters
[in]t_quatThe quaternion vector.

◆ set_quaternionic() [2/2]

void Astro::Orbit::set_quaternionic ( Real t_q_1,
Real t_q_2,
Real t_q_3,
Real t_q_4 )
inline

Set the quaternionic orbital elements.

Parameters
[in]t_q_1The first quaternionic orbit parameter.
[in]t_q_2The second quaternionic orbit parameter.
[in]t_q_3The third quaternionic orbit parameter.
[in]t_q_4The fourth quaternionic orbit parameter.

◆ type() [1/2]

Type Astro::Orbit::type ( ) const
inline

Get the type of the orbit.

Returns
The type of the orbit.

◆ type() [2/2]

void Astro::Orbit::type ( Real e)
inline

Set the type of the orbit.

Parameters
[in]eThe eccentricity of the orbit.

Member Data Documentation

◆ m_anom

Anomaly Astro::Orbit::m_anom
protected

Anomaly orbit parameters.

◆ m_cart

Cartesian Astro::Orbit::m_cart
protected

Cartesian orbit parameters.

◆ m_equi

Equinoctial Astro::Orbit::m_equi
protected

Equinoctial orbit parameters.

◆ m_factor

Factor Astro::Orbit::m_factor {Factor::UNDEFINED}
protected

Orbit posigrade (+1)/retrograde (-1) factor.

◆ m_kepl

Keplerian Astro::Orbit::m_kepl
protected

Keplerian orbit parameters.

◆ m_mu

Real Astro::Orbit::m_mu {QUIET_NAN}
protected

Gravitational constant of the central body.

◆ m_quat

Quaternionic Astro::Orbit::m_quat
protected

Quaternionic orbit parameters.

◆ m_type

Type Astro::Orbit::m_type {Type::UNDEFINED}
protected

Orbit type.


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