Class Application¶
Defined in File application.h
Inheritance Relationships¶
Base Type¶
public lupnt::Object< Application >(Template Class Object)
Derived Types¶
public lupnt::LunaNetSatApp(Class LunaNetSatApp)public lupnt::RoverApp(Class RoverApp)public lupnt::SurfaceStationApp(Class SurfaceStationApp)
Class Documentation¶
-
class Application : public lupnt::Object<Application>¶
Base class for top-level simulation “application” logic attached to an Agent (e.g. RoverApp, SurfaceStationApp) — the part of an agent that runs its navigation filter / mission logic on a periodic schedule.
An Application is created and owned by an Agent (see the Agent(Config&) constructor, which builds it from the
application:block of the agent’s Config and callsSetApplication(...)). Derived classes wire together the agent’s dynamics, devices, and a Filter (EKF/UKF/etc.) into a runnable scenario: Setup() initializes the filter state/covariance and schedules periodic Step() calls, Step() performs one predict/update cycle, and Log() records results each step (Agent::Log forwards to it).Subclassed by lupnt::LunaNetSatApp, lupnt::RoverApp, lupnt::SurfaceStationApp
Public Functions
-
Application() = default¶
-
Application(Config &config)¶
Construct an Application from a YAML Config node.
Called via AssetFactory<Application, Config&>::Create from the Agent(Config&) constructor when an agent’s config contains an
application:block. Reads the optionalname(defaults to GetId()) andfrequency[Hz] entries and stores the full config for use by derived-class constructors (e.g. RoverApp readsdynamics/filtersub-configs from it).- Parameters:
config – YAML configuration node for this application (must outlive derived objects that retain a reference into it).
-
virtual ~Application() = default¶
-
virtual void Setup()¶
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. RoverApp::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) = 0¶
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. RoverApp::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]
-
virtual void Log(Real t)¶
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. RoverApp::Log) override this to additionally log their Filter’s state/covariance and any error metrics.- Parameters:
t – Current simulation time [s, since simulation epoch]
-
inline std::string GetName() const¶
Get the application’s name (used as a prefix for logging/data keys).
-
inline void SetName(std::string name)¶
Set the application’s name.
-
inline void SetFrequency(Real frequency)¶
Set the Step() call frequency [Hz]; used by Setup() to schedule periodic steps.
-
inline void SetAgent(Agent *agent)¶
Set the Agent that owns this application (called by Agent::SetApplication).
-
Application() = default¶