Skip to content

Class astrea::astro::OrbitalElements

ClassList > astrea > astro > OrbitalElements

Class representing a set of orbital elements. More...

  • #include <OrbitalElements.hpp>

Public Functions

Type Name
OrbitalElements ()
Default constructor initializing to Cartesian elements.
OrbitalElements (Cartesian elements)
Constructor initializing with Cartesian elements.
OrbitalElements (Keplerian elements)
Constructor initializing with Keplerian elements.
OrbitalElements (Equinoctial elements)
Constructor initializing with Equinoctial elements.
OrbitalElements & convert_to_set (const std::size_t idx, const GravParam & mu)
Converts the current orbital elements to a specific type.
OrbitalElements convert_to_set (const std::size_t idx, const GravParam & mu) const
Converts the current orbital elements to a specific type.
OrbitalElements & convert_to_set (const GravParam & mu)
Converts the current orbital elements to a specific type.
OrbitalElements convert_to_set (const GravParam & mu) const
Converts the current orbital elements to a specific type.
const ElementVariant & extract () const
Extracts the underlying orbital elements as a variant.
ElementVariant & extract ()
Extracts the underlying orbital elements as a variant.
std::vector< Unitless > force_to_vector () const
Converts the OrbitalElements to a vector of Unitless values.
T in_element_set (const GravParam & mu) const
Converts the current orbital elements to a specified type.
constexpr std::size_t index () const
Returns the index of the current orbital elements in the variant.
OrbitalElements interpolate (const Time & thisTime, const Time & otherTime, const OrbitalElements & other, const GravParam & mu, const Time & targetTime) const
Interpolates between two OrbitalElements at a given time.
OrbitalElements operator* (const Unitless & multiplier) const
Multiplies the OrbitalElements by a scalar.
OrbitalElements & operator*= (const Unitless & multiplier)
Multiplies the OrbitalElements by a scalar.
OrbitalElements operator+ (const OrbitalElements & other) const
Adds two OrbitalElements objects.
OrbitalElements & operator+= (const OrbitalElements & other)
Adds another OrbitalElements object to the current one.
OrbitalElements operator- (const OrbitalElements & other) const
Subtracts another OrbitalElements object from the current one.
OrbitalElements & operator-= (const OrbitalElements & other)
Subtracts another OrbitalElements object from the current one.
OrbitalElementPartials operator/ (const Time & divisor) const
Divides the OrbitalElements by a time.
OrbitalElements operator/ (const Unitless & divisor) const
Divides the OrbitalElements by a scalar.
OrbitalElements & operator/= (const Unitless & divisor)
Divides the OrbitalElements by a scalar.
bool operator== (const OrbitalElements & other) const
Compares two OrbitalElements objects for equality.

Public Static Functions

Type Name
constexpr std::size_t get_set_id ()
Returns the set ID for a specific type of orbital elements.

Detailed Description

This class encapsulates different types of orbital elements (Cartesian, Keplerian, Equinoctial) and provides methods for conversion, interpolation, and mathematical operations.

Public Functions Documentation

function OrbitalElements [1/4]

Default constructor initializing to Cartesian elements.

inline astrea::astro::OrbitalElements::OrbitalElements () 


function OrbitalElements [2/4]

Constructor initializing with Cartesian elements.

inline astrea::astro::OrbitalElements::OrbitalElements (
    Cartesian elements
) 

Parameters:

  • elements The orbital elements to initialize with.

function OrbitalElements [3/4]

Constructor initializing with Keplerian elements.

inline astrea::astro::OrbitalElements::OrbitalElements (
    Keplerian elements
) 

Parameters:

  • elements The orbital elements to initialize with.

function OrbitalElements [4/4]

Constructor initializing with Equinoctial elements.

inline astrea::astro::OrbitalElements::OrbitalElements (
    Equinoctial elements
) 

Parameters:

  • elements The orbital elements to initialize with.

function convert_to_set [1/4]

Converts the current orbital elements to a specific type.

OrbitalElements & astrea::astro::OrbitalElements::convert_to_set (
    const std::size_t idx,
    const GravParam & mu
) 

Template parameters:

  • index The index of the orbital element type to convert to.

Parameters:

  • mu The gravitational parameter to use for the conversion.

Returns:

OrbitalElements& Reference to the current orbital elements after conversion.


function convert_to_set [2/4]

Converts the current orbital elements to a specific type.

OrbitalElements astrea::astro::OrbitalElements::convert_to_set (
    const std::size_t idx,
    const GravParam & mu
) const

Template parameters:

  • index The index of the orbital element type to convert to.

Parameters:

  • mu The gravitational parameter to use for the conversion.

Returns:

OrbitalElements Orbital elements after conversion.


function convert_to_set [3/4]

Converts the current orbital elements to a specific type.

template<IsOrbitalElements T>
inline OrbitalElements & astrea::astro::OrbitalElements::convert_to_set (
    const GravParam & mu
) 

Template parameters:

  • T The type to convert to.

Parameters:

  • mu The gravitational parameter to use for the conversion.

Returns:

A reference to the current orbital elements after conversion.


function convert_to_set [4/4]

Converts the current orbital elements to a specific type.

template<IsOrbitalElements T>
inline OrbitalElements astrea::astro::OrbitalElements::convert_to_set (
    const GravParam & mu
) const

Template parameters:

  • T The type to convert to.

Parameters:

  • mu The gravitational parameter to use for the conversion.

Returns:

The converted orbital elements.


function extract [1/2]

Extracts the underlying orbital elements as a variant.

const ElementVariant & astrea::astro::OrbitalElements::extract () const

Returns:

const ElementVariant& Reference to the underlying orbital elements variant.


function extract [2/2]

Extracts the underlying orbital elements as a variant.

ElementVariant & astrea::astro::OrbitalElements::extract () 

Returns:

ElementVariant& Reference to the underlying orbital elements variant.


function force_to_vector

Converts the OrbitalElements to a vector of Unitless values.

std::vector< Unitless > astrea::astro::OrbitalElements::force_to_vector () const

Returns:

std::vector<Unitless> Vector containing the orbital elements as unitless values.


function in_element_set

Converts the current orbital elements to a specified type.

template<IsOrbitalElements T>
inline T astrea::astro::OrbitalElements::in_element_set (
    const GravParam & mu
) const

Parameters:

  • mu The gravitational parameter to use for the conversion.

Returns:

The converted orbital elements.


function index

Returns the index of the current orbital elements in the variant.

inline constexpr std::size_t astrea::astro::OrbitalElements::index () const

Returns:

std::size_t The index of the current orbital elements in the variant.


function interpolate

Interpolates between two OrbitalElements at a given time.

OrbitalElements astrea::astro::OrbitalElements::interpolate (
    const Time & thisTime,
    const Time & otherTime,
    const OrbitalElements & other,
    const GravParam & mu,
    const Time & targetTime
) const

Parameters:

  • thisTime Time of the current state
  • otherTime Time of the other state
  • other Another OrbitalElements object to interpolate with
  • mu The gravitational parameter to use for the interpolation
  • targetTime The target time for interpolation

Returns:

Interpolated OrbitalElements at the target time.


function operator*

Multiplies the OrbitalElements by a scalar.

OrbitalElements astrea::astro::OrbitalElements::operator* (
    const Unitless & multiplier
) const

Parameters:

  • multiplier Scalar value to multiply with

Returns:

Resultant OrbitalElements after multiplication.


function operator*=

Multiplies the OrbitalElements by a scalar.

OrbitalElements & astrea::astro::OrbitalElements::operator*= (
    const Unitless & multiplier
) 

Parameters:

  • multiplier Scalar value to multiply with

Returns:

Reference to the current OrbitalElements object after multiplication.


function operator+

Adds two OrbitalElements objects.

OrbitalElements astrea::astro::OrbitalElements::operator+ (
    const OrbitalElements & other
) const

Parameters:

Returns:

Resultant OrbitalElements sum.


function operator+=

Adds another OrbitalElements object to the current one.

OrbitalElements & astrea::astro::OrbitalElements::operator+= (
    const OrbitalElements & other
) 

Parameters:

Returns:

Reference to the current OrbitalElements object after addition.


function operator-

Subtracts another OrbitalElements object from the current one.

OrbitalElements astrea::astro::OrbitalElements::operator- (
    const OrbitalElements & other
) const

Parameters:

Returns:

Resultant OrbitalElements difference.


function operator-=

Subtracts another OrbitalElements object from the current one.

OrbitalElements & astrea::astro::OrbitalElements::operator-= (
    const OrbitalElements & other
) 

Parameters:

Returns:

Reference to the current OrbitalElements object after subtraction.


function operator/

Divides the OrbitalElements by a time.

OrbitalElementPartials astrea::astro::OrbitalElements::operator/ (
    const Time & divisor
) const

Parameters:

  • divisor Time value to divide by

Returns:

Resultant OrbitalElementPartials after division.


function operator/

Divides the OrbitalElements by a scalar.

OrbitalElements astrea::astro::OrbitalElements::operator/ (
    const Unitless & divisor
) const

Parameters:

  • divisor Scalar value to divide with

Returns:

Resultant OrbitalElements after division.


function operator/=

Divides the OrbitalElements by a scalar.

OrbitalElements & astrea::astro::OrbitalElements::operator/= (
    const Unitless & divisor
) 

Parameters:

  • divisor Scalar value to divide with

Returns:

Reference to the current OrbitalElements object after division.


function operator==

Compares two OrbitalElements objects for equality.

bool astrea::astro::OrbitalElements::operator== (
    const OrbitalElements & other
) const

Parameters:

Returns:

true if the two OrbitalElements objects are equal

Returns:

false if the two OrbitalElements objects are not equal


Public Static Functions Documentation

function get_set_id

Returns the set ID for a specific type of orbital elements.

template<typename T>
static inline constexpr std::size_t astrea::astro::OrbitalElements::get_set_id () 

Template parameters:

  • T The type of orbital elements.

Returns:

std::size_t The set ID for the specified type.



The documentation for this class was generated from the following file astrea/astro/astro/state/orbital_elements/OrbitalElements.hpp