]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGFDMExec.cpp
builddir -> srcdir so builds can be done outside the master source directory.
[flightgear.git] / src / FDM / JSBSim / FGFDMExec.cpp
index 9f4adfa80eaabe15242519689b812d81b70220d7..d5324fdd0d34d5595ee479a41126ad86d02d479f 100644 (file)
@@ -39,7 +39,7 @@ INCLUDES
 *******************************************************************************/
 
 #ifdef FGFS
-#  include <Include/compiler.h>
+#  include <simgear/compiler.h>
 #  ifdef FG_HAVE_STD_INCLUDES
 #    include <iostream>
 #    include <ctime>
@@ -108,14 +108,18 @@ FGFDMExec::FGFDMExec(void)
   if (!Auxiliary->InitModel())  {cerr << "Auxiliary model init failed"; Error+=64;}
   if (!Output->InitModel())     {cerr << "Output model init failed"; Error+=128;}
 
-  Schedule(Atmosphere,  5);
+  // Schedule a model. The second arg (the integer) is the pass number. For
+  // instance, the atmosphere model gets executed every fifth pass it is called
+  // by the executive. Everything else here gets executed each pass.
+
+  Schedule(Atmosphere,  1);
   Schedule(FCS,         1);
   Schedule(Aircraft,    1);
   Schedule(Rotation,    1);
   Schedule(Translation, 1);
   Schedule(Position,    1);
   Schedule(Auxiliary,   1);
-  Schedule(Output,      5);
+  Schedule(Output,     1);
 
   terminate = false;
   frozen = false;
@@ -172,3 +176,17 @@ bool FGFDMExec::Run(void)
   return true;
 }
 
+
+bool FGFDMExec::RunIC(FGInitialCondition *fgic)
+{
+  float save_dt = State->Getdt();
+
+  State->Setdt(0.0);
+  State->Initialize(fgic);
+  Run();
+  State->Setdt(save_dt);
+
+  return true;
+}
+  
+