]> git.mxchange.org Git - flightgear.git/commitdiff
Comment out set_Static_pressure, set_Static_temperature, and
authordavid <david>
Wed, 15 May 2002 12:06:33 +0000 (12:06 +0000)
committerdavid <david>
Wed, 15 May 2002 12:06:33 +0000 (12:06 +0000)
set_Density; since JSBSim doesn't override the get_* methods from
FGInterface as well, the wrong values are always set anyway.

Take the static temperature, static pressure, and density values from
an external source if requested by the
/environment/params/control-fdm-atmosphere property.  This isn't
working properly yet for JSBSim because of interactions with the
trimming routine.

src/FDM/JSBSim/JSBSim.cxx
src/FDM/JSBSim/JSBSim.hxx

index 76f2181f2d42b6307c37c3586a677f5c3a3d6648..0cc28f7dd46f3fcb5c9be4969442bf907fccdeee 100644 (file)
@@ -87,8 +87,18 @@ FGJSBsim::FGJSBsim( double dt )
     Aerodynamics    = fdmex->GetAerodynamics();
     GroundReactions = fdmex->GetGroundReactions();  
   
-    
+#ifdef FG_WEATHERCM
     Atmosphere->UseInternal();
+#else
+    if (fgGetBool("/environment/params/control-fdm-atmosphere")) {
+      Atmosphere->UseExternal();
+      Atmosphere->SetExTemperature(get_Static_temperature());
+      Atmosphere->SetExPressure(get_Static_pressure());
+      Atmosphere->SetExDensity(get_Density());
+    } else {
+      Atmosphere->UseInternal();
+    }
+#endif
     
     fgic=new FGInitialCondition(fdmex);
     needTrim=true;
@@ -697,31 +707,31 @@ void FGJSBsim::set_Gamma_vert_rad( double gamma) {
     needTrim=true;
 }
 
-void FGJSBsim::set_Static_pressure(double p) {
-    SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Static_pressure: " << p );
+// void FGJSBsim::set_Static_pressure(double p) {
+//     SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Static_pressure: " << p );
     
-    update_ic();
-    Atmosphere->SetExPressure(p);
-    if(Atmosphere->External() == true)
-      needTrim=true;
-}
+//     update_ic();
+//     Atmosphere->SetExPressure(p);
+//     if(Atmosphere->External() == true)
+//       needTrim=true;
+// }
 
-void FGJSBsim::set_Static_temperature(double T) {
-    SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Static_temperature: " << T );
+// void FGJSBsim::set_Static_temperature(double T) {
+//     SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Static_temperature: " << T );
     
-    Atmosphere->SetExTemperature(T);
-    if(Atmosphere->External() == true)
-      needTrim=true;
-}
+//     Atmosphere->SetExTemperature(T);
+//     if(Atmosphere->External() == true)
+//       needTrim=true;
+// }
  
 
-void FGJSBsim::set_Density(double rho) {
-    SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Density: " << rho );
+// void FGJSBsim::set_Density(double rho) {
+//     SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Density: " << rho );
     
-    Atmosphere->SetExDensity(rho);
-    if(Atmosphere->External() == true)
-      needTrim=true;
-}
+//     Atmosphere->SetExDensity(rho);
+//     if(Atmosphere->External() == true)
+//       needTrim=true;
+// }
   
 void FGJSBsim::set_Velocities_Local_Airmass (double wnorth, 
                          double weast, 
index e0e66b1192ef1ade37d4e25610c0dfb50c6a21bd..e727624ad265a2aaa556bbdcf3be1d613968a4a2 100644 (file)
@@ -185,15 +185,15 @@ public:
     //@{
     /** Sets the atmospheric static pressure
         @param p pressure in psf */
-    void set_Static_pressure(double p);
+//     void set_Static_pressure(double p);
 
     /** Sets the atmospheric temperature
         @param T temperature in degrees rankine */
-    void set_Static_temperature(double T);
+//     void set_Static_temperature(double T);
 
     /** Sets the atmospheric density.
         @param rho air density slugs/cubic foot */
-    void set_Density(double rho);
+//     void set_Density(double rho);
 
     /** Sets the velocity of the local airmass for wind modeling.
         @param wnorth velocity north in fps