]> git.mxchange.org Git - flightgear.git/commitdiff
0429 updates from Jon.
authorcurt <curt>
Fri, 28 Apr 2000 19:59:46 +0000 (19:59 +0000)
committercurt <curt>
Fri, 28 Apr 2000 19:59:46 +0000 (19:59 +0000)
21 files changed:
src/FDM/JSBSim.cxx
src/FDM/JSBSim/FGAircraft.cpp
src/FDM/JSBSim/FGAtmosphere.cpp
src/FDM/JSBSim/FGAuxiliary.cpp
src/FDM/JSBSim/FGAuxiliary.h
src/FDM/JSBSim/FGControls.cpp
src/FDM/JSBSim/FGControls.h
src/FDM/JSBSim/FGEngine.cpp
src/FDM/JSBSim/FGFCS.cpp
src/FDM/JSBSim/FGMatrix.cpp
src/FDM/JSBSim/FGOutput.cpp
src/FDM/JSBSim/FGPosition.cpp
src/FDM/JSBSim/FGPosition.h
src/FDM/JSBSim/FGRotation.h
src/FDM/JSBSim/FGState.cpp
src/FDM/JSBSim/FGState.h
src/FDM/JSBSim/FGTranslation.cpp
src/FDM/JSBSim/FGTranslation.h
src/FDM/JSBSim/FGUtility.cpp
src/FDM/JSBSim/FGUtility.h
src/FDM/JSBSim/FGfdmSocket.cpp

index 9e08b337fd1d06a37c14fd14944e9266b2cd3aac..dc40c5a325103e99fcfb19c7351971fb0747dd93 100644 (file)
@@ -217,12 +217,12 @@ int FGJSBsim::copy_from_JSBsim() {
 
     // ***FIXME*** set_Geocentric_Rates( Latitude_dot, Longitude_dot, Radius_dot );
        
-    set_Mach_number( FDMExec.GetState()->GetMach());
+    set_Mach_number( FDMExec.GetTranslation()->GetMach());
 
     // Positions
-    double lat_geoc = FDMExec.GetState()->Getlatitude();
-    double lon = FDMExec.GetState()->Getlongitude();
-    double alt = FDMExec.GetState()->Geth();
+    double lat_geoc = FDMExec.GetPosition()->GetLatitude();
+    double lon = FDMExec.GetPosition()->GetLongitude();
+    double alt = FDMExec.GetPosition()->Geth();
     double lat_geod, tmp_alt, sl_radius1, sl_radius2, tmp_lat_geoc;
     fgGeocToGeod( lat_geoc, EQUATORIAL_RADIUS_M + alt * FEET_TO_METER,
                  &lat_geod, &tmp_alt, &sl_radius1 );
index 0c5012cdaf4107ea1cffb90229f18637816fab45..ce8f1990b8591b96db34a53e4f575b910d892ab3 100644 (file)
@@ -150,7 +150,7 @@ FGAircraft::FGAircraft(FGFDMExec* fdmex) : FGModel(fdmex),
   AxisIdx["PITCH"] = 4;
   AxisIdx["YAW"]   = 5;
 
-  numTanks = numEngines = 0;
+  numTanks = numEngines = numSelectedFuelTanks = numSelectedOxiTanks = 0;
 }
 
 
@@ -288,7 +288,6 @@ void FGAircraft::MassChange()
     Weight += Tank[t]->GetContents();
 
   Mass = Weight / GRAVITY;
-
   // Calculate new CG here.
 
   Tw = 0;
index c73da976504bc56923abc0d4080e982ffff2d503..1c5276d0e595237bda02d982f687806060ce29e6 100644 (file)
@@ -85,7 +85,7 @@ bool FGAtmosphere::Run(void)
 {
   if (!FGModel::Run()) {                 // if false then execute this Run()
     if (!useExternal) {
-      h = State->Geth();
+      h = Position->Geth();
       Calculate(h);
     } else {
       density = exDensity;
@@ -99,11 +99,11 @@ bool FGAtmosphere::Run(void)
   return false;
 }
 
+
 void FGAtmosphere::Calculate(float altitude)
 {
   //see reference [1]
 
-
     float slope,reftemp,refpress,refdens;
     int i=0;
     float htab[]={0,36089,82020,154198,173882,259183,295272,344484}; //ft.
index b02e51c8a2ba6126f57f262acc08602857c84631..2a64ee1178fc6f4fa64a6f613853c18eb7e7a534 100644 (file)
@@ -104,11 +104,10 @@ bool FGAuxiliary::Run()
 
 void FGAuxiliary::GetState(void)
 {
-  qbar = State->Getqbar();
-  mach = State->GetMach();
+  qbar = Translation->Getqbar();
+  mach = Translation->GetMach();
   p = Atmosphere->GetPressure();
   rhosl = Atmosphere->GetDensitySL();
   psl = Atmosphere->GetPressureSL();
 }
 
-void FGAuxiliary::PutState(void){}
index e80114a742fc67b5dc64092564ab9318455da8c9..5904b8ed24bdbf32eae25aa763546e8376e23e75 100644 (file)
@@ -74,8 +74,6 @@ private:
   float qbar,rhosl,rho,p,psl,pt;
   
   void GetState(void);
-  void PutState(void);
-
 };
 
 /******************************************************************************/
index ed6ba2a737edb577576cf068b2f0f6fcb251facc..57b34ebabff95e6cd07f0ceef7e8271ba07adbd1 100644 (file)
@@ -51,6 +51,12 @@ FGControls::~FGControls() {
 
 
 // $Log$
+// Revision 1.9  2000/04/28 17:59:46  curt
+// 0429 updates from Jon.
+//
+// Revision 1.3  2000/04/26 10:55:57  jsb
+// Made changes as required by Curt to install JSBSim into FGFS
+//
 // Revision 1.8  2000/04/24 21:49:06  curt
 // Updated JSBsim code.
 //
index 30f2e78798890a85fc8997373a2b9c158edd0e7e..994939826c6749136676f4b8857a0e5f6b9f85d1 100644 (file)
@@ -177,6 +177,12 @@ extern FGControls controls;
 
 
 // $Log$
+// Revision 1.8  2000/04/28 17:59:46  curt
+// 0429 updates from Jon.
+//
+// Revision 1.4  2000/04/26 10:55:57  jsb
+// Made changes as required by Curt to install JSBSim into FGFS
+//
 // Revision 1.7  2000/04/24 21:49:07  curt
 // Updated JSBsim code.
 //
index 7e4de5684055db8235096f1f3d673d3d28b626b1..1a7674bff68bb31c2b243d0231e878f71b6e3096 100644 (file)
@@ -134,7 +134,7 @@ FGEngine::FGEngine(FGFDMExec* fdex, string enginePath, string engineName, int nu
   }
 
   EngineNumber = num;
-  Thrust = 0.0;
+  Thrust = PctPower = 0.0;
   Starved = Flameout = false;
 }
 
@@ -173,9 +173,9 @@ float FGEngine::CalcPistonThrust(void)
 
   Throttle = FCS->GetThrottlePos(EngineNumber);
   Throttle /= 100;
-  v=State->GetVt();
-  h=State->Geth();
+
+  v=Translation->GetVt();
+  h=Position->Geth();
   if(v < 10)
     v=10;
   if(h < 0)
index 515eed5e371eb40a730f6b7b25f9058963aa2085..3d35a59f3fc6e5a7a4a0669da770556639f958d5 100644 (file)
@@ -63,6 +63,12 @@ INCLUDES
 FGFCS::FGFCS(FGFDMExec* fdmex) : FGModel(fdmex)
 {
   Name = "FGFCS";
+  for (int i=0; i < MAX_ENGINES; i++) {
+    ThrottleCmd[i] = 0.0;
+    ThrottlePos[i] = 0.0;
+  }
+  DaCmd = DeCmd = DrCmd = DfCmd = DsbCmd = DspCmd = 0.0;
+  DaPos = DePos = DrPos = DfPos = DsbPos = DspPos = 0.0;
 }
 
 /******************************************************************************/
@@ -109,6 +115,8 @@ void FGFCS::SetThrottlePos(int engineNum, float setting)
 
 /******************************************************************************/
 
+#pragma warn -8030
+
 bool FGFCS::LoadFCS(FGConfigFile* AC_cfg)
 {
   string token;
@@ -146,6 +154,8 @@ bool FGFCS::LoadFCS(FGConfigFile* AC_cfg)
   return true;
 }
 
+#pragma warn .8030
+
 /******************************************************************************/
 
 float FGFCS::GetComponentOutput(int idx)
index 87c71a1b5849c46378fb13760fe4dade75f6a6a6..549a83c99456d850ee9ddb313c6409846a856ad9 100644 (file)
@@ -51,6 +51,7 @@ void dealloc(double **A, int rows)
 FGMatrix::FGMatrix(const unsigned int r, const unsigned int c) : rows(r), cols(c)
 {
   data = FGalloc(rows,cols);
+  InitMatrix();
   rowCtr = colCtr = 1;
 }
 
index c2f0af287901a4c8d3c3da080dda4ffceb7a5241..c7fb4f1596077dd8d4ada3860d16d3a22a42b4bd 100644 (file)
@@ -118,8 +118,8 @@ void FGOutput::DelimitedOutput(void)
   }
 
   cout << State->Getsim_time() << ",";
-  cout << State->Getqbar() << ",";
-  cout << State->GetVt() << ",";
+  cout << Translation->Getqbar() << ",";
+  cout << Translation->GetVt() << ",";
   cout << FCS->GetThrottlePos(0) << ",";
   cout << FCS->GetDaPos() << ",";
   cout << FCS->GetDePos() << ",";
@@ -133,14 +133,14 @@ void FGOutput::DelimitedOutput(void)
   cout << Aircraft->GetXYZcg() << ",";
   cout << Aircraft->GetForces() << ",";
   cout << Aircraft->GetMoments() << ",";
-  cout << State->Geth() << ",";
+  cout << Position->Geth() << ",";
   cout << Rotation->GetEuler() << ",";
   cout << Rotation->GetPQR() << ",";
   cout << Translation->GetUVW() << ",";
   cout << Translation->Getalpha() << ",";
   cout << Position->GetVel() << ",";
-  cout << State->Getlatitude() << ",";
-  cout << State->Getlongitude();
+  cout << Position->GetLatitude() << ",";
+  cout << Position->GetLongitude();
   cout << endl;
 }
 
@@ -179,8 +179,8 @@ void FGOutput::DelimitedOutput(string fname)
   }
 
   datafile << State->Getsim_time() << ",";
-  datafile << State->Getqbar() << ",";
-  datafile << State->GetVt() << ",";
+  datafile << Translation->Getqbar() << ",";
+  datafile << Translation->GetVt() << ",";
   datafile << FCS->GetThrottlePos(0) << ",";
   datafile << FCS->GetDaPos() << ",";
   datafile << FCS->GetDePos() << ",";
@@ -194,14 +194,14 @@ void FGOutput::DelimitedOutput(string fname)
   datafile << Aircraft->GetXYZcg() << ",";
   datafile << Aircraft->GetForces() << ",";
   datafile << Aircraft->GetMoments() << ",";
-  datafile << State->Geth() << ",";
+  datafile << Position->Geth() << ",";
   datafile << Rotation->GetEuler() << ",";
   datafile << Rotation->GetPQR() << ",";
   datafile << Translation->GetUVW() << ",";
   datafile << Translation->Getalpha() << ",";
   datafile << Position->GetVel() << ",";
-  datafile << State->Getlatitude() << ",";
-  datafile << State->Getlongitude();
+  datafile << Position->GetLatitude() << ",";
+  datafile << Position->GetLongitude();
   datafile << endl;
   datafile.flush();
 }
@@ -259,12 +259,12 @@ void FGOutput::SocketOutput(void)
 
   socket->Clear();
   socket->Append(State->Getsim_time());
-  socket->Append(State->Geth());
+  socket->Append(Position->Geth());
   socket->Append(Rotation->Getphi());
   socket->Append(Rotation->Gettht());
   socket->Append(Rotation->Getpsi());
   socket->Append(Atmosphere->GetDensity());
-  socket->Append(State->GetVt());
+  socket->Append(Translation->GetVt());
   socket->Append(Translation->GetU());
   socket->Append(Translation->GetV());
   socket->Append(Translation->GetW());
@@ -283,9 +283,9 @@ void FGOutput::SocketOutput(void)
   socket->Append(Aircraft->GetFx());
   socket->Append(Aircraft->GetFy());
   socket->Append(Aircraft->GetFz());
-  socket->Append(State->Getlatitude());
-  socket->Append(State->Getlongitude());
-  socket->Append(State->Getqbar());
+  socket->Append(Position->GetLatitude());
+  socket->Append(Position->GetLongitude());
+  socket->Append(Translation->Getqbar());
   socket->Append(Translation->Getalpha());
   socket->Append(Aircraft->GetL());
   socket->Append(Aircraft->GetM());
index 79e5d60b9b7ee71f3710489152b8decb70991f99..5849c934436744ac8115dd551dbd94e1f74a1899 100644 (file)
@@ -87,6 +87,8 @@ FGPosition::FGPosition(FGFDMExec* fdmex) : FGModel(fdmex),
   Name = "FGPosition";
   LongitudeDot = LatitudeDot = RadiusDot = 0.0;
   lastLongitudeDot = lastLatitudeDot = lastRadiusDot = 0.0;
+  Longitude = Latitude = 0.0;
+  h = 0.0;
 }
 
 /******************************************************************************/
@@ -116,11 +118,12 @@ bool FGPosition:: Run(void)
     Latitude  += 0.5*dt*rate*(LatitudeDot + lastLatitudeDot);
     Radius    += 0.5*dt*rate*(RadiusDot + lastRadiusDot);
 
+    h = Radius - EARTHRAD;
+    
     lastLatitudeDot = LatitudeDot;
     lastLongitudeDot = LongitudeDot;
     lastRadiusDot = RadiusDot;
 
-    PutState();
     return false;
 
   } else {
@@ -136,22 +139,8 @@ void FGPosition::GetState(void)
 
   vUVW = Translation->GetUVW();
 
-  Latitude = State->Getlatitude();
-  Longitude = State->Getlongitude();
-
   invMass = 1.0 / Aircraft->GetMass();
-  invRadius = 1.0 / (State->Geth() + EARTHRAD);
-  Radius = State->Geth() + EARTHRAD;
-}
-
-/******************************************************************************/
-
-void FGPosition::PutState(void)
-{
-  State->Setlatitude(Latitude);
-  State->Setlongitude(Longitude);
-  State->Seth(Radius - EARTHRAD);
+  invRadius = 1.0 / (h + EARTHRAD);
+  Radius = h + EARTHRAD;
 }
 
-/******************************************************************************/
-
index 1041630d384daf224a85dfa22b3b765382b24b1b..74a6736a2964f20441df6f66ae5c00b83c23ec70 100644 (file)
@@ -57,14 +57,13 @@ class FGPosition : public FGModel
   FGColumnVector vVel;
 
   float Vee, invMass, invRadius;
-  double Radius;
+  double Radius, h;
   float LatitudeDot, LongitudeDot, RadiusDot;
   float lastLatitudeDot, lastLongitudeDot, lastRadiusDot;
   float Longitude, Latitude;
   float dt;
 
   void GetState(void);
-  void PutState(void);
 
 public:
   FGPosition(FGFDMExec*);
@@ -75,6 +74,13 @@ public:
   inline float GetVn(void)  {return vVel(1);}
   inline float GetVe(void)  {return vVel(2);}
   inline float GetVd(void)  {return vVel(3);}
+  inline float Geth(void)  {return h;}
+  inline float GetLatitude(void) {return Latitude;}
+  inline float GetLongitude(void) {return Longitude;}
+  void SetvVel(const FGColumnVector& v) {vVel = v;}
+  void SetLatitude(float tt) {Latitude = tt;}
+  void SetLongitude(float tt) {Longitude = tt;}
+  void Seth(float tt) {h = tt;}
 
   bool Run(void);
 };
index edf1ec64d80e0fdf425d411041969e75e0273946..51e5d412aeb0e14c01b6bf0ef8d2e7e51cce1125 100644 (file)
@@ -76,6 +76,8 @@ using namespace std;
 CLASS DECLARATION
 *******************************************************************************/
 
+#pragma warn -8026
+
 class FGRotation : public FGModel
 {
   FGColumnVector vPQR;
@@ -101,6 +103,7 @@ public:
   inline float Gettht(void) {return vEuler(2);}
   inline float Getpsi(void) {return vEuler(3);}
 };
+#pragma warn .8026
 
 /******************************************************************************/
 #endif
index 2170072a53844485237902c342ca84ca18594db8..d0cbaa5f3b0eed560eb2ca12261065924f9acec3 100644 (file)
@@ -70,12 +70,8 @@ FGState::FGState(FGFDMExec* fdex) : mTb2l(3,3),
 {
   FDMExec = fdex;
 
-  Vt = 0.0;
-  latitude = longitude = 0.0;
   adot = bdot = 0.0;
-  h = 0.0;
   a = 1000.0;
-  qbar = 0.0;
   sim_time = 0.0;
   dt = 1.0/120.0;
 
@@ -128,6 +124,7 @@ bool FGState::Reset(string path, string acname, string fname)
   string resetDef;
   float U, V, W;
   float phi, tht, psi;
+  float latitude, longitude, h;
 
   resetDef = path + "/" + acname + "/" + fname;
 
@@ -145,6 +142,10 @@ bool FGState::Reset(string path, string acname, string fname)
     resetfile >> h;
     resetfile.close();
 
+    FDMExec->GetPosition()->SetLatitude(latitude*DEGTORAD);
+    FDMExec->GetPosition()->SetLongitude(longitude*DEGTORAD);
+    FDMExec->GetPosition()->Seth(h);
+
     Initialize(U, V, W, phi*DEGTORAD, tht*DEGTORAD, psi*DEGTORAD,
                latitude*DEGTORAD, longitude*DEGTORAD, h);
 
@@ -165,12 +166,15 @@ void FGState::Initialize(float U, float V, float W,
                          float Latitude, float Longitude, float H)
 {
   FGColumnVector vUVW(3);
+  FGColumnVector vLocalVelNED(3);
   FGColumnVector vEuler(3);
   float alpha, beta, gamma;
+  float qbar, Vt;
+
+  FDMExec->GetPosition()->SetLatitude(Latitude*DEGTORAD);
+  FDMExec->GetPosition()->SetLongitude(Longitude*DEGTORAD);
+  FDMExec->GetPosition()->Seth(H);
 
-  latitude = Latitude;
-  longitude = Longitude;
-  h = H;
   FDMExec->GetAtmosphere()->Run();
 
   gamma = 0.0;
@@ -185,14 +189,22 @@ void FGState::Initialize(float U, float V, float W,
 
   vUVW << U << V << W;
   FDMExec->GetTranslation()->SetUVW(vUVW);
+
   vEuler << phi << tht << psi;
   FDMExec->GetRotation()->SetEuler(vEuler);
+
   FDMExec->GetTranslation()->SetABG(alpha, beta, gamma);
 
   Vt = sqrt(U*U + V*V + W*W);
+  FDMExec->GetTranslation()->SetVt(Vt);
+
   qbar = 0.5*(U*U + V*V + W*W)*FDMExec->GetAtmosphere()->GetDensity();
+  FDMExec->GetTranslation()->Setqbar(qbar);
 
   InitMatrices(phi, tht, psi);
+
+  vLocalVelNED = mTb2l*vUVW;
+  FDMExec->GetPosition()->SetvVel(vLocalVelNED);
 }
 
 /******************************************************************************/
@@ -201,7 +213,8 @@ void FGState::Initialize(FGInitialCondition *FGIC)
 {
 
   float tht,psi,phi;
-  float U,V,W;
+  float U, V, W, h;
+  float latitude, longitude;
 
   latitude = FGIC->GetLatitudeRadIC();
   longitude = FGIC->GetLongitudeRadIC();
@@ -226,12 +239,12 @@ bool FGState::StoreData(string fname)
     datafile << (FDMExec->GetTranslation()->GetUVW())(1);
     datafile << (FDMExec->GetTranslation()->GetUVW())(2);
     datafile << (FDMExec->GetTranslation()->GetUVW())(3);
-    datafile << latitude;
-    datafile << longitude;
+    datafile << FDMExec->GetPosition()->GetLatitude();
+    datafile << FDMExec->GetPosition()->GetLongitude();
     datafile << (FDMExec->GetRotation()->GetEuler())(1);
     datafile << (FDMExec->GetRotation()->GetEuler())(2);
     datafile << (FDMExec->GetRotation()->GetEuler())(3);
-    datafile << h;
+    datafile << FDMExec->GetPosition()->Geth();
     datafile.close();
     return true;
   } else {
@@ -262,7 +275,7 @@ float FGState::GetParameter(int val_idx)
 {
   switch(val_idx) {
   case FG_QBAR:
-    return Getqbar();
+    return FDMExec->GetTranslation()->Getqbar();
   case FG_WINGAREA:
     return FDMExec->GetAircraft()->GetWingArea();
   case FG_WINGSPAN:
@@ -308,13 +321,13 @@ float FGState::GetParameter(int val_idx)
   case FG_FLAPS_CMD:
     return FDMExec->GetFCS()->GetDfCmd();
   case FG_MACH:
-    return GetMach();
+    return FDMExec->GetTranslation()->GetMach();
   case FG_ALTITUDE:
-    return Geth();
+    return FDMExec->GetPosition()->Geth();
   case FG_BI2VEL:
-    return FDMExec->GetAircraft()->GetWingSpan()/(2.0 * GetVt());
+    return FDMExec->GetAircraft()->GetWingSpan()/(2.0 * FDMExec->GetTranslation()->GetVt());
   case FG_CI2VEL:
-    return FDMExec->GetAircraft()->Getcbar()/(2.0 * GetVt());
+    return FDMExec->GetAircraft()->Getcbar()/(2.0 * FDMExec->GetTranslation()->GetVt());
   }
   return 0;
 }
index 6391165d47b33d12c31b74ba7ac8ff0e2910c3e9..b7613b102f9416925dabdc6d03c4c9f1970f65ec 100644 (file)
@@ -86,43 +86,24 @@ public:
   void Initialize(FGInitialCondition *FGIC);
   bool StoreData(string);
 
-  inline float GetVt(void) {return Vt;}
-
-  inline float Getlatitude(void) {return latitude;}
-  inline float Getlongitude(void) {return longitude;}
-  inline float GetGeodeticLat(void) {return GeodeticLat;}
-
   inline float Getadot(void) {return adot;}
   inline float Getbdot(void) {return bdot;}
 
   inline float GetLocalAltitudeOverRunway(void) {return LocalAltitudeOverRunway;}
-  inline float Geth(void) {return h;}
   inline float Geta(void) {return a;}
-  inline float GetMach(void) {return Mach;}
 
   inline float Getsim_time(void) {return sim_time;}
   inline float Getdt(void) {return dt;}
 
-  inline float Getqbar(void) {return qbar;}
   float GetParameter(int val_idx);
   float GetParameter(string val_string);
   int GetParameterIndex(string val_string);
 
-  inline void SetVt(float tt) {Vt = tt;}
-
-  inline void Setlatitude(float tt) {latitude = tt;}
-  inline void Setlongitude(float tt) {longitude = tt;}
-  inline void SetGeodeticLat(float tt) {GeodeticLat = tt;}
-
   inline void Setadot(float tt) {adot = tt;}
   inline void Setbdot(float tt) {bdot = tt;}
 
-  inline void Setqbar(float tt) {qbar = tt;}
-
   inline void SetLocalAltitudeOverRunway(float tt) {LocalAltitudeOverRunway = tt;}
-  inline void Seth(float tt) {h = tt;}
   inline void Seta(float tt) {a = tt;}
-  inline void SetMach(float tt) {Mach = tt;}
 
   inline float Setsim_time(float tt) {sim_time = tt; return sim_time;}
   inline void  Setdt(float tt) {dt = tt;}
@@ -140,14 +121,9 @@ public:
 
 private:
 
-  float Vt;                         // Total velocity
-  float latitude, longitude;        // position
-  float GeodeticLat;                // Geodetic Latitude
   float adot, bdot;                 // alpha dot and beta dot
-  float h, a;                       // altitude above sea level, speed of sound
-  float qbar;                       // dynamic pressure
+  float a;                          // speed of sound
   float sim_time, dt;
-  float Mach;                       // Mach number
 
   FGFDMExec* FDMExec;
   float LocalAltitudeOverRunway;
index 71745898961a916b7b38916da61752fb481396bd..d2b60d93469652a9418aac29fb63bfc4f63cdef2 100644 (file)
@@ -80,6 +80,11 @@ FGTranslation::FGTranslation(FGFDMExec* fdmex) : FGModel(fdmex),
                                                  vEuler(3) 
 {
   Name = "FGTranslation";
+  qbar = 0;
+  Vt = 0.0;
+  Mach = 0.0;
+  alpha = beta = gamma = 0.0;
+  rho = 0.002378;
 }
 
 /******************************************************************************/
@@ -123,11 +128,10 @@ bool FGTranslation::Run(void)
 
     qbar = 0.5*rho*Vt*Vt;
 
-    mach = Vt / State->Geta();
+    Mach = Vt / State->Geta();
 
     vlastUVWdot = vUVWdot;
 
-    PutState();
   } else {
   }
   return false;
@@ -148,12 +152,3 @@ void FGTranslation::GetState(void)
   vEuler = Rotation->GetEuler();
 }
 
-/******************************************************************************/
-
-void FGTranslation::PutState(void)
-{
-  State->SetVt(Vt);
-  State->Setqbar(qbar);
-  State->SetMach(mach);
-}
-
index 2d3a0b53d38c3606f428bbcfc0d41efc8ec4be9f..b742a07f71c888f1910e8c25db2e36052c18d0ec 100644 (file)
@@ -76,6 +76,8 @@ using namespace std;
 CLASS DECLARATION
 *******************************************************************************/
 
+#pragma warn -8026
+
 class FGTranslation : public FGModel
 {
 public:
@@ -87,12 +89,17 @@ public:
    inline float Getalpha(void) {return alpha;}
    inline float Getbeta (void) {return beta; }
    inline float Getgamma(void) {return gamma;}
+   inline float Getqbar (void) {return qbar;}
+   inline float GetVt   (void) {return Vt;}
+   inline float GetMach (void) {return Mach;}
 
    void SetUVW(FGColumnVector tt) {vUVW = tt;}
 
    inline void Setalpha(float tt) {alpha = tt;}
    inline void Setbeta (float tt) {beta  = tt;}
    inline void Setgamma(float tt) {gamma = tt;}
+   inline void Setqbar (float tt) {qbar = tt;}
+   inline void SetVt   (float tt) {Vt = tt;}
 
    inline void SetABG(float t1, float t2, float t3) {alpha=t1; beta=t2; gamma=t3;}
 
@@ -105,14 +112,14 @@ private:
   FGColumnVector vPQR;
   FGColumnVector vForces;
   FGColumnVector vEuler;
-  float Vt, qbar, mach;
+  float Vt, qbar, Mach;
   float Mass, dt;
   float alpha, beta, gamma;
   float rho;
 
   void GetState(void);
-  void PutState(void);
 };
+#pragma warn .8026
 
 /******************************************************************************/
 #endif
index 5bc366d73bcb1b617ec69e3e0dde8d09e22dff8c..6b620a1f4f5b7caf1498392fda4eb9051322510f 100644 (file)
@@ -78,16 +78,4 @@ FGUtility::FGUtility()
 FGUtility::~FGUtility()
 {
 }
-                       
-
-float FGUtility::ToGeodetic()
-{
-  return 0.0;
-}
-
-
-float FGUtility:: FromGeodetic()
-{
-  return 0.0;
-}
 
index 6af87c2bb8330a78e59f40b8b8d366123bfda087..c95e265e712934ed307eaea7d0a1b1ac6c33308f 100644 (file)
@@ -59,9 +59,6 @@ public:
   FGUtility(void);
   ~FGUtility(void);
 
-  float ToGeodetic(void);
-  float FromGeodetic(void);
-
 protected:
 
 private:
index ef1d8885ebe23e3266a92c18c6afca7cc50fc018..42f4964de33d931c80c7a45855de0144ae355b74 100644 (file)
@@ -131,10 +131,8 @@ void FGfdmSocket::Append(long item)
 
 void FGfdmSocket::Send(void)
 {
-  int len;
-  
   buffer += string("\n");
-  if ((len = send(sckt,buffer.c_str(),buffer.size(),0)) <= 0) {
+  if ((send(sckt,buffer.c_str(),buffer.size(),0)) <= 0) {
     perror("send");
   } else {
   }