We consider an F-16 aircraft with state
$$x_t = [p^N_t, p^E_t, h_t, u_t, v_t, w_t, p_t, q_t, r_t, \phi_t, \theta_t, \psi_t]^\top,$$
where \((p^N_t, p^E_t, h_t)\) and \((\phi_t,\theta_t,\psi_t)\) denote inertial position and Euler attitude, \((u_t,v_t,w_t)\) are body-frame velocities, and \((p_t,q_t,r_t)\) are body angular rates. The control input is
$$u_t = [\delta_{A,t}, \delta_{E,t}, \delta_{R,t}, \delta_{T,t}]^\top,$$
with aileron, elevator, rudder, and throttle commands. Note that \(\delta\), \(\alpha\), and \(\beta\) in the F-16 dynamics denote control inputs, angle of attack, and sideslip angle, and are distinct from DRS-gatekeeper parameters.
We model the aircraft dynamics using a discrete-time rigid-body model \(x_{t+1} = f(x_t, u_t)\) as
$$x_{t+1} = x_t + \Delta t \underbrace{\begin{bmatrix}
\dot p^N_t \\
\dot p^E_t \\
\dot h_t \\
X_t + r_t v_t - q_t w_t - g \sin\theta_t \\
Y_t + p_t w_t - r_t u_t + g \sin\phi_t \cos\theta_t \\
Z_t + q_t u_t - p_t v_t + g \cos\phi_t \cos\theta_t \\
\dot p_t \\
\dot q_t \\
\dot r_t \\
p_t + q_t \sin\phi_t \tan\theta_t + r_t \cos\phi_t \tan\theta_t \\
q_t \cos\phi_t - r_t \sin\phi_t \\
\frac{q_t \sin\phi_t + r_t \cos\phi_t}{\cos\theta_t}
\end{bmatrix}}_{\dot x_t}$$
where \(\Delta t=\frac{1}{30}\) is the sampling time and \(g=32.174\,\mathrm{ft/s^2}\). The position kinematics are
$$\dot p^N_t = u_t(c_{\theta_t}c_{\psi_t}) + v_t(s_{\phi_t}s_{\theta_t}c_{\psi_t} - c_{\phi_t}s_{\psi_t}) + w_t(c_{\phi_t}s_{\theta_t}c_{\psi_t} + s_{\phi_t}s_{\psi_t}),$$
$$\dot p^E_t = u_t(c_{\theta_t}s_{\psi_t}) + v_t(s_{\phi_t}s_{\theta_t}s_{\psi_t} + c_{\phi_t}c_{\psi_t}) + w_t(c_{\phi_t}s_{\theta_t}s_{\psi_t} - s_{\phi_t}c_{\psi_t}),$$
$$\dot h_t = u_t s_{\theta_t} - v_t s_{\phi_t}c_{\theta_t} - w_t c_{\phi_t}c_{\theta_t},$$
with \(c_{(\cdot)}=\cos(\cdot)\) and \(s_{(\cdot)}=\sin(\cdot)\).
Aerodynamic coefficients are predicted via polynomial approximation
$$[\hat C_{X,t},\hat C_{Y,t},\hat C_{Z,t},\hat C_{L,t},\hat C_{M,t},\hat C_{N,t}]
= \phi(\upsilon_t)^\top W + B,$$
where
$$\upsilon_t=[\alpha_t,\beta_t,\mathrm{Mach}_t,p_t,q_t,r_t,\delta_{e,t},\delta_{a,t},\delta_{r,t}]^\top,$$
and \(\alpha_t=\arctan2(w_t,u_t), ~
\beta_t=\arcsin\!\left(\frac{v_t}{V_t}\right), ~
V_t=\sqrt{u_t^2+v_t^2+w_t^2}\). Using dynamic pressure \(q_{\infty,t}=\frac12\rho V_t^2\), wing area \(S\), span \(b\), mean chord \(\bar c\), and mass \(m\):
$$X_t=q_{\infty,t}\frac{S}{m}\hat C_{X,t}+T(\delta_{t,t}),\quad
Y_t=q_{\infty,t}\frac{S}{m}\hat C_{Y,t},\quad
Z_t=q_{\infty,t}\frac{S}{m}\hat C_{Z,t},$$
$$L_t=q_{\infty,t}Sb\,\hat C_{L,t},\quad
M_t=q_{\infty,t}S\bar c\,\hat C_{M,t},\quad
N_t=q_{\infty,t}Sb\,\hat C_{N,t},$$
and angular accelerations satisfy
$$\dot\omega_t = I^{-1}\!\left(\begin{bmatrix}L_t\\M_t\\N_t\end{bmatrix} - \omega_t \times (I\omega_t)\right),\qquad
\omega_t=[p_t,q_t,r_t]^\top.$$
Control inputs are normalized and bounded by \(\delta_{a,t},\delta_{e,t},\delta_{r,t}\in[-1,1]\), \(\delta_{t,t}\in[0,1]\).
Trajectory Generation
Trajectory generation for the F-16 case study follows the optimization-based workflow described in air-racing-optimization.
The canyon elevation data is obtained from an OpenTopography USGS 10 m digital elevation model of Black Canyon of the Gunnison National Park.
Polynomial Model Identification and Uncertainty Injection
The nominal aerodynamic model is identified from generated simulator data. Each rollout provides state, action, and next-state samples, which are converted into aerodynamic coefficient targets. A regularized polynomial regression is then fit from the selected flight and control features to the six aerodynamic coefficient channels:
$$\mathbf{C}_{\mathrm{nom}}
=
\begin{bmatrix}
C_X & C_Y & C_Z & C_L & C_M & C_N
\end{bmatrix}^{\top}.$$
After fitting the nominal polynomial model, residual coefficient errors are computed on the same generated dataset. Structured residual trends are removed using context-dependent calibration features, namely flight condition. The remaining centered residuals are stored as an empirical uncertainty model. During rollout, uncertainty samples are drawn from residuals observed in nearby historical contexts, so the injected uncertainty remains dependent on the current flight regime rather than being modeled as fixed Gaussian noise.
In the gatekeeper rollout, the sampled uncertainty enters directly in coefficient space. Let
$$\mathbf{w}
=
\begin{bmatrix}
w_{C_X} & w_{C_Y} & w_{C_Z} & w_{C_L} & w_{C_M} & w_{C_N}
\end{bmatrix}^{\top}$$
denote the sampled coefficient residual. The perturbed aerodynamic coefficients are
$$\mathbf{C}
=
\mathbf{C}_{\mathrm{nom}} + \mathbf{w}.$$
These perturbed coefficients are then converted into dimensional forces and moments:
$$X = (C_X + w_{C_X})\frac{\bar q S}{m} + T(\delta_t),
\qquad
Y = (C_Y + w_{C_Y})\frac{\bar q S}{m},
\qquad
Z = (C_Z + w_{C_Z})\frac{\bar q S}{m},$$
$$L = (C_L + w_{C_L})\bar q S b,
\qquad
M = (C_M + w_{C_M})\bar q S \bar c,
\qquad
N = (C_N + w_{C_N})\bar q S b.$$
Thus, uncertainty is injected before rigid-body propagation by perturbing the aerodynamic coefficients, which then changes the body-axis force and moment channels used by the rollout dynamics.