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.

Stick D/A Simulink S-function/***************************************************************************** MODULE: al_stick.c** AUTHOR(S): Fritz <strong>An</strong>derson / Doug Hiranaka** DATE: September 25, 1998** Copyright (c) ALL RIGHTS RESERVED* <strong>Cal</strong> <strong>Poly</strong> San Luis Obispo 1998** REVISION HISTORY:** REV AUTHOR DATE DESCRIPTION* 0 crf 11-5-97 Creation cabtest.cpp* 1 dkh 6-11-98 reduced to stick only* 2 dkh 7-11-98 put into s-mex <strong>for</strong>mat** S-mex: See simulink/src/sfuntmpl.doc** S-mex Copyright (c) 1990-1998 by The MathWorks, Inc. All Rights Reserved.* $Revision: 1.3** This S-function block Reads the commanded stick position from the* PhEagle flight sim cab. This is the a basic version of the inputs* from the Sim cab sending out only the stick, pedal and throttle position* from the cab. The <strong>for</strong>ces are set in the instrument block - ph_inst.c*****************************************************************************/#define S_FUNCTION_NAME al_stick#define S_FUNCTION_LEVEL 2#include "simstruc.h"#include #include #include #include #include #include #include #include #include "sticki.h"float oldVals[16];struct PCLabCard aToD12;struct ADCChannel rThrottle, lThrottle,pitchPos, pitchForce, pitchTrimDef, pitchTrimPos, pitchVelocity,rollPos, rollForce, rollTrimDef, rollTrimPos, rollVelocity,rudderPos, rudderForce, rudderTrimPos, rudderVelocity;/* Function: mdlInitializeSizes ===============================================* Abstract:116

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

Saved successfully!

Ooh no, something went wrong!