Skip to content

Class astrea::astro::Cartesian

ClassList > astrea > astro > Cartesian

Class representing a Cartesian state vector in astrodynamics.More...

  • #include <Cartesian.hpp>

Public Functions

Type Name
Cartesian (Unitless scale=0.0 *astrea::detail::unitless)
Default constructor for Cartesian .
Cartesian (const RadiusVector< frames::earth::icrf > & r, const VelocityVector< frames::earth::icrf > & v)
Constructor for Cartesian with position and velocity vectors.
Cartesian (const Distance & x, const Distance & y, const Distance & z, const Velocity & vx, const Velocity & vy, const Velocity & vz)
Constructor for Cartesian with individual position and velocity components.
Cartesian (const Cartesian & elements, const GravParam & mu)
Constructor for Cartesian from anotherCartesian object.
Cartesian (const Keplerian & elements, const GravParam & mu)
Constructor for Cartesian fromKeplerian elements.
Cartesian (const Equinoctial & elements, const GravParam & mu)
Constructor for Cartesian fromEquinoctial elements.
Cartesian (const OrbitalElements & elements, const GravParam & mu)
Constructor for Cartesian fromOrbitalElements .
Cartesian (const Cartesian & other)
Copy constructor for Cartesian .
Cartesian (Cartesian && other) noexcept
Move constructor for Cartesian .
std::vector< Unitless > force_to_vector () const
Converts the Cartesian state vector to a vector of unitless values.
const RadiusVector< frames::earth::icrf > & get_position () const
Converts the Cartesian state vector to a RadiusVector<frames::earth::icrf>.
const VelocityVector< frames::earth::icrf > & get_velocity () const
Converts the Cartesian state vector to a VelocityVector<frames::earth::icrf>.
const Velocity & get_vx () const
Get the vx value of the Cartesian state vector.
const Velocity & get_vy () const
Get the vy value of the Cartesian state vector.
const Velocity & get_vz () const
Get the vz value of the Cartesian state vector.
const Distance & get_x () const
Get the x value of the Cartesian state vector.
const Distance & get_y () const
Get the y value of the Cartesian state vector.
const Distance & get_z () const
Get the z value of the Cartesian state vector.
Cartesian interpolate (const Time & thisTime, const Time & otherTime, const Cartesian & other, const GravParam & mu, const Time & targetTime) const
Interpolates between two Cartesian states at a given time.
bool operator!= (const Cartesian & other) const
Compares two Cartesian objects for inequality.
Cartesian operator* (const Unitless & multiplier) const
Multiplies the Cartesian state vector by a scalar.
Cartesian & operator*= (const Unitless & multiplier)
Multiplies the Cartesian state vector by a scalar.
Cartesian operator+ (const Cartesian & other) const
Adds two Cartesian objects.
Cartesian operator+ (const RadiusVector< frames::earth::icrf > & r) const
Cartesian operator+ (const VelocityVector< frames::earth::icrf > & v) const
Cartesian & operator+= (const Cartesian & other)
Adds another Cartesian object to the current one.
Cartesian & operator+= (const RadiusVector< frames::earth::icrf > & r)
Cartesian & operator+= (const VelocityVector< frames::earth::icrf > & v)
Cartesian operator- (const Cartesian & other) const
Subtracts another Cartesian object from the current one.
Cartesian operator- (const RadiusVector< frames::earth::icrf > & r) const
Cartesian operator- (const VelocityVector< frames::earth::icrf > & v) const
Cartesian & operator-= (const Cartesian & other)
Subtracts another Cartesian object from the current one.
Cartesian & operator-= (const RadiusVector< frames::earth::icrf > & r)
Cartesian & operator-= (const VelocityVector< frames::earth::icrf > & v)
CartesianPartial operator/ (const Time & time) const
Divides the Cartesian state vector by a time.
std::vector< Unitless > operator/ (const Cartesian & other) const
Divides the Cartesian state vector by anotherCartesian object.
Cartesian operator/ (const Unitless & divisor) const
Divides the Cartesian state vector by a scalar.
Cartesian & operator/= (const Unitless & divisor)
Divides the Cartesian state vector by a scalar.
Cartesian & operator= (Cartesian && other) noexcept
Move assignment operator for Cartesian .
Cartesian & operator= (const Cartesian & other)
Copy assignment operator for Cartesian .
bool operator== (const Cartesian & other) const
Compares two Cartesian objects for equality.
~Cartesian () = default
Default destructor for Cartesian .

Public Static Functions

Type Name
Cartesian GEO (const GravParam & mu)
A static method to create Cartesian state vectors for a GEO orbit.
Cartesian GPS (const GravParam & mu)
A static method to create Cartesian state vectors for a GPS orbit.
Cartesian HMEO (const GravParam & mu)
A static method to create Cartesian state vectors for a HMEO orbit.
Cartesian LEO (const GravParam & mu)
A static method to create Cartesian state vectors for a LEO orbit.
Cartesian LMEO (const GravParam & mu)
A static method to create Cartesian state vectors for a LMEO orbit.

Detailed Description

This class encapsulates the position and velocity of a vehicle in Cartesian coordinates.

Public Functions Documentation

function Cartesian [1/9]

Default constructor for Cartesian .

inline astrea::astro::Cartesian::Cartesian (
    Unitless scale=0.0 *astrea::detail::unitless
) 

Initializes the Cartesian state vector with zero values.


function Cartesian [2/9]

Constructor for Cartesian with position and velocity vectors.

inline astrea::astro::Cartesian::Cartesian (
    const RadiusVector < frames::earth::icrf > & r,
    const VelocityVector < frames::earth::icrf > & v
) 

Parameters:

  • r Radius vector (position)
  • v Velocity vector

function Cartesian [3/9]

Constructor for Cartesian with individual position and velocity components.

inline astrea::astro::Cartesian::Cartesian (
    const Distance & x,
    const Distance & y,
    const Distance & z,
    const Velocity & vx,
    const Velocity & vy,
    const Velocity & vz
) 

Parameters:

  • x X component of position
  • y Y component of position
  • z Z component of position
  • vx X component of velocity
  • vy Y component of velocity
  • vz Z component of velocity

function Cartesian [4/9]

Constructor for Cartesian from anotherCartesian object.

inline astrea::astro::Cartesian::Cartesian (
    const Cartesian & elements,
    const GravParam & mu
) 

Parameters:

  • elements Another Cartesian object
  • sys Astrodynamics system containing celestial body data

function Cartesian [5/9]

Constructor for Cartesian fromKeplerian elements.

astrea::astro::Cartesian::Cartesian (
    const Keplerian & elements,
    const GravParam & mu
) 

Parameters:

  • elements Keplerian elements
  • sys Astrodynamics system containing celestial body data

function Cartesian [6/9]

Constructor for Cartesian fromEquinoctial elements.

astrea::astro::Cartesian::Cartesian (
    const Equinoctial & elements,
    const GravParam & mu
) 

Parameters:

  • elements Equinoctial elements
  • sys Astrodynamics system containing celestial body data

function Cartesian [7/9]

Constructor for Cartesian fromOrbitalElements .

astrea::astro::Cartesian::Cartesian (
    const OrbitalElements & elements,
    const GravParam & mu
) 

Parameters:

  • elements OrbitalElements object
  • sys Astrodynamics system containing celestial body data

function Cartesian [8/9]

Copy constructor for Cartesian .

astrea::astro::Cartesian::Cartesian (
    const Cartesian & other
) 

Parameters:


function Cartesian [9/9]

Move constructor for Cartesian .

astrea::astro::Cartesian::Cartesian (
    Cartesian && other
) noexcept

Parameters:


function force_to_vector

Converts the Cartesian state vector to a vector of unitless values.

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

Returns:

std::vector<Unitless> Vector containing the x, y, z, vx, vy, and vz components of the Cartesian state vector.


function get_position

Converts the Cartesian state vector to a RadiusVector<frames::earth::icrf>.

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

Returns:

RadiusVector<frames::earth::icrf> The position vector in Cartesian coordinates.


function get_velocity

Converts the Cartesian state vector to a VelocityVector<frames::earth::icrf>.

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

Returns:

VelocityVector<frames::earth::icrf> The velocity vector in Cartesian coordinates.


function get_vx

Get the vx value of the Cartesian state vector.

inline const Velocity & astrea::astro::Cartesian::get_vx () const

Returns:

const Velocity& Reference to the vx component of the Cartesian state vector.


function get_vy

Get the vy value of the Cartesian state vector.

inline const Velocity & astrea::astro::Cartesian::get_vy () const

Returns:

const Velocity& Reference to the vy component of the Cartesian state vector.


function get_vz

Get the vz value of the Cartesian state vector.

inline const Velocity & astrea::astro::Cartesian::get_vz () const

Returns:

const Velocity& Reference to the vz component of the Cartesian state vector.


function get_x

Get the x value of the Cartesian state vector.

inline const Distance & astrea::astro::Cartesian::get_x () const

Returns:

const Distance& Reference to the x component of the Cartesian state vector.


function get_y

Get the y value of the Cartesian state vector.

inline const Distance & astrea::astro::Cartesian::get_y () const

Returns:

const Distance& Reference to the y component of the Cartesian state vector.


function get_z

Get the z value of the Cartesian state vector.

inline const Distance & astrea::astro::Cartesian::get_z () const

Returns:

const Distance& Reference to the z component of the Cartesian state vector.


function interpolate

Interpolates between two Cartesian states at a given time.

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

Parameters:

  • thisTime Time of the current state
  • otherTime Time of the other state
  • other Other Cartesian state to interpolate with
  • mu Gravitational parameter of the central body
  • targetTime Target time for interpolation

Returns:

Cartesian Interpolated Cartesian state at the target time.


function operator!=

Compares two Cartesian objects for inequality.

bool astrea::astro::Cartesian::operator!= (
    const Cartesian & other
) const

Parameters:

Returns:

true if the two Cartesian objects are not equal

Returns:

false if the two Cartesian objects are equal


function operator*

Multiplies the Cartesian state vector by a scalar.

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

Parameters:

  • multiplier Scalar value to multiply with

Returns:

Resultant Cartesian after multiplication.


function operator*=

Multiplies the Cartesian state vector by a scalar.

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

Parameters:

  • multiplier Scalar value to multiply with

Returns:

Reference to the current Cartesian object after multiplication.


function operator+

Adds two Cartesian objects.

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

Parameters:

Returns:

Resultant Cartesian sum.


function operator+

Cartesian astrea::astro::Cartesian::operator+ (
    const RadiusVector < frames::earth::icrf > & r
) const

function operator+

Cartesian astrea::astro::Cartesian::operator+ (
    const VelocityVector < frames::earth::icrf > & v
) const

function operator+=

Adds another Cartesian object to the current one.

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

Parameters:

Returns:

Reference to the current Cartesian object after addition.


function operator+=

Cartesian & astrea::astro::Cartesian::operator+= (
    const RadiusVector < frames::earth::icrf > & r
) 

function operator+=

Cartesian & astrea::astro::Cartesian::operator+= (
    const VelocityVector < frames::earth::icrf > & v
) 

function operator-

Subtracts another Cartesian object from the current one.

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

Parameters:

Returns:

Resultant Cartesian difference.


function operator-

Cartesian astrea::astro::Cartesian::operator- (
    const RadiusVector < frames::earth::icrf > & r
) const

function operator-

Cartesian astrea::astro::Cartesian::operator- (
    const VelocityVector < frames::earth::icrf > & v
) const

function operator-=

Subtracts another Cartesian object from the current one.

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

Parameters:

Returns:

Reference to the current Cartesian object after subtraction.


function operator-=

Cartesian & astrea::astro::Cartesian::operator-= (
    const RadiusVector < frames::earth::icrf > & r
) 

function operator-=

Cartesian & astrea::astro::Cartesian::operator-= (
    const VelocityVector < frames::earth::icrf > & v
) 

function operator/

Divides the Cartesian state vector by a time.

CartesianPartial astrea::astro::Cartesian::operator/ (
    const Time & time
) const

Parameters:

  • time Time value to divide by

Returns:

Resultant CartesianPartial after division.


function operator/

Divides the Cartesian state vector by anotherCartesian object.

std::vector< Unitless > astrea::astro::Cartesian::operator/ (
    const Cartesian & other
) const

Parameters:

Returns:

Resultant vector of unitless values after division.


function operator/

Divides the Cartesian state vector by a scalar.

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

Parameters:

  • divisor Scalar value to divide with

Returns:

Resultant Cartesian after division.


function operator/=

Divides the Cartesian state vector by a scalar.

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

Parameters:

  • divisor Scalar value to divide with

Returns:

Reference to the current Cartesian object after division.


function operator=

Move assignment operator for Cartesian .

Cartesian & astrea::astro::Cartesian::operator= (
    Cartesian && other
) noexcept

Parameters:

Returns:

Cartesian& Reference to the current object


function operator=

Copy assignment operator for Cartesian .

Cartesian & astrea::astro::Cartesian::operator= (
    const Cartesian & other
) 

Parameters:

Returns:

Cartesian& Reference to the current object


function operator==

Compares two Cartesian objects for equality.

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

Parameters:

Returns:

true if the two Cartesian objects are equal

Returns:

false if the two Cartesian objects are not equal


function ~Cartesian

Default destructor for Cartesian .

astrea::astro::Cartesian::~Cartesian () = default


Public Static Functions Documentation

function GEO

A static method to create Cartesian state vectors for a GEO orbit.

static Cartesian astrea::astro::Cartesian::GEO (
    const GravParam & mu
) 

This method return predefined Cartesian state vectors for various types of orbits.

Parameters:

  • mu Gravitational parameter of the central body

Returns:

Cartesian Predefined Cartesian state vector for a GEO orbit.


function GPS

A static method to create Cartesian state vectors for a GPS orbit.

static Cartesian astrea::astro::Cartesian::GPS (
    const GravParam & mu
) 

This method return predefined Cartesian state vectors for various types of orbits.

Parameters:

  • mu Gravitational parameter of the central body

Returns:

Cartesian Predefined Cartesian state vector for a GPS orbit.


function HMEO

A static method to create Cartesian state vectors for a HMEO orbit.

static Cartesian astrea::astro::Cartesian::HMEO (
    const GravParam & mu
) 

This method return predefined Cartesian state vectors for various types of orbits.

Parameters:

  • mu Gravitational parameter of the central body

Returns:

Cartesian Predefined Cartesian state vector for a HMEO orbit.


function LEO

A static method to create Cartesian state vectors for a LEO orbit.

static Cartesian astrea::astro::Cartesian::LEO (
    const GravParam & mu
) 

This method return predefined Cartesian state vectors for various types of orbits.

Parameters:

  • mu Gravitational parameter of the central body

Returns:

Cartesian Predefined Cartesian state vector for a LEO orbit.


function LMEO

A static method to create Cartesian state vectors for a LMEO orbit.

static Cartesian astrea::astro::Cartesian::LMEO (
    const GravParam & mu
) 

This method return predefined Cartesian state vectors for various types of orbits.

Parameters:

  • mu Gravitational parameter of the central body

Returns:

Cartesian Predefined Cartesian state vector for a LMEO orbit.



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