39 constexpr EarthModel(
double a_,
double f_,
double omega_,
double mu_)
40 :
a(a_),
f(f_),
omega(omega_),
mu(mu_),
b(a_ * (1.0 - f_)),
41 e2(2.0 * f_ - f_ * f_),
42 e_prime2((2.0 * f_ - f_ * f_) / (1.0 - (2.0 * f_ - f_ * f_))) {}
81 [[nodiscard]]
virtual double gmst(
double t_seconds)
const = 0;
86 return gmst(t_seconds);
113 [[nodiscard]]
double gmst(
double t_seconds)
const override {
146 [[nodiscard]]
double gmst(
double t_seconds)
const override {
148 constexpr double sec_per_century = 86400.0 * 36525.0;
149 const double T = t_seconds / sec_per_century;
152 const double gmst_sec = 67310.54841 +
153 (876600.0 * 3600.0 + 8640184.812866) * T +
154 0.093104 * T * T - 6.2e-6 * T * T * T;
constexpr double pi
Pi.
Definition Constants.hpp:153
constexpr double omega
Angular velocity [rad/s].
Definition Constants.hpp:37
constexpr double R_mean
Mean radius [m].
Definition Constants.hpp:22
constexpr double mu
Gravitational parameter (GM) [m^3/s^2].
Definition Constants.hpp:13
constexpr double omega
Angular velocity [rad/s].
Definition Constants.hpp:63
constexpr double mu
Gravitational parameter [m^3/s^2].
Definition Constants.hpp:60
constexpr double a
Semi-major axis (equatorial radius) [m].
Definition Constants.hpp:45
constexpr double f
Flattening.
Definition Constants.hpp:48
Definition Aerodynamics.hpp:11
double theta0
Initial angle at t=0 [rad].
Definition EarthModel.hpp:108
static constexpr ConstantOmegaRotation from_model(const EarthModel &model, double theta0=0.0)
Create rotation model using specified Earth model.
Definition EarthModel.hpp:123
static constexpr ConstantOmegaRotation from_wgs84(double theta0=0.0)
Create rotation model using WGS84 angular velocity.
Definition EarthModel.hpp:118
double gmst(double t_seconds) const override
Definition EarthModel.hpp:113
double omega
Angular velocity [rad/s].
Definition EarthModel.hpp:107
constexpr ConstantOmegaRotation(double omega_, double theta0_=0.0)
Definition EarthModel.hpp:110
Definition EarthModel.hpp:27
double b
Semi-minor axis (polar radius) [m].
Definition EarthModel.hpp:34
double omega
Angular velocity [rad/s].
Definition EarthModel.hpp:30
double a
Semi-major axis (equatorial radius) [m].
Definition EarthModel.hpp:28
constexpr EarthModel(double a_, double f_, double omega_, double mu_)
Construct an EarthModel with derived quantities computed.
Definition EarthModel.hpp:39
static constexpr EarthModel WGS84()
WGS84 reference ellipsoid (most common for GPS/navigation).
Definition EarthModel.hpp:45
double f
Flattening (a-b)/a.
Definition EarthModel.hpp:29
static constexpr EarthModel Spherical()
Spherical Earth (for simplified calculations).
Definition EarthModel.hpp:54
double e_prime2
Second eccentricity squared: e'² = e²/(1-e²).
Definition EarthModel.hpp:36
double mu
Gravitational parameter (GM) [m³/s²].
Definition EarthModel.hpp:31
double e2
First eccentricity squared: e² = 2f - f²
Definition EarthModel.hpp:35
Definition EarthModel.hpp:75
virtual ~EarthRotationModel()=default
virtual double gmst(double t_seconds) const =0
virtual double ecef_to_eci_angle(double t_seconds) const
Definition EarthModel.hpp:85
constexpr GMSTRotation(double jd_epoch_=2451545.0)
Definition EarthModel.hpp:143
double gmst(double t_seconds) const override
Definition EarthModel.hpp:146
double jd_epoch
Julian Date of the reference epoch.
Definition EarthModel.hpp:141