32template <
typename F,
typename =
void>
struct is_frame : std::false_type {};
35struct is_frame<F, std::void_t<decltype(FrameTraits<F>::ffi_id)>> : std::true_type {};
80#define SIDERUST_DEFINE_FRAME(Tag, EnumVal, Label) \
81 template <> struct FrameTraits<Tag> { \
82 static constexpr siderust_frame_t ffi_id = EnumVal; \
83 static constexpr const char *name() { return Label; } \
91 "EclipticTrueOfDate");
93 "EquatorialMeanJ2000");
95 "EquatorialMeanOfDate");
97 "EquatorialTrueOfDate");
106#undef SIDERUST_DEFINE_FRAME
119 static constexpr const char *
lon_name() {
return "longitude"; }
120 static constexpr const char *
lat_name() {
return "latitude"; }
124 static constexpr const char *
lon_name() {
return "right_ascension"; }
125 static constexpr const char *
lat_name() {
return "declination"; }
129 static constexpr const char *
lon_name() {
return "right_ascension"; }
130 static constexpr const char *
lat_name() {
return "declination"; }
134 static constexpr const char *
lon_name() {
return "right_ascension"; }
135 static constexpr const char *
lat_name() {
return "declination"; }
139 static constexpr const char *
lon_name() {
return "right_ascension"; }
140 static constexpr const char *
lat_name() {
return "declination"; }
144 static constexpr const char *
lon_name() {
return "right_ascension"; }
145 static constexpr const char *
lat_name() {
return "declination"; }
149 static constexpr const char *
lon_name() {
return "azimuth"; }
150 static constexpr const char *
lat_name() {
return "altitude"; }
154 static constexpr const char *
lon_name() {
return "l"; }
155 static constexpr const char *
lat_name() {
return "b"; }
159 static constexpr const char *
lon_name() {
return "ecliptic_longitude"; }
160 static constexpr const char *
lat_name() {
return "ecliptic_latitude"; }
226#define SIDERUST_FRAME_TRANSFORM_PAIR(A, B) \
227 template <> struct has_frame_transform<A, B> : std::true_type {}; \
228 template <> struct has_frame_transform<B, A> : std::true_type {}
248#undef SIDERUST_FRAME_TRANSFORM_PAIR
250template <
typename From,
typename To>
Error handling and utility base for the siderust C++ wrapper.
#define SIDERUST_DEFINE_FRAME(Tag, EnumVal, Label)
#define SIDERUST_FRAME_TRANSFORM_PAIR(A, B)
constexpr bool has_lon_lat_v
constexpr bool has_ra_dec_v
constexpr bool is_frame_v
constexpr bool has_frame_transform_v
constexpr bool has_az_alt_v
constexpr bool has_horizontal_transform_v
Celestial Intermediate Reference System.
Earth-Centered Earth-Fixed.
Mean ecliptic & equinox of J2000.0.
Ecliptic mean of date (alias for EclipticOfDate).
Ecliptic of date (precessed mean obliquity, no nutation).
True ecliptic of date (precessed + nutated).
Mean equatorial of J2000.0 (FK5-aligned).
Mean equatorial of date (precessed, no nutation).
True equatorial of date (precessed + nutated).
SFINAE helper: every frame tag must provide these static members.
Geocentric Celestial Reference System.
Galactic coordinate system (IAU 1958).
Local horizontal (topocentric alt-az).
International Celestial Reference Frame (treated ≡ ICRS).
International Celestial Reference System.
International Terrestrial Reference Frame.
static constexpr const char * lat_name()
static constexpr const char * lon_name()
static constexpr const char * lat_name()
static constexpr const char * lon_name()
static constexpr const char * lon_name()
static constexpr const char * lat_name()
static constexpr const char * lon_name()
static constexpr const char * lat_name()
static constexpr const char * lon_name()
static constexpr const char * lat_name()
static constexpr const char * lon_name()
static constexpr const char * lat_name()
static constexpr const char * lat_name()
static constexpr const char * lon_name()
static constexpr const char * lat_name()
static constexpr const char * lon_name()
Maps a frame to its conventional spherical-coordinate names.
static constexpr const char * lon_name()
static constexpr const char * lat_name()
Terrestrial Intermediate Reference System.
True for the horizontal frame that exposes azimuth / altitude.
True for ecliptic and galactic frames that use longitude / latitude.
True for equatorial frames that expose right-ascension / declination.
Concept-like compile-time check (C++17: constexpr bool).