Post · 2 min read· pp. 69–70

State propagation contract

0. DISCLAIMER: this section is a work in progress.

The state of the vehicle is propagated according to the following equation:

x˙(tk)=f(tk,x(tk),x˙(tk−1),u)\dot{\boldsymbol{x}}(t_{k}) = \boldsymbol{f}\big( t_k, \boldsymbol{x}(t_{k}), \dot{\boldsymbol{x}}(t_{k-1}), \boldsymbol{u} \big)

The simulation is expressed as a discrete-time integration problem, where time is sampled at tkt_k and kk is an integer index.

1.1 State Vector Definition

The propagated state vector is defined as:

x=[u,v,w, p,q,r, xcg,ycg,zcg, q0,q1,q2,q3, masses,inertias]\boldsymbol{x} = \big[ u, v, w,\, p, q, r,\, x_{\text{cg}}, y_{\text{cg}}, z_{\text{cg}},\, q_0, q_1, q_2, q_3,\, \text{masses},\text{inertias}\big]

where:

  • u,v,wu, v, w: CG's translational velocity components w.r.t. ECI, expressed in the standard body-fixed frame
  • p,q,rp, q, r: vehicle's angular velocity components w.r.t. ECI, expressed in the standard body-fixed frame
  • xcg,ycg,zcgx_{\text{cg}}, y_{\text{cg}}, z_{\text{cg}}: CG's position coordinates expressed in the ECI frame
  • q0,q1,q2,q3q_0, q_1, q_2, q_3: vehicle's attitude quaternion components defined in the ECI frame
  • masses\text{masses}: the total mass, and possible individual masses of vehicle's sub-elements (tanks, etc.)
  • inertias\text{inertias}: the 9 elements of the vehicle's inertia matrix in body-frame

1.2 Derivative (Dynamics) Model

At each discrete time tkt_k, the derivative is defined as:

x˙(tk)=f(tk,x(tk),x˙(tk−1),u(tk))\dot{\boldsymbol{x}}(t_k) = \boldsymbol{f} \big( t_k, \boldsymbol{x}(t_k), \dot{\boldsymbol{x}}(t_{k-1}), \boldsymbol{u}(t_k) \big)

where:

  • x(tk)\boldsymbol{x}(t_k): current state
  • u(tk)\boldsymbol{u}(t_k): current inputs (controls, propulsion, environment, etc.)
  • x˙(tk−1)\dot{\boldsymbol{x}}(t_{k-1}): previous-step state derivative
  • f(⋅)\boldsymbol{f}(\cdot): vector-valued function representing the RHS of the EOM in explicit form.

Including x˙(tk−1)\dot{\boldsymbol{x}}(t_{k-1}) makes explicit what is already implicit in many simulator implementations:

  • Predictor/corrector schemes
  • Slope reuse in multi-stage integrators
  • Iterative or stabilized propagation logic

This formulation clarifies the conceptual boundary between:

  • Derivative formation (evaluation of f\boldsymbol{f})
  • Numerical integration

1.3 Numerical Integration Step

The state update is:

x(tk+1)=x(tk)+∫tktk+1x˙(τ) dτ\boldsymbol{x}(t_{k+1}) = \boldsymbol{x}(t_k) + \int_{t_k}^{t_{k+1}} \dot{\boldsymbol{x}}(\tau)\,\mathrm{d}\tau

The integral is approximated using the integrator selected inside FGPropagate. This makes explicit that:

  • FGPropagate performs numerical integration
  • FGFDMExec determines execution ordering and scheduling
  • The two together implement the discrete-time realization of the ODE

2. Observation Equation (Published Outputs)

In addition to propagation, the simulator produces outputs:

y(tk)=g(tk,x(tk),x˙(tk−1),u(tk))\boldsymbol{y}(t_k) = \boldsymbol{g}\big( t_k, \boldsymbol{x}(t_k), \dot{\boldsymbol{x}}(t_{k-1}), \boldsymbol{u}(t_k) \big)

where:

  • y(tk)\boldsymbol{y}(t_k): published or observable outputs (aero angles, derived velocities, accelerations, navigation quantities, atmosphere values, etc.)
  • g(⋅)\boldsymbol{g}(\cdot): output mapping

This observation equation formalizes what is currently scattered across model execution and property publication.

TBD