Skip to content

Class astrea::astro::Spherical

ClassList > astrea > astro > Spherical

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

  • #include <Spherical.hpp>

Public Functions

Type Name
Spherical (Unitless scale=0.0 *astrea::detail::unitless)
Default constructor for Spherical .
Spherical (const Distance & range, const Angle & inclination, const Angle & azimuth)
Constructor for Spherical with azimuth, inclination, and range.
Spherical (const RadiusVector< frames::earth::icrf > & r, const Date & date, const CelestialBody * parent)
Constructor for Spherical with position and velocity vectors.
Spherical (const RadiusVector< frames::earth::earth_fixed > & r, const CelestialBody * parent)
Constructor for Spherical with position and velocity vectors.
Spherical (const T & elements, const AstrodynamicsSystem & sys, const Date & date)
Constructor for Spherical from orbital elements.
Spherical (const Spherical & other)
Copy constructor for Spherical .
Spherical (Spherical && other) noexcept
Move constructor for Spherical .
const Angle & get_azimuth () const
Get the azimuth of the Spherical state vector.
const Angle & get_inclination () const
Get the inclination of the Spherical state vector.
RadiusVector< frames::earth::earth_fixed > get_position (const CelestialBody * parent) const
Converts the Spherical state vector to a RadiusVector<frames::earth::earth_fixed>.
RadiusVector< frames::earth::icrf > get_position (const Date & date, const CelestialBody * parent) const
Converts the Spherical state vector to a RadiusVector<frames::earth::icrf>.
const Distance & get_range () const
Get the range of the Spherical state vector.
Spherical interpolate (const Time & thisTime, const Time & otherTime, const Spherical & other, const Time & targetTime) const
Interpolates between two Spherical states at a given time.
bool operator!= (const Spherical & other) const
Compares two Spherical objects for inequality.
Spherical operator* (const Unitless & multiplier) const
Multiplies the Spherical state vector by a scalar.
Spherical & operator*= (const Unitless & multiplier)
Multiplies the Spherical state vector by a scalar.
Spherical operator+ (const Spherical & other) const
Adds two Spherical objects.
Spherical & operator+= (const Spherical & other)
Adds another Spherical object to the current one.
Spherical operator- (const Spherical & other) const
Subtracts another Spherical object from the current one.
Spherical & operator-= (const Spherical & other)
Subtracts another Spherical object from the current one.
std::vector< Unitless > operator/ (const Spherical & other) const
Divides the Spherical state vector by anotherSpherical object.
Spherical operator/ (const Unitless & divisor) const
Divides the Spherical state vector by a scalar.
Spherical & operator/= (const Unitless & divisor)
Divides the Spherical state vector by a scalar.
Spherical & operator= (Spherical && other) noexcept
Move assignment operator for Spherical .
Spherical & operator= (const Spherical & other)
Copy assignment operator for Spherical .
bool operator== (const Spherical & other) const
Compares two Spherical objects for equality.
~Spherical () = default
Default destructor for Spherical .

Detailed Description

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

Public Functions Documentation

function Spherical [1/7]

Default constructor for Spherical .

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

Initializes the Spherical state vector with zero values.


function Spherical [2/7]

Constructor for Spherical with azimuth, inclination, and range.

inline astrea::astro::Spherical::Spherical (
    const Distance & range,
    const Angle & inclination,
    const Angle & azimuth
) 

Parameters:

  • azimuth Spherical azimuth
  • inclination Inclination
  • range Range

function Spherical [3/7]

Constructor for Spherical with position and velocity vectors.

astrea::astro::Spherical::Spherical (
    const RadiusVector < frames::earth::icrf > & r,
    const Date & date,
    const CelestialBody * parent
) 

Parameters:

  • r Radius vector in ECI (position)

function Spherical [4/7]

Constructor for Spherical with position and velocity vectors.

astrea::astro::Spherical::Spherical (
    const RadiusVector < frames::earth::earth_fixed > & r,
    const CelestialBody * parent
) 

Parameters:

  • r Radius vector in ECEF (position)

function Spherical [5/7]

Constructor for Spherical from orbital elements.

template<IsOrbitalElements T>
inline astrea::astro::Spherical::Spherical (
    const T & elements,
    const AstrodynamicsSystem & sys,
    const Date & date
) 

Parameters:

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

function Spherical [6/7]

Copy constructor for Spherical .

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

Parameters:


function Spherical [7/7]

Move constructor for Spherical .

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

Parameters:


function get_azimuth

Get the azimuth of the Spherical state vector.

inline const Angle & astrea::astro::Spherical::get_azimuth () const

Returns:

const Angle& Reference to the azimuth component of the Spherical state vector.


function get_inclination

Get the inclination of the Spherical state vector.

inline const Angle & astrea::astro::Spherical::get_inclination () const

Returns:

const Angle& Reference to the inclination component of the Spherical state vector.


function get_position [1/2]

Converts the Spherical state vector to a RadiusVector<frames::earth::earth_fixed>.

RadiusVector < frames::earth::earth_fixed > astrea::astro::Spherical::get_position (
    const CelestialBody * parent
) const

Returns:

RadiusVector<frames::earth::earth_fixed> The position vector in Spherical coordinates.


function get_position [2/2]

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

RadiusVector < frames::earth::icrf > astrea::astro::Spherical::get_position (
    const Date & date,
    const CelestialBody * parent
) const

Returns:

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


function get_range

Get the range of the Spherical state vector.

inline const Distance & astrea::astro::Spherical::get_range () const

Returns:

const Distance& Reference to the range component of the Spherical state vector.


function interpolate

Interpolates between two Spherical states at a given time.

Spherical astrea::astro::Spherical::interpolate (
    const Time & thisTime,
    const Time & otherTime,
    const Spherical & other,
    const Time & targetTime
) const

Parameters:

  • thisTime Time of the current state
  • otherTime Time of the other state
  • other Other Spherical state to interpolate with
  • sys Astrodynamics system containing celestial body data
  • targetTime Target time for interpolation

Returns:

Spherical Interpolated Spherical state at the target time.


function operator!=

Compares two Spherical objects for inequality.

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

Parameters:

Returns:

true if the two Spherical objects are not equal

Returns:

false if the two Spherical objects are equal


function operator*

Multiplies the Spherical state vector by a scalar.

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

Parameters:

  • multiplier Scalar value to multiply with

Returns:

Resultant Spherical after multiplication.


function operator*=

Multiplies the Spherical state vector by a scalar.

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

Parameters:

  • multiplier Scalar value to multiply with

Returns:

Reference to the current Spherical object after multiplication.


function operator+

Adds two Spherical objects.

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

Parameters:

Returns:

Resultant Spherical sum.


function operator+=

Adds another Spherical object to the current one.

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

Parameters:

Returns:

Reference to the current Spherical object after addition.


function operator-

Subtracts another Spherical object from the current one.

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

Parameters:

Returns:

Resultant Spherical difference.


function operator-=

Subtracts another Spherical object from the current one.

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

Parameters:

Returns:

Reference to the current Spherical object after subtraction.


function operator/

Divides the Spherical state vector by anotherSpherical object.

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

Parameters:

Returns:

Resultant vector of unitless values after division.


function operator/

Divides the Spherical state vector by a scalar.

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

Parameters:

  • divisor Scalar value to divide with

Returns:

Resultant Spherical after division.


function operator/=

Divides the Spherical state vector by a scalar.

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

Parameters:

  • divisor Scalar value to divide with

Returns:

Reference to the current Spherical object after division.


function operator=

Move assignment operator for Spherical .

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

Parameters:

Returns:

Spherical& Reference to the current object


function operator=

Copy assignment operator for Spherical .

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

Parameters:

Returns:

Spherical& Reference to the current object


function operator==

Compares two Spherical objects for equality.

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

Parameters:

Returns:

true if the two Spherical objects are equal

Returns:

false if the two Spherical objects are not equal


function ~Spherical

Default destructor for Spherical .

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



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