next up previous contents
Next: Conclusion Up: The Simulator Program Previous: Output

Time Step Calculation

Using the current state and control variables of the airplane, the flight simulator calculates, by finite differences, the state of the airplane a small time increment in the future.

The first task for the time step calculation is to calculate variables dependent on the environment, including the air density and wind velocity; perhaps using Equations 2-4 to determine density.

The second task is to calculate the variables that depend on the state and control variables. The simulator calculates the cosine matrix using Equation 16 or Equation 21, depending on how it stores orientation. If the simulator stores orientation with quarternions, it then calculates the Euler angles using Equations 30-32. It transforms the wind velocity to body axes using Equation 7, and then subtracts this from the aircraft velocity to yield the airspeed components ( ua,va,wa). If it is important, the simulator may use the formulas from Reference 3 to calculate the geodetic coordinates ( $h,\theta,\phi$).

The flight simulator calculates $\alpha $ and $\beta$ using Equations 5 and 6. It calculates nondimensional parameters like $\overline q$ using Equations 51-53. To calculate $\dot\alpha$, it uses the chain rule with $\dot u$ and $\dot v$:

 \begin{displaymath}\dot\alpha = \frac{d}{dt}\tan^{-1}\left(\frac{w_a}{u_a}\right)
=\frac{u_a\dot w-w_a\dot u}{u_a^2+w_a^2}
\end{displaymath} (99)

Equation 99 assumes $\dot{u_a}\approx\dot{u}$ and $\dot{w_a}\approx\dot{w}$.

Once the necessary variables are calculated, the flight simulator uses the aerodynamic, landing gear, engine, and body force models from Sections 2, 3, and 4 to calculate the total resultant force and moment on the airplane.

Then it employs the the rigid body equations of motion (Equations 10-15, 17-19 or 22-25, and 33-35 or 36-38) to calculate the time derivatives of all the rigid-body state variables. Additionally, it uses Equations 65, 72, and 76, to calculate the time derivative of other state variables within the airplane.

Having determined the time derivatives of all state variables, the simulator is ready to use a finite-difference scheme to calculate the future state of the airplane. Generally, schemes that require only one calculation of the time derivatives per time step are preferred.

Reference 21 recommends using the predictive Adams-Brashford method. For a given state variable s, the method is given by Equation 100, in which $\Delta
t$ is the step size.

 \begin{displaymath}s(t+\Delta t) = s(t) + \frac{\Delta t}2 \big(3\dot s(t) - \dot
s(t-\Delta t)\big)
\end{displaymath} (100)

The method is second-order accurate. Another second order accurate method from Reference 21 is the trapezoidal method, given by Equation 101.

 \begin{displaymath}s(t+\Delta t) = s(t) + \frac{\Delta t}2 \big(\dot s(t) + \dot
s(t-\Delta t)\big)
\end{displaymath} (101)

Reference 21 reports that both methods have acceptably low phase errors. Note that both methods require the time derivatives from the previous time step.

next up previous contents
Next: Conclusion Up: The Simulator Program Previous: Output
Carl Banks