siderust-cpp 0.8.0
Header-only C++ wrapper for siderust
Loading...
Searching...
No Matches
orbital_center.hpp File Reference

C++ wrapper for body-centric coordinates using orbital elements. More...

#include "centers.hpp"
#include "ffi_core.hpp"
#include "orbit.hpp"
#include <cstdint>
#include <ostream>
Include dependency graph for orbital_center.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  siderust::BodycentricParams
 Parameters for a body-centric coordinate system. More...
 

Namespaces

namespace  siderust
 

Enumerations

enum class  siderust::OrbitReferenceCenter : std::uint8_t { siderust::Barycentric = 0 , siderust::Heliocentric = 1 , siderust::Geocentric = 2 }
 Specifies the reference center for an orbit. More...
 

Functions

std::ostream & siderust::operator<< (std::ostream &os, OrbitReferenceCenter center)
 

Detailed Description

C++ wrapper for body-centric coordinates using orbital elements.

Provides OrbitReferenceCenter enum and BodycentricParams struct to define and work with coordinate systems centered on orbiting bodies (planets, moons, satellites, etc.). Use these with Position<centers::Bodycentric, F, U> to express positions relative to an orbiting body.

Example

using namespace siderust;
// Define Mars's heliocentric orbit
KeplerianOrbit mars_orbit = {
1.524, // semi_major_axis_au
0.0934, // eccentricity
1.85, // inclination_deg
49.56, // lon_ascending_node_deg
286.5, // arg_periapsis_deg
19.41, // mean_anomaly_deg
};
// Create parameters: Mars as center of a heliocentric orbit
BodycentricParams mars_center = BodycentricParams::heliocentric(mars_orbit);
// Later, compute Mars position and use it as reference center
// (Integration with transform functions coming in future release)
tempoch::EncodedTime< Scale, Format > Time
Definition time.hpp:36
Parameters for a body-centric coordinate system.

Definition in file orbital_center.hpp.