1 /***************************************************************************
5 ----------------------------------------------------------------------------
7 FUNCTION: Model loop executive
9 ----------------------------------------------------------------------------
11 MODULE STATUS: developmental
13 ----------------------------------------------------------------------------
15 GENEALOGY: Created 15 October 1992 as part of LaRCSIM project
18 ----------------------------------------------------------------------------
20 DESIGNED BY: Bruce Jackson
22 CODED BY: Bruce Jackson
24 MAINTAINED BY: maintainer
26 ----------------------------------------------------------------------------
32 950306 Added parameters to call: dt, which is the step size
33 to be taken this loop (caution: may vary from call to call)
34 and Initialize, which if non-zero, implies an initialization
37 CURRENT RCS HEADER INFO:
40 Revision 1.2 2000/04/10 18:09:41 curt
41 David Megginson made a few (mostly minor) mods to the LaRCsim files, and
42 it's now possible to choose the LaRCsim model at runtime, as in
48 fgfs --aircraft=uiuc --aircraft-dir=Aircraft-uiuc/Boeing747
50 I did this so that I could play with the UIUC stuff without losing
51 Tony's C172 with its flaps, etc. I did my best to respect the design
52 of the LaRCsim code by staying in C, making only minimal changes, and
53 not introducing any dependencies on the rest of FlightGear. The
54 modified files are attached.
56 Revision 1.1.1.1 1999/06/17 18:07:33 curt
59 Revision 1.1.1.1 1999/04/05 21:32:45 curt
60 Start of 0.6.x branch.
62 Revision 1.3 1998/08/06 12:46:39 curt
65 Revision 1.2 1998/01/19 18:40:27 curt
66 Tons of little changes to clean up the code and to remove fatal errors
67 when building with the c++ compiler.
69 Revision 1.1 1997/05/29 00:09:58 curt
70 Initial Flight Gear revision.
72 * Revision 1.3 1995/03/06 18:49:46 bjax
73 * Added dt and initialize flag parameters to subroutine calls. This will
74 * support trim routine (to allow single throttle setting to drive
75 * all four throttle positions, for example, if initialize is TRUE).
77 * Revision 1.2 1993/03/10 06:38:09 bjax
78 * Added additional calls: inertias() and subsystems()... EBJ
80 * Revision 1.1 92/12/30 13:19:08 bjax
84 ----------------------------------------------------------------------------
88 ----------------------------------------------------------------------------
90 CALLED BY: ls_step (in initialization), ls_loop (planned)
92 ----------------------------------------------------------------------------
94 CALLS TO: aero(), engine(), gear()
96 ----------------------------------------------------------------------------
100 ----------------------------------------------------------------------------
104 --------------------------------------------------------------------------*/
105 #include "ls_types.h"
106 #include "ls_model.h"
107 #include "default_model_routines.h"
112 void ls_model( SCALAR dt, int Initialize ) {
113 switch (current_model) {
115 inertias( dt, Initialize );
116 subsystems( dt, Initialize );
117 navion_aero( dt, Initialize );
118 navion_engine( dt, Initialize );
119 navion_gear( dt, Initialize );
122 inertias( dt, Initialize );
123 subsystems( dt, Initialize );
124 c172_aero( dt, Initialize );
125 c172_engine( dt, Initialize );
126 c172_gear( dt, Initialize );
129 inertias( dt, Initialize );
130 subsystems( dt, Initialize );
131 cherokee_aero( dt, Initialize );
132 cherokee_engine( dt, Initialize );
133 cherokee_gear( dt, Initialize );
136 inertias( dt, Initialize );
137 subsystems( dt, Initialize );
138 uiuc_aero( dt, Initialize );
139 uiuc_engine( dt, Initialize );
140 uiuc_gear( dt, Initialize );