]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGState.h
Updated to match changes in radiostack.[ch]xx
[flightgear.git] / src / FDM / JSBSim / FGState.h
index 8bb298ab41301c89aa281c126d1dc6fdf7539a54..5d7b70dcdef868a70a7c26e946c0486862e7a9f1 100644 (file)
@@ -95,6 +95,10 @@ CLASS DOCUMENTATION
 /** Encapsulates the calculation of aircraft state.
     @author Jon S. Berndt
     @version $Id$
+    @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGState.h?rev=HEAD&content-type=text/vnd.viewcvs-markup">
+         Header File </a>
+    @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGState.cpp?rev=HEAD&content-type=text/vnd.viewcvs-markup">
+         Source File </a>
 */
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -166,17 +170,11 @@ public:
       */
   void Initialize(FGInitialCondition *FGIC);
 
-  /** Stores state data in the supplied file name.
-      @param filename the file to store the data in.
-      @return true if successful.
-      */
-  bool StoreData(string filename);
-
   /// returns the speed of sound in feet per second.
   inline double Geta(void) { return a; }
 
   /// Returns the simulation time in seconds.
-  inline double Getsim_time(void) { return sim_time; }
+  inline double Getsim_time(void) const { return sim_time; }
   /// Returns the simulation delta T.
   inline double Getdt(void) { return dt; }
 
@@ -185,27 +183,6 @@ public:
   /// Resumes the simulation by resetting delta T to the correct value.
   inline void Resume(void)  {dt = saved_dt;}
 
-  /** Retrieves a parameter.
-      The parameters that can be retrieved are enumerated in FGJSBBase.h.
-      @param val_idx one of the enumerated JSBSim parameters.
-      @return the value of the parameter.
-      */
-  double GetParameter(eParam val_idx);
-
-  /** Retrieves a parameter.
-      The parameters that can be retrieved are enumerated in FGJSBBase.h.
-      @param val_string a string representing one of the enumerated JSBSim parameters,
-             i.e. "FG_QBAR".
-      @return the value of the parameter.
-      */
-  double GetParameter(string val_string);
-
-  /** Retrieves the JSBSim parameter enumerated item given the text string.
-      @param val_string the parameter string, i.e. "FG_QBAR".
-      @return the JSBSim parameter index (an enumerated type) for the supplied string.
-      */
-  eParam GetParameterIndex(string val_string);
-
   /** Sets the speed of sound.
       @param speed the speed of sound in feet per second.
       */
@@ -225,12 +202,6 @@ public:
       */
   inline void  Setdt(double delta_t) { dt = delta_t; }
 
-  /** Sets the JSBSim parameter to the supplied value.
-      @param prm the JSBSim parameter to set, i.e. FG_RUDDER_POS.
-      @param val the value to give the parameter.
-      */
-  void SetParameter(eParam prm, double val);
-
   /** Increments the simulation time.
       @return the new simulation time.
       */
@@ -302,10 +273,13 @@ public:
       configuration, etc.)
   */
   void ReportState(void);
-
-
-  typedef map<eParam, string> ParamMap;
-  ParamMap paramdef;
+  
+  inline string GetPropertyName(string prm) { return ParamNameToProp[prm]; }
+  //inline string GetPropertyName(eParam prm) { return ParamIdxToProp[prm]; }
+  //inline eParam GetParam(string property) { return PropToParam[property]; }
+  
+  void bind();
+  void unbind();
 
 private:
   double a;                          // speed of sound
@@ -319,10 +293,11 @@ private:
   FGMatrix33 mTb2s;
   FGColumnVector4 vQtrn;
   FGColumnVector4 vlastQdot;
+  FGColumnVector4 vQdot;
   FGColumnVector3 vUVW;
   FGColumnVector3 vLocalVelNED;
   FGColumnVector3 vLocalEuler;
-  FGColumnVector4 vQdot;
+  
   FGColumnVector4 vTmp;
   FGColumnVector3 vEuler;
 
@@ -336,11 +311,27 @@ private:
   FGAerodynamics* Aerodynamics;
   FGGroundReactions* GroundReactions;
   FGPropulsion* Propulsion;
+  FGPropertyManager* PropertyManager;
 
-  typedef map<string, eParam> CoeffMap;
/*  typedef map<string, eParam> CoeffMap;
   CoeffMap coeffdef;
-  void Debug(void);
+
+  typedef map<eParam, string> ParamMap;
+  //ParamMap paramdef; */
+
+  
+  typedef map<string,string> ParamNameMap;
+  ParamNameMap ParamNameToProp;
+  
+  typedef map<eParam,string> ParamIdxMap;
+  ParamIdxMap ParamIdxToProp;
+  //CoeffMap PropToParam;
+
   int ActiveEngine;
+  
+  void InitPropertyMaps(void);
+  
+  void Debug(int from);
 };
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%