Skip to content

Class astrea::astro::State

ClassList > astrea > astro > State

Class representing the state of an astronomical object. More...

  • #include <State.hpp>

Public Functions

Type Name
State () = default
Default constructor for State .
State (const OrbitalElements & elements, const Date & epoch, const AstrodynamicsSystem & sys)
Constructs a State with given orbital elements, epoch, and astrodynamics system.
State (const StateHistory & history)
Constructs a State from aStateHistory object.
State (const OrbitalElements &, const Date &, AstrodynamicsSystem &&) = delete
Deleted constructor for State to prevent constructing a reference to anAstrodynamicsSystem rvalue.
void convert_to_set ()
Converts the orbital elements to a different type.
State & convert_to_set (const std::size_t idx)
Converts the orbital elements to a different type based on index.
State convert_to_set (const std::size_t idx) const
Converts the state to a different type of orbital elements based on index.
State convert_to_set () const
Converts the state to a different type of orbital elements.
const OrbitalElements & get_elements () const
Gets the orbital elements of the state.
const Date & get_epoch () const
Gets the epoch of the state.
RadiusVector< frames::earth::icrf > get_position () const
Gets the position vector from the state.
RadiusVector< Frame_T > get_position_in_frame () const
Gets the position vector in a specified frame.
const AstrodynamicsSystem & get_system () const
Gets the astrodynamics system associated with the state.
VelocityVector< frames::earth::icrf > get_velocity () const
Gets the velocity vector from the state.
T in_element_set () const
Converts the current orbital elements to a specified type.
bool operator== (const State & other) const
Checks if two State objects are equal.
void set_elements (const T & elements, const bool convertToOriginal=false)
Sets the orbital elements of the state.
void set_epoch (const Date & epoch)
Sets the epoch of the state.
void set_system (const AstrodynamicsSystem & sys)
Sets the astrodynamics system associated with the state.

Detailed Description

  • This class encapsulates the orbital elements, epoch, and the astrodynamics system
  • that the state belongs to.

Public Functions Documentation

function State [1/4]

Default constructor for State .

astrea::astro::State::State () = default


function State [2/4]

Constructs a State with given orbital elements, epoch, and astrodynamics system.

inline astrea::astro::State::State (
    const OrbitalElements & elements,
    const Date & epoch,
    const AstrodynamicsSystem & sys
) 

Parameters:

  • elements The orbital elements of the state.
  • epoch The epoch of the state.
  • sys The astrodynamics system associated with the state.

function State [3/4]

Constructs a State from aStateHistory object.

astrea::astro::State::State (
    const StateHistory & history
) 

Parameters:

Note:

This only works if the StateHistory contains exactly one state.


function State [4/4]

Deleted constructor for State to prevent constructing a reference to anAstrodynamicsSystem rvalue.

astrea::astro::State::State (
    const OrbitalElements &,
    const Date &,
    AstrodynamicsSystem &&
) = delete


function convert_to_set [1/4]

Converts the orbital elements to a different type.

template<IsOrbitalElements T>
inline void astrea::astro::State::convert_to_set () 

Template parameters:

  • T The type to convert the orbital elements to.

function convert_to_set [2/4]

Converts the orbital elements to a different type based on index.

inline State & astrea::astro::State::convert_to_set (
    const std::size_t idx
) 

Parameters:

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

function convert_to_set [3/4]

Converts the state to a different type of orbital elements based on index.

inline State astrea::astro::State::convert_to_set (
    const std::size_t idx
) const

Parameters:

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

Returns:

State A new State object with the converted orbital elements.


function convert_to_set [4/4]

Converts the state to a different type of orbital elements.

template<IsOrbitalElements T>
inline State astrea::astro::State::convert_to_set () const

Template parameters:

  • T The type to convert the state to.

Returns:

State A new State object with the converted orbital elements.


function get_elements

Gets the orbital elements of the state.

inline const OrbitalElements & astrea::astro::State::get_elements () const

Returns:

const OrbitalElements& Reference to the orbital elements of the state.


function get_epoch

Gets the epoch of the state.

inline const Date & astrea::astro::State::get_epoch () const

Returns:

const Date& Reference to the epoch of the state.


function get_position

Gets the position vector from the state.

inline RadiusVector < frames::earth::icrf > astrea::astro::State::get_position () const

Returns:

RadiusVector<frames::earth::icrf> The position vector of the state.


function get_position_in_frame

Gets the position vector in a specified frame.

template<typename Frame_T>
inline RadiusVector < Frame_T > astrea::astro::State::get_position_in_frame () const

Template parameters:

  • Frame_T The frame type to get the position in.

Returns:

RadiusVector<Frame_T> The position vector in the specified frame.


function get_system

Gets the astrodynamics system associated with the state.

inline const AstrodynamicsSystem & astrea::astro::State::get_system () const

Returns:

const AstrodynamicsSystem& Reference to the astrodynamics system.


function get_velocity

Gets the velocity vector from the state.

inline VelocityVector < frames::earth::icrf > astrea::astro::State::get_velocity () const

Returns:

VelocityVector<frames::earth::icrf> The velocity vector of the state.


function in_element_set

Converts the current orbital elements to a specified type.

template<IsOrbitalElements T>
inline T astrea::astro::State::in_element_set () const

Parameters:

  • sys The astrodynamics system to use for the conversion.

Returns:

The converted orbital elements.


function operator==

Checks if two State objects are equal.

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

Parameters:

  • other The other State object to compare with.

Returns:

true if the two states are equal (same elements and epoch),

Returns:

false otherwise.


function set_elements

Sets the orbital elements of the state.

template<IsOrbitalElements T>
inline void astrea::astro::State::set_elements (
    const T & elements,
    const bool convertToOriginal=false
) 

Parameters:

  • elements The new orbital elements to set.

function set_epoch

Sets the epoch of the state.

inline void astrea::astro::State::set_epoch (
    const Date & epoch
) 

Parameters:

  • epoch The new epoch to set.

function set_system

Sets the astrodynamics system associated with the state.

inline void astrea::astro::State::set_system (
    const AstrodynamicsSystem & sys
) 

Parameters:

  • sys The new astrodynamics system to set.


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