]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGState.h
Fax an INCLUDES problem
[flightgear.git] / src / FDM / JSBSim / FGState.h
index 8709b00b35d7418f2ea4b1252f28784eda92bd6d..d1ca3d74ff7a803faf7cbb24facb44cbe13212fa 100644 (file)
@@ -7,20 +7,20 @@
  ------------- Copyright (C) 1999  Jon S. Berndt (jsb@hal-pc.org) -------------
 
  This program is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License as published by the Free Software
+ the terms of the GNU Lesser General Public License as published by the Free Software
  Foundation; either version 2 of the License, or (at your option) any later
  version.
 
  This program is distributed in the hope that it will be useful, but WITHOUT
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
  details.
 
- You should have received a copy of the GNU General Public License along with
+ You should have received a copy of the GNU Lesser General Public License along with
  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
  Place - Suite 330, Boston, MA  02111-1307, USA.
 
- Further information about the GNU General Public License can also be found on
+ Further information about the GNU Lesser General Public License can also be found on
  the world wide web at http://www.gnu.org.
 
 FUNCTIONAL DESCRIPTION
@@ -41,38 +41,22 @@ SENTRY
 INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-#ifdef FGFS
-#  include <simgear/compiler.h>
-#  ifdef SG_HAVE_STD_INCLUDES
-#    include <fstream>
-#  else
-#    include <fstream.h>
-#  endif
-#else
-#  if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
-#    include <fstream.h>
-#  else
-#    include <fstream>
-#  endif
-#endif
-
+#include <fstream>
 #include <string>
 #include <map>
 #include "FGJSBBase.h"
-#include "FGInitialCondition.h"
-#include "FGMatrix33.h"
-#include "FGColumnVector3.h"
-#include "FGQuaternion.h"
+#include <initialization/FGInitialCondition.h>
+#include <math/FGColumnVector3.h>
+#include <math/FGQuaternion.h>
 #include "FGFDMExec.h"
-#include "FGAtmosphere.h"
-#include "FGFCS.h"
-#include "FGPropagate.h"
-#include "FGAuxiliary.h"
-#include "FGAerodynamics.h"
-#include "FGOutput.h"
-#include "FGAircraft.h"
-#include "FGGroundReactions.h"
-#include "FGPropulsion.h"
+#include <models/FGAtmosphere.h>
+#include <models/FGFCS.h>
+#include <models/FGPropagate.h>
+#include <models/FGAuxiliary.h>
+#include <models/FGAerodynamics.h>
+#include <models/FGAircraft.h>
+#include <models/FGGroundReactions.h>
+#include <models/FGPropulsion.h>
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINITIONS
@@ -91,8 +75,10 @@ CLASS DOCUMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 /** Encapsulates the calculation of aircraft state.
+    <h3>Properties</h3>
+    @property sim-time-sec (read only) cumulative simulation in seconds.
     @author Jon S. Berndt
-    @version $Id$
+    @version $Revision$
 */
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -110,71 +96,56 @@ public:
 
   /** Initializes the simulation state based on parameters from an Initial Conditions object.
       @param FGIC pointer to an initial conditions object.
-      @see FGInitialConditions.
-      */
+      @see FGInitialConditions.    */
   void Initialize(FGInitialCondition *FGIC);
 
-  /// Returns the simulation time in seconds.
+  /// Returns the cumulative simulation time in seconds.
   inline double Getsim_time(void) const { return sim_time; }
+
   /// Returns the simulation delta T.
-  inline double Getdt(void) { return dt; }
+  inline double Getdt(void) {return dt;}
 
   /// Suspends the simulation and sets the delta T to zero.
-  inline void Suspend(void) {saved_dt = dt; dt = 0.0;}
+  inline void SuspendIntegration(void) {saved_dt = dt; dt = 0.0;}
+
   /// Resumes the simulation by resetting delta T to the correct value.
-  inline void Resume(void)  {dt = saved_dt;}
+  inline void ResumeIntegration(void)  {dt = saved_dt;}
+
+  /** Returns the simulation suspension state.
+      @return true if suspended, false if executing  */
+  bool IntegrationSuspended(void) {return dt == 0.0;}
 
   /** Sets the current sim time.
       @param cur_time the current time
-      @return the current time.
-      */
+      @return the current simulation time.      */
   inline double Setsim_time(double cur_time) {
     sim_time = cur_time;
     return sim_time;
   }
 
   /** Sets the integration time step for the simulation executive.
-      @param delta_t the time step in seconds.
-      */
+      @param delta_t the time step in seconds.     */
   inline void  Setdt(double delta_t) { dt = delta_t; }
 
   /** Increments the simulation time.
-      @return the new simulation time.
-      */
+      @return the new simulation time.     */
   inline double IncrTime(void) {
     sim_time+=dt;
     return sim_time;
   }
 
-  /** Calculates and returns the stability-to-body axis transformation matrix.
-      @return a reference to the stability-to-body transformation matrix.
-      */
-  FGMatrix33& GetTs2b(void);
-
-  /** Calculates and returns the body-to-stability axis transformation matrix.
-      @return a reference to the stability-to-body transformation matrix.
-      */
-  FGMatrix33& GetTb2s(void);
-
   /** Prints a summary of simulator state (speed, altitude,
-      configuration, etc.)
-  */
-  void ReportState(void);
-
-  void bind();
-  void unbind();
+      configuration, etc.)  */
+//  void ReportState(void);
 
 private:
   double sim_time, dt;
   double saved_dt;
 
   FGFDMExec* FDMExec;
-  FGMatrix33 mTs2b;
-  FGMatrix33 mTb2s;
 
   FGAircraft* Aircraft;
   FGPropagate* Propagate;
-  FGOutput* Output;
   FGAtmosphere* Atmosphere;
   FGFCS* FCS;
   FGAerodynamics* Aerodynamics;
@@ -183,6 +154,8 @@ private:
   FGAuxiliary* Auxiliary;
   FGPropertyManager* PropertyManager;
 
+  void bind();
+
   void Debug(int from);
 };
 }