13.07.2015 Views

An Integrated, Modular Simulation System for Education ... - Cal Poly

An Integrated, Modular Simulation System for Education ... - Cal Poly

An Integrated, Modular Simulation System for Education ... - Cal Poly

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CPsi=cos(Psi);TTheta=tan(Theta);SecTheta=1.0;if (CTheta > 1e-6)SecTheta = 1.0/CTheta;/* u_Trim = u0;UpdateState();*/}#endif /* MDL_INITIALIZE_CONDITIONS *//* ENTRY POINT FOR FLIGHT MODEL LOOP* This function takes as parameters references to a state_vect structure* containing the control input from the current pass, as well as the* values <strong>for</strong> all other aircraft data from the previous pass. *//* Function: mdlOutputs =======================================================* Abstract:**/static void mdlOutputs(SimStruct *S, int_T tid){/* Function: mdlOutputs ======================================================* Abstract:* This function is called once <strong>for</strong> every major integration time step.** Control vector:* Deflect_Elevator = uPtrs[0]* Deflect_Aileron = uPtrs[1]* Deflect_Rudder = uPtrs[2]* Rho = uPtrs[3]* Fx = uPtrs[4]* Fy = uPtrs[5]* Fz = uPtrs[6]* PitchingMoment = uPtrs[7]* RollingMoment = uPtrs[8]* YawingMoment = uPtrs[9]** Output vector values:* y[0] = xx* y[1] = yy* y[2] = zz* y[3] = Psi* y[4] = Theta* y[5] = Phi* y[6] = u* y[7] = v* y[8] = w* y[9] = p* y[10]= q* y[11]= r* y[12]= Alpha* y[13]= Beta* y[14]= pDot145

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!