1 /**********************************************************************
3 FILENAME: uiuc_recorder.cpp
5 ----------------------------------------------------------------------
7 DESCRIPTION: outputs variables specified in input file to recorder
10 ----------------------------------------------------------------------
14 ----------------------------------------------------------------------
16 REFERENCES: Liberty, Jesse. "Sam's Teach Yourself C++ in 21 Days,"
19 ----------------------------------------------------------------------
21 HISTORY: 01/31/2000 initial release
22 03/02/2000 (JS) added record options for 1D and 2D
23 interpolated variables
24 04/01/2000 (JS) added throttle, longitudinal, lateral,
25 and rudder inputs to record map
26 04/24/2000 (JS) added rest of variables in
28 07/06/2001 (RD) changed Flap handle output
29 07/20/2001 (RD) fixed Lat_control and Rudder_pedal
30 10/25/2001 (RD) Added new variables needed for the non-
31 linear Twin Otter model at zero flaps
33 11/12/2001 (RD) Added new variables needed for the non-
34 linear Twin Otter model at zero flaps
35 (CxfxxfI). Removed zero flap variables.
36 Added flap_pos and flap_cmd_deg.
37 02/13/2002 (RD) Added variables so linear aero model
38 values can be recorded
39 03/03/2003 (RD) Added flap_cmd_record
40 03/16/2003 (RD) Added trigger record variables
42 ----------------------------------------------------------------------
44 AUTHOR(S): Jeff Scott http://www.jeffscott.net/
45 Robert Deters <rdeters@uiuc.edu>
46 Michael Selig <m-selig@uiuc.edu>
47 ----------------------------------------------------------------------
51 ----------------------------------------------------------------------
55 ----------------------------------------------------------------------
57 OUTPUTS: -variables recorded in uiuc_recorder.dat
59 ----------------------------------------------------------------------
61 CALLED BY: uiuc_wrapper.cpp
63 ----------------------------------------------------------------------
67 ----------------------------------------------------------------------
69 COPYRIGHT: (C) 2000 by Michael Selig
71 This program is free software; you can redistribute it and/or
72 modify it under the terms of the GNU General Public License
73 as published by the Free Software Foundation.
75 This program is distributed in the hope that it will be useful,
76 but WITHOUT ANY WARRANTY; without even the implied warranty of
77 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
78 GNU General Public License for more details.
80 You should have received a copy of the GNU General Public License
81 along with this program; if not, write to the Free Software
82 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
83 USA or view http://www.gnu.org/copyleft/gpl.html.
85 **********************************************************************/
91 #include <simgear/compiler.h>
92 #include <simgear/misc/sg_path.hxx>
93 #include <Aircraft/aircraft.hxx>
94 #include <Main/fg_props.hxx>
96 #include "uiuc_recorder.h"
98 SG_USING_STD(endl); // -dw
100 void uiuc_recorder( double dt )
105 static int recordStep = 0;
106 string record_variables = "# ";
108 int modulus = recordStep % recordRate;
110 if ((recordStep % recordRate) == 0)
112 command_list = recordParts->getCommands();
116 for (command_line = command_list.begin(); command_line!=command_list.end(); ++command_line)
117 record_variables += recordParts->getToken(*command_line,2) + " ";
119 fout << record_variables << endl;
120 for (command_line = command_list.begin(); command_line!=command_list.end(); ++command_line)
122 linetoken = recordParts->getToken(*command_line, 2);
124 switch(record_map[linetoken])
126 /************************* Time ************************/
129 fout << Simtime << " ";
138 /************************* Mass ************************/
141 fout << Weight << " ";
170 /*********************** Geometry **********************/
171 case Dx_pilot_record:
173 fout << Dx_pilot << " ";
176 case Dy_pilot_record:
178 fout << Dy_pilot << " ";
181 case Dz_pilot_record:
183 fout << Dz_pilot << " ";
188 fout << Dx_cg << " ";
193 fout << Dy_cg << " ";
198 fout << Dz_cg << " ";
202 /********************** Positions **********************/
203 case Lat_geocentric_record:
205 fout << Lat_geocentric << " ";
208 case Lon_geocentric_record:
210 fout << Lon_geocentric << " ";
213 case Radius_to_vehicle_record:
215 fout << Radius_to_vehicle << " ";
218 case Latitude_record:
220 fout << Latitude << " ";
223 case Longitude_record:
225 fout << Longitude << " ";
228 case Altitude_record:
230 fout << Altitude << " ";
240 fout << Theta << " ";
249 /******************** Accelerations ********************/
250 case V_dot_north_record:
252 fout << V_dot_north << " ";
255 case V_dot_east_record:
257 fout << V_dot_east << " ";
260 case V_dot_down_record:
262 fout << V_dot_down << " ";
265 case U_dot_body_record:
267 fout << U_dot_body << " ";
270 case V_dot_body_record:
272 fout << V_dot_body << " ";
275 case W_dot_body_record:
277 fout << W_dot_body << " ";
280 case A_X_pilot_record:
282 fout << A_X_pilot << " ";
285 case A_Y_pilot_record:
287 fout << A_Y_pilot << " ";
290 case A_Z_pilot_record:
292 fout << A_Z_pilot << " ";
297 fout << A_X_cg << " ";
302 fout << A_Y_cg << " ";
307 fout << A_Z_cg << " ";
310 case N_X_pilot_record:
312 fout << N_X_pilot << " ";
315 case N_Y_pilot_record:
317 fout << N_Y_pilot << " ";
320 case N_Z_pilot_record:
322 fout << N_Z_pilot << " ";
327 fout << N_X_cg << " ";
332 fout << N_Y_cg << " ";
337 fout << N_Z_cg << " ";
340 case P_dot_body_record:
342 fout << P_dot_body << " ";
345 case Q_dot_body_record:
347 fout << Q_dot_body << " ";
350 case R_dot_body_record:
352 fout << R_dot_body << " ";
356 /********************** Velocities *********************/
359 fout << V_north << " ";
364 fout << V_east << " ";
369 fout << V_down << " ";
372 case V_north_rel_ground_record:
374 fout << V_north_rel_ground << " ";
377 case V_east_rel_ground_record:
379 fout << V_east_rel_ground << " ";
382 case V_down_rel_ground_record:
384 fout << V_down_rel_ground << " ";
387 case V_north_airmass_record:
389 fout << V_north_airmass << " ";
392 case V_east_airmass_record:
394 fout << V_east_airmass << " ";
397 case V_down_airmass_record:
399 fout << V_down_airmass << " ";
402 case V_north_rel_airmass_record:
404 fout << V_north_rel_airmass << " ";
407 case V_east_rel_airmass_record:
409 fout << V_east_rel_airmass << " ";
412 case V_down_rel_airmass_record:
414 fout << V_down_rel_airmass << " ";
419 fout << U_gust << " ";
424 fout << V_gust << " ";
429 fout << W_gust << " ";
434 fout << U_body << " ";
439 fout << V_body << " ";
444 fout << W_body << " ";
447 case V_rel_wind_record:
449 fout << V_rel_wind << " ";
452 case V_true_kts_record:
454 fout << V_true_kts << " ";
457 case V_rel_ground_record:
459 fout << V_rel_ground << " ";
462 case V_inertial_record:
464 fout << V_inertial << " ";
467 case V_ground_speed_record:
469 fout << V_ground_speed << " ";
474 fout << V_equiv << " ";
477 case V_equiv_kts_record:
479 fout << V_equiv_kts << " ";
482 case V_calibrated_record:
484 fout << V_calibrated << " ";
487 case V_calibrated_kts_record:
489 fout << V_calibrated_kts << " ";
494 fout << P_local << " ";
499 fout << Q_local << " ";
504 fout << R_local << " ";
509 fout << P_body << " ";
514 fout << Q_body << " ";
519 fout << R_body << " ";
524 fout << P_total << " ";
529 fout << Q_total << " ";
534 fout << R_total << " ";
539 fout << Phi_dot << " ";
542 case Theta_dot_record:
544 fout << Theta_dot << " ";
549 fout << Psi_dot << " ";
552 case Latitude_dot_record:
554 fout << Latitude_dot << " ";
557 case Longitude_dot_record:
559 fout << Longitude_dot << " ";
562 case Radius_dot_record:
564 fout << Radius_dot << " ";
568 /************************ Angles ***********************/
571 fout << Std_Alpha << " ";
574 case Alpha_deg_record:
576 fout << Std_Alpha * RAD_TO_DEG << " ";
579 case Alpha_dot_record:
581 fout << Std_Alpha_dot << " ";
584 case Alpha_dot_deg_record:
586 fout << Std_Alpha_dot * RAD_TO_DEG << " ";
591 fout << Std_Beta << " ";
594 case Beta_deg_record:
596 fout << Std_Beta * RAD_TO_DEG << " ";
599 case Beta_dot_record:
601 fout << Std_Beta_dot << " ";
604 case Beta_dot_deg_record:
606 fout << Std_Beta_dot * RAD_TO_DEG << " ";
609 case Gamma_vert_record:
611 fout << Gamma_vert_rad << " ";
614 case Gamma_vert_deg_record:
616 fout << Gamma_vert_rad * RAD_TO_DEG << " ";
619 case Gamma_horiz_record:
621 fout << Gamma_horiz_rad << " ";
624 case Gamma_horiz_deg_record:
626 fout << Gamma_horiz_rad * RAD_TO_DEG << " ";
630 /**************** Atmospheric Properties ***************/
633 fout << Density << " ";
638 fout << V_sound << " ";
641 case Mach_number_record:
643 fout << Mach_number << " ";
646 case Static_pressure_record:
648 fout << Static_pressure << " ";
651 case Total_pressure_record:
653 fout << Total_pressure << " ";
656 case Impact_pressure_record:
658 fout << Impact_pressure << " ";
661 case Dynamic_pressure_record:
663 fout << Dynamic_pressure << " ";
666 case Static_temperature_record:
668 fout << Static_temperature << " ";
671 case Total_temperature_record:
673 fout << Total_temperature << " ";
677 /******************** Earth Properties *****************/
680 fout << Gravity << " ";
683 case Sea_level_radius_record:
685 fout << Sea_level_radius << " ";
688 case Earth_position_angle_record:
690 fout << Earth_position_angle << " ";
693 case Runway_altitude_record:
695 fout << Runway_altitude << " ";
698 case Runway_latitude_record:
700 fout << Runway_latitude << " ";
703 case Runway_longitude_record:
705 fout << Runway_longitude << " ";
708 case Runway_heading_record:
710 fout << Runway_heading << " ";
713 case Radius_to_rwy_record:
715 fout << Radius_to_rwy << " ";
718 case D_pilot_north_of_rwy_record:
720 fout << D_pilot_north_of_rwy << " ";
723 case D_pilot_east_of_rwy_record:
725 fout << D_pilot_east_of_rwy << " ";
728 case D_pilot_above_rwy_record:
730 fout << D_pilot_above_rwy << " ";
733 case X_pilot_rwy_record:
735 fout << X_pilot_rwy << " ";
738 case Y_pilot_rwy_record:
740 fout << Y_pilot_rwy << " ";
743 case H_pilot_rwy_record:
745 fout << H_pilot_rwy << " ";
748 case D_cg_north_of_rwy_record:
750 fout << D_cg_north_of_rwy << " ";
753 case D_cg_east_of_rwy_record:
755 fout << D_cg_east_of_rwy << " ";
758 case D_cg_above_rwy_record:
760 fout << D_cg_above_rwy << " ";
763 case X_cg_rwy_record:
765 fout << X_cg_rwy << " ";
768 case Y_cg_rwy_record:
770 fout << Y_cg_rwy << " ";
773 case H_cg_rwy_record:
775 fout << H_cg_rwy << " ";
779 /********************* Engine Inputs *******************/
780 case Throttle_3_record:
782 fout << Throttle[3] << " ";
785 case Throttle_pct_record:
787 fout << Throttle_pct << " ";
791 /************************ Controls ***********************/
792 case Long_control_record:
794 fout << Long_control << " ";
797 case Long_trim_record:
799 fout << Long_trim << " ";
802 case Long_trim_deg_record:
804 fout << Long_trim * RAD_TO_DEG << " ";
807 case elevator_record:
809 fout << elevator << " ";
812 case elevator_deg_record:
814 fout << elevator * RAD_TO_DEG << " ";
817 case Lat_control_record:
819 fout << Lat_control << " ";
824 fout << aileron << " ";
827 case aileron_deg_record:
829 fout << aileron * RAD_TO_DEG << " ";
832 case Rudder_pedal_record:
834 fout << Rudder_pedal << " ";
839 fout << rudder << " ";
842 case rudder_deg_record:
844 fout << rudder * RAD_TO_DEG << " ";
847 case Flap_handle_record:
849 fout << Flap_handle << " ";
857 case flap_cmd_record:
859 fout << flap_cmd << " ";
862 case flap_cmd_deg_record:
864 fout << flap_cmd * RAD_TO_DEG << " ";
867 case flap_pos_record:
869 fout << flap_pos << " ";
872 case flap_pos_deg_record:
874 fout << flap_pos * RAD_TO_DEG << " ";
877 case Spoiler_handle_record:
879 fout << Spoiler_handle << " ";
882 case spoiler_cmd_deg_record:
884 fout << spoiler_cmd_deg << " ";
887 case spoiler_pos_deg_record:
889 fout << spoiler_pos_deg << " ";
892 case spoiler_pos_norm_record:
894 fout << spoiler_pos_norm << " ";
897 case spoiler_pos_record:
899 fout << spoiler_pos << " ";
903 /****************** Aero Coefficients ******************/
911 fout << CDfaI << " ";
916 fout << CDfCLI << " ";
921 fout << CDfadeI << " ";
926 fout << CDfdfI << " ";
931 fout << CDfadfI << " ";
939 case CXfabetafI_record:
941 fout << CXfabetafI << " ";
944 case CXfadefI_record:
946 fout << CXfadefI << " ";
951 fout << CXfaqfI << " ";
954 case CDo_save_record:
956 fout << CDo_save << " ";
959 case CDK_save_record:
961 fout << CDK_save << " ";
964 case CLK_save_record:
966 fout << CLK_save << " ";
969 case CD_a_save_record:
971 fout << CD_a_save << " ";
974 case CD_adot_save_record:
976 fout << CD_adot_save << " ";
979 case CD_q_save_record:
981 fout << CD_q_save << " ";
984 case CD_ih_save_record:
986 fout << CD_ih_save << " ";
989 case CD_de_save_record:
991 fout << CD_de_save << " ";
994 case CD_dr_save_record:
996 fout << CD_dr_save << " ";
999 case CD_da_save_record:
1001 fout << CD_da_save << " ";
1004 case CD_beta_save_record:
1006 fout << CD_beta_save << " ";
1009 case CD_df_save_record:
1011 fout << CD_df_save << " ";
1014 case CD_ds_save_record:
1016 fout << CD_ds_save << " ";
1019 case CD_dg_save_record:
1021 fout << CD_dg_save << " ";
1024 case CXo_save_record:
1026 fout << CXo_save << " ";
1029 case CXK_save_record:
1031 fout << CXK_save << " ";
1034 case CX_a_save_record:
1036 fout << CX_a_save << " ";
1039 case CX_a2_save_record:
1041 fout << CX_a2_save << " ";
1044 case CX_a3_save_record:
1046 fout << CX_a3_save << " ";
1049 case CX_adot_save_record:
1051 fout << CX_adot_save << " ";
1054 case CX_q_save_record:
1056 fout << CX_q_save << " ";
1059 case CX_de_save_record:
1061 fout << CX_de_save << " ";
1064 case CX_dr_save_record:
1066 fout << CX_dr_save << " ";
1069 case CX_df_save_record:
1071 fout << CX_df_save << " ";
1074 case CX_adf_save_record:
1076 fout << CX_adf_save << " ";
1086 fout << CLfaI << " ";
1089 case CLfadeI_record:
1091 fout << CLfadeI << " ";
1096 fout << CLfdfI << " ";
1099 case CLfadfI_record:
1101 fout << CLfadfI << " ";
1111 fout << CZfaI << " ";
1114 case CZfabetafI_record:
1116 fout << CZfabetafI << " ";
1119 case CZfadefI_record:
1121 fout << CZfadefI << " ";
1124 case CZfaqfI_record:
1126 fout << CZfaqfI << " ";
1129 case CLo_save_record:
1131 fout << CLo_save << " ";
1134 case CL_a_save_record:
1136 fout << CL_a_save << " ";
1139 case CL_adot_save_record:
1141 fout << CL_adot_save << " ";
1144 case CL_q_save_record:
1146 fout << CL_q_save << " ";
1149 case CL_ih_save_record:
1151 fout << CL_ih_save << " ";
1154 case CL_de_save_record:
1156 fout << CL_de_save << " ";
1159 case CL_df_save_record:
1161 fout << CL_df_save << " ";
1164 case CL_ds_save_record:
1166 fout << CL_ds_save << " ";
1169 case CL_dg_save_record:
1171 fout << CL_dg_save << " ";
1174 case CZo_save_record:
1176 fout << CZo_save << " ";
1179 case CZ_a_save_record:
1181 fout << CZ_a_save << " ";
1184 case CZ_a2_save_record:
1186 fout << CZ_a2_save << " ";
1189 case CZ_a3_save_record:
1191 fout << CZ_a3_save << " ";
1194 case CZ_adot_save_record:
1196 fout << CZ_adot_save << " ";
1199 case CZ_q_save_record:
1201 fout << CZ_q_save << " ";
1204 case CZ_de_save_record:
1206 fout << CZ_de_save << " ";
1209 case CZ_deb2_save_record:
1211 fout << CZ_deb2_save << " ";
1214 case CZ_df_save_record:
1216 fout << CZ_df_save << " ";
1219 case CZ_adf_save_record:
1221 fout << CZ_adf_save << " ";
1231 fout << CmfaI << " ";
1234 case CmfadeI_record:
1236 fout << CmfadeI << " ";
1241 fout << CmfdfI << " ";
1244 case CmfadfI_record:
1246 fout << CmfadfI << " ";
1249 case CmfabetafI_record:
1251 fout << CmfabetafI << " ";
1254 case CmfadefI_record:
1256 fout << CmfadefI << " ";
1259 case CmfaqfI_record:
1261 fout << CmfaqfI << " ";
1264 case Cmo_save_record:
1266 fout << Cmo_save << " ";
1269 case Cm_a_save_record:
1271 fout << Cm_a_save << " ";
1274 case Cm_a2_save_record:
1276 fout << Cm_a2_save << " ";
1279 case Cm_adot_save_record:
1281 fout << Cm_adot_save << " ";
1284 case Cm_q_save_record:
1286 fout << Cm_q_save << " ";
1289 case Cm_ih_save_record:
1291 fout << Cm_ih_save << " ";
1294 case Cm_de_save_record:
1296 fout << Cm_de_save << " ";
1299 case Cm_b2_save_record:
1301 fout << Cm_b2_save << " ";
1304 case Cm_r_save_record:
1306 fout << Cm_r_save << " ";
1309 case Cm_df_save_record:
1311 fout << Cm_df_save << " ";
1314 case Cm_ds_save_record:
1316 fout << Cm_ds_save << " ";
1319 case Cm_dg_save_record:
1321 fout << Cm_dg_save << " ";
1329 case CYfadaI_record:
1331 fout << CYfadaI << " ";
1334 case CYfbetadrI_record:
1336 fout << CYfbetadrI << " ";
1339 case CYfabetafI_record:
1341 fout << CYfabetafI << " ";
1344 case CYfadafI_record:
1346 fout << CYfadafI << " ";
1349 case CYfadrfI_record:
1351 fout << CYfadrfI << " ";
1354 case CYfapfI_record:
1356 fout << CYfapfI << " ";
1359 case CYfarfI_record:
1361 fout << CYfarfI << " ";
1364 case CYo_save_record:
1366 fout << CYo_save << " ";
1369 case CY_beta_save_record:
1371 fout << CY_beta_save << " ";
1374 case CY_p_save_record:
1376 fout << CY_p_save << " ";
1379 case CY_r_save_record:
1381 fout << CY_r_save << " ";
1384 case CY_da_save_record:
1386 fout << CY_da_save << " ";
1389 case CY_dr_save_record:
1391 fout << CY_dr_save << " ";
1394 case CY_dra_save_record:
1396 fout << CY_dra_save << " ";
1399 case CY_bdot_save_record:
1401 fout << CY_bdot_save << " ";
1409 case ClfadaI_record:
1411 fout << ClfadaI << " ";
1414 case ClfbetadrI_record:
1416 fout << ClfbetadrI << " ";
1419 case ClfabetafI_record:
1421 fout << ClfabetafI << " ";
1424 case ClfadafI_record:
1426 fout << ClfadafI << " ";
1429 case ClfadrfI_record:
1431 fout << ClfadrfI << " ";
1434 case ClfapfI_record:
1436 fout << ClfapfI << " ";
1439 case ClfarfI_record:
1441 fout << ClfarfI << " ";
1444 case Clo_save_record:
1446 fout << Clo_save << " ";
1449 case Cl_beta_save_record:
1451 fout << Cl_beta_save << " ";
1454 case Cl_p_save_record:
1456 fout << Cl_p_save << " ";
1459 case Cl_r_save_record:
1461 fout << Cl_r_save << " ";
1464 case Cl_da_save_record:
1466 fout << Cl_da_save << " ";
1469 case Cl_dr_save_record:
1471 fout << Cl_dr_save << " ";
1474 case Cl_daa_save_record:
1476 fout << Cl_daa_save << " ";
1484 case CnfadaI_record:
1486 fout << CnfadaI << " ";
1489 case CnfbetadrI_record:
1491 fout << CnfbetadrI << " ";
1494 case CnfabetafI_record:
1496 fout << CnfabetafI << " ";
1499 case CnfadafI_record:
1501 fout << CnfadafI << " ";
1504 case CnfadrfI_record:
1506 fout << CnfadrfI << " ";
1509 case CnfapfI_record:
1511 fout << CnfapfI << " ";
1514 case CnfarfI_record:
1516 fout << CnfarfI << " ";
1519 case Cno_save_record:
1521 fout << Cno_save << " ";
1524 case Cn_beta_save_record:
1526 fout << Cn_beta_save << " ";
1529 case Cn_p_save_record:
1531 fout << Cn_p_save << " ";
1534 case Cn_r_save_record:
1536 fout << Cn_r_save << " ";
1539 case Cn_da_save_record:
1541 fout << Cn_da_save << " ";
1544 case Cn_dr_save_record:
1546 fout << Cn_dr_save << " ";
1549 case Cn_q_save_record:
1551 fout << Cn_q_save << " ";
1554 case Cn_b3_save_record:
1556 fout << Cn_b3_save << " ";
1560 /******************** Ice Detection ********************/
1561 case CL_clean_record:
1563 fout << CL_clean << " ";
1566 case CL_iced_record:
1568 fout << CL_iced << " ";
1571 case CD_clean_record:
1573 fout << CD_clean << " ";
1576 case CD_iced_record:
1578 fout << CD_iced << " ";
1581 case Cm_clean_record:
1583 fout << Cm_clean << " ";
1586 case Cm_iced_record:
1588 fout << Cm_iced << " ";
1591 case Ch_clean_record:
1593 fout << Ch_clean << " ";
1596 case Ch_iced_record:
1598 fout << Ch_iced << " ";
1601 case Cl_clean_record:
1603 fout << Cl_clean << " ";
1606 case Cl_iced_record:
1608 fout << Cl_iced << " ";
1611 case CLclean_wing_record:
1613 fout << CLclean_wing << " ";
1616 case CLiced_wing_record:
1618 fout << CLiced_wing << " ";
1621 case CLclean_tail_record:
1623 fout << CLclean_tail << " ";
1626 case CLiced_tail_record:
1628 fout << CLiced_tail << " ";
1631 case Lift_clean_wing_record:
1633 fout << Lift_clean_wing << " ";
1636 case Lift_iced_wing_record:
1638 fout << Lift_iced_wing << " ";
1641 case Lift_clean_tail_record:
1643 fout << Lift_clean_tail << " ";
1646 case Lift_iced_tail_record:
1648 fout << Lift_iced_tail << " ";
1651 case Gamma_clean_wing_record:
1653 fout << Gamma_clean_wing << " ";
1656 case Gamma_iced_wing_record:
1658 fout << Gamma_iced_wing << " ";
1661 case Gamma_clean_tail_record:
1663 fout << Gamma_clean_tail << " ";
1666 case Gamma_iced_tail_record:
1668 fout << Gamma_iced_tail << " ";
1671 case w_clean_wing_record:
1673 fout << w_clean_wing << " ";
1676 case w_iced_wing_record:
1678 fout << w_iced_wing << " ";
1681 case w_clean_tail_record:
1683 fout << w_clean_tail << " ";
1686 case w_iced_tail_record:
1688 fout << w_iced_tail << " ";
1691 case V_total_clean_wing_record:
1693 fout << V_total_clean_wing << " ";
1696 case V_total_iced_wing_record:
1698 fout << V_total_iced_wing << " ";
1701 case V_total_clean_tail_record:
1703 fout << V_total_clean_tail << " ";
1706 case V_total_iced_tail_record:
1708 fout << V_total_iced_tail << " ";
1711 case beta_flow_clean_wing_record:
1713 fout << beta_flow_clean_wing << " ";
1716 case beta_flow_clean_wing_deg_record:
1718 fout << beta_flow_clean_wing * RAD_TO_DEG << " ";
1721 case beta_flow_iced_wing_record:
1723 fout << beta_flow_iced_wing << " ";
1726 case beta_flow_iced_wing_deg_record:
1728 fout << beta_flow_iced_wing * RAD_TO_DEG << " ";
1731 case beta_flow_clean_tail_record:
1733 fout << beta_flow_clean_tail << " ";
1736 case beta_flow_clean_tail_deg_record:
1738 fout << beta_flow_clean_tail * RAD_TO_DEG << " ";
1741 case beta_flow_iced_tail_record:
1743 fout << beta_flow_iced_tail << " ";
1746 case beta_flow_iced_tail_deg_record:
1748 fout << beta_flow_iced_tail * RAD_TO_DEG << " ";
1751 case Dbeta_flow_wing_record:
1753 fout << Dbeta_flow_wing << " ";
1756 case Dbeta_flow_wing_deg_record:
1758 fout << Dbeta_flow_wing * RAD_TO_DEG << " ";
1761 case Dbeta_flow_tail_record:
1763 fout << Dbeta_flow_tail << " ";
1766 case Dbeta_flow_tail_deg_record:
1768 fout << Dbeta_flow_tail * RAD_TO_DEG << " ";
1771 case pct_beta_flow_wing_record:
1773 fout << pct_beta_flow_wing << " ";
1776 case pct_beta_flow_tail_record:
1778 fout << pct_beta_flow_tail << " ";
1781 case eta_ice_record:
1783 fout << eta_ice << " ";
1786 case eta_wing_left_record:
1788 fout << eta_wing_left << " ";
1791 case eta_wing_right_record:
1793 fout << eta_wing_right << " ";
1796 case eta_tail_record:
1798 fout << eta_tail << " ";
1801 case delta_CL_record:
1803 fout << delta_CL << " ";
1806 case delta_CD_record:
1808 fout << delta_CD << " ";
1811 case delta_Cm_record:
1813 fout << delta_Cm << " ";
1816 case delta_Cl_record:
1818 fout << delta_Cl << " ";
1821 case delta_Cn_record:
1823 fout << delta_Cn << " ";
1826 case boot_cycle_tail_record:
1828 fout << boot_cycle_tail << " ";
1831 case boot_cycle_wing_left_record:
1833 fout << boot_cycle_wing_left << " ";
1836 case boot_cycle_wing_right_record:
1838 fout << boot_cycle_wing_right << " ";
1841 case autoIPS_tail_record:
1843 fout << autoIPS_tail << " ";
1846 case autoIPS_wing_left_record:
1848 fout << autoIPS_wing_left << " ";
1851 case autoIPS_wing_right_record:
1853 fout << autoIPS_wing_right << " ";
1856 case eps_pitch_input_record:
1858 fout << eps_pitch_input << " ";
1861 case eps_alpha_max_record:
1863 fout << eps_alpha_max << " ";
1866 case eps_pitch_max_record:
1868 fout << eps_pitch_max << " ";
1871 case eps_pitch_min_record:
1873 fout << eps_pitch_min << " ";
1876 case eps_roll_max_record:
1878 fout << eps_roll_max << " ";
1881 case eps_thrust_min_record:
1883 fout << eps_thrust_min << " ";
1886 case eps_flap_max_record:
1888 fout << eps_flap_max << " ";
1891 case eps_airspeed_max_record:
1893 fout << eps_airspeed_max << " ";
1896 case eps_airspeed_min_record:
1898 fout << eps_airspeed_min << " ";
1901 case tactilefadefI_record:
1903 fout << tactilefadefI << " ";
1907 /*******************Autopilot***************************/
1908 case ap_Theta_ref_deg_record:
1910 fout << ap_Theta_ref_deg << " ";
1913 case ap_pah_on_record:
1915 fout << ap_pah_on << " ";
1919 /************************ Forces ***********************/
1920 case F_X_wind_record:
1922 fout << F_X_wind << " ";
1925 case F_Y_wind_record:
1927 fout << F_Y_wind << " ";
1930 case F_Z_wind_record:
1932 fout << F_Z_wind << " ";
1935 case F_X_aero_record:
1937 fout << F_X_aero << " ";
1940 case F_Y_aero_record:
1942 fout << F_Y_aero << " ";
1945 case F_Z_aero_record:
1947 fout << F_Z_aero << " ";
1950 case F_X_engine_record:
1952 fout << F_X_engine << " ";
1955 case F_Y_engine_record:
1957 fout << F_Y_engine << " ";
1960 case F_Z_engine_record:
1962 fout << F_Z_engine << " ";
1965 case F_X_gear_record:
1967 fout << F_X_gear << " ";
1970 case F_Y_gear_record:
1972 fout << F_Y_gear << " ";
1975 case F_Z_gear_record:
1977 fout << F_Z_gear << " ";
1995 case F_north_record:
1997 fout << F_north << " ";
2002 fout << F_east << " ";
2007 fout << F_down << " ";
2011 /*********************** Moments ***********************/
2012 case M_l_aero_record:
2014 fout << M_l_aero << " ";
2017 case M_m_aero_record:
2019 fout << M_m_aero << " ";
2022 case M_n_aero_record:
2024 fout << M_n_aero << " ";
2027 case M_l_engine_record:
2029 fout << M_l_engine << " ";
2032 case M_m_engine_record:
2034 fout << M_m_engine << " ";
2037 case M_n_engine_record:
2039 fout << M_n_engine << " ";
2042 case M_l_gear_record:
2044 fout << M_l_gear << " ";
2047 case M_m_gear_record:
2049 fout << M_m_gear << " ";
2052 case M_n_gear_record:
2054 fout << M_n_gear << " ";
2059 fout << M_l_rp << " ";
2064 fout << M_m_rp << " ";
2069 fout << M_n_rp << " ";
2073 /********************* flapper variables *********************/
2074 case flapper_freq_record:
2076 fout << flapper_freq << " ";
2079 case flapper_phi_record:
2081 fout << flapper_phi << " ";
2084 case flapper_phi_deg_record:
2086 fout << flapper_phi*RAD_TO_DEG << " ";
2089 case flapper_Lift_record:
2091 fout << flapper_Lift << " ";
2094 case flapper_Thrust_record:
2096 fout << flapper_Thrust << " ";
2099 case flapper_Inertia_record:
2101 fout << flapper_Inertia << " ";
2104 case flapper_Moment_record:
2106 fout << flapper_Moment << " ";
2109 /********* MSS debug and other data *******************/
2110 /* debug variables for use in probing data */
2111 /* comment out old lines, and add new */
2112 /* only remove code that you have written */
2116 // fout << eta_q_Cm_q_fac << " ";
2117 // fout << eta_q_Cm_adot_fac << " ";
2118 // fout << eta_q_Cmfade_fac << " ";
2119 // fout << eta_q_Cl_dr_fac << " ";
2120 // fout << eta_q_Cm_de_fac << " ";
2122 // fout << eta_q << " ";
2124 // fout << engineOmega * 60 / (2 * LS_PI)<< " ";
2125 // vertical climb rate in fpm
2126 fout << V_down * 60 << " ";
2127 // vertical climb rate in fps
2128 // fout << V_down << " ";
2129 // w_induced downwash at tail due to wing
2130 // fout << gammaWing << " ";
2131 //fout << outside_control << " ";
2136 // Lift to drag ratio
2137 // fout << V_ground_speed/V_down_rel_ground << " ";
2138 // g's through the c.g. of the aircraft
2139 fout << (-A_Z_cg/32.174) << " ";
2140 // L/D via forces (used in 201 class for L/D)
2141 // fout << (F_Z_wind/F_X_wind) << " ";
2142 // gyroscopic moment (see uiuc_wrapper.cpp)
2143 // fout << (polarInertia * engineOmega * Q_body) << " ";
2144 // downwashAngle at tail
2145 // fout << downwashAngle * 57.29 << " ";
2146 // w_induced from engine
2147 // fout << w_induced << " ";
2152 // die off function for eta_q
2153 // fout << (Cos_alpha * Cos_alpha) << " ";
2154 // gyroscopic moment (see uiuc_wrapper.cpp)
2155 // fout << (-polarInertia * engineOmega * R_body) << " ";
2157 // fout << eta_q << " ";
2158 // flapper cycle percentage
2159 fout << (sin(flapper_phi - 3 * LS_PI / 2)) << " ";
2162 /********* RD debug and other data *******************/
2163 /* debug variables for use in probing data */
2164 /* comment out old lines, and add new */
2165 /* only remove code that you have written */
2168 // flapper F_X_aero_flapper
2169 fout << F_X_aero_flapper << " ";
2174 // flapper F_Z_aero_flapper
2175 //fout << F_Z_aero_flapper << " ";
2177 fout << gear_rate << " ";
2183 fout << gear_max << " ";
2186 case V_down_fpm_record:
2188 fout << V_down * 60 << " ";
2193 fout << eta_q << " ";
2198 fout << (engineOmega * 60 / (2 * LS_PI)) << " ";
2201 case elevator_sas_deg_record:
2203 fout << elevator_sas * RAD_TO_DEG << " ";
2206 case aileron_sas_deg_record:
2208 fout << aileron_sas * RAD_TO_DEG << " ";
2211 case rudder_sas_deg_record:
2213 fout << rudder_sas * RAD_TO_DEG << " ";
2216 case w_induced_record:
2218 fout << w_induced << " ";
2221 case downwashAngle_deg_record:
2223 fout << downwashAngle * RAD_TO_DEG << " ";
2226 case alphaTail_deg_record:
2228 fout << alphaTail * RAD_TO_DEG << " ";
2231 case gammaWing_record:
2233 fout << gammaWing << " ";
2238 fout << V_ground_speed/V_down_rel_ground << " ";
2243 fout << -A_Z_cg/32.174 << " ";
2246 case gyroMomentQ_record:
2248 fout << polarInertia * engineOmega * Q_body << " ";
2251 case gyroMomentR_record:
2253 fout << -polarInertia * engineOmega * R_body << " ";
2256 case Gear_handle_record:
2258 fout << Gear_handle << " ";
2261 case gear_cmd_norm_record:
2263 fout << gear_cmd_norm << " ";
2266 case gear_pos_norm_record:
2268 fout << gear_pos_norm << " ";
2271 /****************Trigger Variables*******************/
2272 case trigger_on_record:
2274 fout << trigger_on << " ";
2277 case trigger_num_record:
2279 fout << trigger_num << " ";
2282 case trigger_toggle_record:
2284 fout << trigger_toggle << " ";
2287 case trigger_counter_record:
2289 fout << trigger_counter << " ";
2298 // end uiuc_recorder.cpp