Nutation model selection for the C++ bindings.
#include <cmath>
#include <iostream>
namespace {
return std::sqrt(std::pow(a.
x - b.
x, 2) + std::pow(a.
y - b.
y, 2) + std::pow(a.
z - b.
z, 2));
}
}
int main() {
std::cout << "=== Nutation Model Selection ===\n\n";
std::cout << "Epoch (TT): " << jd << '\n';
std::cout << "Input ICRS direction: " << icrs << "\n\n";
const auto precession_only_ctx = ctx.with_model<
Iau2006>();
const auto precession_only_true =
std::cout << std::scientific << std::setprecision(3);
std::cout << "1. Default transform (Iau2006A)\n";
std::cout << " TOD direction = " << default_true << '\n';
std::cout << "\n2. Custom transform with Iau2000B\n";
std::cout << " TOD direction = " << fast_true << '\n';
std::cout << " Chord delta vs default = " << chord_delta(default_true, fast_true) << '\n';
std::cout << "\n3. Custom transform with Iau2006 (precession only)\n";
std::cout << " TOD direction = " << precession_only_true << '\n';
std::cout << " Chord delta vs default = " << chord_delta(default_true, precession_only_true)
<< "\n\n";
std::cout << std::fixed;
std::cout << "Pattern to copy:\n";
std::cout << " AstroContext ctx;\n";
std::cout << " auto custom = ctx.with_model<Iau2000B>();\n";
std::cout << " auto tod = icrs.to_frame_with<EquatorialTrueOfDate>(jd, custom);\n";
return 0;
}
constexpr AstroContext with_model() const
tempoch::EncodedTime< Scale, Format > Time
Umbrella header for the siderust C++ wrapper library.
A unit-vector direction in Cartesian form, compile-time frame-tagged.
double x
X component (unitless).
double y
Y component (unitless).
double z
Z component (unitless).
True equatorial of date (precessed + nutated).