Class LanderGncApp¶
Defined in File lander_gnc_app.h
Inheritance Relationships¶
Base Type¶
public lupnt::Application(Class Application)
Class Documentation¶
-
class LanderGncApp : public lupnt::Application¶
Guidance/control application for a lunar lander, hosted on a agent alongside a
LanderNavApp(both in the agent’sapplications:list, guidance first).It owns the powered-descent truth trajectory: it builds the Moon-fixed position, velocity, attitude, and the body-frame specific force / angular rate from the ENU descent path (or a supplied reference trajectory), writes the host lander’s truth state each epoch, and exposes the truth for the co-hosted navigation app to synthesize its measurements from. It reads only the shared
World(terrain / ENU frame) — never the filter’s estimate — so a closed-loop guidance law could later consume the nav estimate without changing this split.Public Functions
-
LanderGncApp() = default¶
-
inline void SetReferenceTrajectoryEnu(const MatXd &ref_traj_enu)¶
Supply an externally-generated reference (truth) trajectory,
N x 3ENU rows [m] about the DEM site center. Overrides the built-in smoothstep descent and setsN. Call before theSimulationruns.
-
virtual void Setup() override¶
Initialize the application and schedule its periodic Step() calls.
Base implementation: if GetFrequency() > 0, schedules
Step(t)on the owning agent’s Simulation at Event::Priority::APPLICATION, starting at t=0 with period 1/GetFrequency() seconds; otherwise logs a warning that no frequency is set. Derived classes (e.g. LanderNavApp::Setup, SurfaceStationApp::Setup) override this to additionally initialize their Filter’s time/state/covariance and dynamics/process noise callbacks before (optionally) calling the base behavior.
-
virtual void Step(Real t) override¶
Run one simulation step of this application’s mission logic at time
t.Pure virtual: derived classes implement the actual filter predict/update cycle here (e.g. LanderNavApp::Step computes a control input and logs state; the LNSS application’s Step would run the GNSS measurement-update). Invoked periodically by the Simulation event scheduled in Setup(), at the application’s configured frequency.
- Parameters:
t – Current simulation time [s, since simulation epoch]
-
inline virtual void Log(Real) 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 EnsureInitialized()¶
Build the truth trajectory if not already built (idempotent). Called on the first
Step, and by a co-hostedLanderNavAppso it can read the truth regardless of app order.
-
inline int N() const¶
-
inline double dt() const¶
-
inline const Vec3d &SpecificForce(int k) const¶
Body-frame truth specific force [m/s^2] at epoch k (gravity removed).
-
inline double Altitude(int k) const¶
Truth height above terrain [m] at epoch k.
-
inline const LanderGncConfig &config() const¶
-
LanderGncApp() = default¶