Class LansEphemeris

Class Documentation

class LansEphemeris

Piecewise ephemeris model for one fitting window: an osculating two-body Kepler orbit (fit at the window’s midpoint) plus a Chebyshev-polynomial correction on the Cartesian position residual, with velocity obtained from the polynomial’s analytic time derivative. This mirrors the “orbital elements + polynomial correction” representation used by GNSS broadcast ephemerides (e.g. GPS LNAV), extended here to arbitrary orbits/gravity fields via the polynomial correction term.

Used directly (via the Python bindings) and by EphemerisSimulation (lupnt/simulations/ephemeris/ephemeris_simulation.h) to study the position/velocity accuracy vs. parameter-count/datasize trade-off of broadcast-style ephemerides for lunar orbits.

Public Functions

LansEphemeris() = default
inline explicit LansEphemeris(EphemerisFitOptions options)
VecXd Fit(const VecXd &t_s, const MatXd &rv) const

Fit this ephemeris model to a sampled trajectory.

Parameters:
  • t_s – Sample epochs [s], strictly increasing, relative to any fixed time origin.

  • rv – Sampled Cartesian states [N x 6] ([m, m, m, m/s, m/s, m/s]), row i corresponding to t_s(i).

Returns:

Fitted parameter vector; see ParamNames() for the layout.

MatXd Eval(const VecXd &t_s, const VecXd &params) const

Evaluate the fitted ephemeris at a set of epochs.

Parameters:
  • t_s – Query epochs [s], same time origin as used in Fit.

  • params – Parameter vector returned by Fit.

Returns:

Evaluated Cartesian states [N x 6].

EphemerisFitErrorStats EvalError(const VecXd &t_s, const MatXd &rv_ref, const VecXd &params) const

Evaluate the fit error of params against a reference trajectory.

Parameters:
  • t_s – Reference epochs [s].

  • rv_ref – Reference Cartesian states [N x 6] to compare against.

  • params – Parameter vector returned by Fit.

int NumParams() const

Number of scalar parameters in the vector returned by Fit.

std::vector<std::string> ParamNames() const

Human-readable name of each parameter in the vector returned by Fit (same order/length), e.g. “t_ref”, “t_fit”, “a”, “e”, “i”, “raan”, “argp”, “M_ref”, “x_0”, …, “y_0”, …, “z_0”, …

inline const EphemerisFitOptions &GetOptions() const