# Aim:

I want to solve the 6DOF equations to model the flight dynamics of an aircraft (for a flight simulator) In order to do this, I need to solve multiple differential equations using the Runge-Kutta 4 algorithm.

After a bit of research, I can use the RK4 algorithm to solve simple 2 variable ODE's, but I have no idea how to apply it to multi-variable ODE's.

I only have an engineering background so I apologize if I have made a meal out of the terminology.

The equations are a bit hefty so I will only type one of them out... See pg 10/32 for the full set of equations Link to full set of equations.

# Equations of Flight

Time Derivative of Angle of Attack $$\dot\alpha = \frac{\bar q S}{mV}C_Ncos(\alpha) + q-tan(\beta)(pcos(\alpha)+rsin(\alpha) + \frac{g}{V}(cos(\phi)cos(\theta)cos(\alpha)+sin(\theta)sin(\alpha))$$

In these equations most of the variables are functions of time (like $\dot \alpha, \bar q, V, p,q,r)$

As a result, I am not sure how to proceed. I would be very grateful if someone could offer some help. Alternatively, if anyone has any experience of flight sims I would be delighted to learn how the number-crunching works.

Regards,

Henry

• So I can just extend the RK method and solve each derivative one at a time? – ArmchairPilot Oct 2 '17 at 16:06
• No, all equations of the system are numerically solved simultaneously. For instance, with RK1 (= Euler method), $${\boldsymbol y}_{n+1} = {\boldsymbol y}_{n} + (t_{n+1}-t_n)\, {\boldsymbol f}(t_{n},{\boldsymbol y}_{n}) \, ,$$ whatever the dimension of $\boldsymbol y$. – Harry49 Oct 2 '17 at 16:09
• I think that works, thank you. – ArmchairPilot Oct 2 '17 at 17:35