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.

* Function: mdlInitializeSampleTimes =========================================* Abstract:* Specifiy that we inherit our sample time from the driving block.*/static void mdlInitializeSampleTimes(SimStruct *S){ssSetSampleTime(S, 0, INHERITED_SAMPLE_TIME);ssSetOffsetTime(S, 0, 0.0);}#define MDL_START#if defined(MDL_START)/* Function: mdlstart ========*/static void mdlStart(SimStruct *S){d16.nBits=16;d16.baseAddr=0x340;d16.nLimit = -5.0;d16.pLimit = 5.0;d16.nChannels = 16;d16.vDefault = 0.0;d12.nBits=12;d12.baseAddr=0x300;d12.nLimit = -5.0;d12.pLimit = 5.0;d12.nChannels = 16;d12.vDefault = 0.0;errorChecking=0; /****** 0 turns off 1 truns on ******//***** DACChannel 16 bit channels *****/roll8Ball.channelNumber=1;roll8Ball.minV=pi;roll8Ball.maxV=-pi;yaw8Ball.channelNumber=2;yaw8Ball.minV=-pi;yaw8Ball.maxV=pi;dirGyro.channelNumber=3;dirGyro.minV=-pi;dirGyro.maxV=pi;gMeter.channelNumber=4;gMeter.minV=-4;gMeter.maxV=9;pitch8Ball.channelNumber=5;pitch8Ball.minV=0.5*pi;pitch8Ball.maxV=-0.5*pi;vertDevPoint.channelNumber=6;vertDevPoint.minV=-10;vertDevPoint.maxV=40;108

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

Saved successfully!

Ooh no, something went wrong!