]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGAuxiliary.cpp
Updates from JSBSim, including new turbine engine model from David Culp
[flightgear.git] / src / FDM / JSBSim / FGAuxiliary.cpp
index fcadc8000920225bcfb26437c995b1621f65399b..aa188c32c446c1d2b68a1276dceaaa60b37ce17a 100644 (file)
@@ -57,6 +57,8 @@ INCLUDES
 #include "FGColumnVector4.h"
 #include "FGPropertyManager.h"
 
+namespace JSBSim {
+
 static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_AUXILIARY;
 
@@ -95,6 +97,10 @@ bool FGAuxiliary::Run()
 
   if (!FGModel::Run()) {
     GetState();
+    
+    //caculate total temperature assuming isentropic flow
+    tat=sat*(1 + 0.2*mach*mach);
+    
     if (mach < 1) {   //calculate total pressure assuming isentropic flow
       pt=p*pow((1 + 0.2*mach*mach),3.5);
     } else {
@@ -216,6 +222,11 @@ void FGAuxiliary::bind(void)
                        &FGAuxiliary::GetVequivalentFPS);
   PropertyManager->Tie("velocities/ve-kts", this,
                        &FGAuxiliary::GetVequivalentKTS);
+  PropertyManager->Tie("velocities/tat-r", this,
+                       &FGAuxiliary::GetTotalTemperature);
+  PropertyManager->Tie("velocities/pt-lbs_sqft", this,
+                       &FGAuxiliary::GetTotalPressure);
+                     
   PropertyManager->Tie("accelerations/a-pilot-x-ft_sec2", this,1,
                        (PMF)&FGAuxiliary::GetPilotAccel);
   PropertyManager->Tie("accelerations/a-pilot-y-ft_sec2", this,2,
@@ -267,6 +278,7 @@ void FGAuxiliary::GetState(void)
   p = Atmosphere->GetPressure();
   rhosl = Atmosphere->GetDensitySL();
   psl = Atmosphere->GetPressureSL();
+  sat = Atmosphere->GetTemperature();
 }
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -315,3 +327,4 @@ void FGAuxiliary::Debug(int from)
   }
 }
 
+} // namespace JSBSim