1 /**********************************************************************
3 FILENAME: uiuc_icing_demo.cpp
5 ----------------------------------------------------------------------
9 ----------------------------------------------------------------------
13 ----------------------------------------------------------------------
17 ----------------------------------------------------------------------
19 HISTORY: 12/02/2002 initial release - originally in
22 ----------------------------------------------------------------------
24 AUTHOR(S): Robert Deters <rdeters@uiuc.edu>
26 ----------------------------------------------------------------------
30 ----------------------------------------------------------------------
34 ----------------------------------------------------------------------
38 ----------------------------------------------------------------------
40 CALLED BY: uiuc_coefficients
42 ----------------------------------------------------------------------
46 ----------------------------------------------------------------------
48 COPYRIGHT: (C) 2002 by Michael Selig
50 This program is free software; you can redistribute it and/or
51 modify it under the terms of the GNU General Public License
52 as published by the Free Software Foundation.
54 This program is distributed in the hope that it will be useful,
55 but WITHOUT ANY WARRANTY; without even the implied warranty of
56 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57 GNU General Public License for more details.
59 You should have received a copy of the GNU General Public License
60 along with this program; if not, write to the Free Software
61 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
62 USA or view http://www.gnu.org/copyleft/gpl.html.
64 **********************************************************************/
66 #include "uiuc_icing_demo.h"
68 void uiuc_icing_demo()
70 // Envelope protection values
71 if (demo_eps_alpha_max) {
72 double time = Simtime - demo_eps_alpha_max_startTime;
73 eps_alpha_max = uiuc_1Dinterpolation(demo_eps_alpha_max_timeArray,
74 demo_eps_alpha_max_daArray,
75 demo_eps_alpha_max_ntime,
78 if (demo_eps_pitch_max) {
79 double time = Simtime - demo_eps_pitch_max_startTime;
80 eps_pitch_max = uiuc_1Dinterpolation(demo_eps_pitch_max_timeArray,
81 demo_eps_pitch_max_daArray,
82 demo_eps_pitch_max_ntime,
85 if (demo_eps_pitch_min) {
86 double time = Simtime - demo_eps_pitch_min_startTime;
87 eps_pitch_min = uiuc_1Dinterpolation(demo_eps_pitch_min_timeArray,
88 demo_eps_pitch_min_daArray,
89 demo_eps_pitch_min_ntime,
92 if (demo_eps_roll_max) {
93 double time = Simtime - demo_eps_roll_max_startTime;
94 eps_roll_max = uiuc_1Dinterpolation(demo_eps_roll_max_timeArray,
95 demo_eps_roll_max_daArray,
96 demo_eps_roll_max_ntime,
99 if (demo_eps_thrust_min) {
100 double time = Simtime - demo_eps_thrust_min_startTime;
101 eps_thrust_min = uiuc_1Dinterpolation(demo_eps_thrust_min_timeArray,
102 demo_eps_thrust_min_daArray,
103 demo_eps_thrust_min_ntime,
106 if (demo_eps_airspeed_max) {
107 double time = Simtime - demo_eps_airspeed_max_startTime;
108 eps_airspeed_max = uiuc_1Dinterpolation(demo_eps_airspeed_max_timeArray,
109 demo_eps_airspeed_max_daArray,
110 demo_eps_airspeed_max_ntime,
113 if (demo_eps_airspeed_min) {
114 double time = Simtime - demo_eps_airspeed_min_startTime;
115 eps_airspeed_min = uiuc_1Dinterpolation(demo_eps_airspeed_min_timeArray,
116 demo_eps_airspeed_min_daArray,
117 demo_eps_airspeed_min_ntime,
120 if (demo_eps_flap_max) {
121 double time = Simtime - demo_eps_flap_max_startTime;
122 eps_flap_max = uiuc_1Dinterpolation(demo_eps_flap_max_timeArray,
123 demo_eps_flap_max_daArray,
124 demo_eps_flap_max_ntime,
127 if (demo_eps_pitch_input) {
128 double time = Simtime - demo_eps_pitch_input_startTime;
129 eps_pitch_input = uiuc_1Dinterpolation(demo_eps_pitch_input_timeArray,
130 demo_eps_pitch_input_daArray,
131 demo_eps_pitch_input_ntime,
136 if (demo_boot_cycle_tail) {
137 double time = Simtime - demo_boot_cycle_tail_startTime;
138 boot_cycle_tail = uiuc_1Dinterpolation(demo_boot_cycle_tail_timeArray,
139 demo_boot_cycle_tail_daArray,
140 demo_boot_cycle_tail_ntime,
143 if (demo_boot_cycle_wing_left) {
144 double time = Simtime - demo_boot_cycle_wing_left_startTime;
145 boot_cycle_wing_left = uiuc_1Dinterpolation(demo_boot_cycle_wing_left_timeArray,
146 demo_boot_cycle_wing_left_daArray,
147 demo_boot_cycle_wing_left_ntime,
150 if (demo_boot_cycle_wing_right) {
151 double time = Simtime - demo_boot_cycle_wing_right_startTime;
152 boot_cycle_wing_right = uiuc_1Dinterpolation(demo_boot_cycle_wing_right_timeArray,
153 demo_boot_cycle_wing_right_daArray,
154 demo_boot_cycle_wing_right_ntime,
160 double time = Simtime - demo_ice_tail_startTime;
161 ice_tail = uiuc_1Dinterpolation(demo_ice_tail_timeArray,
162 demo_ice_tail_daArray,
167 double time = Simtime - demo_ice_left_startTime;
168 ice_left = uiuc_1Dinterpolation(demo_ice_left_timeArray,
169 demo_ice_left_daArray,
173 if (demo_ice_right) {
174 double time = Simtime - demo_ice_right_startTime;
175 ice_right = uiuc_1Dinterpolation(demo_ice_right_timeArray,
176 demo_ice_right_daArray,
177 demo_ice_right_ntime,
183 double time = Simtime - demo_ap_pah_on_startTime;
184 ap_pah_on = uiuc_1Dinterpolation(demo_ap_pah_on_timeArray,
185 demo_ap_pah_on_daArray,
186 demo_ap_pah_on_ntime,
189 if (demo_ap_Theta_ref_deg){
190 double time = Simtime - demo_ap_Theta_ref_deg_startTime;
191 ap_Theta_ref_deg = uiuc_1Dinterpolation(demo_ap_Theta_ref_deg_timeArray,
192 demo_ap_Theta_ref_deg_daArray,
193 demo_ap_Theta_ref_deg_ntime,