]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/LaRCsim/ls_model.c
Improve timing statistics
[flightgear.git] / src / FDM / LaRCsim / ls_model.c
index e2301d42ed6b449ef7bea83eb03679f57eb0d908..591ea3aed842f19cd09f95c27f582753f2f7bbc0 100644 (file)
        CURRENT RCS HEADER INFO:
 $Header$
 $Log$
+Revision 1.5  2005/12/19 12:53:21  ehofman
+Vassilii Khachaturov:
+
+clean up some build warnings caught with gcc-4.0.
+
+Revision 1.4  2003/07/25 17:53:41  mselig
+UIUC code initilization mods to tidy things up a bit.
+
+Revision 1.3  2003/05/13 18:45:06  curt
+Robert Deters:
+
+  I have attached some revisions for the UIUCModel and some LaRCsim.
+  The only thing you should need to check is LaRCsim.cxx.  The file
+  I attached is a revised version of 1.5 and the latest is 1.7.  Also,
+  uiuc_getwind.c and uiuc_getwind.h are no longer in the LaRCsim
+  directory.  They have been moved over to UIUCModel.
+
+Revision 1.2  2003/03/31 03:05:41  m-selig
+uiuc wind changes, MSS
+
+Revision 1.1.1.1  2003/02/28 01:33:39  rob
+uiuc version of FlightGear v0.9.0
+
+Revision 1.3  2002/12/12 00:01:04  rob
+*** empty log message ***
+
+Revision 1.2  2002/10/22 21:06:49  rob
+*** empty log message ***
+
+Revision 1.2  2002/08/29 18:56:37  rob
+*** empty log message ***
+
+Revision 1.1.1.1  2002/04/24 17:08:23  rob
+UIUC version of FlightGear-0.7.pre11
+
+Revision 1.5  2002/04/01 19:37:34  curt
+I have attached revisions to the UIUC code.  The revisions include the
+ability to run a nonlinear model with flaps.  The files ls_model.c and
+uiuc_aero.c were changed since we had some functions with the same
+name.  The name changes doesn't affect the code, it just makes it a
+little easier to read.  There are changes in LaRCsim.cxx so UIUC
+models have engine sound.  Could you send me an email when you receive
+this and/or when the changes make it to the CVS?  Thanks.
+
+Also I noticed you have some outdated files that are no longer used in
+the UIUCModel directory.  They are uiuc_initializemaps1.cpp,
+uiuc_initializemaps2.cpp, uiuc_initializemaps3.cpp, and
+uiuc_initializemaps4.cpp
+
+Rob
+
 Revision 1.4  2001/09/14 18:47:27  curt
 More changes in support of UIUCModel.
 
@@ -108,6 +159,8 @@ Initial Flight Gear revision.
        OUTPUTS:
 
 --------------------------------------------------------------------------*/
+#include <stdio.h>
+
 #include "ls_types.h"
 #include "ls_model.h"
 #include "default_model_routines.h"
@@ -125,6 +178,7 @@ void ls_model( SCALAR dt, int Initialize ) {
       navion_gear( dt, Initialize );
       break;
     case C172:
+      printf("here we are in C172 \n");
       if(Initialize < 0) c172_init();
       inertias( dt, Initialize );
       subsystems( dt, Initialize );
@@ -139,13 +193,29 @@ void ls_model( SCALAR dt, int Initialize ) {
       cherokee_engine( dt, Initialize );
       cherokee_gear( dt, Initialize );
       break;
+    case BASIC:
+      //      printf("here we are in BASIC \n");
+      if(Initialize < 0) basic_init();
+      printf("Initialize %d \n", Initialize);
+      inertias( dt, Initialize );
+      subsystems( dt, Initialize );
+      basic_aero( dt, Initialize );
+      basic_engine( dt, Initialize );
+      basic_gear( dt, Initialize );
+      break;
     case UIUC:
       inertias( dt, Initialize );
       subsystems( dt, Initialize );
-      uiuc_aero( dt, Initialize );
-      uiuc_engine( dt, Initialize );
-      uiuc_gear( dt, Initialize );
-      uiuc_record(dt);
+      // During initialization period, re-initialize velocities
+      // and euler angles
+      if (Initialize !=0) uiuc_init_2_wrapper();
+      uiuc_network_recv_2_wrapper();
+      uiuc_engine_2_wrapper( dt, Initialize );
+      uiuc_wind_2_wrapper( dt, Initialize );
+      uiuc_aero_2_wrapper( dt, Initialize );
+      uiuc_gear_2_wrapper( dt, Initialize );
+      uiuc_network_send_2_wrapper();
+      uiuc_record_2_wrapper(dt);
       break;
     }
 }