Example #1
0
h_array = np.zeros(steps)
u_h_array = np.zeros(steps)
w_array = np.zeros(steps)
i = 0

while t < time_end:

    #NO CHANGING
    #This defines how to transition to each phase of flight
    myFlightPlan.check_triggers(t, x)

    #This defines what to do during each phase of flight
    u = myFlightPlan.state_function(t, dt, x)

    #This updates the aircraft position each time step
    x_new, psi, xd_new = myAircraft1.step(dt, x, u)
    #NO CHANGING

    psi_array[i] = psi
    pn_array[i] = x_new[0][0]
    pe_array[i] = x_new[1][0]
    h_array[i] = x_new[5][0]
    u_h_array[i] = u[3]

    #NO CHANGING
    x = x_new
    t = t + dt
    i = i + 1
    #NO CHANGING

#Plot the heading angle