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.

Instrument D/A Simulink S-function/***************************************************************************** MODULE: al_inst.c** AUTHOR(S): Friz <strong>An</strong>derson / Douglas Hiranaka** DATE: September 25, 1998** Copyright (c) ALL RIGHTS RESERVED** REVISION HISTORY:** REV AUTHOR DATE DESCRIPTION* 0 crf 11-5-97 Creation cabtest.cpp* 1 dkh 6-11-98 reduced to instruments only* 2 dkh 7-11-98 put into c-mex S-function <strong>for</strong>mat** S-mex: See simulink/src/sfuntmpl.doc** Copyright (c) 1990-1998 by The MathWorks, Inc. All Rights Reserved.* $Revision: 1.3** This S-function block sends values to the instruments from the computer to* the PhEagle flight sim cab. This is the a basic version of the outputs* to the Sim cab sending out only the altitude, airspeed, attitude, direction* g’s, angle of attack, side slip, L-rpm, R-rpm, Vertical speed, and the* <strong>for</strong>ces back to the sim cab stick. The stick positions are read in the* stick block - ph_stick.c*****************************************************************************/#define S_FUNCTION_NAME al_inst#define S_FUNCTION_LEVEL 2#include "simstruc.h"#include #include #include #include #include #include #include #include "cyda.h"char errorChecking;float pi = 3.14159;struct DAC d16, d12;106

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

Saved successfully!

Ooh no, something went wrong!