Class LanderNavApp

Inheritance Relationships

Base Type

Class Documentation

class LanderNavApp : public lupnt::Application

Strapdown inertial-navigation multiplicative EKF (MEKF) for a lunar lander, hosted on a agent as its . Attitude is estimated as a unit quaternion q_b2n with a 3-parameter multiplicative error in the covariance.

When constructed from a YAML application: block, the app is self-driving: Setup() precomputes the descent truth trajectory (built-in smoothstep or a supplied reference trajectory), a synthetic crater map, the relay orbits, and the perturbed initial estimate, seeds the filter, and schedules Step(t) at the IMU cadence; each Step synthesizes that epoch’s IMU, pseudorange, altimeter, and crater-bearing measurements from the shared World and runs the predict/update cycle, recording the result series accessible below. The lower-level Configure/Predict/Update* core can also be driven directly.

Public Functions

LanderNavApp() = default
inline explicit LanderNavApp(const LanderNavAppParams &params)
explicit LanderNavApp(Config &config)

Construct a self-driving app from the application: block of a Lander agent.

virtual void Setup() override

Precompute descent truth, crater map, relay orbits, and the perturbed initial estimate (same RNG draw order as the legacy RunLanderNav), seed the filter, log epoch 0, and schedule periodic Steps. Terrain / gravity / ENU come from GetWorld().

virtual void Step(Real t) override

One self-driving descent epoch: set the host lander’s truth state, Predict the IMU sample, then LunaNet / altimeter / crater updates (same order as the legacy loop).

virtual void Log(Real t) override

Log this application’s current state/diagnostics to the DataLogger.

Base implementation only emits a debug message. Called once after Setup() and thereafter from Agent::Log(t) (which forwards to application_->Log(time) each time the owning agent logs). Derived classes (e.g. LanderNavApp::Log) override this to additionally log their Filter’s state/covariance and any error metrics.

Parameters:

t – Current simulation time [s, since simulation epoch]

void Configure(double t0, const Vec3d &r0, const Vec3d &v0, const Mat3d &R0, const Vec3d &ba0, const Vec3d &bg0, double cb0, double cd0, const MatXd &P0)

Seed the filter nominal state and covariance.

void Predict(const SurfaceImuMeasurement &imu, double dt)
void UpdateLans(const std::vector<SurfaceLansMeasurement> &meas)
void UpdateAltimeter(const LanderAltimeterMeasurement &meas)
void UpdateCraters(const std::vector<LanderCraterMeasurement> &meas)
void UpdateCrater(const LanderCraterMeasurement &meas)
void UpdateScalar(const VecXd &H, double z_pred, double z_meas, double variance)
inline double time() const
inline const Vec3d &position() const
inline const Vec3d &velocity() const
inline Mat3d attitude() const
inline Vec4d quaternion() const
inline const Vec3d &accel_bias() const
inline const Vec3d &gyro_bias() const
inline double clock_bias() const
inline double clock_drift() const
inline const MatXd &covariance() const
inline const LanderNavAppParams &params() const
inline const LanderNavConfig &config() const
inline const LanderNavResults &results() const
inline const std::string &site_id() const
inline const std::string &site_name() const
inline const MatXd &dem_x() const
inline const MatXd &dem_y() const
inline const MatXd &dem_elevation() const
inline const MatXd &crater_enu() const
inline const VecXd &time_series() const
inline const MatXd &pos_err_enu() const
inline const MatXd &pos_sigma_enu() const
inline const VecXd &pos_err_norm() const
inline const VecXd &vel_err_norm() const
inline const VecXd &clock_bias_err() const
inline const VecXd &clock_bias_sigma() const
inline const VecXi &n_visible_sat() const
inline const VecXi &n_craters() const
inline const MatXd &accel_bias_err() const
inline const MatXd &accel_bias_sigma() const
inline const MatXd &gyro_bias_err() const
inline const MatXd &gyro_bias_sigma() const
inline const MatXd &att_err_deg() const
inline const MatXd &att_sigma_deg() const
inline const MatXd &att_quat_est() const
inline const MatXd &traj_enu_truth() const
inline const MatXd &traj_enu_est() const
inline const VecXd &alt_truth() const
inline const VecXd &alt_est() const
inline const std::vector<std::string> &satellite_names() const