Class ImuDynamics¶
Defined in File imu_dynamics.h
Inheritance Relationships¶
Base Type¶
public lupnt::Dynamics(Class Dynamics)
Class Documentation¶
-
class ImuDynamics : public lupnt::Dynamics¶
IMU bias random-walk propagation model.
Propagates an
ImuState(gyro biasb_wand accelerometer biasb_a, each 3-element) as a random walk driven by the bias-instability noise parameters of the configuredImuModel(seedevices/imu.hImu::GetParameters). Used bydevices/imu.hImuto evolve the “true” IMU bias state that corrupts simulated IMU measurements consumed by attitude/inertial-navigation filters.Public Functions
-
ImuDynamics()¶
Construct with an undefined IMU model.
-
ImuDynamics(Config &config)¶
Construct from a YAML configuration node.
Reads the optional
model(ImuModel) field.
-
inline void SetSeed(int seed)¶
Set the random-number-generator seed used for bias-noise sampling.
Reseeds the internal Mersenne Twister RNG (
rng_).
-
virtual State Propagate(const State &x0, Real t0, Real tf, const State *u = nullptr) override¶
Propagate the IMU gyro/accelerometer bias state as a random walk over
[t0, tf].For each of the 3 gyro-bias and 3 accelerometer-bias components, draws a new value from a normal distribution centered on the previous bias with standard deviation
sigma_*_bias / sqrt(1/(tf-t0))(i.e. scaled bysqrt(tf-t0)), usingimu_model_’s noise parameters (Imu::GetParameters) and the internal RNG (rng_).- Parameters:
x0 – Initial IMU bias state (
ImuState, 6-element:b_wthenb_a) at timet0.t0 – Initial epoch [s].
tf – Final epoch [s].
u – Unused; must be nullptr (IMU bias dynamics has no control input).
- Returns:
Propagated IMU bias state at time
tf.
-
inline virtual StateType GetStateType() const override¶
Return
ImuState::TYPE, the gyro/accelerometer bias state type propagated by this model.
-
virtual State Propagate(const State &x0, Real t0, Real tf, const State *u, MatXd *stm)¶
Propagate the state and compute the state transition matrix (STM) d(xf)/d(x0) via automatic differentiation.
Default implementation: if
stm == nullptr, forwards to the no-STMPropagateoverload; otherwise wrapsPropagate(x0, t0, tf, u)in an autodiff Jacobian (jacobian(...)) with respect tox0. Used by filters (filters/) that need the linearized state transition for covariance propagation (e.g. EKF/UKF time updates).- Parameters:
x0 – Initial state at time
t0.t0 – Initial epoch [s, TDB since J2000].
tf – Final epoch [s, TDB since J2000].
u – Optional control/forcing input; nullptr if unused.
stm – Output: state transition matrix d(xf)/d(x0); left unmodified if nullptr.
- Returns:
Propagated state at time
tf.
-
virtual MatX Propagate(const State &x0, const VecX &tfs, const State *u = nullptr)¶
Propagate the state to a sequence of output epochs.
Repeatedly calls
Propagate(x0, t0, tf, u)between consecutive entries oftfs, accumulating each result as a row of the returned matrix. Used by applications/ and analysis scripts to generate a full trajectory time history in one call, with optional progress-bar output (see SetPrintProgress).- Parameters:
x0 – Initial state at
tfs(0).tfs – Vector of output epochs [s, TDB since J2000], including the initial epoch as
tfs(0).u – Optional control/forcing input applied at every step; nullptr if unused.
- Returns:
Matrix whose i-th row is the propagated state at
tfs(i).
-
ImuDynamics()¶