]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGInitialCondition.h
Make yasim accept the launchbar and hook properties. They are not tied to anything...
[flightgear.git] / src / FDM / JSBSim / FGInitialCondition.h
index 753b26dc21f2563cd4f64b245bf7e4c40f002920..00632ae90db6cc673c73296c93e57adc76d1d857 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Header:       FGInitialCondition.h
  Author:       Tony Peden
@@ -36,23 +36,20 @@ angles, and altitude.  This class does not attempt to trim the model i.e.
 the sim will most likely start in a very dynamic state (unless, of course,
 you have chosen your IC's wisely) even after setting it up with this class.
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGINITIALCONDITION_H
 #define FGINITIALCONDITION_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGFDMExec.h"
 #include "FGJSBBase.h"
-#include "FGAtmosphere.h"
-#include "FGMatrix33.h"
 #include "FGColumnVector3.h"
-#include "FGColumnVector4.h"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINITIONS
@@ -60,16 +57,14 @@ DEFINITIONS
 
 #define ID_INITIALCONDITION "$Id$"
 
-typedef enum { setvt, setvc, setve, setmach, setuvw, setned, setvg } speedset;
-typedef enum { setwned, setwmd, setwhc } windset; 
-
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 FORWARD DECLARATIONS
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+namespace JSBSim {
+
+typedef enum { setvt, setvc, setve, setmach, setuvw, setned, setvg } speedset;
+typedef enum { setwned, setwmd, setwhc } windset; 
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DOCUMENTATION
@@ -87,9 +82,7 @@ CLASS DOCUMENTATION
    FGInitialCondition fgic=new FGInitialCondition(FDMExec);
    fgic->SetVcalibratedKtsIC()
    fgic->SetAltitudeFtIC();
-   .
-   .
-   .
+
    //to directly into Run
    FDMExec->GetState()->Initialize(fgic)
    delete fgic;
@@ -100,36 +93,32 @@ CLASS DOCUMENTATION
    
    Speed:
    
-        Since vc, ve, vt, and mach all represent speed, the remaining
-        three are recalculated each time one of them is set (using the
-        current altitude).  The most recent speed set is remembered so 
-        that if and when altitude is reset, the last set speed is used 
-        to recalculate the remaining three. Setting any of the body 
-        components forces a recalculation of vt and vt then becomes the
-        most recent speed set.
+   Since vc, ve, vt, and mach all represent speed, the remaining
+   three are recalculated each time one of them is set (using the
+   current altitude).  The most recent speed set is remembered so 
+   that if and when altitude is reset, the last set speed is used 
+   to recalculate the remaining three. Setting any of the body 
+   components forces a recalculation of vt and vt then becomes the
+   most recent speed set.
    
    Alpha,Gamma, and Theta:
    
    This class assumes that it will be used to set up the sim for a
-        steady, zero pitch rate condition. Since any two of those angles 
+   steady, zero pitch rate condition. Since any two of those angles 
    specifies the third gamma (flight path angle) is favored when setting
    alpha and theta and alpha is favored when setting gamma. i.e.
    
-       set alpha : recalculate theta using gamma as currently set
-                 set theta : recalculate alpha using gamma as currently set
-                 set gamma : recalculate theta using alpha as currently set
+   - set alpha : recalculate theta using gamma as currently set
+   - set theta : recalculate alpha using gamma as currently set
+   - set gamma : recalculate theta using alpha as currently set
  
-        The idea being that gamma is most interesting to pilots (since it 
-        is indicative of climb rate). 
-        
-        Setting climb rate is, for the purpose of this discussion, 
-        considered equivalent to setting gamma.
-   @author Anthony K. Peden
-   @version $Id$
-    @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGInitialCondition.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/FGInitialCondition.cpp?rev=HEAD&content-type=text/vnd.viewcvs-markup">
-         Source File </a>
+   The idea being that gamma is most interesting to pilots (since it 
+   is indicative of climb rate). 
+   
+   Setting climb rate is, for the purpose of this discussion, 
+   considered equivalent to setting gamma.
+   @author Tony Peden
+   @version "$Id$"
 */
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -203,6 +192,9 @@ public:
   void SetVnorthFpsIC(double tt);
   void SetVeastFpsIC(double tt);
   void SetVdownFpsIC(double tt);
+  void SetPRadpsIC(double tt)  { p = tt; }
+  void SetQRadpsIC(double tt) { q = tt; }
+  void SetRRadpsIC(double tt) { r = tt; }
   
   void SetWindNEDFpsIC(double wN, double wE, double wD);
  
@@ -226,9 +218,12 @@ public:
   inline double GetWindFpsIC(void)  const { return sqrt(wnorth*wnorth + weast*weast); }
   double GetWindDirDegIC(void); 
   inline double GetClimbRateFpsIC(void) const { return hdot; }
-  double GetUBodyFpsIC(void);
-  double GetVBodyFpsIC(void);
-  double GetWBodyFpsIC(void);
+  double GetUBodyFpsIC(void) const;
+  double GetVBodyFpsIC(void) const;
+  double GetWBodyFpsIC(void) const;
+  double GetPRadpsIC() const { return p; }
+  double GetQRadpsIC() const { return q; }
+  double GetRRadpsIC() const { return r; }
   void SetFlightPathAngleRadIC(double tt);
   void SetAlphaRadIC(double tt);
   void SetPitchAngleRadIC(double tt);
@@ -264,6 +259,7 @@ private:
   double altitude,hdot;
   double latitude,longitude;
   double u,v,w;
+  double p,q,r;
   double uw,vw,ww;
   double vnorth,veast,vdown;
   double wnorth,weast,wdown;
@@ -301,6 +297,6 @@ private:
   bool solve(double *y, double x);
   void Debug(int from);
 };
-
+}
 #endif