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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

y[7] = (int)newVal;newVal = doConversion(&rollTrimPos,&aToD12);newVal = 0.4*newVal + 0.6*oldVals[8];oldVals[8] = newVal;y[8] = (int)newVal;newVal = doConversion(&rollVelocity,&aToD12);newVal = 0.4*newVal + 0.6*oldVals[9];oldVals[9] = newVal;y[9] = (int)newVal;newVal = doConversion(&rudderPos,&aToD12);newVal = 0.4*newVal + 0.6*oldVals[10];oldVals[10] = newVal;y[10] = (int)(-newVal);newVal = doConversion(&rudderForce,&aToD12);newVal = 0.4*newVal + 0.6*oldVals[11];oldVals[11] = newVal;y[11] = (int)newVal;newVal = doConversion(&rudderTrimPos,&aToD12);newVal = 0.4*newVal + 0.6*oldVals[12];oldVals[12] = newVal;y[12] = (int)newVal;newVal = doConversion(&rudderVelocity,&aToD12);newVal = 0.4*newVal + 0.6*oldVals[13];oldVals[13] = newVal;y[13] = (int)newVal;newVal = doConversion(&rThrottle,&aToD12);newVal = 0.4*newVal + 0.6*oldVals[14];oldVals[14] = newVal;y[14] = (int)newVal;}newVal = doConversion(&lThrottle,&aToD12);newVal = 0.4*newVal + 0.6*oldVals[15];oldVals[15] = newVal;y[15] = (int)newVal;#define MDL_UPDATE /* Change to #undef to remove function */#if defined(MDL_UPDATE)/* Function: mdlUpdate ======================================================* Abstract:* This function is called once <strong>for</strong> every major integration time step.* Discrete states are typically updated here, but this function is useful* <strong>for</strong> per<strong>for</strong>ming any tasks that should only take place once per* integration step.*/static void mdlUpdate(SimStruct *S, int_T tid){}#endif /* MDL_UPDATE */121

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

Saved successfully!

Ooh no, something went wrong!