1 /**********************************************************************
3 FILENAME: uiuc_controlInput.cpp
5 ----------------------------------------------------------------------
7 DESCRIPTION: sets control surface deflections for specified input
10 ----------------------------------------------------------------------
14 ----------------------------------------------------------------------
18 ----------------------------------------------------------------------
20 HISTORY: 04/08/2000 initial release
22 ----------------------------------------------------------------------
24 AUTHOR(S): Jeff Scott <jscott@mail.com>
26 ----------------------------------------------------------------------
30 ----------------------------------------------------------------------
36 ----------------------------------------------------------------------
38 OUTPUTS: -elevator deflection
40 ----------------------------------------------------------------------
42 CALLED BY: uiuc_coefficients.cpp
44 ----------------------------------------------------------------------
48 ----------------------------------------------------------------------
50 COPYRIGHT: (C) 2000 by Michael Selig
52 This program is free software; you can redistribute it and/or
53 modify it under the terms of the GNU General Public License
54 as published by the Free Software Foundation.
56 This program is distributed in the hope that it will be useful,
57 but WITHOUT ANY WARRANTY; without even the implied warranty of
58 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
59 GNU General Public License for more details.
61 You should have received a copy of the GNU General Public License
62 along with this program; if not, write to the Free Software
63 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
64 USA or view http://www.gnu.org/copyleft/gpl.html.
66 **********************************************************************/
68 #include "uiuc_controlInput.h"
71 void uiuc_controlInput()
73 // elevator step input
76 if (Simtime >= elevator_step_startTime)
78 elevator = elevator + elevator_step_angle;
82 // elevator singlet input
85 if (Simtime >= elevator_singlet_startTime &&
86 Simtime <= (elevator_singlet_startTime + elevator_singlet_duration))
88 elevator = elevator + elevator_singlet_angle;
92 // elevator doublet input
95 if (Simtime >= elevator_doublet_startTime &&
96 Simtime <= (elevator_doublet_startTime + elevator_doublet_duration/2))
98 elevator = elevator + elevator_doublet_angle;
100 else if (Simtime >= (elevator_doublet_startTime + elevator_doublet_duration/2) &&
101 Simtime <= (elevator_doublet_startTime + elevator_doublet_duration))
103 elevator = elevator - elevator_doublet_angle;
110 double elevator_input_endTime = elevator_input_timeArray[elevator_input_ntime];
111 if (Simtime >= elevator_input_startTime &&
112 Simtime <= (elevator_input_startTime + elevator_input_endTime))
114 double time = Simtime - elevator_input_startTime;
115 elevator = elevator +
116 uiuc_1Dinterpolation(elevator_input_timeArray,
117 elevator_input_deArray,
118 elevator_input_ntime,
125 // end uiuc_controlInput.cpp