Class GroundStationManagerApp

Inheritance Relationships

Base Type

Class Documentation

class GroundStationManagerApp : public lupnt::Application

Centralized orbit-determination application hosted on a GroundStationManager agent.

The manager is the estimator of the ground segment: GroundStationTrackingApps running on the individual GroundStation agents push their visibility-gated range/range-rate observations here (AddMeasurement) as the arc plays out. At end of arc a single Solve runs the combined weighted-least-squares batch filter over all stations’ measurements (analytic design matrix: closed-form range/range-rate partials chained with the target dynamics’ autodiff STM), then a square-root information filter + Dyer—McReynolds smoother for a process-noise-aware, per-epoch covariance. The target dynamics come from the shared World (World::MakeDynamics), so truth and filter share one force model by construction.

Public Functions

GroundStationManagerApp() = default
explicit GroundStationManagerApp(Config &config)
virtual void Setup() override

Resolve the target agent and shared dynamics, build the uniform epoch grid, seed the batch’s perturbed initial guess, and schedule the single end-of-arc Solve.

inline virtual void Step(Real) 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]

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]

int RegisterStation(const std::string &station_name)

Register a tracking station with the manager, returning its station id (index into StationNames()). Called from GroundStationTrackingApp::Setup.

void AddMeasurement(const StationMeasurement &m)

Aggregate one observation from a tracking station.

int EpochIndex(double t) const

Map a sim-relative epoch [s] to its index in the uniform grid (nearest).

void Solve()

Run the centralized batch + SRIF/smoother over all aggregated measurements. Scheduled once after the last tracking Step; idempotent.

Vec6d ModeledStation(const StationMeasurement &m) const

Station state the estimator uses for a measurement: the reported nominal position plus the solid-tide displacement when model_solid_earth_tide is set (else nominal).

double ModeledRangeCorrection(const StationMeasurement &m) const

Modelled range correction added to the predicted range: the full Shapiro delay (when enabled) plus the calibrated fractions of the troposphere and ionosphere delays.

double RangeSigmaEffective(const StationMeasurement &m) const

Range 1-sigma inflated to cover the uncancelled troposphere/ionosphere remainder.

inline bool HasSolved() const
inline bool Converged() const
inline int NumIterations() const
inline int NumMeasurements() const
inline const std::vector<std::string> &StationNames() const
inline const Vec6d &X0True() const
inline const Vec6d &X0InitialGuess() const
inline const Vec6d &X0Estimated() const
inline const Mat6d &Covariance() const
inline const VecXd &TimeGrid() const
inline const MatXd &TruthState() const
inline const MatXd &EstimatedState() const
inline const MatXd &EstimatedCovariance() const
inline const MatXd &IterationState() const
inline const VecXd &IterationPosError() const
inline const VecXd &IterationVelError() const
inline const VecXd &IterationCorrectionNorm() const
inline const VecXd &IterationWeightedRms() const
inline const VecXd &IterationRmsRange() const
inline const VecXd &IterationRmsRangeRate() const
inline const MatXd &SrifFilteredState() const
inline const MatXd &SrifFilteredCovariance() const
inline const MatXd &SrifSmoothedState() const
inline const MatXd &SrifSmoothedCovariance() const

Protected Attributes

std::string target_name_
int seed_ = 42
double initial_position_sigma_m_ = 2000.0
double initial_velocity_sigma_mps_ = 0.5
int batch_max_iterations_ = 10
double batch_convergence_tol_ = 1.0e-3
double obs_interval_s_ = 300.0
bool run_srif_ = true
bool srif_use_process_noise_ = true
double srif_accel_psd_ = 3.0e-13
bool model_shapiro_ = true
bool model_solid_earth_tide_ = true
double tropo_cancel_fraction_ = 0.0
double iono_cancel_fraction_ = 0.0
double residual_delay_noise_scale_ = 1.0
Config filter_dyn_node_
Config batch_dyn_node_
Config srif_dyn_node_
bool has_filter_dyn_ = false
bool has_batch_dyn_ = false
bool has_srif_dyn_ = false
Ptr<NBodyDynamics> dynamics_
Ptr<NBodyDynamics> batch_dynamics_
Ptr<NBodyDynamics> srif_dynamics_
Real epoch0_ = 0.0
std::vector<std::string> station_names_
std::vector<StationMeasurement> meas_
VecXd t_grid_
Vec6d x0_true_ = Vec6d::Zero()
Vec6d x0_guess_ = Vec6d::Zero()
Vec6d x0_est_ = Vec6d::Zero()
Mat6d covariance_ = Mat6d::Zero()
bool converged_ = false
bool solved_ = false
int num_iterations_ = 0
MatXd truth_state_
MatXd estimated_state_
MatXd estimated_covariance_
MatXd iter_state_
VecXd iter_pos_err_
VecXd iter_vel_err_
VecXd iter_corr_norm_
VecXd iter_weighted_rms_
VecXd iter_rms_range_
VecXd iter_rms_range_rate_
MatXd srif_filtered_state_
MatXd srif_filtered_cov_
MatXd srif_smoothed_state_
MatXd srif_smoothed_cov_