siderust-cpp 0.8.0
Header-only C++ wrapper for siderust
Loading...
Searching...
No Matches
siderust::BodycentricPos< F, U > Struct Template Reference

Result of a body-centric coordinate transformation. More...

#include <siderust/coordinates/bodycentric_transforms.hpp>

Collaboration diagram for siderust::BodycentricPos< F, U >:

Public Member Functions

x () const
 
y () const
 
z () const
 
distance () const
 Distance from the body (norm of the embedded pos).
 
distance_to (const BodycentricPos &other) const
 Distance to another body-centric position.
 
const BodycentricParamscenter_params () const
 Access the embedded orbital parameters of the body.
 
cartesian::Position< centers::Geocentric, F, U > to_geocentric (const Time< TT, JD > &jd) const
 Transform back to geocentric coordinates.
 

Public Attributes

cartesian::Position< centers::Bodycentric, F, U > pos
 Raw Cartesian position tagged with the Bodycentric center.
 
BodycentricParams params
 Orbital parameters of the body used as the coordinate origin.
 

Detailed Description

template<typename F, typename U = qtty::AstronomicalUnit>
struct siderust::BodycentricPos< F, U >

Result of a body-centric coordinate transformation.

Carries the relative position (target – body) and the embedded BodycentricParams needed for the inverse transform (to_geocentric). Mirrors Rust's Position<Bodycentric, F, U> which stores BodycentricParams at runtime.

Template Parameters
FReference frame tag (e.g. frames::EclipticMeanJ2000).
ULength unit (default: qtty::AstronomicalUnit).

Definition at line 73 of file bodycentric_transforms.hpp.

Member Function Documentation

◆ center_params()

template<typename F , typename U = qtty::AstronomicalUnit>
const BodycentricParams & siderust::BodycentricPos< F, U >::center_params ( ) const
inline

Access the embedded orbital parameters of the body.

Definition at line 95 of file bodycentric_transforms.hpp.

References siderust::BodycentricPos< F, U >::params.

◆ distance()

template<typename F , typename U = qtty::AstronomicalUnit>
U siderust::BodycentricPos< F, U >::distance ( ) const
inline

Distance from the body (norm of the embedded pos).

Definition at line 89 of file bodycentric_transforms.hpp.

References siderust::BodycentricPos< F, U >::pos.

◆ distance_to()

template<typename F , typename U = qtty::AstronomicalUnit>
U siderust::BodycentricPos< F, U >::distance_to ( const BodycentricPos< F, U > &  other) const
inline

Distance to another body-centric position.

Definition at line 92 of file bodycentric_transforms.hpp.

References siderust::BodycentricPos< F, U >::pos.

◆ to_geocentric()

template<typename F , typename U >
cartesian::Position< centers::Geocentric, F, U > siderust::BodycentricPos< F, U >::to_geocentric ( const Time< TT, JD > &  jd) const
inline

Transform back to geocentric coordinates.

Mirrors Rust's FromBodycentricExt::to_geocentric(jd). Uses the same params and jd as the original to_bodycentric() call.

Parameters
jdJulian Date (same as the forward transform).
Returns
Geocentric position in the same frame and unit.

Definition at line 158 of file bodycentric_transforms.hpp.

References siderust::check_status(), and siderust::BodycentricParams::to_c().

◆ x()

template<typename F , typename U = qtty::AstronomicalUnit>
U siderust::BodycentricPos< F, U >::x ( ) const
inline

Definition at line 84 of file bodycentric_transforms.hpp.

References siderust::BodycentricPos< F, U >::pos.

◆ y()

template<typename F , typename U = qtty::AstronomicalUnit>
U siderust::BodycentricPos< F, U >::y ( ) const
inline

Definition at line 85 of file bodycentric_transforms.hpp.

References siderust::BodycentricPos< F, U >::pos.

◆ z()

template<typename F , typename U = qtty::AstronomicalUnit>
U siderust::BodycentricPos< F, U >::z ( ) const
inline

Definition at line 86 of file bodycentric_transforms.hpp.

References siderust::BodycentricPos< F, U >::pos.

Member Data Documentation

◆ params

template<typename F , typename U = qtty::AstronomicalUnit>
BodycentricParams siderust::BodycentricPos< F, U >::params

Orbital parameters of the body used as the coordinate origin.

Definition at line 80 of file bodycentric_transforms.hpp.

Referenced by siderust::BodycentricPos< F, U >::center_params().

◆ pos

template<typename F , typename U = qtty::AstronomicalUnit>
cartesian::Position<centers::Bodycentric, F, U> siderust::BodycentricPos< F, U >::pos

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