Class Spacecraft¶
Defined in File spacecraft.h
Inheritance Relationships¶
Base Type¶
public lupnt::Agent(Class Agent)
Class Documentation¶
-
class Spacecraft : public lupnt::Agent¶
A physical spacecraft whose truth is a joint orbit + clock 8-state
[r(3), v(3), clock_bias, clock_drift]. It self-propagates that truth so other agents / sensors can query both its geometry and its clock (needed for two-way time/frequency transfer and pseudorange).Truth dynamics come entirely from the agent config, keeping the “onboard
software never knows the truth” separation:
orbit: the agent’s
dynamics:block (anNBodyDynamics-style force model). When omitted,Simulation::Setupinjects the sharedworld.force_modelhere, so common orbit physics is declared once underworld:. Built with the state-transition matrix disabled (truth needs no STM).clock: an optional
clock:block (model,seed,add_noise).
The initial truth state is read from
initial_state:, which accepts either an explicit{r0_m, v0_mps}(MOON_CI) or a{class: ClassicalOE, ...}block, plus optionalclock_bias_s/clock_drift_sps.This is a general orbit+clock spacecraft agent, used by both the ISL scenarios and the Lunar-GNSS receiver. Truth is propagated in simulation-relative time;
JointOrbitClockDynamicsaddsGetLupntEpoch().Public Functions
-
Spacecraft() = default¶
-
inline virtual void Setup() override¶
Perform one-time setup before the simulation starts: schedules a periodic
Stepcallback with the simulation event scheduler (iffrequency_ > 0) and callsSetupon each attached device.Called once by
Simulation::Setupfor every registered agent, before the main time-stepping loop begins.AgentWithDynamicsandGnssConstellationoverride/extend this for their own initialization needs.
-
virtual void Step(Real t) override¶
Propagate the truth 8-state to
t[s, sim-relative] (mutating) and log.
-
State GetTruthStateAt(Real t) const¶
The truth joint 8-state
[r,v,clock_bias,clock_drift]at timet(sim-relative [s]), without mutating the stored truth.
-
inline JointOrbitClockDynamics *GetTruthDynamics() const¶
-
virtual Cart6 GetStateAt(Real t) const override¶
Geometry facade: Cartesian
[r; v]truth att, inFrame::MOON_CI.
Protected Functions