]> git.mxchange.org Git - flightgear.git/commitdiff
Sync with current JSBSim devel code.
authorcurt <curt>
Fri, 3 Nov 2000 23:02:47 +0000 (23:02 +0000)
committercurt <curt>
Fri, 3 Nov 2000 23:02:47 +0000 (23:02 +0000)
92 files changed:
src/FDM/JSBSim.cxx
src/FDM/JSBSim.hxx
src/FDM/JSBSim/FGAerodynamics.cpp
src/FDM/JSBSim/FGAerodynamics.h
src/FDM/JSBSim/FGAircraft.cpp
src/FDM/JSBSim/FGAircraft.h
src/FDM/JSBSim/FGAtmosphere.cpp
src/FDM/JSBSim/FGAuxiliary.cpp
src/FDM/JSBSim/FGAuxiliary.h
src/FDM/JSBSim/FGCoefficient.cpp
src/FDM/JSBSim/FGCoefficient.h
src/FDM/JSBSim/FGConfigFile.cpp
src/FDM/JSBSim/FGConfigFile.h
src/FDM/JSBSim/FGControls.cpp
src/FDM/JSBSim/FGControls.h
src/FDM/JSBSim/FGDefs.h
src/FDM/JSBSim/FGEngine.cpp
src/FDM/JSBSim/FGEngine.h
src/FDM/JSBSim/FGFCS.cpp
src/FDM/JSBSim/FGFCS.h
src/FDM/JSBSim/FGFDMExec.cpp
src/FDM/JSBSim/FGFDMExec.h
src/FDM/JSBSim/FGForce.cpp
src/FDM/JSBSim/FGForce.h
src/FDM/JSBSim/FGGroundReactions.cpp
src/FDM/JSBSim/FGGroundReactions.h
src/FDM/JSBSim/FGInertial.cpp
src/FDM/JSBSim/FGInertial.h
src/FDM/JSBSim/FGInitialCondition.h
src/FDM/JSBSim/FGLGear.cpp
src/FDM/JSBSim/FGLGear.h
src/FDM/JSBSim/FGMassBalance.cpp
src/FDM/JSBSim/FGMassBalance.h
src/FDM/JSBSim/FGMatrix.cpp
src/FDM/JSBSim/FGMatrix.h
src/FDM/JSBSim/FGModel.cpp
src/FDM/JSBSim/FGModel.h
src/FDM/JSBSim/FGNozzle.cpp
src/FDM/JSBSim/FGNozzle.h
src/FDM/JSBSim/FGOutput.cpp
src/FDM/JSBSim/FGOutput.h
src/FDM/JSBSim/FGPiston.cpp
src/FDM/JSBSim/FGPiston.h
src/FDM/JSBSim/FGPosition.cpp
src/FDM/JSBSim/FGPosition.h
src/FDM/JSBSim/FGPropeller.cpp
src/FDM/JSBSim/FGPropeller.h
src/FDM/JSBSim/FGPropulsion.cpp
src/FDM/JSBSim/FGPropulsion.h
src/FDM/JSBSim/FGRocket.cpp
src/FDM/JSBSim/FGRocket.h
src/FDM/JSBSim/FGRotation.cpp
src/FDM/JSBSim/FGRotation.h
src/FDM/JSBSim/FGRotor.cpp
src/FDM/JSBSim/FGRotor.h
src/FDM/JSBSim/FGState.cpp
src/FDM/JSBSim/FGState.h
src/FDM/JSBSim/FGTank.cpp
src/FDM/JSBSim/FGTank.h
src/FDM/JSBSim/FGThruster.cpp
src/FDM/JSBSim/FGThruster.h
src/FDM/JSBSim/FGTranslation.cpp
src/FDM/JSBSim/FGTranslation.h
src/FDM/JSBSim/FGTrim.cpp
src/FDM/JSBSim/FGTrim.h
src/FDM/JSBSim/FGTrimAxis.cpp
src/FDM/JSBSim/FGTrimAxis.h
src/FDM/JSBSim/FGTurboJet.cpp
src/FDM/JSBSim/FGTurboJet.h
src/FDM/JSBSim/FGTurboShaft.cpp
src/FDM/JSBSim/FGTurboShaft.h
src/FDM/JSBSim/FGUtility.cpp
src/FDM/JSBSim/FGUtility.h
src/FDM/JSBSim/FGfdmSocket.cpp
src/FDM/JSBSim/FGfdmSocket.h
src/FDM/JSBSim/JSBSim.cpp
src/FDM/JSBSim/filtersjb/FGDeadBand.cpp
src/FDM/JSBSim/filtersjb/FGDeadBand.h
src/FDM/JSBSim/filtersjb/FGFCSComponent.cpp
src/FDM/JSBSim/filtersjb/FGFCSComponent.h
src/FDM/JSBSim/filtersjb/FGFilter.cpp
src/FDM/JSBSim/filtersjb/FGFilter.h
src/FDM/JSBSim/filtersjb/FGFlaps.cpp
src/FDM/JSBSim/filtersjb/FGFlaps.h
src/FDM/JSBSim/filtersjb/FGGain.cpp
src/FDM/JSBSim/filtersjb/FGGain.h
src/FDM/JSBSim/filtersjb/FGGradient.cpp
src/FDM/JSBSim/filtersjb/FGGradient.h
src/FDM/JSBSim/filtersjb/FGSummer.cpp
src/FDM/JSBSim/filtersjb/FGSummer.h
src/FDM/JSBSim/filtersjb/FGSwitch.cpp
src/FDM/JSBSim/filtersjb/FGSwitch.h

index 44058b127f05c4d7ec01a72896fd69a2f9dcc93f..68997a3424f31b35727eae8bcbd45ab1fed87632 100644 (file)
@@ -117,7 +117,7 @@ bool FGJSBsim::init( double dt ) {
 #endif
 
     if (result) {
-       FG_LOG( FG_FLIGHT, FG_INFO, "  loaded aircraft" << globals->get_options()->get_aircraft() );
+       FG_LOG( FG_FLIGHT, FG_INFO, "  loaded aircraft " << globals->get_options()->get_aircraft() );
     } else {
        FG_LOG( FG_FLIGHT, FG_INFO, "  aircraft "
                << globals->get_options()->get_aircraft()
@@ -210,10 +210,14 @@ bool FGJSBsim::update( int multiloop ) {
        set_Altitude( 0.0 );
     }
 
-  
-  
-    if(needTrim) {
-       FGTrim *fgtrim=new FGTrim(fdmex,fgic,tLongitudinal);
+    if(needTrim && (globals->get_options()->get_trim_mode() > 0)) {
+       FGTrim *fgtrim;
+       if(fgic->GetVcalibratedKtsIC() < 10 ) {
+               fgic->SetVcalibratedKtsIC(0.0);
+               fgtrim=new FGTrim(fdmex,fgic,tGround);
+       } else {
+               fgtrim=new FGTrim(fdmex,fgic,tLongitudinal);
+       }       
        if(!fgtrim->DoTrim()) {
            fgtrim->Report();
            fgtrim->TrimStats();
@@ -223,6 +227,7 @@ bool FGJSBsim::update( int multiloop ) {
     
        needTrim=false;
     
+         
        controls.set_elevator_trim(fdmex->GetFCS()->GetPitchTrimCmd());
        controls.set_elevator(fdmex->GetFCS()->GetDeCmd());
        controls.set_throttle(FGControls::ALL_ENGINES,
@@ -250,6 +255,8 @@ bool FGJSBsim::update( int multiloop ) {
     // autopilot (and the rest of the sim can use the updated values
 
     copy_from_JSBsim();
+    
 
     // but lets restore our original bogus altitude when we are done
 
@@ -380,12 +387,14 @@ bool FGJSBsim::copy_from_JSBsim() {
     _set_Alpha( fdmex->GetTranslation()->Getalpha() );
     _set_Beta( fdmex->GetTranslation()->Getbeta() );
 
+    
     _set_Gamma_vert_rad( fdmex->GetPosition()->GetGamma() );
     // set_Gamma_horiz_rad( Gamma_horiz_rad );
 
     _set_Earth_position_angle( fdmex->GetAuxiliary()->GetEarthPositionAngle() );
 
     _set_Climb_Rate( fdmex->GetPosition()->Gethdot() );
+    
 
     for ( i = 1; i <= 3; i++ ) {
        for ( j = 1; j <= 3; j++ ) {
index 4b9cf8e2f240595c6cf979f32a56cf02f2efa8f4..7c56e1cf52b7312a9a89731045a2e16774a4ac83 100644 (file)
@@ -21,9 +21,6 @@
  along with this program; if not, write to the Free Software
  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
- Further information about the GNU General Public License can also be found on
- the world wide web at http://www.gnu.org.
-
 HISTORY
 --------------------------------------------------------------------------------
 02/01/1999   CLO   Created
@@ -63,7 +60,7 @@ COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
 CLASS DOCUMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-/** FGFS / JSBSim interface (aka "The Bus")
+/** FGFS / JSBSim interface (aka "The Bus").
     This class provides for an interface between FlightGear and its data
     structures and JSBSim and its data structures. This is the class which is
     used to command JSBSim when integrated with FlightGear. See the
@@ -80,6 +77,17 @@ CLASS DECLARATION
 
 class FGJSBsim: public FGInterface {
 
+#if 0
+    // The aircraft for this instance
+    FGFDMExec *fdmex;
+    FGInitialCondition *fgic;
+    bool needTrim;
+    
+    bool trimmed;
+    float trim_elev;
+    float trim_throttle;
+#endif
+
 public:
     /// Constructor
     FGJSBsim::FGJSBsim(void);
@@ -95,7 +103,7 @@ public:
     /// Reset flight params to a specific position
     bool init( double dt );
 
-    /// Position Parameters
+    /// @name Position Parameter Set
     //@{
     /** Set geocentric latitude
         @param lat latitude in radians measured from the 0 meridian where
@@ -115,7 +123,7 @@ public:
 
     //void set_AltitudeAGL(double altagl); // and vice-versa
 
-    /// Velocity Parameters
+    /// @name Velocity Parameter Set
     //@{
     /** Sets calibrated airspeed
         Setting this will trigger a recalc of the other velocity terms.
@@ -142,13 +150,13 @@ public:
     void set_Velocities_Wind_Body( double u, double v, double w);
     //@}
 
-    /** Euler angle parameters
+    /** Euler Angle Parameter Set
         @param phi roll angle in radians
              @param theta pitch angle in radians
              @param psi heading angle in radians */
     void set_Euler_Angles( double phi, double theta, double psi );
 
-    /// Flight Path Parameters
+    /// @name Flight Path Parameter Set
     //@{
     /** Sets rate of climb
         @param roc Rate of climb in ft/sec */
@@ -159,7 +167,7 @@ public:
     void set_Gamma_vert_rad( double gamma);
     //@}
 
-    /// Earth Parameters
+    /// @name Earth Parameter Set
     //@{
     /** Sets the sea level radius in feet.
         @param slr Sea Level Radius in feet */
@@ -170,7 +178,7 @@ public:
     void set_Runway_altitude(double ralt);
     //@}
 
-    /// Atmospheric Parameters
+    /// @name Atmospheric Parameter Set
     //@{
     /** Sets the atmospheric static pressure
         @param p pressure in psf */
index cbffadc97c7dc31d6be88d71a933f3a6b473b906..d1a5a2564792a420b0a73e28c4f8168cb3edce35 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGAerodynamics.cpp
  Author:       Jon S. Berndt
@@ -31,18 +31,18 @@ HISTORY
 --------------------------------------------------------------------------------
 09/13/00   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGAerodynamics.h"
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_AERODYNAMICS;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 FGAerodynamics::FGAerodynamics(FGFDMExec* fgex) : FGModel(fgex)
index f448203a33e338f8bbf3a60b6900bd43086b7b89..842eba5f4fff2192eebbfac3e2185bcb1e28e47a 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGAerodynamics.h
  Author:       Jon S. Berndt
@@ -27,20 +27,16 @@ HISTORY
 --------------------------------------------------------------------------------
 09/13/00   JSB   Created
 
-********************************************************************************
-COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
-
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGAERODYNAMICS_H
 #define FGAERODYNAMICS_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -54,23 +50,57 @@ INCLUDES
 #endif
 
 #include "FGModel.h"
+#include "FGConfigFile.h"
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_AERODYNAMICS "$Header$"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+FORWARD DECLARATIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DOCUMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/** Encapsulates the aerodynamic calculations.
+    This class owns and contains the list of coefficients that define the
+    aerodynamic properties of this aircraft. Here also, such unique phenomena
+    as ground effect and maximum lift curve tailoff are handled.
+    @author Jon S. Berndt
+    @version $Id$
+    @see -
+*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGAerodynamics : public FGModel {
 
 public:
+  /** Constructor
+      @param Executive a pointer to the parent executive object */
   FGAerodynamics(FGFDMExec*);
+  /// Destructor
   ~FGAerodynamics(void);
 
+  /** Runs the Aerodynamics model; called by the Executive
+      @return false if no error */
   bool Run(void);
+
+  /** Loads the Aerodynamics model
+      @return true if successful */
   bool LoadAerodynamics(FGConfigFile* AC_cfg);
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
 
index debb1d9eedab2e263e25900bd298c4cf9ad95bf7..ccf5bfc46ed4e1b492ff2501b20df04234bd5b11 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Module:       FGAircraft.cpp
  Author:       Jon S. Berndt
@@ -41,9 +41,10 @@ HISTORY
                  point to config file. Added calculations for moments due to 
                  difference in cg and aero reference point
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
 [1] Cooke, Zyda, Pratt, and McGhee, "NPSNET: Flight Simulation Dynamic Modeling
       Using Quaternions", Presence, Vol. 1, No. 4, pp. 404-420  Naval Postgraduate
       School, January 1994
@@ -97,9 +98,9 @@ Control
   CnDr - Yaw moment due to rudder
   CnDa - Yaw moment due to aileron
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -128,12 +129,20 @@ INCLUDES
 #include "FGAuxiliary.h"
 #include "FGOutput.h"
 
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+GLOBAL DATA
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_AIRCRAFT;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 FGAircraft::FGAircraft(FGFDMExec* fdmex) : FGModel(fdmex),
     vMoments(3),
@@ -165,7 +174,7 @@ FGAircraft::FGAircraft(FGFDMExec* fdmex) : FGModel(fdmex),
 }
 
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
 FGAircraft::~FGAircraft(void) { 
@@ -187,7 +196,7 @@ FGAircraft::~FGAircraft(void) {
   delete[] Coeff;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 bool FGAircraft::LoadAircraft(string aircraft_path, string engine_path, string fname) {
   string path;
@@ -234,7 +243,7 @@ bool FGAircraft::LoadAircraft(string aircraft_path, string engine_path, string f
   return true;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 bool FGAircraft::Run(void) {
   if (!FGModel::Run()) {                 // if false then execute this Run()
@@ -260,7 +269,7 @@ bool FGAircraft::Run(void) {
   return false;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGAircraft::MassChange() {
   static FGColumnVector vXYZtank(3);
@@ -354,7 +363,7 @@ void FGAircraft::MassChange() {
 
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGAircraft::FMAero(void) {
   static FGColumnVector vDXYZcg(3);
@@ -393,7 +402,7 @@ void FGAircraft::FMAero(void) {
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGAircraft::FMGear(void) {
 
@@ -409,7 +418,7 @@ void FGAircraft::FMGear(void) {
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGAircraft::FMMass(void) {
   vForces(eX) += -GRAVITY*sin(vEuler(eTht)) * Mass;
@@ -417,7 +426,7 @@ void FGAircraft::FMMass(void) {
   vForces(eZ) +=  GRAVITY*cos(vEuler(ePhi))*cos(vEuler(eTht)) * Mass;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGAircraft::FMProp(void) {
   for (unsigned int i=0;i<numEngines;i++) {
@@ -429,7 +438,7 @@ void FGAircraft::FMProp(void) {
   
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGAircraft::GetState(void) {
   dt = State->Getdt();
@@ -439,7 +448,7 @@ void FGAircraft::GetState(void) {
   vEuler = Rotation->GetEuler();
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGAircraft::ReadMetrics(FGConfigFile* AC_cfg) {
   string token = "";
@@ -491,7 +500,7 @@ void FGAircraft::ReadMetrics(FGConfigFile* AC_cfg) {
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGAircraft::ReadPropulsion(FGConfigFile* AC_cfg) {
   string token;
@@ -525,7 +534,7 @@ void FGAircraft::ReadPropulsion(FGConfigFile* AC_cfg) {
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGAircraft::ReadFlightControls(FGConfigFile* AC_cfg) {
   string token;
@@ -533,7 +542,7 @@ void FGAircraft::ReadFlightControls(FGConfigFile* AC_cfg) {
   FCS->LoadFCS(AC_cfg);
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGAircraft::ReadAerodynamics(FGConfigFile* AC_cfg) {
   string token, axis;
@@ -555,7 +564,7 @@ void FGAircraft::ReadAerodynamics(FGConfigFile* AC_cfg) {
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGAircraft::ReadUndercarriage(FGConfigFile* AC_cfg) {
   string token;
@@ -567,7 +576,7 @@ void FGAircraft::ReadUndercarriage(FGConfigFile* AC_cfg) {
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGAircraft::ReadOutput(FGConfigFile* AC_cfg) {
   string token, parameter;
@@ -635,7 +644,7 @@ void FGAircraft::ReadOutput(FGConfigFile* AC_cfg) {
   Output->SetRate( (int)(0.5 + 1.0/(State->Getdt()*OutRate)) );
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGAircraft::ReadPrologue(FGConfigFile* AC_cfg) {
   string token = AC_cfg->GetValue();
@@ -657,7 +666,7 @@ void FGAircraft::ReadPrologue(FGConfigFile* AC_cfg) {
 
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGAircraft::DisplayCoeffFactors(vector <eParam> multipliers) {
   cout << "   Non-Dimensionalized by: ";
@@ -668,7 +677,7 @@ void FGAircraft::DisplayCoeffFactors(vector <eParam> multipliers) {
   cout << endl;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 string FGAircraft::GetCoefficientStrings(void) {
   string CoeffStrings = "";
@@ -688,7 +697,7 @@ string FGAircraft::GetCoefficientStrings(void) {
   return CoeffStrings;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 string FGAircraft::GetCoefficientValues(void) {
   string SDValues = "";
@@ -711,7 +720,7 @@ string FGAircraft::GetCoefficientValues(void) {
   ;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 string FGAircraft::GetGroundReactionStrings(void) {
   string GroundReactionStrings = "";
@@ -730,7 +739,7 @@ string FGAircraft::GetGroundReactionStrings(void) {
   return GroundReactionStrings;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 string FGAircraft::GetGroundReactionValues(void) {
   char buff[20];
index b8fe04ca59eea2a4102ba2fb9089aaf9f87c4474..05c9de0b4cec5b6846c2af737a6f123e64090029 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Header:       FGAircraft.h
  Author:       Jon S. Berndt
@@ -27,74 +27,16 @@ HISTORY
 --------------------------------------------------------------------------------
 12/12/98   JSB   Created
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGAIRCRAFT_H
 #define FGAIRCRAFT_H
 
-/*******************************************************************************
-COMMENTS, REFERENCES,  and NOTES
-*******************************************************************************/
-/*
-The aerodynamic coefficients used in this model typically are:
-Longitudinal
-  CL0 - Reference lift at zero alpha
-  CD0 - Reference drag at zero alpha
-  CDM - Drag due to Mach
-  CLa - Lift curve slope (w.r.t. alpha)
-  CDa - Drag curve slope (w.r.t. alpha)
-  CLq - Lift due to pitch rate
-  CLM - Lift due to Mach
-  CLadt - Lift due to alpha rate
-  Cmadt - Pitching Moment due to alpha rate
-  Cm0 - Reference Pitching moment at zero alpha
-  Cma - Pitching moment slope (w.r.t. alpha)
-  Cmq - Pitch damping (pitch moment due to pitch rate)
-  CmM - Pitch Moment due to Mach
-Lateral
-  Cyb - Side force due to sideslip
-  Cyr - Side force due to yaw rate
-  Clb - Dihedral effect (roll moment due to sideslip)
-  Clp - Roll damping (roll moment due to roll rate)
-  Clr - Roll moment due to yaw rate
-  Cnb - Weathercocking stability (yaw moment due to sideslip)
-  Cnp - Rudder adverse yaw (yaw moment due to roll rate)
-  Cnr - Yaw damping (yaw moment due to yaw rate)
-Control
-  CLDe - Lift due to elevator
-  CDDe - Drag due to elevator
-  CyDr - Side force due to rudder
-  CyDa - Side force due to aileron
-  CmDe - Pitch moment due to elevator
-  ClDa - Roll moment due to aileron
-  ClDr - Roll moment due to rudder
-  CnDr - Yaw moment due to rudder
-  CnDa - Yaw moment due to aileron
-[1] Cooke, Zyda, Pratt, and McGhee, "NPSNET: Flight Simulation Dynamic Modeling
-        Using Quaternions", Presence, Vol. 1, No. 4, pp. 404-420  Naval Postgraduate
-        School, January 1994
-[2] D. M. Henderson, "Euler Angles, Quaternions, and Transformation Matrices",
-        JSC 12960, July 1977
-[3] Richard E. McFarland, "A Standard Kinematic Model for Flight Simulation at
-        NASA-Ames", NASA CR-2497, January 1975
-[4] Barnes W. McCormick, "Aerodynamics, Aeronautics, and Flight Mechanics",
-        Wiley & Sons, 1979 ISBN 0-471-03032-5
-[5] Bernard Etkin, "Dynamics of Flight, Stability and Control", Wiley & Sons,
-        1982 ISBN 0-471-08936-2
-*/
-
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -121,35 +63,49 @@ INCLUDES
 #include "FGConfigFile.h"
 #include "FGMatrix.h"
 
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
 #define ID_AIRCRAFT "$Header$"
 
-/*******************************************************************************
-DEFINITIONS
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+FORWARD DECLARATIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DOCUMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 /** Encapsulates an Aircraft and its systems.
-    Owns all the parts (other classes) which make
-    up this aircraft. This includes the Engines, Tanks, Propellers, Nozzles,
-    aerodynamic and mass properties, landing gear, etc.
+    Owns all the parts (other classes) which make up this aircraft. This includes
+    the Engines, Tanks, Propellers, Nozzles, Aerodynamic and Mass properties,
+    landing gear, etc. These constituent parts may actually run as separate
+    JSBSim models themselves, but the responsibility for initializing them and
+    for retrieving their force and moment contributions falls to FGAircraft.
     @author Jon S. Berndt
     @version $Id$
     @see
-     [1] Cooke, Zyda, Pratt, and McGhee, "NPSNET: Flight Simulation Dynamic Modeling
+     <ol><li>Cooke, Zyda, Pratt, and McGhee, "NPSNET: Flight Simulation Dynamic Modeling
           Using Quaternions", Presence, Vol. 1, No. 4, pp. 404-420  Naval Postgraduate
-          School, January 1994
-     [2] D. M. Henderson, "Euler Angles, Quaternions, and Transformation Matrices",
-     JSC 12960, July 1977
-     [3] Richard E. McFarland, "A Standard Kinematic Model for Flight Simulation at
-     NASA-Ames", NASA CR-2497, January 1975
-     [4] Barnes W. McCormick, "Aerodynamics, Aeronautics, and Flight Mechanics",
-     Wiley & Sons, 1979 ISBN 0-471-03032-5
-     [5] Bernard Etkin, "Dynamics of Flight, Stability and Control", Wiley & Sons,
-     1982 ISBN 0-471-08936-2
-  */
+          School, January 1994</li>
+     <li>D. M. Henderson, "Euler Angles, Quaternions, and Transformation Matrices",
+     JSC 12960, July 1977</li>
+     <li>Richard E. McFarland, "A Standard Kinematic Model for Flight Simulation at
+     NASA-Ames", NASA CR-2497, January 1975</li>
+     <li>Barnes W. McCormick, "Aerodynamics, Aeronautics, and Flight Mechanics",
+     Wiley & Sons, 1979 ISBN 0-471-03032-5</li>
+     <li>Bernard Etkin, "Dynamics of Flight, Stability and Control", Wiley & Sons,
+     1982 ISBN 0-471-08936-2</li></ol>
+*/
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGAircraft : public FGModel {
   enum {eL=1, eM, eN};
@@ -159,17 +115,15 @@ class FGAircraft : public FGModel {
 
 public:
   /** Constructor
-      @param Executive a pointer to the parent executive object
-    */
+      @param Executive a pointer to the parent executive object */
   FGAircraft(FGFDMExec *Executive);
   
   /// Destructor
   ~FGAircraft(void);
 
-  /** Runs the model; called by the Executive
+  /** Runs the Aircraft model; called by the Executive
       @see JSBSim.cpp documentation
-      @return bool returns false if no error
-    */
+      @return false if no error */
   bool Run(void);
   
   /** Loads the aircraft.
@@ -177,24 +131,37 @@ public:
       @param apath path to the aircraft files (e.g. "aircraft/X15/")
       @param epath path to engine files (e.g. "engine/")
       @param acname name of aircraft (e.g. "X15")
-      @return true if succesful
-    */
+      @return true if succesful */
   bool LoadAircraft(string apath, string epath, string acname);
   
-  /** Retrieves the aircraft name
-      @return the name of the aircraft as a string type
-    */
+  /** Gets the aircraft name
+      @return the name of the aircraft as a string type */
   inline string GetAircraftName(void) { return AircraftName; }
   
-  inline void SetGearUp(bool tt) { GearUp = tt; }
+  /** Gets the gear status
+      @return true if gear is not deployed */
   inline bool GetGearUp(void) { return GearUp; }
+  /** Gets the number of gear units defined for the aircraft
+      @return number of gear units defined */
   inline int GetNumGearUnits(void) { return lGear.size(); }
-  inline FGLGear* GetGearUnit(int ii) { return &(lGear[ii]); }
+  /** Gets a gear instance
+      @param gear index of gear instance
+      @return a pointer to the FGLGear instance of the gear unit requested */
+  inline FGLGear* GetGearUnit(int gear) { return &(lGear[gear]); }
+  /// Gets the wing area
   inline float GetWingArea(void) { return WingArea; }
+  /// Gets the wing span
   inline float GetWingSpan(void) { return WingSpan; }
+  /// Gets the average wing chord
   inline float Getcbar(void) { return cbar; }
-  inline FGEngine* GetEngine(int tt) { return Engine[tt]; }
-  inline FGTank* GetTank(int tt) { return Tank[tt]; }
+  /** Gets an engine instance.
+      @param engine index of the engine instance
+      @return a pointer to the FGEngine instance of the requested engine */
+  inline FGEngine* GetEngine(int engine) { return Engine[engine]; }
+  /** Gets a tank instance.
+      @param tank index of the tank instance
+      @return a pointer to the FGTank instance of the requested tank */
+  inline FGTank* GetTank(int tank) { return Tank[tank]; }
   inline float GetWeight(void) { return Weight; }
   inline float GetMass(void) { return Mass; }
   inline FGColumnVector GetMoments(void) { return vMoments; }
@@ -212,6 +179,7 @@ public:
   inline float GetAlphaCLMax(void) { return alphaclmax; }
   inline float GetAlphaCLMin(void) { return alphaclmin; }
 
+  inline void SetGearUp(bool tt) { GearUp = tt; }
   inline void SetAlphaCLMax(float tt) { alphaclmax=tt; }
   inline void SetAlphaCLMin(float tt) { alphaclmin=tt; }
 
@@ -221,17 +189,20 @@ public:
   string GetGroundReactionStrings(void);
   string GetGroundReactionValues(void);
 
-  enum { ssSimulation      = 1,
-         ssAerosurfaces    = 2,
-         ssRates           = 4,
-         ssVelocities      = 8,
-         ssForces          = 16,
-         ssMoments         = 32,
-         ssAtmosphere      = 64,
-         ssMassProps       = 128,
-         ssCoefficients    = 256,
-         ssPosition        = 512,
-         ssGroundReactions = 1024 } subsystems;
+  /// Subsystem types for specifying which will be output in the FDM data logging
+  enum  SubSystems {
+    /** Subsystem: Simulation (= 1)          */ ssSimulation      = 1,
+    /** Subsystem: Aerosurfaces (= 2)        */ ssAerosurfaces    = 2,
+    /** Subsystem: Body rates (= 4)          */ ssRates           = 4,
+    /** Subsystem: Velocities (= 8)          */ ssVelocities      = 8,
+    /** Subsystem: Forces (= 16)             */ ssForces          = 16,
+    /** Subsystem: Moments (= 32)            */ ssMoments         = 32,
+    /** Subsystem: Atmosphere (= 64)         */ ssAtmosphere      = 64,
+    /** Subsystem: Mass Properties (= 128)   */ ssMassProps       = 128,
+    /** Subsystem: Coefficients (= 256)      */ ssCoefficients    = 256,
+    /** Subsystem: Position (= 512)          */ ssPosition        = 512,
+    /** Subsystem: Ground Reactions (= 1024) */ ssGroundReactions = 1024
+  } subsystems;
 
 private:
   void GetState(void);
@@ -290,5 +261,5 @@ private:
   void ReadOutput(FGConfigFile*);
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index 3dc6810ac35e2540ab02988f45df5e6ba5b1d300..170f5e2328a078ba0c80167849ea58d71fa289d3 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGAtmosphere.cpp
  Author:       Jon Berndt
@@ -36,15 +36,15 @@ HISTORY
 11/24/98   JSB   Created
 07/23/99   TP    Added implementation of 1959 Standard Atmosphere
                  Moved calculation of Mach number to FGTranslation
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 [1]   Anderson, John D. "Introduction to Flight, Third Edition", McGraw-Hill,
       1989, ISBN 0-07-001641-0
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGAtmosphere.h"
 #include "FGState.h"
@@ -62,9 +62,9 @@ INCLUDES
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_ATMOSPHERE;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 FGAtmosphere::FGAtmosphere(FGFDMExec* fdmex) : FGModel(fdmex),
index 4b6d09169d7875f453aab83759f4911dc9950f42..3cd05ff0e97a463db11f94bf1ab2a8e57c401fe9 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Module:       FGAuxiliary.cpp
  Author:       Jon Berndt
@@ -36,9 +36,9 @@ HISTORY
 --------------------------------------------------------------------------------
 01/26/99   JSB   Created
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGAuxiliary.h"
 #include "FGTranslation.h"
@@ -55,9 +55,9 @@ INCLUDES
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_AUXILIARY;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 FGAuxiliary::FGAuxiliary(FGFDMExec* fdmex) : FGModel(fdmex) {
   Name = "FGAuxiliary";
index 12cdabdd0495c7e6c966f3a1801549cf4dfc7ae5..6d676ad58c7a6d632ab9aa5f57a4bc7311b572c8 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Header:       FGAuxiliary.h
  Author:       Jon Berndt
@@ -28,38 +28,61 @@ HISTORY
 11/22/98   JSB   Created
   1/1/00   TP    Added calcs and getters for VTAS, VCAS, VEAS, Vground, in knots
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGAUXILIARY_H
 #define FGAUXILIARY_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGModel.h"
 #include "FGMatrix.h"
 
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
 #define ID_AUXILIARY "$Header"
 
-/*******************************************************************************
-DEFINES
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+FORWARD DECLARATIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DOCUMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-/*******************************************************************************
+/** Encapsulates various uncategorized scheduled functions.
+    @author Tony Peden, Jon Berndt
+    @version $Id$
+    @see -
+*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGAuxiliary : public FGModel {
 public:
+  /** Constructor
+      @param Executive a pointer to the parent executive object */
   FGAuxiliary(FGFDMExec*);
+  /// Destructor
   ~FGAuxiliary(void);
 
+  /** Runs the Auxiliary routines; called by the Executive
+      @return false if no error */
   bool Run(void);
 
-  //use FGInitialCondition to set these speeds
+  // Use FGInitialCondition to set these speeds
   inline float GetVcalibratedFPS(void) { return vcas; }
   inline float GetVcalibratedKTS(void) { return vcas*FPSTOKTS; }
   inline float GetVequivalentFPS(void) { return veas; }
@@ -78,15 +101,14 @@ private:
   float veas;
   float mach;
   float qbar,rhosl,rho,p,psl,pt;
-  //Don't add a getter for pt!
-  //pt above is freestream total pressure for subsonic only
-  //for supersonic it is the 1D total pressure behind a normal shock
-  //if a general freestream total is needed, e-mail Tony Peden
+
+  // Don't add a getter for pt!
+  // pt above is freestream total pressure for subsonic only
+  // for supersonic it is the 1D total pressure behind a normal shock
+  // if a general freestream total is needed, e-mail Tony Peden
   // (apeden@earthlink.net) or you can add it your self using the
   // isentropic flow equations
-  
-  
+
   FGColumnVector vPilotAccel;
   
   float earthPosAngle;
@@ -94,5 +116,5 @@ private:
   void GetState(void);
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index a87a0ff31cc30d08480e1c2991f49527cdf4d03a..3f66bee0a5620bf5f2aa07fb6466a481cb63e16f 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGCoefficient.cpp
  Author:       Jon S. Berndt
@@ -40,9 +40,9 @@ HISTORY
 --------------------------------------------------------------------------------
 12/28/98   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGCoefficient.h"
 #include "FGState.h"
@@ -51,9 +51,9 @@ INCLUDES
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = "ID_COEFFICIENT";
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 FGCoefficient::FGCoefficient(FGFDMExec* fdex, FGConfigFile* AC_cfg)
 {
@@ -177,13 +177,13 @@ FGCoefficient::FGCoefficient(FGFDMExec* fdex, FGConfigFile* AC_cfg)
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGCoefficient::~FGCoefficient(void) {
   DeAllocate();
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 bool FGCoefficient::DeAllocate(void)
 {
@@ -196,7 +196,7 @@ bool FGCoefficient::DeAllocate(void)
   return true;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 bool FGCoefficient::Allocate(int r, int c)
 {
@@ -207,7 +207,7 @@ bool FGCoefficient::Allocate(int r, int c)
   return true;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 float FGCoefficient::Value(float rVal, float cVal)
 {
@@ -238,7 +238,7 @@ float FGCoefficient::Value(float rVal, float cVal)
   return Value;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 float FGCoefficient::Value(float Val)
 {
@@ -269,7 +269,7 @@ float FGCoefficient::Value(float Val)
   return Value;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 float FGCoefficient::Value(void)
 {
@@ -285,7 +285,7 @@ float FGCoefficient::Value(void)
   return Value;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 float FGCoefficient::TotalValue()
 {
@@ -304,12 +304,12 @@ float FGCoefficient::TotalValue()
   return 0;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGCoefficient::DumpSD(void)
 {
   cout << "   " << name << ": " << SD << endl;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
index cfb59f11fb01e5d647f2f0e36f1a638cba5d0643..ce8a21daf27c334b1b92db562754be2c0cbcb2cf 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGCoefficient.h
  Author:       Jon Berndt
@@ -27,16 +27,16 @@ HISTORY
 --------------------------------------------------------------------------------
 12/28/98   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGCOEFFICIENT_H
 #define FGCOEFFICIENT_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -47,15 +47,17 @@ INCLUDES
 #include "FGConfigFile.h"
 #include "FGDefs.h"
 
-/*******************************************************************************
-DEFINES
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_COEFFICIENT "$Header"
 
-/*******************************************************************************
+using std::vector;
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 FORWARD DECLARATIONS
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGFDMExec;
 class FGState;
@@ -68,18 +70,29 @@ class FGPosition;
 class FGAuxiliary;
 class FGOutput;
 
-/*******************************************************************************
-COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-This class models the stability derivative coefficient lookup tables or 
-equations. Note that the coefficients need not be calculated each delta-t.
+Note that the coefficients need not be calculated each delta-t. This is
+something that may be fixed someday.
 
-********************************************************************************
-CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DOCUMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-using std::vector;
+/** This class models the stability derivative coefficient lookup tables.
+    Each coefficient for an axis is stored in that axes' vector of coefficients.
+    Each FDM execution frame the Run() method of the [currently] FGAircraft model
+    is called and the coefficient value is calculated.
+    @author Jon S. Berndt
+    @version $Id$
+    @see -
+*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DECLARATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGCoefficient
 {
@@ -128,5 +141,5 @@ public:
 
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index 28432622762fda79e75e0a0992fd71e66513cc82..f74a1c128ef75383b6472f7e8e5f649101b3de2b 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGConfigFile.h
  Author:       Jon Berndt
@@ -13,9 +13,9 @@ HISTORY
 --------------------------------------------------------------------------------
 03/16/2000 JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGConfigFile.h"
 #include <stdlib.h>
@@ -24,9 +24,9 @@ INCLUDES
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = "ID_CONFIGFILE";
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 FGConfigFile::FGConfigFile(string cfgFileName)
 {
index 081b77dc71f38d10f7d7b93c32809ecbbf2e6555..f9106a2ed8dfeb3b2e28417f70c134fbe33369b1 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGConfigFile.h
  Author:       Jon Berndt
@@ -27,16 +27,16 @@ HISTORY
 --------------------------------------------------------------------------------
 03/29/00   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGCONFIGFILE_H
 #define FGCONFIGFILE_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -52,23 +52,45 @@ INCLUDES
 #include <string>
 #include "FGDefs.h"
 
-/*******************************************************************************
-DEFINES
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_CONFIGFILE "$Header"
 
 using std::string;
 using std::ifstream;
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+FORWARD DECLARATIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DOCUMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/** Encapsulates reading a JSBSim config file.
+    JSBSim config files are in XML format.
+    @author Jon S. Berndt
+    @version $Id$
+    @see -
+*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGConfigFile
 {
 public:
-  FGConfigFile(string);
+  /** Constructor
+      @param Filename the name of the config file to be read. */
+  FGConfigFile(string Filename);
+  /// Destructor
   ~FGConfigFile(void);
 
   string GetLine(void);
@@ -94,5 +116,5 @@ private:
   unsigned int      CurrentIndex;
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index 0bf85cb14cc03c090bd240cb91750370329f0ebf..59bef9079bf26abc460c2e711d20c009403da085 100644 (file)
@@ -53,8 +53,8 @@ FGControls::~FGControls() {
 
 
 // $Log$
-// Revision 1.19  2000/10/14 00:10:12  curt
-// Friday the 13th JSBSim update ... :-0  !!!
+// Revision 1.20  2000/11/03 22:02:48  curt
+// Sync with current JSBSim devel code.
 //
 // Revision 1.4  2000/10/13 19:21:02  jsb
 // ** JSB ** Added version identifiers for all files
index bf7251767665947d85f2d9284f227795ce1e4212..04097f911ad3175999338964e9ddd6aa1757039f 100644 (file)
@@ -178,8 +178,8 @@ extern FGControls controls;
 
 
 // $Log$
-// Revision 1.18  2000/10/14 00:10:12  curt
-// Friday the 13th JSBSim update ... :-0  !!!
+// Revision 1.19  2000/11/03 22:02:48  curt
+// Sync with current JSBSim devel code.
 //
 // Revision 1.7  2000/10/13 19:21:02  jsb
 // ** JSB ** Added version identifiers for all files
index 5379593af30d3fc86a8442de8c69d5d0b625d7f2..132b7470a52230a2d85bb2f1797119a37d8e606f 100644 (file)
@@ -54,7 +54,7 @@ SENTRY
 #define FPSTOKTS        0.592484
 #define INCHTOFT        0.08333333
 #define OMEGA_EARTH .00007272205217  
-#define NEEDED_CFG_VERSION "1.35"
+#define NEEDED_CFG_VERSION "1.36"
 
 #define HPTOFTLBSSEC 550
 #define METERS_TO_FEET 3.2808
index 5e673eabf22cdfbac597c6c62d6fc0643db45159..a00b3c9069db06af130d573393f8ffef1a943742 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Module:       FGEngine.cpp
  Author:       Jon Berndt
@@ -34,9 +34,9 @@ HISTORY
 09/03/99   JSB   Changed Rocket thrust equation to correct -= Thrust instead of
                  += Thrust (thanks to Tony Peden)
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -65,9 +65,9 @@ INCLUDES
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = "ID_ENGINE";
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 FGEngine::FGEngine(FGFDMExec* fdex, string enginePath, string engineName, int num) {
index b75910dccc2ac61463b16df1459ba47e9764195a..e2f405fa9c7182e563a2d702481a3b7aff9b68f9 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Header:       FGEngine.h
  Author:       Jon S. Berndt
@@ -33,16 +33,16 @@ HISTORY
 --------------------------------------------------------------------------------
 01/21/99   JSB   Created
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGEngine_H
 #define FGEngine_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -52,17 +52,17 @@ FG_USING_STD(string);
 #  include <string>
 #endif
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_ENGINE "$Header"
 
 using std::string;
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGFDMExec;
 class FGState;
@@ -149,5 +149,5 @@ protected:
 
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index 0725df45e9be418733f83ac8a630eb39b9764349..5e4f4259c6a8f920b1ddfb42b22cf0ade8e9fc41 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Module:       FGFCS.cpp
  Author:       Jon Berndt
@@ -33,9 +33,9 @@ HISTORY
 --------------------------------------------------------------------------------
 12/12/98   JSB   Created
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGFCS.h"
 #include "FGState.h"
@@ -59,11 +59,9 @@ INCLUDES
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = "ID_FCS";
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
-
-char const *Id = "$Header$";
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 FGFCS::FGFCS(FGFDMExec* fdmex) : FGModel(fdmex) {
   Name = "FGFCS";
@@ -71,18 +69,18 @@ FGFCS::FGFCS(FGFDMExec* fdmex) : FGModel(fdmex) {
     ThrottleCmd[i] = 0.0;
     ThrottlePos[i] = 0.0;
   }
-  DaCmd = DeCmd = DrCmd = DfCmd = DsbCmd = DspCmd = 0.0;
+  DaCmd = DeCmd = DrCmd = DfCmd = DsbCmd = DspCmd = PTrimCmd = 0.0;
   DaPos = DePos = DrPos = DfPos = DsbPos = DspPos = 0.0;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGFCS::~FGFCS(void) {
   for(unsigned int i=0;i<Components.size();i++)
     delete Components[i];
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 bool FGFCS::Run(void) {
   if (!FGModel::Run()) {
@@ -97,7 +95,7 @@ bool FGFCS::Run(void) {
   return false;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGFCS::SetThrottleCmd(int engineNum, float setting) {
   if (engineNum < 0) {
@@ -107,7 +105,7 @@ void FGFCS::SetThrottleCmd(int engineNum, float setting) {
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGFCS::SetThrottlePos(int engineNum, float setting) {
   if (engineNum < 0) {
@@ -117,22 +115,8 @@ void FGFCS::SetThrottlePos(int engineNum, float setting) {
   }
 }
 
-/******************************************************************************/
-
-void FGFCS::SetLBrake(float setting) {
-
-}
-
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-void FGFCS::SetRBrake(float setting) {
-}
-
-/******************************************************************************/
-void FGFCS::SetCBrake(float setting) {
-}
-
-/******************************************************************************/
 bool FGFCS::LoadFCS(FGConfigFile* AC_cfg) {
   string token;
 
@@ -173,15 +157,29 @@ bool FGFCS::LoadFCS(FGConfigFile* AC_cfg) {
   return true;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 float FGFCS::GetComponentOutput(eParam idx) {
   return Components[idx]->GetOutput();
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 string FGFCS::GetComponentName(int idx) {
   return Components[idx]->GetName();
 }
 
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+float FGFCS::GetBrake(FGLGear::eBrakeGroup bg) {
+  switch (bg) {
+  case FGLGear::bgLeft:
+    return LeftBrake;
+  case FGLGear::bgRight:
+    return RightBrake;
+  case FGLGear::bgCenter:
+    return CenterBrake;
+  default:
+    cerr << "GetBrake asked to return a bogus brake value" << endl;
+  }
+}
index c2288fe16fcd07ca82dcfa90050967d233cca41b..c334935f09b66cd11cf4a5b6f1c9702ce4722c6a 100644 (file)
@@ -1,5 +1,5 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
  Header:       FGGFCS.h
  Author:       Jon S. Berndt
  Date started: 12/12/98
@@ -27,16 +27,16 @@ HISTORY
 --------------------------------------------------------------------------------
 12/12/98   JSB   Created
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGFCS_H
 #define FGFCS_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -52,76 +52,283 @@ INCLUDES
 #include <string>
 #include "filtersjb/FGFCSComponent.h"
 #include "FGModel.h"
+#include "FGLGear.h"
 #include "FGConfigFile.h"
 
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
 #define ID_FCS "$Header"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+FORWARD DECLARATIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DOCUMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/** Encapsulates the Flight Control System (FCS) functionality.
+    <ul><li>\URL[Source Code]{FGFCS.cpp.html}</li>
+    <li>\URL[Header File]{FGFCS.h.html}</li></ul>
+    This class owns and contains the list of \URL[components]{FGFCSComponent.html}
+    that define the control system for this aircraft. The config file for the
+    aircraft contains a description of the control path that starts at an input
+    or command and ends at an effector, e.g. an aerosurface. The FCS components
+    which comprise the control laws for an axis are defined sequentially in
+    the configuration file. For instance, for the X-15:
+    
+    <pre>
+    &lt FLIGHT_CONTROL NAME="X-15 SAS"&gt
+
+    &lt COMPONENT NAME="Pitch Trim Sum" TYPE="SUMMER"&gt
+      ID            0
+      INPUT        FG_ELEVATOR_CMD
+      INPUT        FG_PITCH_TRIM_CMD
+      CLIPTO       -1 1
+    &lt/COMPONENT&gt
+
+    &lt COMPONENT NAME="Pitch Command Scale" TYPE="AEROSURFACE_SCALE"&gt
+      ID           1
+      INPUT        0
+      MIN         -50
+      MAX          50
+    &lt/COMPONENT&gt
+
+    &lt COMPONENT NAME="Pitch Gain 1" TYPE="PURE_GAIN"&gt
+      ID           2
+      INPUT        1
+      GAIN         -0.36
+    &lt/COMPONENT&gt
+
+    &lt COMPONENT NAME="Pitch Scheduled Gain 1" TYPE="SCHEDULED_GAIN"&gt
+      ID           3
+      INPUT        2
+      GAIN         0.017
+      SCHEDULED_BY FG_ELEVATOR_POS
+      -0.35  -6.0
+      -0.17  -3.0
+       0.00  -2.0
+       0.09  -3.0
+       0.17  -5.0
+       0.60 -12.0
+    &lt/COMPONENT&gt
+
+    ... etc.
+    </pre>
+    
+    In the above case we can see the first few components of the pitch channel
+    defined. The input to the first component, as can be seen in the "Pitch trim
+    sum" component, is really the sum of two parameters: elevator command (from
+    the stick - a pilot input), and pitch trim. The type of this component is
+    "Summer". Its ID is 0 - the ID is used by other components to reference it.
+    The next component created is an aerosurface scale component - a type of
+    gain (see the LoadFCS() method for insight on how the various types of
+    components map into the actual component classes). You can see the input of
+    the "Pitch Command Scale" component takes "0" as input. When a number is
+    specified as an input, it refers to the ID of another FCS component. In this
+    case, ID 0 refers to the previously defined and discussed "Pitch Trim Sum"
+    component. This continues until the final component for an axis when the
+    OUTPUT keyword specifies where the output is supposed to go. See the
+    individual components for more information on how they are mechanized.
+    
+    @author Jon S. Berndt
+    @version $Id$
+    @see FGFCSComponent
+    @see FGConfigFile
+    @see FGGain
+    @see FGSummer
+    @see FGSwitch
+    @see FGGradient
+    @see FGFilter
+    @see FGFlaps
+    @see FGDeadBand
+*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGFCS : public FGModel {
-private:
-  float DaCmd, DeCmd, DrCmd, DfCmd, DsbCmd, DspCmd;
-  float DaPos, DePos, DrPos, DfPos, DsbPos, DspPos;
-  float PTrimCmd;
-  float ThrottleCmd[MAX_ENGINES];       // Needs to be changed: no limit
-  float ThrottlePos[MAX_ENGINES];       // Needs to be changed: no limit
-
-  vector <FGFCSComponent*> Components;
 
 public:
+  /** Constructor
+      @param Executive a pointer to the parent executive object */
   FGFCS(FGFDMExec*);
+  /// Destructor
   ~FGFCS(void);
 
+  /** Runs the Flight Controls model; called by the Executive
+      @return false if no error */
   bool Run(void);
 
+  /// @name Pilot input command retrieval
+  //@{
+  /** Gets the aileron command.
+      @return aileron command in radians */
   inline float GetDaCmd(void) { return DaCmd; }
+  /** Gets the elevator command.
+      @return elevator command in radians */
   inline float GetDeCmd(void) { return DeCmd; }
+  /** Gets the rudder command.
+      @return rudder command in radians */
   inline float GetDrCmd(void) { return DrCmd; }
+  /** Gets the flaps command.
+      @return flaps command in radians */
   inline float GetDfCmd(void) { return DfCmd; }
+  /** Gets the speedbrake command.
+      @return speedbrake command in radians */
   inline float GetDsbCmd(void) { return DsbCmd; }
+  /** Gets the spoiler command.
+      @return spoiler command in radians */
   inline float GetDspCmd(void) { return DspCmd; }
-  inline float GetThrottleCmd(int ii) { return ThrottleCmd[ii]; }
+  /** Gets the throttle command.
+      @param engine engine ID number
+      @return throttle command in percent ( 0 - 100) for the given engine */
+  inline float GetThrottleCmd(int engine) { return ThrottleCmd[engine]; }
+  /** Gets the pitch trim command.
+      @return pitch trim command in radians */
   inline float GetPitchTrimCmd(void) { return PTrimCmd; }
-
+  //@}
+  
+  /// @name Aerosurface position retrieval
+  //@{
+  /** Gets the aileron position.
+      @return aileron position in radians */
   inline float GetDaPos(void) { return DaPos; }
+  /** Gets the elevator position.
+      @return elevator position in radians */
   inline float GetDePos(void) { return DePos; }
+  /** Gets the rudder position.
+      @return rudder position in radians */
   inline float GetDrPos(void) { return DrPos; }
+  /** Gets the flaps position.
+      @return flaps position in radians */
   inline float GetDfPos(void) { return DfPos; }
+  /** Gets the speedbrake position.
+      @return speedbrake position in radians */
   inline float GetDsbPos(void) { return DsbPos; }
+  /** Gets the spoiler position.
+      @return spoiler position in radians */
   inline float GetDspPos(void) { return DspPos; }
+  /** Gets the throttle position.
+      @param engine engine ID number
+      @return throttle position for the given engine in percent ( 0 - 100)*/
+  inline float GetThrottlePos(int engine) { return ThrottlePos[engine]; }
+  //@}
 
-  inline float GetThrottlePos(int ii) { return ThrottlePos[ii]; }
+  /** Retrieves the State object pointer.
+      This is used by the FGFCS-owned components.
+      @return pointer to the State object */
   inline FGState* GetState(void) { return State; }
+  /** Retrieves a components output value
+      @param idx the index of the component (the component ID)
+      @return output value from the component */
   float GetComponentOutput(eParam idx);
+  /** Retrieves the component name
+      @param idx the index of the component (the component ID)
+      @return name of the component */
   string GetComponentName(int idx);
 
-  inline void SetDaCmd(float tt) { DaCmd = tt; }
-  inline void SetDeCmd(float tt) { DeCmd = tt; }
-  inline void SetDrCmd(float tt) { DrCmd = tt; }
-  inline void SetDfCmd(float tt) { DfCmd = tt; }
-  inline void SetDsbCmd(float tt) { DsbCmd = tt; }
-  inline void SetDspCmd(float tt) { DspCmd = tt; }
-  inline void SetPitchTrimCmd(float tt) { PTrimCmd = tt; }
-
-  void SetThrottleCmd(int ii, float tt);
-
-  inline void SetDaPos(float tt) { DaPos = tt; }
-  inline void SetDePos(float tt) { DePos = tt; }
-  inline void SetDrPos(float tt) { DrPos = tt; }
-  inline void SetDfPos(float tt) { DfPos = tt; }
-  inline void SetDsbPos(float tt) { DsbPos = tt; }
-  inline void SetDspPos(float tt) { DspPos = tt; }
+  /// @name Pilot input command setting
+  //@{
+  /** Sets the aileron command
+      @param cmd aileron command in radians*/
+  inline void SetDaCmd(float cmd) { DaCmd = cmd; }
+  /** Sets the elevator command
+      @param cmd elevator command in radians*/
+  inline void SetDeCmd(float cmd) { DeCmd = cmd; }
+  /** Sets the rudder command
+      @param cmd rudder command in radians*/
+  inline void SetDrCmd(float cmd) { DrCmd = cmd; }
+  /** Sets the flaps command
+      @param cmd flaps command in radians*/
+  inline void SetDfCmd(float cmd) { DfCmd = cmd; }
+  /** Sets the speedbrake command
+      @param cmd speedbrake command in radians*/
+  inline void SetDsbCmd(float cmd) { DsbCmd = cmd; }
+  /** Sets the spoilers command
+      @param cmd spoilers command in radians*/
+  inline void SetDspCmd(float cmd) { DspCmd = cmd; }
+  /** Sets the pitch trim command
+      @param cmd pitch trim command in radians*/
+  inline void SetPitchTrimCmd(float cmd) { PTrimCmd = cmd; }
+  /** Sets the throttle command for the specified engine
+      @param engine engine ID number 
+      @param cmd throttle command in percent (0 - 100)*/
+  inline void SetThrottleCmd(int engine, float cmd);
+  //@}
 
-  void SetLBrake(float);
-  void SetRBrake(float);
-  void SetCBrake(float);
+  /// @name Aerosurface position setting
+  //@{
+  /** Sets the aileron position
+      @param cmd aileron position in radians*/
+  inline void SetDaPos(float cmd) { DaPos = cmd; }
+  /** Sets the elevator position
+      @param cmd elevator position in radians*/
+  inline void SetDePos(float cmd) { DePos = cmd; }
+  /** Sets the rudder position
+      @param cmd rudder position in radians*/
+  inline void SetDrPos(float cmd) { DrPos = cmd; }
+  /** Sets the flaps position
+      @param cmd flaps position in radians*/
+  inline void SetDfPos(float cmd) { DfPos = cmd; }
+  /** Sets the speedbrake position
+      @param cmd speedbrake position in radians*/
+  inline void SetDsbPos(float cmd) { DsbPos = cmd; }
+  /** Sets the spoiler position
+      @param cmd spoiler position in radians*/
+  inline void SetDspPos(float cmd) { DspPos = cmd; }
+  /** Sets the actual throttle setting for the specified engine
+      @param engine engine ID number 
+      @param cmd throttle setting in percent (0 - 100)*/
+  inline void SetThrottlePos(int engine, float cmd);
+  //@}
 
-  void SetThrottlePos(int ii, float tt);
+  /// @name Landing Gear brakes
+  //@{
+  /** Sets the left brake group
+      @param cmd brake setting in percent (0.0 - 1.0) */
+  void SetLBrake(float cmd) {LeftBrake = cmd;}
+  /** Sets the right brake group
+      @param cmd brake setting in percent (0.0 - 1.0) */
+  void SetRBrake(float cmd) {RightBrake = cmd;}
+  /** Sets the center brake group
+      @param cmd brake setting in percent (0.0 - 1.0) */
+  void SetCBrake(float cmd) {CenterBrake = cmd;}
+  /** Gets the brake for a specified group.
+      @param bg which brakegroup to retrieve the command for
+      @return the brake setting for the supplied brake group argument */
+  float GetBrake(FGLGear::eBrakeGroup bg);
+  //@}
 
+  /** Loads the Flight Control System.
+      The FGAircraft instance is actually responsible for reading the config file
+      and calling the various Loadxx() methods of the other systems, passing in
+      the config file instance pointer. LoadFCS() is called from FGAircraft.
+      @param AC_cfg pointer to the config file instance
+      @return true if succesful */
   bool LoadFCS(FGConfigFile* AC_cfg);
+  
+  /** The name of the flight control laws for this aircraft.
+      This is given in the config file, and is not used for anything currently.*/
   string FCSName;
+  
+private:
+  float DaCmd, DeCmd, DrCmd, DfCmd, DsbCmd, DspCmd;
+  float DaPos, DePos, DrPos, DfPos, DsbPos, DspPos;
+  float PTrimCmd;
+  float ThrottleCmd[MAX_ENGINES];       // Needs to be changed: s/b no limit
+  float ThrottlePos[MAX_ENGINES];       // Needs to be changed: s/b no limit
+  float LeftBrake, RightBrake, CenterBrake; // Brake settings
+
+  vector <FGFCSComponent*> Components;
+
 };
 
 #include "FGState.h"
index 9aa740f6ab2ce377824d6320506592ccdf58a2b0..6e8964c491391bd26d70bb587a6fcd6b8ce79244 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGFDMExec.cpp
  Author:       Jon S. Berndt
@@ -34,9 +34,9 @@ HISTORY
 --------------------------------------------------------------------------------
 11/17/98   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -66,9 +66,9 @@ INCLUDES
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = "ID_FDMEXEC";
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 // Constructor
@@ -103,7 +103,6 @@ FGFDMExec::~FGFDMExec(void){
 
 bool FGFDMExec::Allocate(void) {
   
-  cout << "FGFDMExec::Allocate ... ";
   bool result=true;
   
   Atmosphere  = new FGAtmosphere(this);
@@ -144,13 +143,11 @@ bool FGFDMExec::Allocate(void) {
   Schedule(Output,     1);
   
   modelLoaded = false;
-  cout << "done." << endl;
   return result;
 
 }
 
 bool FGFDMExec::DeAllocate(void) {
-  cout << "FGFDMExec::DeAllocate ... ";
  
   if ( Atmosphere != 0 )  delete Atmosphere;
   if ( FCS != 0 )         delete FCS;
@@ -177,7 +174,6 @@ bool FGFDMExec::DeAllocate(void) {
 
   modelLoaded = false;
   
-  cout << "done" << endl;
 }
 
 
@@ -240,7 +236,6 @@ bool FGFDMExec::RunIC(FGInitialCondition *fgic)
 bool FGFDMExec::LoadModel(string APath, string EPath, string model)
 {
        bool result=false;
-  cout << "FGFDMExec::LoadModel ..." << endl;
   if(modelLoaded) {
      DeAllocate();
      Allocate();
@@ -248,12 +243,13 @@ bool FGFDMExec::LoadModel(string APath, string EPath, string model)
   AircraftPath = APath;
        EnginePath = EPath;
   result = Aircraft->LoadAircraft(AircraftPath, EnginePath, model);
-  if(result) {
-    modelLoaded=true;
+
+  if (result) {
+    modelLoaded = true;
   } else {
     cerr << "FGFDMExec: Failed to load aircraft and/or engine model" << endl;
-  }  
-  cout << "FGFDMExec::LoadModel complete." << endl;;
+  }
+
   return result;
 }
 
index b17b35057fb9ccff200785a31303fa361ab84055..7d36c4027174ee4d907abe0cd42a5ec834f65bb6 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGFDMExec.h
  Author:       Jon Berndt
@@ -30,25 +30,25 @@ HISTORY
                  begins with the IC values from the given FGInitialCondition 
                                   object and dt=0. 
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGFDMEXEC_HEADER_H
 #define FGFDMEXEC_HEADER_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_FDMEXEC "$Header"
 
 #include "FGModel.h"
 #include "FGInitialCondition.h"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGState;
 class FGAtmosphere;
@@ -92,8 +92,8 @@ public:
   inline FGPosition* GetPosition(void)       {return Position;}
   inline FGAuxiliary* GetAuxiliary(void)     {return Auxiliary;}
   inline FGOutput* GetOutput(void)           {return Output;}
-  
-  
+  inline string GetEnginePath(void)          {return EnginePath;}
+  inline string GetAircraftPath(void)        {return AircraftPath;}
 
 private:
   bool frozen;
@@ -105,7 +105,6 @@ private:
   string EnginePath;
   string ScriptPath;
 
-
   FGState*       State;
   FGAtmosphere*  Atmosphere;
   FGFCS*         FCS;
@@ -122,5 +121,5 @@ private:
 protected:
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index 0b596d1a2e207c308bfa6d34788d0a84508ba34c..c73edd805e5eb058daafb4dfd1d343aa01ac50ab 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Source:       FGForce.cpp
  Author:       Tony Peden
index 8bb2f55786ccc6bfba52e8e73ae1e73e64120055..6a765876f3236e13d42d16c63ca89c8a86748bb4 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGForce.h
  Author:       Tony Peden
@@ -46,25 +46,25 @@ CAVEAT:  if the custom transform is used for wind-to-body transforms then the
          provided by SetTransform(tWindBody) and is not subject to the same
          restriction.
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGFORCE_H
 #define FGFORCE_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_FORCE "$Header"
 
 #include "FGFDMExec.h"
 #include "FGMatrix.h"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 typedef enum { tNone, tWindBody, tLocalBody, tCustom } TransformType;
 
index 085c8e6fa2ee81aff8e39555c4f5ca9d7414ff11..69520b6eadcad48b79a463595a219bd6a3951e78 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGGroundReactions.cpp
  Author:       Jon S. Berndt
@@ -31,18 +31,18 @@ HISTORY
 --------------------------------------------------------------------------------
 09/13/00   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGGroundReactions.h"
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_GROUNDREACTIONS;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 FGGroundReactions::FGGroundReactions(FGFDMExec* fgex) : FGModel(fgex)
index 64555697423f5493530946baea0c1f5b96e16967..5c4135ad373e10e141eb6e7866360468a1b26608 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGGroundReactions.h
  Author:       Jon S. Berndt
@@ -27,20 +27,20 @@ HISTORY
 --------------------------------------------------------------------------------
 09/13/00   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGGROUNDREACTIONS_H
 #define FGGROUNDREACTIONS_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -54,12 +54,13 @@ INCLUDES
 #endif
 
 #include "FGModel.h"
+#include "FGConfigFile.h"
 
 #define ID_GROUNDREACTIONS "$Header"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGGroundReactions : public FGModel {
 
@@ -71,6 +72,6 @@ public:
   bool LoadGroundReactions(FGConfigFile* AC_cfg);
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
 
index 36e54c69b3f6d0bfa5aa0502b482b3445789f0e0..e72aa64ed334d562cee0b08e388afb31f9b6e7c2 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGInertial.cpp
  Author:       Jon S. Berndt
@@ -31,18 +31,18 @@ HISTORY
 --------------------------------------------------------------------------------
 09/13/00   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGInertial.h"
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_INERTIAL;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 FGInertial::FGInertial(FGFDMExec* fgex) : FGModel(fgex)
index 115dbb71630913ba45bc7199dc9ad298e3b8618a..b1a0b299b765bfcc8b107b76ca8886f5906637c9 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGInertial.h
  Author:       Jon S. Berndt
@@ -27,20 +27,20 @@ HISTORY
 --------------------------------------------------------------------------------
 09/13/00   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGINERTIAL_H
 #define FGINERTIAL_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -58,9 +58,9 @@ INCLUDES
 
 #define ID_INERTIAL "$Header"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 const char *Id_Inertial = "JSBSim $Header$";
 
@@ -74,6 +74,6 @@ public:
   bool LoadInertial(FGConfigFile* AC_cfg);
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
 
index ccb5e9a969465b29face0086f14b3f7a87b3a5b3..a461bccb933b0cde3b715929e1e09b153edbd1b9 100644 (file)
@@ -171,7 +171,8 @@ public:
   inline float GetMachIC(void) { return mach; }
 
   inline float GetAltitudeFtIC(void) { return altitude; }
-
+  inline float GetAltitudeAGLFtIC(void) { return altitude - terrain_altitude; }
+  
   inline float GetFlightPathAngleDegIC(void) { return gamma*RADTODEG; }
   inline float GetFlightPathAngleRadIC(void) { return gamma; }
 
index 6858c969cf92bf664c2b9b865112e7c90eff1281..6dc659162b56d20d8ddb016a545c61494952304a 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGLGear.cpp
  Author:       Jon S. Berndt
@@ -32,20 +32,27 @@ HISTORY
 --------------------------------------------------------------------------------
 11/18/99   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGLGear.h"
 #include <algorithm>
 
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+GLOBAL DATA
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_LGEAR;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
-
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 FGLGear::FGLGear(FGConfigFile* AC_cfg, FGFDMExec* fdmex) : vXYZ(3),
                                                            vMoment(3),
@@ -55,7 +62,7 @@ FGLGear::FGLGear(FGConfigFile* AC_cfg, FGFDMExec* fdmex) : vXYZ(3),
   string tmp;
   *AC_cfg >> tmp >> name >> vXYZ(1) >> vXYZ(2) >> vXYZ(3)  
             >> kSpring >> bDamp>> dynamicFCoeff >> staticFCoeff
-                 >> SteerType >> BrakeType >> GroupMember >> maxSteerAngle;
+                 >> SteerType >> BrakeGroup >> maxSteerAngle;
     
   cout << "    Name: " << name << endl;
   cout << "      Location: " << vXYZ << endl;
@@ -63,11 +70,24 @@ FGLGear::FGLGear(FGConfigFile* AC_cfg, FGFDMExec* fdmex) : vXYZ(3),
   cout << "      Damping Constant: " << bDamp << endl;
   cout << "      Dynamic Friction: " << dynamicFCoeff << endl;
   cout << "      Static Friction:  " << staticFCoeff << endl;
-  cout << "      Brake Type:       " << BrakeType << endl;
-  cout << "      Grouping:         " << GroupMember << endl;
+  cout << "      Grouping:         " << BrakeGroup << endl;
   cout << "      Steering Type:    " << SteerType << endl;
   cout << "      Max Steer Angle:  " << maxSteerAngle << endl;
-  
+
+  if      (BrakeGroup == "LEFT"  ) eBrakeGrp = bgLeft;
+  else if (BrakeGroup == "RIGHT" ) eBrakeGrp = bgRight;
+  else if (BrakeGroup == "CENTER") eBrakeGrp = bgCenter;
+  else if (BrakeGroup == "NOSE"  ) eBrakeGrp = bgNose;
+  else if (BrakeGroup == "TAIL"  ) eBrakeGrp = bgTail;
+  else if (BrakeGroup == "NONE"  ) eBrakeGrp = bgNone;
+  else {
+    cerr << "Improper braking group specification in config file: "
+         << BrakeGroup << " is undefined." << endl;
+  }
+
+// add some AI here to determine if gear is located properly according to its
+// brake group type
+
   State       = Exec->GetState();
   Aircraft    = Exec->GetAircraft();
   Position    = Exec->GetPosition();
@@ -79,23 +99,65 @@ FGLGear::FGLGear(FGConfigFile* AC_cfg, FGFDMExec* fdmex) : vXYZ(3),
   Reported = false;
   DistanceTraveled = 0.0;
   MaximumStrutForce = MaximumStrutTravel = 0.0;
-}
+  
+  vWhlBodyVec     = (vXYZ - Aircraft->GetXYZcg()) / 12.0;
+  vWhlBodyVec(eX) = -vWhlBodyVec(eX);
+  vWhlBodyVec(eZ) = -vWhlBodyVec(eZ);
 
+  vLocalGear = State->GetTb2l() * vWhlBodyVec;
+}
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-FGLGear::~FGLGear(void)
+FGLGear::FGLGear(const FGLGear& lgear)
 {
-  cout << "Destructing Landing Gear ..." << endl;
+  State    = lgear.State;
+  Aircraft = lgear.Aircraft;
+  Position = lgear.Position;
+  Rotation = lgear.Rotation;
+  Exec     = lgear.Exec;
+
+  vXYZ = lgear.vXYZ;
+  vMoment = lgear.vMoment;
+  vWhlBodyVec = lgear.vWhlBodyVec;
+  vLocalGear = lgear.vLocalGear;
+
+  WOW                = lgear.WOW;
+  ReportEnable       = lgear.ReportEnable;
+  FirstContact       = lgear.FirstContact;
+  DistanceTraveled   = lgear.DistanceTraveled;
+  MaximumStrutForce  = lgear.MaximumStrutForce;
+  MaximumStrutTravel = lgear.MaximumStrutTravel;
+
+  kSpring         = lgear.kSpring;
+  bDamp           = lgear.bDamp;
+  compressLength  = lgear.compressLength;
+  compressSpeed   = lgear.compressSpeed;
+  staticFCoeff    = lgear.staticFCoeff;
+  dynamicFCoeff   = lgear.dynamicFCoeff;
+  brakePct        = lgear.brakePct;
+  maxCompLen      = lgear.maxCompLen;
+  SinkRate        = lgear.SinkRate;
+  GroundSpeed     = lgear.GroundSpeed;
+  Reported        = lgear.Reported;
+  name            = lgear.name;
+  SteerType       = lgear.SteerType;
+  BrakeGroup      = lgear.BrakeGroup;
+  eBrakeGrp       = lgear.eBrakeGrp;
+  maxSteerAngle   = lgear.maxSteerAngle;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FGLGear::~FGLGear(void) {}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGColumnVector FGLGear::Force(void)
 {
   FGColumnVector vForce(3);
   FGColumnVector vLocalForce(3);
-  FGColumnVector vLocalGear(3);     // Vector: CG to this wheel (Local)
+  //FGColumnVector vLocalGear(3);     // Vector: CG to this wheel (Local)
   FGColumnVector vWhlVelVec(3);     // Velocity of this wheel (Local)
   
   vWhlBodyVec     = (vXYZ - Aircraft->GetXYZcg()) / 12.0;
@@ -131,6 +193,26 @@ FGColumnVector FGLGear::Force(void)
 
 // the following needs work regarding friction coefficients and braking and steering
 
+    switch (eBrakeGrp) {
+    case bgLeft:
+
+      break;
+    case bgRight:
+      break;
+    case bgCenter:
+      break;
+    case bgNose:
+      break;
+    case bgTail:
+      break;
+    case bgNone:
+      break;
+    default:
+      cerr << "Improper brake group membership detected for this gear." << endl;
+      break;
+    }
+//
+
     vLocalForce(eZ) =  min(-compressLength * kSpring - compressSpeed * bDamp, (float)0.0);
     vLocalForce(eX) =  fabs(vLocalForce(eZ) * staticFCoeff) * vWhlVelVec(eX);
     vLocalForce(eY) =  fabs(vLocalForce(eZ) * staticFCoeff) * vWhlVelVec(eY);
@@ -166,7 +248,7 @@ FGColumnVector FGLGear::Force(void)
   return vForce;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGLGear::Report(void)
 {
index be4abad6ff2b9f4a6ebbb9ef249dfaf13d6cfec0..0b2536a187e002f21c3492eb1499e4a784ee005a 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGLGear.h
  Author:       Jon S. Berndt
@@ -27,32 +27,16 @@ HISTORY
 --------------------------------------------------------------------------------
 11/18/99   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGLGEAR_H
 #define FGLGEAR_H
 
-/*******************************************************************************
-COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
-
-[1] Cooke, Zyda, Pratt, and McGhee, "NPSNET: Flight Simulation Dynamic Modeling
-          Using Quaternions", Presence, Vol. 1, No. 4, pp. 404-420  Naval Postgraduate
-          School, January 1994
-[2] D. M. Henderson, "Euler Angles, Quaternions, and Transformation Matrices",
-          JSC 12960, July 1977
-[3] Richard E. McFarland, "A Standard Kinematic Model for Flight Simulation at
-          NASA-Ames", NASA CR-2497, January 1975
-[4] Barnes W. McCormick, "Aerodynamics, Aeronautics, and Flight Mechanics",
-          Wiley & Sons, 1979 ISBN 0-471-03032-5
-[5] Bernard Etkin, "Dynamics of Flight, Stability and Control", Wiley & Sons,
-          1982 ISBN 0-471-08936-2
-
-********************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -64,47 +48,177 @@ INCLUDES
 #include "FGFDMExec.h"
 #include "FGState.h"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINITIONS
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_LGEAR "$Header"
 
-/*******************************************************************************
-CLASS DECLARATION
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+FORWARD DECLARATIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGAircraft;
 class FGPosition;
 class FGRotation;
 
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DOCUMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/** Landing gear model.
+    Calculates forces and moments due to landing gear reactions. This is done in
+    several steps, and is dependent on what kind of gear is being modeled. Here
+    are the parameters that can be specified in the config file for modeling
+    landing gear:
+    <p>
+    <b><u>Physical Characteristics</u></b><br>
+    <ol>
+    <li>X, Y, Z location, in inches in structural coordinate frame</li>
+    <li>Spring constant, in lbs/ft</li>
+    <li>Damping coefficient, in lbs/ft/sec</li>
+    <li>Dynamic Friction Coefficient</li>
+    <li>Static Friction Coefficient</li>
+    </ol></p><p>
+    <b><u>Operational Properties</b></u><br>
+    <ol>
+    <li>Name</li>
+    <li>Steerability attribute {one of STEERABLE | FIXED | CASTERED}</li>
+    <li>Brake Group Membership {one of LEFT | CENTER | RIGHT | NOSE | TAIL | NONE}</li>
+    <li>Max Steer Angle, in degrees</li>
+    </ol></p>
+    <p>
+    <b><u>Algorithm and Approach to Modeling</u></b><br>
+    <ol>
+    <li>Find the location of the uncompressed landing gear relative to the CG of
+    the aircraft. Remember, the structural coordinate frame that the aircraft is
+    defined in is: X positive towards the tail, Y positive out the right side, Z
+    positive upwards. The locations of the various parts are given in inches in
+    the config file.</li>
+    <li>The vector giving the location of the gear (relative to the cg) is
+    rotated 180 degrees about the Y axis to put the coordinates in body frame (X
+    positive forwards, Y positive out the right side, Z positive downwards, with
+    the origin at the cg). The lengths are also now given in feet.</li>
+    <li>The new gear location is now transformed to the local coordinate frame
+    using the body-to-local matrix. (Mb2l).</li>
+    <li>Knowing the location of the center of gravity relative to the ground
+    (height above ground level or AGL) now enables gear deflection to be
+    calculated. The gear compression value is the local frame gear Z location
+    value minus the height AGL. [Currently, we make the assumption that the gear
+    is oriented - and the deflection occurs in - the Z axis only. Additionally,
+    the vector to the landing gear is currently not modified - which would
+    (correctly) move the point of contact to the actual compressed-gear point of
+    contact. Eventually, articulated gear may be modeled, but initially an
+    effort must be made to model a generic system.] As an example, say the
+    aircraft left main gear location (in local coordinates) is Z = 3 feet
+    (positive) and the height AGL is 2 feet. This tells us that the gear is
+    compressed 1 foot.</li>
+    <li>If the gear is compressed, a Weight-On-Wheels (WOW) flag is set.</li>
+    <li>With the compression length calculated, the compression velocity may now
+    be calculated. This will be used to determine the damping force in the
+    strut. The aircraft rotational rate is multiplied by the vector to the wheel
+    to get a wheel velocity in body frame. That velocity vector is then
+    transformed into the local coordinate frame.</li>
+    <li>The aircraft cg velocity in the local frame is added to the
+    just-calculated wheel velocity (due to rotation) to get a total wheel
+    velocity in the local frame.</li>
+    <li>The compression speed is the Z-component of the vector.</li>
+    <li>With the wheel velocity vector no longer needed, it is normalized and
+    multiplied by a -1 to reverse it. This will be used in the friction force
+    calculation.</li>
+    <li>Since the friction force takes place solely in the runway plane, the Z
+    coordinate of the normalized wheel velocity vector is set to zero.</li>
+    <li>The gear deflection force (the force on the aircraft acting along the
+    local frame Z axis) is now calculated given the spring and damper
+    coefficients, and the gear deflection speed and stroke length. Keep in mind
+    that gear forces always act in the negative direction (in both local and
+    body frames), and are not capable of generating a force in the positive
+    sense (one that would attract the aircraft to the ground). So, the gear
+    forces are always negative - they are limited to values of zero or less. The
+    gear force is simply the negative of the sum of the spring compression
+    length times the spring coefficient and the gear velocity times the damping
+    coefficient.</li>
+    <li>The lateral/directional force acting on the aircraft through the landing
+    gear (along the local frame X and Y axes) is calculated next. First, the
+    friction coefficient is multiplied by the recently calculated Z-force. This
+    is the friction force. It must be given direction in addition to magnitude.
+    We want the components in the local frame X and Y axes. From step 9, above,
+    the conditioned wheel velocity vector is taken and the X and Y parts are
+    multiplied by the friction force to get the X and Y components of friction.
+    </li>
+    <li>The wheel force in local frame is next converted to body frame.</li>
+    <li>The moment due to the gear force is calculated by multiplying r x F
+    (radius to wheel crossed into the wheel force). Both of these operands are
+    in body frame.</li>
+    </ol>
+    @author Jon S. Berndt
+    @version $Id$
+    @see Richard E. McFarland, "A Standard Kinematic Model for Flight Simulation at
+          NASA-Ames", NASA CR-2497, January 1975
+    @see Barnes W. McCormick, "Aerodynamics, Aeronautics, and Flight Mechanics",
+          Wiley & Sons, 1979 ISBN 0-471-03032-5
+*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DECLARATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
 class FGLGear
 {
 public:
-  FGLGear(FGConfigFile*, FGFDMExec*);
+  /// Brake grouping enumerators
+  enum eBrakeGroup {bgNone=0, bgLeft, bgRight, bgCenter, bgNose, bgTail };
+  /** Constructor
+      @param Executive a pointer to the parent executive object
+      @param File a pointer to the config file instance */
+  FGLGear(FGConfigFile* File, FGFDMExec* Executive);
+  /** Constructor
+      @param lgear a reference to an existing FGLGear object     */
+  FGLGear(const FGLGear& lgear);
+  /// Destructor
   ~FGLGear(void);
 
+
+  /// The Force vector for this gear
   FGColumnVector Force(void);
+  /// The Moment vector for this gear
   FGColumnVector Moment(void) {return vMoment;}
+  /// Gets the location of the gear in Body axes
   FGColumnVector GetBodyLocation(void) { return vWhlBodyVec; }
+  
+  FGColumnVector GetLocalGear(void) { return vLocalGear; }
 
+  /// Gets the name of the gear
   inline string GetName(void)      {return name;          }
+  /// Gets the Weight On Wheels flag value
   inline bool   GetWOW(void)       {return WOW;           }
+  /// Gets the current compressed length of the gear in feet
   inline float  GetCompLen(void)   {return compressLength;}
+  /// Gets the current gear compression velocity in ft/sec
   inline float  GetCompVel(void)   {return compressSpeed; }
+  /// Gets the gear compression force in pounds
   inline float  GetCompForce(void) {return Force()(3);    }
   
+  /// Sets the brake value in percent (0 - 100)
   inline void SetBrake(double bp) {brakePct = bp;}
-  
-  inline void SetReport(bool bb) { ReportEnable=bb; }
+
+  /** Set the console touchdown reporting feature
+      @param flag true turns on touchdown reporting, false turns it off */
+  inline void SetReport(bool flag) { ReportEnable = flag; }
+  /** Get the console touchdown reporting feature
+      @return true if reporting is turned on */
   inline bool GetReport(void)    { return ReportEnable; }
-  
 
 private:
   enum {eX=1, eY, eZ};
   FGColumnVector vXYZ;
   FGColumnVector vMoment;
   FGColumnVector vWhlBodyVec;
+  FGColumnVector vLocalGear;
   float kSpring;
   float bDamp;
   float compressLength;
@@ -122,9 +236,9 @@ private:
   bool Reported;
   bool ReportEnable;
   string name;
-  string BrakeType;
   string SteerType;
-  string GroupMember;
+  string BrakeGroup;
+  eBrakeGroup eBrakeGrp;
   float  maxSteerAngle;
 
   FGFDMExec*     Exec;
@@ -140,5 +254,5 @@ private:
 #include "FGPosition.h"
 #include "FGRotation.h"
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index f9cdd9cbc0c208fe6798109e885feccb08cd6e3c..3004964540142cbdcb9e9d973e807bf87ac035bc 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGMassBalance.cpp
  Author:       Jon S. Berndt
@@ -34,18 +34,18 @@ HISTORY
 --------------------------------------------------------------------------------
 09/12/2000  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGMassBalance.h"
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_MASSBALANCE;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 FGMassBalance::FGMassBalance(FGFDMExec* fdmex) : FGModel(fdmex)
index ca75b0fd7186fc56e48f484d851e602def1e6163..1e69fd502696e0915c568dfee56d3982bf302f2f 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGMassBalance.h
  Author:       Jon S. Berndt
@@ -27,28 +27,28 @@ HISTORY
 --------------------------------------------------------------------------------
 09/12/2000  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGMASSBALANCE_H
 #define FGMASSBALANCE_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGModel.h"
 
 #define ID_MASSBALANCE "$Header"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGMassBalance : public FGModel
 {
@@ -60,5 +60,5 @@ public:
   bool Run(void);
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index 6671a3e45e1b85886841375dcc1c34a699439873..5660020fdb2ca6414acdcad581395b7fbb23c06b 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 Module: FGMatrix.cpp
 Author: Originally by Tony Peden [formatted here (and broken??) by JSB]
@@ -14,18 +14,18 @@ HISTORY
 ??/??/??   TP   Created
 03/16/2000 JSB  Added exception throwing
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGMatrix.h"
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_MATRIX;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 double** FGalloc(int rows, int cols)
 {
@@ -41,7 +41,7 @@ double** FGalloc(int rows, int cols)
   return A;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void dealloc(double **A, int rows)
 {
@@ -49,7 +49,7 @@ void dealloc(double **A, int rows)
   delete[] A;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGMatrix::FGMatrix(const unsigned int r, const unsigned int c) : rows(r), cols(c)
 {
@@ -58,7 +58,7 @@ FGMatrix::FGMatrix(const unsigned int r, const unsigned int c) : rows(r), cols(c
   rowCtr = colCtr = 1;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGMatrix::FGMatrix(const FGMatrix& M)
 {
@@ -67,7 +67,7 @@ FGMatrix::FGMatrix(const FGMatrix& M)
   *this = M;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGMatrix::~FGMatrix(void)
 {
@@ -76,7 +76,7 @@ FGMatrix::~FGMatrix(void)
   rows = cols = 0;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 ostream& operator<<(ostream& os, const FGMatrix& M)
 {
@@ -91,7 +91,7 @@ ostream& operator<<(ostream& os, const FGMatrix& M)
   return os;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGMatrix& FGMatrix::operator<<(const float ff)
 {
@@ -104,7 +104,7 @@ FGMatrix& FGMatrix::operator<<(const float ff)
   return *this;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 istream& operator>>(istream& is, FGMatrix& M)
 {
@@ -116,7 +116,7 @@ istream& operator>>(istream& is, FGMatrix& M)
   return is;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGMatrix& FGMatrix::operator=(const FGMatrix& M)
 {
@@ -140,21 +140,21 @@ FGMatrix& FGMatrix::operator=(const FGMatrix& M)
   return *this;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 unsigned int FGMatrix::Rows(void) const
 {
   return rows;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 unsigned int FGMatrix::Cols(void) const
 {
   return cols;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGMatrix::SetOParams(char delim,int width,int prec,int origin)
 {
@@ -164,7 +164,7 @@ void FGMatrix::SetOParams(char delim,int width,int prec,int origin)
   FGMatrix::origin = origin;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGMatrix::InitMatrix(double value)
 {
@@ -177,7 +177,7 @@ void FGMatrix::InitMatrix(double value)
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGMatrix::InitMatrix(void)
 {
@@ -206,7 +206,7 @@ FGMatrix FGMatrix::operator-(const FGMatrix& M)
   return Diff;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGMatrix::operator-=(const FGMatrix &M)
 {
@@ -223,7 +223,7 @@ void FGMatrix::operator-=(const FGMatrix &M)
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGMatrix FGMatrix::operator+(const FGMatrix& M)
 {
@@ -243,7 +243,7 @@ FGMatrix FGMatrix::operator+(const FGMatrix& M)
   return Sum;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGMatrix::operator+=(const FGMatrix &M)
 {
@@ -260,7 +260,7 @@ void FGMatrix::operator+=(const FGMatrix &M)
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGMatrix operator*(double scalar, FGMatrix &M)
 {
@@ -274,7 +274,7 @@ FGMatrix operator*(double scalar, FGMatrix &M)
   return Product;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGMatrix::operator*=(const double scalar)
 {
@@ -285,7 +285,7 @@ void FGMatrix::operator*=(const double scalar)
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGMatrix FGMatrix::operator*(const FGMatrix& M)
 {
@@ -308,7 +308,7 @@ FGMatrix FGMatrix::operator*(const FGMatrix& M)
   return Product;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGMatrix::operator*=(const FGMatrix& M)
 {
@@ -334,7 +334,7 @@ void FGMatrix::operator*=(const FGMatrix& M)
   cols = M.cols;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGMatrix FGMatrix::operator/(const double scalar)
 {
@@ -352,7 +352,7 @@ FGMatrix FGMatrix::operator/(const double scalar)
   return Quot;  
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGMatrix::operator/=(const double scalar)
 {
@@ -367,7 +367,7 @@ void FGMatrix::operator/=(const double scalar)
     cerr << "Attempt to divide by zero in method FGMatrix::operator/=(const double scalar), object " << this << endl; 
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGMatrix::T(void)
 {
@@ -377,7 +377,7 @@ void FGMatrix::T(void)
     TransposeNonSquare();
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGColumnVector FGMatrix::operator*(const FGColumnVector& Col)
 {
@@ -398,7 +398,7 @@ FGColumnVector FGMatrix::operator*(const FGColumnVector& Col)
   return Product;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGMatrix::TransposeSquare(void)
 {
@@ -411,7 +411,7 @@ void FGMatrix::TransposeSquare(void)
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGMatrix::TransposeNonSquare(void)
 {
@@ -433,21 +433,21 @@ void FGMatrix::TransposeNonSquare(void)
   cols       = m;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGColumnVector::FGColumnVector(void):FGMatrix(3,1) { }
 FGColumnVector::FGColumnVector(int m):FGMatrix(m,1) { }
 FGColumnVector::FGColumnVector(const FGColumnVector& b):FGMatrix(b) { }
 FGColumnVector::~FGColumnVector() { }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 double& FGColumnVector::operator()(int m) const
 {
   return FGMatrix::operator()(m,1);
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGColumnVector operator*(const FGMatrix& Mat, const FGColumnVector& Col)
 {
@@ -469,7 +469,7 @@ FGColumnVector operator*(const FGMatrix& Mat, const FGColumnVector& Col)
   return Product;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGColumnVector FGColumnVector::operator+(const FGColumnVector& C)
 {
@@ -488,7 +488,7 @@ FGColumnVector FGColumnVector::operator+(const FGColumnVector& C)
   return Sum;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGColumnVector FGColumnVector::operator*(const double scalar)
 {
@@ -499,7 +499,7 @@ FGColumnVector FGColumnVector::operator*(const double scalar)
   return Product;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGColumnVector FGColumnVector::operator-(const FGColumnVector& V)
 {
@@ -518,7 +518,7 @@ FGColumnVector FGColumnVector::operator-(const FGColumnVector& V)
   return Diff;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGColumnVector FGColumnVector::operator/(const double scalar)
 {
@@ -535,7 +535,7 @@ FGColumnVector FGColumnVector::operator/(const double scalar)
     
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGColumnVector operator*(const double scalar, const FGColumnVector& C)
 {
@@ -548,7 +548,7 @@ FGColumnVector operator*(const double scalar, const FGColumnVector& C)
   return Product;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 float FGColumnVector::Magnitude(void)
 {
@@ -565,7 +565,7 @@ float FGColumnVector::Magnitude(void)
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGColumnVector FGColumnVector::Normalize(void)
 {
@@ -580,7 +580,7 @@ FGColumnVector FGColumnVector::Normalize(void)
   return *this;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGColumnVector FGColumnVector::operator*(const FGColumnVector& V)
 {
@@ -599,7 +599,7 @@ FGColumnVector FGColumnVector::operator*(const FGColumnVector& V)
   return Product;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGColumnVector FGColumnVector::multElementWise(const FGColumnVector& V)
 {
@@ -618,4 +618,4 @@ FGColumnVector FGColumnVector::multElementWise(const FGColumnVector& V)
   return Product;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
index 98a9f94570e23ae3d01ced94c2dac967e509d768..4e19f652a23db8343b4dbb9b5bbf1e3a365282d6 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 Header: FGMatrix.h
 Author: Originally by Tony Peden [formatted and adapted here by Jon Berndt]
@@ -9,16 +9,16 @@ HISTORY
 ??/??/??   TP   Created
 03/16/2000 JSB  Added exception throwing
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGMATRIX_H
 #define FGMATRIX_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include <stdlib.h>
 #ifdef FGFS
@@ -40,17 +40,11 @@ INCLUDES
 
 #include <string>
 
-#define ID_MATRIX "$Header"
-
-/*******************************************************************************
-FORWARD DECLARATIONS
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-class FGColumnVector;
-
-/*******************************************************************************
-DECLARATION: MatrixException
-*******************************************************************************/
+#define ID_MATRIX "$Header"
 
 using std::string;
 using std::ostream;
@@ -58,15 +52,25 @@ using std::istream;
 using std::cerr;
 using std::endl;
 
-class MatrixException /* :  public exception */  
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+FORWARD DECLARATIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+class FGColumnVector;
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DECLARATION: MatrixException
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+class MatrixException /* :  public exception */
 {
 public:
   string Message;
 };
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DECLARATION: FGMatrix
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGMatrix
 {
@@ -118,9 +122,9 @@ public:
   void SetOParams(char delim,int width,int prec, int origin=0);
 };
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DECLARATION: FGColumnVector
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGColumnVector : public FGMatrix
 {
@@ -146,5 +150,5 @@ public:
   FGColumnVector multElementWise(const FGColumnVector& V);
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index bc148164dbf2e810ddb2e6dc118f6af6e8015f7f..dc0a9d998a14b077283cff852aaa44c992dc25b7 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGModel.cpp
  Author:       Jon Berndt
@@ -34,9 +34,9 @@ HISTORY
 --------------------------------------------------------------------------------
 11/11/98   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGModel.h"
 #include "FGState.h"
@@ -53,9 +53,9 @@ INCLUDES
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_MODEL;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 FGModel::FGModel(FGFDMExec* fdmex)
 {
index 55aaffe1ef5745a5803906f2ce6bbf29488af735..cfb00142ef7a22c87150037b0ef412cba24bff47 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGModel.h
  Author:       Jon Berndt
@@ -27,16 +27,16 @@ HISTORY
 --------------------------------------------------------------------------------
 11/22/98   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGMODEL_H
 #define FGMODEL_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGDefs.h"
 
@@ -55,15 +55,15 @@ INCLUDES
 
 #define ID_MODEL "$Header$"
 
-/*******************************************************************************
-DEFINES
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 using namespace std;
 
-/*******************************************************************************
-CLASS DECLARATION
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+FORWARD DECLARATIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGFDMExec;
 class FGState;
@@ -76,14 +76,37 @@ class FGPosition;
 class FGAuxiliary;
 class FGOutput;
 
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DOCUMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/** Base class for all scheduled JSBSim models
+    @author Jon S. Berndt
+  */
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DECLARATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
 class FGModel
 {
 public:
+
+  /// Constructor
   FGModel(FGFDMExec*);
+  /// Destructor
   virtual ~FGModel(void);
 
   FGModel* NextModel;
   string Name;
+
+    /** Runs the model; called by the Executive
+      @see JSBSim.cpp documentation
+      @return false if no error */
   virtual bool Run(void);
   virtual bool InitModel(void);
   virtual void SetRate(int tt) {rate = tt;}
@@ -114,5 +137,5 @@ protected:
 private:
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index 9c0edbf53eb1cf78cc95bdbe57d0a15e0a27ee49..69141ceeab5b0c8df373b13455587be3cde7f6a3 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGNozzle.cpp
  Author:       Jon S. Berndt
@@ -31,18 +31,18 @@ HISTORY
 --------------------------------------------------------------------------------
 08/24/00  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGNozzle.h"
 
 static const char *IdSrc = "$Header$";
-static const char *IdHdr = "";
+static const char *IdHdr = ID_NOZZLE;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 FGNozzle::FGNozzle(FGFDMExec *FDMExec) : FGThruster(FDMExec)
index 70aed14ae7f4375a1125ecf5b36c76582dcc1054..cf3d14c632c164fbca5d137f8481ca3f9cf7d9a1 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGNozzle.h
  Author:       Jon S. Berndt
@@ -27,26 +27,28 @@ HISTORY
 --------------------------------------------------------------------------------
 08/24/00  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGNOZZLE_H
 #define FGNOZZLE_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGThruster.h"
 
-/*******************************************************************************
+#define ID_NOZZLE "$Header$";
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGNozzle : public FGThruster {
 
@@ -57,5 +59,5 @@ public:
   void Calculate(void);
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index e61bf5a408d5260242364efff456a63b6a812ca1..8f28db2032abf9c6a61e2b5ce51939aa37064ade 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGOutput.cpp
  Author:       Jon Berndt
@@ -34,9 +34,9 @@ HISTORY
 --------------------------------------------------------------------------------
 12/02/98   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGOutput.h"
 #include "FGState.h"
@@ -52,9 +52,9 @@ INCLUDES
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_OUTPUT;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 FGOutput::FGOutput(FGFDMExec* fdmex) : FGModel(fdmex)
 {
@@ -71,14 +71,14 @@ FGOutput::FGOutput(FGFDMExec* fdmex) : FGModel(fdmex)
 #endif
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGOutput::~FGOutput(void)
 {
   if (socket) delete socket;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 bool FGOutput::Run(void)
 {
@@ -107,7 +107,7 @@ bool FGOutput::Run(void)
   return false;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGOutput::SetType(string type)
 {
@@ -125,7 +125,7 @@ void FGOutput::SetType(string type)
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGOutput::DelimitedOutput(void)
 {
@@ -267,7 +267,7 @@ void FGOutput::DelimitedOutput(void)
   cout << endl;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGOutput::DelimitedOutput(string fname)
 {
@@ -410,7 +410,7 @@ void FGOutput::DelimitedOutput(string fname)
   datafile.flush();
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGOutput::SocketOutput(void)
 {
@@ -501,7 +501,7 @@ void FGOutput::SocketOutput(void)
   socket->Send(); */
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGOutput::SocketStatusOutput(string out_str)
 {
@@ -515,5 +515,5 @@ void FGOutput::SocketStatusOutput(string out_str)
   socket->Send();
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
index 60a3b99f925f55a445a3f4ac6024b29de3b1a972..0e090f165ac8b4bb15d6f6ec4dcbcfb7f8c0a0fe 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGOutput.h
  Author:       Jon Berndt
@@ -27,16 +27,16 @@ HISTORY
 --------------------------------------------------------------------------------
 12/02/98   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGOUTPUT_H
 #define FGOUTPUT_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGModel.h"
 
@@ -58,9 +58,9 @@ INCLUDES
 
 #define ID_OUTPUT "$Header$"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGOutput : public FGModel
 {
@@ -91,6 +91,6 @@ private:
   FGfdmSocket* socket;
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
 
index 186ee1c3df0537023c4e3cc9204aab8638e21e82..9acbf502ae4b0a682afc0900bd5d686bf88c3d47 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGPiston.cpp
  Author:       Jon S. Berndt
@@ -34,18 +34,18 @@ HISTORY
 --------------------------------------------------------------------------------
 09/12/2000  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGPiston.h"
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_PISTON;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 FGPiston::FGPiston(FGFDMExec* fdex, string enginePath, string engineName, int num) :
index 5e9c78cc77344e4e75ff0f6d77defb1e1645b6f7..579eb82de4f39588ec4c80af79e0470d637046a4 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGPiston.h
  Author:       Jon S. Berndt
@@ -27,26 +27,28 @@ HISTORY
 --------------------------------------------------------------------------------
 09/12/2000  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGPISTON_H
 #define FGPISTON_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGEngine.h"
 
-/*******************************************************************************
+#define ID_PISTON "$Header$";
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGPiston : public FGEngine
 {
@@ -57,5 +59,5 @@ public:
 
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index 9fadd6ccbf49945c81a686fbf43caffdd59ff28d..c10bb83eea7f662fe042451d832cfbc5569884ee 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Module:       FGPosition.cpp
  Author:       Jon S. Berndt
@@ -34,9 +34,9 @@ HISTORY
 --------------------------------------------------------------------------------
 01/05/99   JSB   Created
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 [1] Cooke, Zyda, Pratt, and McGhee, "NPSNET: Flight Simulation Dynamic Modeling
     Using Quaternions", Presence, Vol. 1, No. 4, pp. 404-420  Naval Postgraduate
     School, January 1994
@@ -49,9 +49,9 @@ COMMENTS, REFERENCES,  and NOTES
 [5] Bernard Etkin, "Dynamics of Flight, Stability and Control", Wiley & Sons,
     1982 ISBN 0-471-08936-2
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -81,9 +81,9 @@ INCLUDES
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_POSITION;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 extern float globalTriNormal[3];
 extern double globalSceneryAltitude;
@@ -108,7 +108,7 @@ FGPosition::FGPosition(FGFDMExec* fdmex) : FGModel(fdmex),
   vRunwayNormal(3) = -1.0;                 // Initialized for standalone mode
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGPosition::~FGPosition(void) {}
 
@@ -167,7 +167,7 @@ bool FGPosition:: Run(void) {
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGPosition::GetState(void) {
   dt = State->Getdt();
index 354f619449683e774a3afb714325ed0ce674124c..0051817b2a2b32082f33b4a0aa62542f2ff8a521 100644 (file)
@@ -1,5 +1,5 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
  Header:       FGPosition.h
  Author:       Jon S. Berndt
  Date started: 1/5/99
@@ -27,65 +27,60 @@ HISTORY
 --------------------------------------------------------------------------------
 01/05/99   JSB   Created
  
-********************************************************************************
-COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGPOSITION_H
 #define FGPOSITION_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGModel.h"
 #include "FGMatrix.h"
 
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
 #define ID_POSITION "$Header$"
 
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+FORWARD DECLARATIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-/*******************************************************************************
-DEFINITIONS
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+COMMENTS, REFERENCES,  and NOTES
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DOCUMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 /** Models the lateral and longitudinal translational EOM.
     @author Jon S. Berndt
     @version $Id$
   */
-/*******************************************************************************
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGPosition : public FGModel {
-  
-  FGColumnVector vUVW;
-  FGColumnVector vVel;
-  FGColumnVector vVelDot;
-  FGColumnVector vRunwayNormal;
-  
-  double Vee, invMass, invRadius;
-  double Radius, h;
-  double LatitudeDot, LongitudeDot, RadiusDot;
-  double lastLatitudeDot, lastLongitudeDot, lastRadiusDot;
-  double Longitude, Latitude;
-  float dt;
-  double RunwayRadius;
-  double DistanceAGL;
-  double SeaLevelRadius;
-  double gamma;
-  double Vt, Vground;
-  double hoverb,b;
-
-  void GetState(void);
-
 public:
+  /** Constructor
+      @param Executive a pointer to the parent executive object */
   FGPosition(FGFDMExec*);
+  /// Destructor
   ~FGPosition(void);
 
+  /** Runs the Position model; called by the Executive
+      @see JSBSim.cpp documentation
+      @return false if no error */
+  bool Run(void);
+  
   inline FGColumnVector GetVel(void) { return vVel; }
   inline FGColumnVector GetVelDot(void) { return vVelDot; }
   inline FGColumnVector GetUVW(void) { return vUVW; }
@@ -117,8 +112,29 @@ public:
       vRunwayNormal << fgx << fgy << fgz;
   }
   
-  bool Run(void);
+private:  
+  FGColumnVector vUVW;
+  FGColumnVector vVel;
+  FGColumnVector vVelDot;
+  FGColumnVector vRunwayNormal;
+  
+  double Vee, invMass, invRadius;
+  double Radius, h;
+  double LatitudeDot, LongitudeDot, RadiusDot;
+  double lastLatitudeDot, lastLongitudeDot, lastRadiusDot;
+  double Longitude, Latitude;
+  float dt;
+  double RunwayRadius;
+  double DistanceAGL;
+  double SeaLevelRadius;
+  double gamma;
+  double Vt, Vground;
+  double hoverb,b;
+
+  void GetState(void);
+
+  
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index 0f7442a016600bba621336c52356cc75507c8dd3..5eefe09ff897bbcface12e5b55eca981b4e857d3 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGPropeller.cpp
  Author:       Jon S. Berndt
@@ -31,18 +31,18 @@ HISTORY
 --------------------------------------------------------------------------------
 08/24/00  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGPropeller.h"
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_PROPELLER;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 FGPropeller::FGPropeller(FGFDMExec *FDMExec) : FGThruster(FDMExec)
index 12b6330d3ffae5c76e6053cc7a5246680ce232fa..5c2010eb0991789fe44799d36a23638e26a116cc 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGPropeller.h
  Author:       Jon S. Berndt
@@ -27,28 +27,28 @@ HISTORY
 --------------------------------------------------------------------------------
 08/24/00  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGPROPELLER_H
 #define FGPROPELLER_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGThruster.h"
 
 #define ID_PROPELLER "$Header$"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGPropeller : public FGThruster {
 
@@ -59,5 +59,5 @@ public:
   void Calculate(void);
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index 818892df4be241587b2c6825f67e3ca53344929d..4536b5ed44e018b9c9768f1090c3954fb39efe38 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGPropulsion.cpp
  Author:       Jon S. Berndt
@@ -52,18 +52,18 @@ HISTORY
 --------------------------------------------------------------------------------
 08/20/00   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGPropulsion.h"
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_PROPULSION;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 FGPropulsion::FGPropulsion(FGFDMExec* fgex) : FGModel(fgex)
@@ -88,6 +88,7 @@ bool FGPropulsion::LoadPropulsion(FGConfigFile* AC_cfg)
   string token;
   string engine_name;
   string parameter;
+  int numEngines=0, numTanks=0;
 
   AC_cfg->GetNextConfigLine();
 
@@ -97,18 +98,18 @@ bool FGPropulsion::LoadPropulsion(FGConfigFile* AC_cfg)
     if (parameter == "AC_ENGINE") {
 
       *AC_cfg >> engine_name;
-      Engine[numEngines] = new FGEngine(FDMExec, EnginePath, engine_name, numEngines);
+      Engines[numEngines] = *(new FGEngine(FDMExec, FDMExec->GetEnginePath(), engine_name, numEngines));
       numEngines++;
 
     } else if (parameter == "AC_TANK") {
 
-      Tank[numTanks] = new FGTank(AC_cfg);
-      switch(Tank[numTanks]->GetType()) {
+      Tanks[numTanks] = *(new FGTank(AC_cfg));
+      switch(Tanks[numTanks].GetType()) {
       case FGTank::ttFUEL:
-        numSelectedFuelTanks++;
+//        numSelectedFuelTanks++;
         break;
       case FGTank::ttOXIDIZER:
-        numSelectedOxiTanks++;
+//        numSelectedOxiTanks++;
         break;
       }
       numTanks++;
index c1255d671a1f0197b31d8a2d4f676868e08d557d..d4b260d19650089819e9a6be8df2b055d2c64c6f 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGPropulsion.h
  Author:       Jon S. Berndt
@@ -27,22 +27,22 @@ HISTORY
 --------------------------------------------------------------------------------
 08/20/00   JSB   Created
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGPROPULSION_H
 #define FGPROPULSION_H
 
-#declare ID_PROPULSION "$Header$"
+#define ID_PROPULSION "$Header$"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -62,9 +62,9 @@ INCLUDES
 #include "FGThruster.h"
 #include "FGConfigFile.h"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGPropulsion : public FGModel {
   vector <FGEngine>   Engines;
@@ -77,6 +77,6 @@ public:
   bool LoadPropulsion(FGConfigFile* AC_cfg);
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
 
index 1957d1df716957e5ab9cf28ab382873f0c103d76..962b5bb3829f98a44d628ea1aa7d8b831c0dba94 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGRocket.cpp
  Author:       Jon S. Berndt
@@ -34,18 +34,18 @@ HISTORY
 --------------------------------------------------------------------------------
 09/12/2000  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGRocket.h"
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_ROCKET;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 FGRocket::FGRocket(FGFDMExec* fdex, string enginePath, string engineName, int num) :
index 7336e959dbcc5ae758c60a9b498337fcd4e8b947..436971ea92ec6d282acc806ed129d035dc74abbc 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGRocket.h
  Author:       Jon S. Berndt
@@ -27,28 +27,28 @@ HISTORY
 --------------------------------------------------------------------------------
 09/12/2000  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGROCKET_H
 #define FGROCKET_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGEngine.h"
 
 #define ID_ROCKET "$Header$"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGRocket : public FGEngine
 {
@@ -59,5 +59,5 @@ public:
 
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index b482da41acd3be9355f3dcef6766c6ee3c629068..5a4f4c13ba5b1251e2e5802f6bb9b9f9b67b139c 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGRotation.cpp
  Author:       Jon Berndt
@@ -33,9 +33,9 @@ HISTORY
 --------------------------------------------------------------------------------
 12/02/98   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 [1] Cooke, Zyda, Pratt, and McGhee, "NPSNET: Flight Simulation Dynamic Modeling
     Using Quaternions", Presence, Vol. 1, No. 4, pp. 404-420  Naval Postgraduate
     School, January 1994
@@ -51,9 +51,9 @@ COMMENTS, REFERENCES,  and NOTES
   The order of rotations used in this class corresponds to a 3-2-1 sequence,
   or Y-P-R, or Z-Y-X, if you prefer.
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGRotation.h"
 #include "FGAtmosphere.h"
@@ -69,9 +69,9 @@ INCLUDES
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_ROTATION;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 FGRotation::FGRotation(FGFDMExec* fdmex) : FGModel(fdmex),
@@ -86,13 +86,13 @@ FGRotation::FGRotation(FGFDMExec* fdmex) : FGModel(fdmex),
     sTht=sPhi=sPsi=0.0;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGRotation::~FGRotation(void)
 {
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 bool FGRotation::Run(void)
 {
@@ -136,7 +136,7 @@ bool FGRotation::Run(void)
     return false;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGRotation::GetState(void)
 {
@@ -150,5 +150,5 @@ void FGRotation::GetState(void)
     Ixz = Aircraft->GetIxz();
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
index a02b84032cdefeff70de27318801e50052db8e60..deae5c7d5447189533d07a68f4a22ffd413b802c 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGRotation.h
  Author:       Jon Berndt
@@ -27,9 +27,9 @@ HISTORY
 --------------------------------------------------------------------------------
 12/02/98   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 [1] Cooke, Zyda, Pratt, and McGhee, "NPSNET: Flight Simulation Dynamic Modeling
     Using Quaternions", Presence, Vol. 1, No. 4, pp. 404-420  Naval Postgraduate
     School, January 1994
@@ -45,16 +45,16 @@ COMMENTS, REFERENCES,  and NOTES
   The order of rotations used in this class corresponds to a 3-2-1 sequence,
   or Y-P-R, or Z-Y-X, if you prefer.
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGROTATION_H
 #define FGROTATION_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -77,9 +77,9 @@ INCLUDES
 
 #define ID_ROTATION "$Header$"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGRotation : public FGModel
 {
@@ -127,5 +127,5 @@ public:
 
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index f45e13328bf0bcdf9286e046998fd6fa86603afa..de5ee60ba9020d3affc01ad4f18417371f55a532 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGRotor.cpp
  Author:       Jon S. Berndt
@@ -31,18 +31,18 @@ HISTORY
 --------------------------------------------------------------------------------
 08/24/00  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGRotor.h"
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_ROTOR;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 FGRotor::FGRotor(FGFDMExec *FDMExec) : FGThruster(FDMExec)
index 14df54e416f2775226679c187646aa1354bda382..9d22743f34ba1882ab85f48362e8a8ab228045f8 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGRotor.h
  Author:       Jon S. Berndt
@@ -27,28 +27,28 @@ HISTORY
 --------------------------------------------------------------------------------
 08/24/00  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGROTOR_H
 #define FGROTOR_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGThruster.h"
 
 #define ID_ROTOR "$Header$"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGRotor : public FGThruster {
 
@@ -59,5 +59,5 @@ public:
   void Calculate(void);
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index 4fe8aab569f915ca7fb540f77ff92cb38cd5bf6c..454de5b2b062a35b6e03c3d0a837edd292635ddf 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                                                                        
  Module:       FGState.cpp
  Author:       Jon Berndt
@@ -32,9 +32,9 @@ HISTORY
 --------------------------------------------------------------------------------
 11/17/98   JSB   Created
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -66,17 +66,17 @@ INCLUDES
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_STATE;
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 MACROS
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define RegisterVariable(ID,DEF) coeffdef[#ID] = ID; paramdef[ID] = DEF
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 //
 // For every term registered here there must be a corresponding handler in
 // GetParameter() below that retrieves that parameter. Also, there must be an
@@ -127,11 +127,11 @@ FGState::FGState(FGFDMExec* fdex) : mTb2l(3,3),
   RegisterVariable(FG_PITCH_TRIM_CMD, " pitch_trim_cmd " );
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGState::~FGState(void) {}
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 float FGState::GetParameter(eParam val_idx) {
   switch(val_idx) {
@@ -210,19 +210,19 @@ float FGState::GetParameter(eParam val_idx) {
   return 0;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 float FGState::GetParameter(string val_string) {
   return GetParameter(coeffdef[val_string]);
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 eParam FGState::GetParameterIndex(string val_string) {
   return coeffdef[val_string];
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGState::SetParameter(eParam val_idx, float val) {
   switch(val_idx) {
@@ -341,7 +341,7 @@ void FGState::Initialize(float U, float V, float W,
   FDMExec->GetPosition()->SetvVel(vLocalVelNED);
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGState::Initialize(FGInitialCondition *FGIC) {
 
@@ -364,9 +364,10 @@ void FGState::Initialize(FGInitialCondition *FGIC) {
   FDMExec->GetPosition()->SetSeaLevelRadius( FGIC->GetSeaLevelRadiusFtIC() );
   FDMExec->GetPosition()->SetRunwayRadius( FGIC->GetSeaLevelRadiusFtIC() + 
                                              FGIC->GetTerrainAltitudeFtIC() );
+
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 bool FGState::StoreData(string fname) {
   ofstream datafile(fname.c_str());
@@ -389,7 +390,7 @@ bool FGState::StoreData(string fname) {
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGState::InitMatrices(float phi, float tht, float psi) {
   float thtd2, psid2, phid2;
@@ -425,7 +426,7 @@ void FGState::InitMatrices(float phi, float tht, float psi) {
   CalcMatrices();
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGState::CalcMatrices(void) {
   float Q0Q0, Q1Q1, Q2Q2, Q3Q3;
@@ -457,7 +458,7 @@ void FGState::CalcMatrices(void) {
   mTb2l.T();
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGState::IntegrateQuat(FGColumnVector vPQR, int rate) {
   static FGColumnVector vlastQdot(4);
@@ -475,7 +476,7 @@ void FGState::IntegrateQuat(FGColumnVector vPQR, int rate) {
   vlastQdot = vQdot;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGColumnVector FGState::CalcEuler(void) {
   static FGColumnVector vEuler(3);
@@ -492,7 +493,7 @@ FGColumnVector FGState::CalcEuler(void) {
   return vEuler;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGMatrix FGState::GetTs2b(float alpha, float beta) {
   float ca, cb, sa, sb;
@@ -515,5 +516,5 @@ FGMatrix FGState::GetTs2b(float alpha, float beta) {
   return mTs2b;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
index 1d81833951247c52765d997bf28cfef0093477e1..119fb34b4e8ed236a58b8f4cea3ef3ed9b1fc562 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Header:       FGState.h
  Author:       Jon S. Berndt
@@ -33,16 +33,16 @@ HISTORY
 --------------------------------------------------------------------------------
 11/17/98   JSB   Created
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGSTATE_H
 #define FGSTATE_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -61,15 +61,15 @@ INCLUDES
 #include "FGInitialCondition.h"
 #include "FGMatrix.h"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_STATE "$Header$"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGFDMExec;
 
@@ -140,5 +140,5 @@ protected:
   enum {eP=1, eQ, eR};
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index 922ff8d0daec313b42298bbffd051a584300ddf2..52f592e460a0929e88bc40cfaa025eed482d9bf7 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGTank.cpp
  Author:       Jon Berndt
@@ -32,18 +32,18 @@ HISTORY
 --------------------------------------------------------------------------------
 01/21/99   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGTank.h"
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_TANK;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 FGTank::FGTank(FGConfigFile* AC_cfg)
index 5e767c893072bca9cecb2cf3bd20fe49169f0c01..5919c473badbadc1d975109ed8e3042c647cb8a9 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGTank.h
  Author:       Jon S. Berndt
@@ -33,16 +33,16 @@ HISTORY
 --------------------------------------------------------------------------------
 01/21/99   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGTank_H
 #define FGTank_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -51,15 +51,15 @@ INCLUDES
 #include <string>
 #include "FGConfigFile.h"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_TANK "$Header"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGTank
 {
@@ -90,5 +90,5 @@ private:
 protected:
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index 7391f2484cd437368ce2015f3a2c56c2ca158c85..04c616625fdee93761966c1c2a21d3204565ee77 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGThruster.cpp
  Author:       Jon S. Berndt
@@ -31,18 +31,18 @@ HISTORY
 --------------------------------------------------------------------------------
 08/23/00  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGThruster.h"
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_THRUSTER;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 FGThruster::FGThruster(FGFDMExec *FDMExec) : FGForce(FDMExec)
index 6ccf197ac8301ae1e06bfc80d51ba291d0d98fd3..e340d2f06943f28ae3b3e63c37d26ed5aae7816f 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGThruster.h
  Author:       Jon S. Berndt
@@ -27,28 +27,28 @@ HISTORY
 --------------------------------------------------------------------------------
 08/24/00  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGTHRUSTER_H
 #define FGTHRUSTER_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGForce.h"
 
 #define ID_THRUSTER "$Header"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGThruster : public FGForce {
 
@@ -61,5 +61,5 @@ public:
   virtual void Calculate(void);
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index 031d0961f3004e449805540a2bbb2b3b0136a997..aa706890ee6bb2847925d3fed1546da8e118f056 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Module:       FGTranslation.cpp
  Author:       Jon Berndt
@@ -35,9 +35,9 @@ HISTORY
  7/23/99   TP    Added data member and modified Run and PutState to calcuate 
                               Mach number
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 [1] Cooke, Zyda, Pratt, and McGhee, "NPSNET: Flight Simulation Dynamic Modeling
     Using Quaternions", Presence, Vol. 1, No. 4, pp. 404-420  Naval Postgraduate
     School, January 1994
@@ -53,9 +53,9 @@ COMMENTS, REFERENCES,  and NOTES
   The order of rotations used in this class corresponds to a 3-2-1 sequence,
   or Y-P-R, or Z-Y-X, if you prefer.
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGTranslation.h"
 #include "FGRotation.h"
@@ -71,9 +71,9 @@ INCLUDES
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_TRANSLATION;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 FGTranslation::FGTranslation(FGFDMExec* fdmex) : FGModel(fdmex),
@@ -94,11 +94,11 @@ FGTranslation::FGTranslation(FGFDMExec* fdmex) : FGModel(fdmex),
   rho = 0.002378;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGTranslation::~FGTranslation(void) {}
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 bool FGTranslation::Run(void) {
   static FGColumnVector vlastUVWdot(3);
@@ -161,7 +161,7 @@ bool FGTranslation::Run(void) {
   return false;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGTranslation::GetState(void) {
   dt = State->Getdt();
index cb3696b46127438e18b3365d71ab539089b2f643..1de210162379d10b630b1ee82b94f49b166a3bd8 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Header:       FGTranslation.h
  Author:       Jon Berndt
@@ -27,9 +27,9 @@ HISTORY
 --------------------------------------------------------------------------------
 12/02/98   JSB   Created
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 [1] Cooke, Zyda, Pratt, and McGhee, "NPSNET: Flight Simulation Dynamic Modeling
     Using Quaternions", Presence, Vol. 1, No. 4, pp. 404-420  Naval Postgraduate
     School, January 1994
@@ -45,16 +45,16 @@ COMMENTS, REFERENCES,  and NOTES
   The order of rotations used in this class corresponds to a 3-2-1 sequence,
   or Y-P-R, or Z-Y-X, if you prefer.
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGTRANSLATION_H
 #define FGTRANSLATION_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -72,9 +72,9 @@ INCLUDES
 
 #define ID_TRANSLATION "$Header"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGTranslation : public FGModel {
 public:
@@ -126,5 +126,5 @@ private:
   void GetState(void);
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index 852cf38e29e84251d027498e44e9fc85615af085..5c2bf2d524da7edd966e54660cd8b8f5490fad13 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Header:       FGTrim.cpp
  Author:       Tony Peden
@@ -40,9 +40,9 @@ scheme. */
 //  !!!!!!! BEWARE ALL YE WHO ENTER HERE !!!!!!!
 
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include <stdlib.h>
 
@@ -55,7 +55,7 @@ INCLUDES
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_TRIM;
 
-/*******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGTrim::FGTrim(FGFDMExec *FDMExec,FGInitialCondition *FGIC, TrimMode tt ) {
 
@@ -94,7 +94,7 @@ FGTrim::FGTrim(FGFDMExec *FDMExec,FGInitialCondition *FGIC, TrimMode tt ) {
     cout << "  Ground Trim" << endl;
     TrimAxes.push_back(new FGTrimAxis(fdmex,fgic,tWdot,tAltAGL,Tolerance));
     TrimAxes.push_back(new FGTrimAxis(fdmex,fgic,tQdot,tTheta,A_Tolerance));
-    TrimAxes.push_back(new FGTrimAxis(fdmex,fgic,tPdot,tPhi,A_Tolerance));
+    //TrimAxes.push_back(new FGTrimAxis(fdmex,fgic,tPdot,tPhi,A_Tolerance));
     break;
   }
   //cout << "NumAxes: " << TrimAxes.size() << endl;
@@ -105,7 +105,7 @@ FGTrim::FGTrim(FGFDMExec *FDMExec,FGInitialCondition *FGIC, TrimMode tt ) {
   current_axis=0;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGTrim::~FGTrim(void) {
   for(current_axis=0; current_axis<NumAxes; current_axis++) {
@@ -116,7 +116,7 @@ FGTrim::~FGTrim(void) {
   delete[] solution;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGTrim::TrimStats() {
   char out[80];
@@ -139,7 +139,7 @@ void FGTrim::TrimStats() {
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGTrim::Report(void) {
   cout << "  Trim Results: " << endl;
@@ -148,7 +148,7 @@ void FGTrim::Report(void) {
 
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGTrim::ReportState(void) {
   char out[80], flap[10], gear[10];
@@ -195,7 +195,7 @@ void FGTrim::ReportState(void) {
                     fdmex->GetRotation()->Getpsi()*RADTODEG,
                     fdmex->GetState()->GetParameter(FG_BETA)*RADTODEG );                  
   cout << out;
-  sprintf(out, "    Bank Angle: %3.0f deg\n",
+  sprintf(out, "    Bank Angle: %5.2f deg\n",
                     fdmex->GetRotation()->Getphi()*RADTODEG );
   cout << out;
   sprintf(out, "    Elevator: %5.2f deg  Left Aileron: %5.2f deg  Rudder: %5.2f deg\n",
@@ -208,7 +208,7 @@ void FGTrim::ReportState(void) {
   cout << out;                                  
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 bool FGTrim::DoTrim(void) {
   
@@ -225,6 +225,10 @@ bool FGTrim::DoTrim(void) {
   for(current_axis=0;current_axis<NumAxes;current_axis++) {
     //cout << current_axis << "  " << TrimAxes[current_axis]->GetAccelName()
     //<< "  " << TrimAxes[current_axis]->GetControlName()<< endl;
+    if(TrimAxes[current_axis]->GetAccelType() == tQdot) {
+      if(mode == tGround) 
+         TrimAxes[current_axis]->initTheta();
+    }  
     xlo=TrimAxes[current_axis]->GetControlMin();
     xhi=TrimAxes[current_axis]->GetControlMax();
     TrimAxes[current_axis]->SetControl((xlo+xhi)/2);
@@ -314,7 +318,7 @@ bool FGTrim::DoTrim(void) {
   return !trim_failed;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 bool FGTrim::solve(void) {
 
@@ -373,7 +377,7 @@ bool FGTrim::solve(void) {
   return success;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 /*
  produces an interval (xlo..xhi) on one side or the other of the current 
  control value in which a solution exists.  This domain is, hopefully, 
@@ -453,7 +457,7 @@ bool FGTrim::findInterval(void) {
   return found;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 //checks to see which side of the current control value the solution is on
 //and sets solutionDomain accordingly:
 //  1 if solution is between the current and max
@@ -487,7 +491,7 @@ bool FGTrim::checkLimits(void) {
   solutionDomain=0;
   solutionExists=false;
   if(fabs(ahi-alo) > TrimAxes[current_axis]->GetTolerance()) {
-    if(alo*current_accel < 0) {
+    if(alo*current_accel <= 0) {
       solutionExists=true;
       solutionDomain=-1;
       xhi=current_control;
index c7088fa1c87360f154ab370dcb8185cb4ff4a68e..6f17a81cbbbde9f1192b43b55684b84099e6c439 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Header:       FGTrim.h
  Author:       Tony Peden
@@ -39,16 +39,16 @@ scheme.
  
  
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGTRIM_H
 #define FGTRIM_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGFDMExec.h"
 #include "FGRotation.h"
@@ -67,9 +67,9 @@ INCLUDES
 
 #define ID_TRIM "$Header"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 typedef enum { tLongitudinal, tFull, tGround } TrimMode;
 
index a4df730636bc08df3251adfeb10607a25a78d9e1..292454f04ce68c944a5ccf22682a64d2496d12c3 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Header:       FGTrimAxis.cpp
  Author:       Tony Peden
@@ -28,9 +28,9 @@
 --------------------------------------------------------------------------------
 7/3/00   TP   Created
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include <string>
 #include <stdlib.h>
@@ -103,13 +103,13 @@ FGTrimAxis::FGTrimAxis(FGFDMExec* fdex, FGInitialCondition* ic, Accel acc,
     solver_eps=tolerance/100;
     break;
   case tTheta:
-    control_min=-10*DEGTORAD;
-    control_max=10*DEGTORAD;
+    control_min=fdmex->GetRotation()->Gettht() - 5*DEGTORAD;
+    control_max=fdmex->GetRotation()->Gettht() + 5*DEGTORAD;
     accel_convert=RADTODEG;
     break;
   case tPhi:
-    control_min=-30*DEGTORAD;
-    control_max=30*DEGTORAD;
+    control_min=fdmex->GetRotation()->Getphi() - 5*DEGTORAD;
+    control_max=fdmex->GetRotation()->Getphi() + 5*DEGTORAD;
     accel_convert=RADTODEG;
     break;
   case tGamma:
@@ -182,6 +182,10 @@ void FGTrimAxis::setControl(void) {
   }
 }
 
+
+  
+
+
 /*****************************************************************************/
 
 // the aircraft center of rotation is no longer the cg once the gear
@@ -229,6 +233,68 @@ void FGTrimAxis::SetThetaOnGround(float ff) {
 
 /*****************************************************************************/
 
+bool FGTrimAxis::initTheta(void) {
+  int i,N,iAft, iForward;
+  float zAft,zForward,zDiff,theta;
+  bool level;  
+  float saveAlt;
+  
+  saveAlt=fgic->GetAltitudeAGLFtIC();
+  fgic->SetAltitudeAGLFtIC(100);
+  
+  
+  N=fdmex->GetAircraft()->GetNumGearUnits();
+  
+  //find the first wheel unit forward of the cg
+  //the list is short so a simple linear search is fine
+  for( i=0; i<N; i++ ) {
+    if(fdmex->GetAircraft()->GetGearUnit(i)->GetBodyLocation()(1) > 0 ) {
+        iForward=i;
+        break;
+    }
+  }
+  //now find the first wheel unit aft of the cg
+  for( i=0; i<N; i++ ) {
+    if(fdmex->GetAircraft()->GetGearUnit(i)->GetBodyLocation()(1) < 0 ) {
+        iAft=i;
+        break;
+    }
+  }
+         
+  // now adjust theta till the wheels are the same distance from the ground
+  zAft=fdmex->GetAircraft()->GetGearUnit(1)->GetLocalGear()(3);
+  zForward=fdmex->GetAircraft()->GetGearUnit(0)->GetLocalGear()(3);
+  zDiff = zForward - zAft;
+  level=false;
+  theta=fgic->GetPitchAngleDegIC(); 
+  while(!level && (i < 100)) {
+       theta+=2.0*zDiff;
+       fgic->SetPitchAngleDegIC(theta);   
+       fdmex->RunIC(fgic);
+       zAft=fdmex->GetAircraft()->GetGearUnit(1)->GetLocalGear()(3);
+        zForward=fdmex->GetAircraft()->GetGearUnit(0)->GetLocalGear()(3);
+        zDiff = zForward - zAft;
+       //cout << endl << theta << "  " << zDiff << endl;
+       //cout << "0: " << fdmex->GetAircraft()->GetGearUnit(0)->GetLocalGear() << endl;
+       //cout << "1: " << fdmex->GetAircraft()->GetGearUnit(1)->GetLocalGear() << endl;
+
+       if(fabs(zDiff ) < 0.1) 
+           level=true;
+       i++;   
+  }                    
+  //cout << i << endl;
+  cout << "    Initial Theta: " << fdmex->GetRotation()->Gettht()*RADTODEG << endl;
+  control_min=(theta+5)*DEGTORAD;
+  control_max=(theta-5)*DEGTORAD;
+  fgic->SetAltitudeAGLFtIC(saveAlt);
+  if(i < 100) 
+    return true;
+  else
+    return false;  
+} 
+
+/*****************************************************************************/
+
 void FGTrimAxis::SetPhiOnGround(float ff) {
   int i,ref;
 
index 0bad11ddcb21daabbca696b62d625367e25c3f18..d03ac462bad5980f4d5b96952950414bbf276bce 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Header:       FGTrimAxis.h
  Author:       Tony Peden
  
  
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGTRIMAXIS_H
 #define FGTRIMAXIS_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include <string>
 
@@ -63,9 +63,9 @@ const string ControlNames[13]= { "Throttle","Sideslip","Angle of Attack",
                                  "Roll Angle", "Flight Path Angle", 
                                  "Pitch Trim", "Roll Trim", "Yaw Trim"
                                };
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 enum Accel { tUdot,tVdot,tWdot,tQdot,tPdot,tRdot };
 enum Control { tThrottle, tBeta, tAlpha, tElevator, tAileron, tRudder, tAltAGL,
@@ -78,7 +78,7 @@ public:
   ~FGTrimAxis();
 
   void Run(void);
-
   float GetAccel(void) { getAccel(); return accel_value; }
   //Accels are not settable
   inline void SetControl(float value ) { control_value=value; }
@@ -95,6 +95,11 @@ public:
 
   inline void SetControlToMin(void) { control_value=control_min; }
   inline void SetControlToMax(void) { control_value=control_max; }
+  
+  inline void SetControlLimits(float min, float max) { 
+      control_min=min;
+      control_max=max;
+  }    
 
   inline void  SetTolerance(float ff) { tolerance=ff;}
   inline float GetTolerance(void) { return tolerance; }
@@ -111,7 +116,9 @@ public:
   
   void SetThetaOnGround(float ff);
   void SetPhiOnGround(float ff);
-
+  
+  bool initTheta(void);
+  
   void AxisReport(void);
   
   bool InTolerance(void) { getAccel(); return (fabs(accel_value) <= tolerance); }
@@ -149,6 +156,8 @@ private:
   void getAccel(void);
   void getControl(void);
   void setControl(void);
+  
+  
 
 };
 
index 9e15172c1dab91124cdaccf6247b352cca33d579..6d04e394ad8e2e4589d03e5fd1839a5de85f721a 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGTurboJet.cpp
  Author:       Jon S. Berndt
@@ -34,18 +34,18 @@ HISTORY
 --------------------------------------------------------------------------------
 09/12/2000  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGTurboJet.h"
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_TURBOJET;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 FGTurboJet::FGTurboJet(FGFDMExec* fdex, string enginePath, string engineName, int num) :
index 2d3ceae65d7c2e343c8e656439c33a3730866b1b..d109f33bb5690f3ea200e1c7e3b4b2f6a42eb767 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGTurboJet.h
  Author:       Jon S. Berndt
@@ -27,28 +27,28 @@ HISTORY
 --------------------------------------------------------------------------------
 09/12/2000  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGTURBOJET_H
 #define FGTURBOJET_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGEngine.h"
 
 #define ID_TURBOJET "$Header"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGTurboJet : public FGEngine
 {
@@ -59,5 +59,5 @@ public:
 
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index 222e19c99118588cd4b2f304fd89c4b4c3790b26..f85d0a63727f5a39f12a20de4d27415ca32b1c32 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGTurboShaft.cpp
  Author:       Jon S. Berndt
@@ -34,18 +34,18 @@ HISTORY
 --------------------------------------------------------------------------------
 09/12/2000  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGTurboShaft.h"
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_TURBOSHAFT;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 
 FGTurboShaft::FGTurboShaft(FGFDMExec* fdex, string enginePath, string engineName, int num) :
index 5b1bfd1ae3fc64c41aac9545d71fd3cb87b7fb34..75f9b1d6ecb431d38a2de670565bdc8202e21769 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGTurboShaft.h
  Author:       Jon S. Berndt
@@ -27,28 +27,28 @@ HISTORY
 --------------------------------------------------------------------------------
 09/12/2000  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGTURBOSHAFT_H
 #define FGTURBOSHAFT_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGEngine.h"
 
 #define ID_TURBOSHAFT "$Header"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGTurboShaft : public FGEngine
 {
@@ -59,5 +59,5 @@ public:
 
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index bed3e719a0d8eb68ff2687fa540fbcb6b35de891..50b13a01573c5e0567d02839d743a6b9333dd172 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGUtility.cpp
  Author:       Jon Berndt
@@ -34,13 +34,13 @@ HISTORY
 --------------------------------------------------------------------------------
 01/09/99   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
                                                         
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -60,9 +60,9 @@ INCLUDES
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_UTILITY;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 FGUtility::FGUtility()
 {
index f4614f344f3914656fe044e2ee8ba9ab978cd089..5457ee1d7395d2a0583dfc416d3a972ee58d6f9b 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGUtility.h
  Author:       Jon Berndt
@@ -27,26 +27,26 @@ HISTORY
 --------------------------------------------------------------------------------
 01/09/99   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGUTILITY_H
 #define FGUTILITY_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_UTILITY "$Header"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGFDMExec;
 class FGState;
@@ -64,5 +64,5 @@ private:
   FGFDMExec* FDMExec;
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
index 97d731af9b3b1b8e3b5d99c98099a41ab94db126..19be402a7604ece6acbb4c424ca05e9ed383c397 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGfdmSocket.cpp
  Author:       Jon S. Berndt
@@ -33,18 +33,18 @@ HISTORY
 --------------------------------------------------------------------------------
 11/08/99   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGfdmSocket.h"
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_FDMSOCKET;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 FGfdmSocket::FGfdmSocket(string address, int port)
 {
index d34d196104ebd90805678cff82e17a5d9a56b377..0875c43554f0795575cec5961fd5f573ecdb9c73 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGfdmSocket.h
  Author:       Jon S. Berndt
@@ -27,20 +27,20 @@ HISTORY
 --------------------------------------------------------------------------------
 11/08/99   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGfdmSocket_H
 #define FGfdmSocket_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include <stdio.h>
 
@@ -72,18 +72,18 @@ INCLUDES
   #include <errno.h>
 #endif
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINITIONS
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_FDMSOCKET "$Header"
 
 using std::cout;
 using std::endl;
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 using std::string;
 
index a41a51e275680ca849508461c7f00686a9dc4069..ad4a167db806a1d33b56c09f667fbf32df9235c2 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       JSBSim.cpp
  Author:       Jon S. Berndt
@@ -35,9 +35,9 @@ HISTORY
 --------------------------------------------------------------------------------
 08/17/99   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #if __BCPLUSPLUS__  == 0x0540   // If compiling under Borland C++Builder
 #pragma hdrstop
@@ -87,7 +87,7 @@ USEUNIT("FGTurboShaft.cpp");
 USEUNIT("FGPropulsion.cpp");
 USEUNIT("FGGroundReactions.cpp");
 USEUNIT("FGAerodynamics.cpp");
-//---------------------------------------------------------------------------
+
 #pragma argsused
 #endif
 
@@ -101,7 +101,6 @@ USEUNIT("FGAerodynamics.cpp");
 #include "FGPosition.h"
 #include "FGAuxiliary.h"
 #include "FGOutput.h"
-#include "FGInitialCondition.h"
 
 #ifdef FGFS
 #include <simgear/compiler.h>
@@ -116,8 +115,38 @@ USEUNIT("FGAerodynamics.cpp");
 #include <ctime>
 #endif
 
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+GLOBAL DATA
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
 static const char *IdSrc = "$Header$";
 
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DOCUMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/** Standalone JSBSim main program
+    This is the wrapper program used to instantiate the JSBSim system and control
+    it. Use this program to build a version of JSBSim that can be run from the
+    command line. This program is also designed to be built using Borland C++
+    Builder, v4.0 or greater.
+    @author Jon S. Berndt
+    @version $Id$
+    @see -
+*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
 int main(int argc, char** argv)
 {
   FGFDMExec* FDMExec;
@@ -132,38 +161,17 @@ int main(int argc, char** argv)
 
   FDMExec = new FGFDMExec();
 
-  result = FDMExec->LoadModel("/home/tony/FlightGear/Aircraft", 
-                                "/home/tony/FlightGear/Engine", 
-                                  string(argv[1]));
+  result = FDMExec->LoadModel("aircraft", "engine", string(argv[1]));
   
   if (!result) {
        cerr << "Aircraft file " << argv[1] << " was not found" << endl;
          exit(-1);
   }
   
-  if ( ! FDMExec->GetState()->Reset("/home/tony/FlightGear/Aircraft", 
-                                       string(argv[1]), string(argv[2])))
+  if ( ! FDMExec->GetState()->Reset("aircraft", string(argv[1]), string(argv[2])))
     FDMExec->GetState()->Initialize(2000,0,0,0,0,0,0.5,0.5,40000);
-  
-  FGInitialCondition *fgic= new FGInitialCondition(FDMExec);
-  fgic->SetUBodyFpsIC(170);
-  fgic->SetTrueHeadingDegIC(275);
-  FDMExec->RunIC(fgic);
-  cout << "FDMExec->GetTranslation()->GetVt(): " << FDMExec->GetTranslation()->GetVt() << endl;
-  cout << "FDMExec->GetPosition()->GetVn(): " << FDMExec->GetPosition()->GetVn() << endl;
-  cout << "FDMExec->GetPosition()->GetVe(): " << FDMExec->GetPosition()->GetVe() << endl;
-  cout << "FDMExec->GetAuxiliary()->GetVcalibratedKTS(): " << FDMExec->GetAuxiliary()->GetVcalibratedKTS() << endl; 
-  fgic->SetVnorthFpsIC(170);
-  cout << "fgic->GetUBodyFpsIC(): " << fgic->GetUBodyFpsIC() << endl;
-  cout << "fgic->GetVBodyFpsIC(): " << fgic->GetVBodyFpsIC() << endl;
-  cout << "fgic->GetWBodyFpsIC(): " << fgic->GetWBodyFpsIC() << endl;
-  FDMExec->RunIC(fgic);
-  cout << "FDMExec->GetTranslation()->GetVt(): " << FDMExec->GetTranslation()->GetVt() << endl;
-  cout << "FDMExec->GetPosition()->GetVn(): " << FDMExec->GetPosition()->GetVn() << endl;
-  cout << "FDMExec->GetPosition()->GetVe(): " << FDMExec->GetPosition()->GetVe() << endl;
-  cout << "FDMExec->GetAuxiliary()->GetVcalibratedKTS(): " << FDMExec->GetAuxiliary()->GetVcalibratedKTS() << endl; 
-  
-  /* float cmd = 0.0;
+
+  float cmd = 0.0;
 
   while (FDMExec->GetState()->Getsim_time() <= 10.0)
   {
@@ -188,7 +196,6 @@ int main(int argc, char** argv)
     
     FDMExec->Run();
   }
- */
 
   delete FDMExec;
 
index 7ab308521f6d54a6971c7172b3226725e13be651..2130f9a705d19e5c74313149283c8d86da67fcf4 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGDeadBand.cpp
  Author:       Jon S. Berndt
@@ -29,22 +29,22 @@ FUNCTIONAL DESCRIPTION
 HISTORY
 --------------------------------------------------------------------------------
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGDeadBand.h"
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_DEADBAND;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 // *****************************************************************************
 //  Function:   Run
index e1a3224ec4143370abda59e22c339dec9f336285..3f3498d1d1301a5c1560e8607d2efc181593ddc5 100644 (file)
@@ -1,5 +1,4 @@
-
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGDeadBand.h
  Author:       
 HISTORY
 --------------------------------------------------------------------------------
 
-********************************************************************************
-COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
-
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGDEADBAND_H
 #define FGDEADBAND_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGFCSComponent.h"
 #include "../FGConfigFile.h"
 
-/*******************************************************************************
-DEFINES
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_DEADBAND "$Header"
 
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+FORWARD DECLARATIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
 class FGFCS;
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+COMMENTS, REFERENCES,  and NOTES
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DOCUMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/** Models a deadband object.
+    Owned and Operated by the FGFCS class.
+    @author Jon S. Berndt
+    @see -
+  */
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGDeadBand  : public FGFCSComponent         
 {
@@ -68,4 +81,6 @@ public:
   bool Run (void )  ;
 };
 
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
 #endif
index 321f57c0e8e2625d2ca0bcd580eab1a005e4d5a0..2eba3c57980f5e53c0c6b64fd9b6e1be19465982 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGFCSComponent.cpp
  Author:       Jon S. Berndt
@@ -29,22 +29,22 @@ FUNCTIONAL DESCRIPTION
 HISTORY
 --------------------------------------------------------------------------------
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGFCSComponent.h"                                    
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_FCSCOMPONENT;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 FGFCSComponent::FGFCSComponent(FGFCS* _fcs) : fcs(_fcs)
 {
index ba79ed0852961a23f5415668785386286fa5572d..fb65abab13722e07c03b012be7b6d701281ae0d6 100644 (file)
@@ -1,9 +1,8 @@
-
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGFCSComponent.h
- Author:       
- Date started: 
+ Author:       Jon S. Berndt
+ Date started: 05/01/2000
 
  ------------- Copyright (C)  -------------
 
 HISTORY
 --------------------------------------------------------------------------------
 
-********************************************************************************
-COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
-
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGFCSCOMPONENT_H
 #define FGFCSCOMPONENT_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -49,19 +44,50 @@ INCLUDES
 #include <string>
 #include "../FGDefs.h"
 
-/*******************************************************************************
-DEFINES
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_FCSCOMPONENT "$Header"
 
 using std::string;
 
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+FORWARD DECLARATIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
 class FGFCS;
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DOCUMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/** Base class for JSBSim Flight Control System Components.
+    The Flight Control System (FCS) for JSBSim consists of the FCS container
+    class (see \URL[FGFCS]{FGFCS.html}), the FGFCSComponent base class, and the
+    component classes from which can be constructed a string, or channel. See:
+    <ul>
+    <li>\URL[Switch Component]{FGSwitch.html}</li>
+    <li>\URL[Gain Component]{FGGain.html}</li>
+    <li>\URL[Flaps Component]{FGFlaps.html}</li>
+    <li>\URL[Filter Component]{FGFilter.html}</li>
+    <li>\URL[Deadband Component]{FGDeadBand.html}</li>
+    <li>\URL[Summer Component]{FGSummer.html}</li>
+    <li>\URL[Gradient Component]{FGGradient.html}</li>
+    </ul>
+    @author Jon S. Berndt
+    @version $Id$
+    @see Documentation for the FGFCS class, and for the configuration file class
+         FGConfigFile.
+*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGFCSComponent
 {
@@ -71,7 +97,8 @@ protected:
   FGFCS* fcs;
   string Type;
   string Name;
-  enum {itPilotAC, itFCS, itAP} InputType; // Pilot/Aircraft, FCS, Autopilot inputs
+   /// Pilot/Aircraft, FCS, Autopilot inputs
+  enum eInputType {itPilotAC, itFCS, itAP} InputType;
   int ID;
   eParam InputIdx;
   float Input;
@@ -81,7 +108,9 @@ protected:
   bool IsOutput;
 
 public:
+  /// Constructor
   FGFCSComponent(FGFCS*);
+  /// Destructor
   virtual ~FGFCSComponent ( ) { }       //Destructor
 
   virtual bool Run (void);
index a6da5b275b57e5086588d9cc5c5aa6af46c1cb71..9bddef58872c0cf10ae666e497b70e2447ac8b91 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGFilter.cpp
  Author:       Jon S. Berndt
@@ -29,22 +29,22 @@ FUNCTIONAL DESCRIPTION
 HISTORY
 --------------------------------------------------------------------------------
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGFilter.h"
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_FILTER;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 FGFilter::FGFilter(FGFCS* fcs, FGConfigFile* AC_cfg) : FGFCSComponent(fcs),
                                                        AC_cfg(AC_cfg)
index a0a6845752b6bd6231402d328277a48438fc8149..9fdf4bd2c5edcf2449b6caf3cceefe376c358d76 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGFilter.h
  Author:       
 HISTORY
 --------------------------------------------------------------------------------
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGFILTER_H
 #define FGFILTER_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGFCSComponent.h"
 #include "../FGConfigFile.h"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_FILTER "$Header"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGFilter  : public FGFCSComponent         
 {
index 3b22923f4bf4ff7295644fa0e4ad65c1d0d5fb4d..ee714527ac2a829f916d379f8accd6fe1bed1523 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Module:       FGFlap.cpp
  Author:       Tony Peden, for flight control system authored by Jon S. Berndt
@@ -29,22 +29,22 @@ FUNCTIONAL DESCRIPTION
 HISTORY
 --------------------------------------------------------------------------------
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGFlaps.h"
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_FLAPS;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 // *****************************************************************************
 //  Function:   Constructor
index f7c6692dfe371d45049296a79ced8cafb3d55e62..d26daaca62e729911b9ad1dc1f74e125edb4d453 100644 (file)
@@ -1,5 +1,5 @@
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Header:       FGFlap.h
  Author:       Tony Peden, for flight control system authored by Jon S. Berndt
 HISTORY
 --------------------------------------------------------------------------------
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGFlap_H
 #define FGFlap_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -57,15 +57,15 @@ INCLUDES
 #include "FGFCSComponent.h"
 #include "../FGConfigFile.h"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_FLAPS "$Header"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGFlaps  : public FGFCSComponent {
   FGConfigFile* AC_cfg;
index 104b9540f3647c0f4ba25825496cda59bd22acdc..c5b54c7e2d3b1156ccc71669793b13a5100197d8 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGGain.cpp
  Author:       Jon S. Berndt
@@ -29,22 +29,22 @@ FUNCTIONAL DESCRIPTION
 HISTORY
 --------------------------------------------------------------------------------
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGGain.h"            
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_GAIN;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 // *****************************************************************************
 //  Function:   Constructor
index cab7ab5cd29befb1ce23913ada47a3876ad45717..7e6f47bf7573d86d1ba50d67bcd18f4292aade02 100644 (file)
@@ -1,5 +1,5 @@
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGGain.h
  Author:       
 HISTORY
 --------------------------------------------------------------------------------
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGGAIN_H
 #define FGGAIN_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -57,17 +57,17 @@ INCLUDES
 #include "FGFCSComponent.h"
 #include "../FGConfigFile.h"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_GAIN "$Header"
 
 class FGFCS;
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGGain  : public FGFCSComponent         
 {
index 5203bf6f9c723d0fd48b4d16a96856debd896a72..a1f09c022441c0167e5c6afe910ba70a6abd8f57 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGGradient.cpp
  Author:       
@@ -29,22 +29,22 @@ FUNCTIONAL DESCRIPTION
 HISTORY
 --------------------------------------------------------------------------------
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGGradient.h"                                
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_GRADIENT;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 FGGradient::FGGradient(FGFCS* fcs, FGConfigFile* AC_cfg) : FGFCSComponent(fcs),
                                                            AC_cfg(AC_cfg)
index 9130c1c20a79b3338b4bcb2b8824e223d1c16909..814944bd1a0e663d911ece5b0c43f9ec94d51db1 100644 (file)
@@ -1,5 +1,5 @@
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGGradient.h
  Author:       
 HISTORY
 --------------------------------------------------------------------------------
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGGRADIENT_H
 #define FGGRADIENT_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGFCSComponent.h"
 #include "../FGConfigFile.h"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_GRADIENT "$Header"
 
 class FGFCS;
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGGradient  : public FGFCSComponent
 {
index a013eee599fa2468bafd1585fa3b0d09ab0c40e1..6abed084c2c047052fa676e66357b750b1c55930 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGSummer.cpp
  Author:       Jon S. Berndt
@@ -29,22 +29,22 @@ FUNCTIONAL DESCRIPTION
 HISTORY
 --------------------------------------------------------------------------------
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGSummer.h"            
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_SUMMER;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 FGSummer::FGSummer(FGFCS* fcs, FGConfigFile* AC_cfg) : FGFCSComponent(fcs),
                                                        AC_cfg(AC_cfg)
index 749dc0c545a008144a9d2c61122d3155d376508f..8872845b48a456c8347a1388e52ec49edbf99ddd 100644 (file)
@@ -1,5 +1,5 @@
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGSummer.h
  Author:       
 HISTORY
 --------------------------------------------------------------------------------
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGSUMMER_H
 #define FGSUMMER_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -57,15 +57,15 @@ INCLUDES
 #include "FGFCSComponent.h"
 #include "../FGConfigFile.h"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_SUMMER "$Header"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGSummer  : public FGFCSComponent
 {
index 6687abbd943feb820b4c869ef60670212d69e14c..db856cdf7e6cb15fab349ec9ae3ba85734786133 100644 (file)
@@ -1,5 +1,5 @@
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGSwitch.cpp
  Author:       Jon S. Berndt
@@ -30,22 +30,22 @@ FUNCTIONAL DESCRIPTION
 HISTORY
 --------------------------------------------------------------------------------
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGSwitch.h"                                  
 
 static const char *IdSrc = "$Header$";
 static const char *IdHdr = ID_SWITCH;
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 FGSwitch::FGSwitch(FGFCS* fcs, FGConfigFile* AC_cfg) : FGFCSComponent(fcs),
                                                        AC_cfg(AC_cfg)
index 475cf7e66d5bde289f740b335a708d775b60c0d8..04518f126fee0ff8ab36cd20de4a7e555eda66e9 100644 (file)
@@ -1,5 +1,5 @@
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGSwitch.h
  Author:       
 HISTORY
 --------------------------------------------------------------------------------
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGSWITCH_H
 #define FGSWITCH_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGFCSComponent.h"
 #include "../FGConfigFile.h"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #define ID_SWITCH "$Header"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGSwitch  : public FGFCSComponent
 {