X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2FJSBSim%2Fmodels%2FFGAtmosphere.cpp;h=7113fc3ca45df8d7d6a1c6043c597bc1b1fa4f0c;hb=642735ab18421db87a07d6841dd720fd4615bfff;hp=1387f013f8656916d6e1979a088bba8bbc78d8aa;hpb=7375166c2b426f672cbada959cd2925525730777;p=flightgear.git diff --git a/src/FDM/JSBSim/models/FGAtmosphere.cpp b/src/FDM/JSBSim/models/FGAtmosphere.cpp index 1387f013f..7113fc3ca 100644 --- a/src/FDM/JSBSim/models/FGAtmosphere.cpp +++ b/src/FDM/JSBSim/models/FGAtmosphere.cpp @@ -50,7 +50,7 @@ INCLUDES namespace JSBSim { -static const char *IdSrc = "$Id: FGAtmosphere.cpp,v 1.48 2011/07/10 20:18:14 jberndt Exp $"; +static const char *IdSrc = "$Id: FGAtmosphere.cpp,v 1.51 2012/04/13 13:18:28 jberndt Exp $"; static const char *IdHdr = ID_ATMOSPHERE; /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -101,12 +101,8 @@ bool FGAtmosphere::Run(bool Holding) if (FGModel::Run(Holding)) return true; if (Holding) return false; - RunPreFunctions(); - Calculate(in.altitudeASL); - RunPostFunctions(); - Debug(2); return false; } @@ -128,7 +124,7 @@ void FGAtmosphere::Calculate(double altitude) //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -void FGAtmosphere::SetPressureSL(double pressure, ePressure unit) +void FGAtmosphere::SetPressureSL(ePressure unit, double pressure) { double press = ConvertToPSF(pressure, unit); @@ -171,6 +167,9 @@ double FGAtmosphere::ConvertToRankine(double t, eTemperature unit) const break; case eKelvin: targetTemp = t*9.0/5.0; + break; + default: + break; } return targetTemp; @@ -214,7 +213,9 @@ void FGAtmosphere::bind(void) PropertyManager->Tie("atmosphere/a-fps", this, &FGAtmosphere::GetSoundSpeed); PropertyManager->Tie("atmosphere/T-sl-R", this, &FGAtmosphere::GetTemperatureSL); PropertyManager->Tie("atmosphere/rho-sl-slugs_ft3", this, &FGAtmosphere::GetDensitySL); - PropertyManager->Tie("atmosphere/P-sl-psf", this, &FGAtmosphere::GetPressureSL); +// PropertyManager->Tie("atmosphere/P-sl-psf", this, ePSF, +// (PMFi)&FGAtmosphere::GetPressureSL, +// (PMF)&FGAtmosphere::SetPressureSL); PropertyManager->Tie("atmosphere/a-sl-fps", this, &FGAtmosphere::GetSoundSpeedSL); PropertyManager->Tie("atmosphere/theta", this, &FGAtmosphere::GetTemperatureRatio); PropertyManager->Tie("atmosphere/sigma", this, &FGAtmosphere::GetDensityRatio); @@ -261,7 +262,7 @@ void FGAtmosphere::Debug(int from) } if (debug_lvl & 16) { // Sanity checking } - if (debug_lvl & 128) { // + if (debug_lvl & 128) { // } if (debug_lvl & 64) { if (from == 0) { // Constructor