]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGAuxiliary.cpp
Make yasim accept the launchbar and hook properties. They are not tied to anything...
[flightgear.git] / src / FDM / JSBSim / FGAuxiliary.cpp
index 033e9153a35d1c7b8f5af12470e3ce809033dfc4..c7e29e7b89e3d4b4ff0253da4f33871c077e0c8f 100644 (file)
@@ -1,18 +1,18 @@
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
  Module:       FGAuxiliary.cpp
  Author:       Tony Peden, Jon Berndt
  Date started: 01/26/99
  Purpose:      Calculates additional parameters needed by the visual system, etc.
  Called by:    FGSimExec
+
  ------------- Copyright (C) 1999  Jon S. Berndt (jsb@hal-pc.org) -------------
+
  This program is free software; you can redistribute it and/or modify it under
  the terms of the GNU General Public License as published by the Free Software
  Foundation; either version 2 of the License, or (at your option) any later
  version.
+
  This program is distributed in the hope that it will be useful, but WITHOUT
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
@@ -42,21 +42,16 @@ INCLUDES
 
 #include "FGAuxiliary.h"
 #include "FGAerodynamics.h"
-#include "FGTranslation.h"
-#include "FGRotation.h"
+#include "FGPropagate.h"
 #include "FGAtmosphere.h"
 #include "FGState.h"
 #include "FGFDMExec.h"
-#include "FGFCS.h"
 #include "FGAircraft.h"
-#include "FGPosition.h"
-#include "FGOutput.h"
 #include "FGInertial.h"
-#include "FGMatrix33.h"
-#include "FGColumnVector3.h"
-#include "FGColumnVector4.h"
 #include "FGPropertyManager.h"
 
+namespace JSBSim {
+
 static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_AUXILIARY;
 
@@ -68,14 +63,29 @@ CLASS IMPLEMENTATION
 FGAuxiliary::FGAuxiliary(FGFDMExec* fdmex) : FGModel(fdmex)
 {
   Name = "FGAuxiliary";
-  vcas = veas = mach = qbar = pt = 0;
+  vcas = veas = pt = tat = 0;
   psl = rhosl = 1;
   earthPosAngle = 0.0;
-  
+  qbar = 0;
+  qbarUW = 0.0;
+  qbarUV = 0.0;
+  Mach = 0.0;
+  alpha = beta = 0.0;
+  adot = bdot = 0.0;
+  gamma = Vt = Vground = 0.0;
+  psigt = 0.0;
+  day_of_year = 1;
+  seconds_in_day = 0.0;
+  hoverbmac = hoverbcg = 0.0;
+
+  vPilotAccel.InitMatrix();
   vPilotAccelN.InitMatrix();
-  
+  vToEyePt.InitMatrix();
+  vAeroPQR.InitMatrix();
+  vEulerRates.InitMatrix();
+
   bind();
-  
+
   Debug(0);
 }
 
@@ -91,82 +101,136 @@ FGAuxiliary::~FGAuxiliary()
 
 bool FGAuxiliary::Run()
 {
-  double A,B,D;
+  double A,B,D, hdot_Vt;
+  const FGColumnVector3& vPQR = Propagate->GetPQR();
+  const FGColumnVector3& vUVW = Propagate->GetUVW();
+  const FGColumnVector3& vUVWdot = Propagate->GetUVWdot();
+  const FGColumnVector3& vVel = Propagate->GetVel();
+
+  if (!FGModel::Run())
+  {
+    p = Atmosphere->GetPressure();
+    rhosl = Atmosphere->GetDensitySL();
+    psl = Atmosphere->GetPressureSL();
+    sat = Atmosphere->GetTemperature();
+
+// Rotation
+
+    double cTht = Propagate->GetCosEuler(eTht);
+    double cPhi = Propagate->GetCosEuler(ePhi);
+    double sPhi = Propagate->GetSinEuler(ePhi);
+
+    vEulerRates(eTht) = vPQR(eQ)*cPhi - vPQR(eR)*sPhi;
+    if (cTht != 0.0) {
+      vEulerRates(ePsi) = (vPQR(eQ)*sPhi + vPQR(eR)*cPhi)/cTht;
+      vEulerRates(ePhi) = vPQR(eP) + vEulerRates(ePsi)*sPhi;
+    }
 
-  if (!FGModel::Run()) {
-    GetState();
-    if (mach < 1) {   //calculate total pressure assuming isentropic flow
-      pt=p*pow((1 + 0.2*mach*mach),3.5);
+    vAeroPQR = vPQR + Atmosphere->GetTurbPQR();
+
+// Translation
+
+    vAeroUVW = vUVW + Propagate->GetTl2b()*Atmosphere->GetWindNED();
+
+    Vt = vAeroUVW.Magnitude();
+    if ( Vt > 0.05) {
+      if (vAeroUVW(eW) != 0.0)
+        alpha = vAeroUVW(eU)*vAeroUVW(eU) > 0.0 ? atan2(vAeroUVW(eW), vAeroUVW(eU)) : 0.0;
+      if (vAeroUVW(eV) != 0.0)
+        beta = vAeroUVW(eU)*vAeroUVW(eU)+vAeroUVW(eW)*vAeroUVW(eW) > 0.0 ? atan2(vAeroUVW(eV),
+               sqrt(vAeroUVW(eU)*vAeroUVW(eU) + vAeroUVW(eW)*vAeroUVW(eW))) : 0.0;
+
+      double mUW = (vAeroUVW(eU)*vAeroUVW(eU) + vAeroUVW(eW)*vAeroUVW(eW));
+      double signU=1;
+      if (vAeroUVW(eU) != 0.0)
+        signU = vAeroUVW(eU)/fabs(vAeroUVW(eU));
+
+      if ( (mUW == 0.0) || (Vt == 0.0) ) {
+        adot = 0.0;
+        bdot = 0.0;
+      } else {
+        adot = (vAeroUVW(eU)*vUVWdot(eW) - vAeroUVW(eW)*vUVWdot(eU))/mUW;
+        bdot = (signU*mUW*vUVWdot(eV) - vAeroUVW(eV)*(vAeroUVW(eU)*vUVWdot(eU)
+                + vAeroUVW(eW)*vUVWdot(eW)))/(Vt*Vt*sqrt(mUW));
+      }
     } else {
-      // shock in front of pitot tube, we'll assume its normal and use
-      // the Rayleigh Pitot Tube Formula, i.e. the ratio of total
-      // pressure behind the shock to the static pressure in front
+      alpha = beta = adot = bdot = 0;
+    }
 
-      B = 5.76*mach*mach/(5.6*mach*mach - 0.8);
+    qbar = 0.5*Atmosphere->GetDensity()*Vt*Vt;
+    qbarUW = 0.5*Atmosphere->GetDensity()*(vAeroUVW(eU)*vAeroUVW(eU) + vAeroUVW(eW)*vAeroUVW(eW));
+    qbarUV = 0.5*Atmosphere->GetDensity()*(vAeroUVW(eU)*vAeroUVW(eU) + vAeroUVW(eV)*vAeroUVW(eV));
+    Mach = Vt / Atmosphere->GetSoundSpeed();
+    MachU = vMachUVW(eU) = vAeroUVW(eU) / Atmosphere->GetSoundSpeed();
+    vMachUVW(eV) = vAeroUVW(eV) / Atmosphere->GetSoundSpeed();
+    vMachUVW(eW) = vAeroUVW(eW) / Atmosphere->GetSoundSpeed();
 
-      // The denominator above is zero for Mach ~ 0.38, for which
-      // we'll never be here, so we're safe
+// Position
 
-      D = (2.8*mach*mach-0.4)*0.4167;
+    Vground = sqrt( vVel(eNorth)*vVel(eNorth) + vVel(eEast)*vVel(eEast) );
+
+    if (vVel(eNorth) == 0) psigt = 0;
+    else psigt =  atan2(vVel(eEast), vVel(eNorth));
+
+    if (psigt < 0.0) psigt += 2*M_PI;
+
+    if (Vt != 0) {
+      hdot_Vt = -vVel(eDown)/Vt;
+      if (fabs(hdot_Vt) <= 1) gamma = asin(hdot_Vt);
+    } else {
+      gamma = 0.0;
+    }
+
+    tat = sat*(1 + 0.2*Mach*Mach); // Total Temperature, isentropic flow
+    tatc = RankineToCelsius(tat);
+
+    if (MachU < 1) {   // Calculate total pressure assuming isentropic flow
+      pt = p*pow((1 + 0.2*MachU*MachU),3.5);
+    } else {
+      // Use Rayleigh pitot tube formula for normal shock in front of pitot tube
+      B = 5.76*MachU*MachU/(5.6*MachU*MachU - 0.8);
+      D = (2.8*MachU*MachU-0.4)*0.4167;
       pt = p*pow(B,3.5)*D;
     }
 
     A = pow(((pt-p)/psl+1),0.28571);
-    vcas = sqrt(7*psl/rhosl*(A-1));
-    veas = sqrt(2*qbar/rhosl);
-
-    // Pilot sensed accelerations are calculated here. This is used
-    // for the coordinated turn ball instrument. Motion base platforms sometimes
-    // use the derivative of pilot sensed accelerations as the driving parameter,
-    // rather than straight accelerations.
-    //
-    // The theory behind pilot-sensed calculations is presented:
-    //
-    // For purposes of discussion and calculation, assume for a minute that the
-    // pilot is in space and motionless in inertial space. She will feel
-    // no accelerations. If the aircraft begins to accelerate along any axis or
-    // axes (without rotating), the pilot will sense those accelerations. If
-    // any rotational moment is applied, the pilot will sense an acceleration
-    // due to that motion in the amount:
-    //
-    // [wdot X R]  +  [w X (w X R)]
-    //   Term I          Term II
-    //
-    // where:
-    //
-    // wdot = omegadot, the rotational acceleration rate vector
-    // w    = omega, the rotational rate vector
-    // R    = the vector from the aircraft CG to the pilot eyepoint
-    //
-    // The sum total of these two terms plus the acceleration of the aircraft
-    // body axis gives the acceleration the pilot senses in inertial space.
-    // In the presence of a large body such as a planet, a gravity field also
-    // provides an accelerating attraction. This acceleration can be transformed
-    // from the reference frame of the planet so as to be expressed in the frame
-    // of reference of the aircraft. This gravity field accelerating attraction
-    // is felt by the pilot as a force on her tushie as she sits in her aircraft
-    // on the runway awaiting takeoff clearance.
-    //
-    // In JSBSim the acceleration of the body frame in inertial space is given
-    // by the F = ma relation. If the vForces vector is divided by the aircraft
-    // mass, the acceleration vector is calculated. The term wdot is equivalent
-    // to the JSBSim vPQRdot vector, and the w parameter is equivalent to vPQR.
-    // The radius R is calculated below in the vector vToEyePt.
-    
-    vPilotAccel.InitMatrix();   
-    if ( Translation->GetVt() > 1 ) {
-      vToEyePt = Aircraft->GetXYZep() - MassBalance->GetXYZcg();
-      vToEyePt *= inchtoft;
-      vPilotAccel =  Aerodynamics->GetForces() 
-                  +  Propulsion->GetForces()
-                  +  GroundReactions->GetForces();
-      vPilotAccel /= MassBalance->GetMass();
-      vPilotAccel += Rotation->GetPQRdot() * vToEyePt;
-      vPilotAccel += Rotation->GetPQR() * (Rotation->GetPQR() * vToEyePt);
-      //vPilotAccel(2)*=-1;
-      vPilotAccelN = vPilotAccel/Inertial->gravity();
+    if (MachU > 0.0) {
+      vcas = sqrt(7*psl/rhosl*(A-1));
+      veas = sqrt(2*qbar/rhosl);
+    } else {
+      vcas = veas = 0.0;
+    }
+
+    vPilotAccel.InitMatrix();
+    if ( Vt > 1.0 ) {
+       vPilotAccel =  Aerodynamics->GetForces()
+                      +  Propulsion->GetForces()
+                      +  GroundReactions->GetForces();
+       vPilotAccel /= MassBalance->GetMass();
+       vToEyePt = MassBalance->StructuralToBody(Aircraft->GetXYZep());
+       vPilotAccel += Propagate->GetPQRdot() * vToEyePt;
+       vPilotAccel += vPQR * (vPQR * vToEyePt);
+    } else {
+       vPilotAccel = Propagate->GetTl2b() * FGColumnVector3( 0.0, 0.0, Inertial->gravity() );
     }
+
+    vPilotAccelN = vPilotAccel/Inertial->gravity();
+
     earthPosAngle += State->Getdt()*Inertial->omega();
+
+    // VRP computation
+    const FGLocation& vLocation = Propagate->GetLocation();
+    FGColumnVector3 vrpStructural = Aircraft->GetXYZvrp();
+    FGColumnVector3 vrpBody = MassBalance->StructuralToBody( vrpStructural );
+    FGColumnVector3 vrpLocal = Propagate->GetTb2l() * vrpBody;
+    vLocationVRP = vLocation.LocalToLocation( vrpLocal );
+
+    // Recompute some derived values now that we know the dependent parameters values ...
+    hoverbcg = Propagate->GetDistanceAGL() / Aircraft->GetWingSpan();
+
+    FGColumnVector3 vMac = Propagate->GetTb2l()*MassBalance->StructuralToBody(Aircraft->GetXYZrp());
+    hoverbmac = (Propagate->GetDistanceAGL() + vMac(3)) / Aircraft->GetWingSpan();
+
     return false;
   } else {
     return true;
@@ -177,26 +241,24 @@ bool FGAuxiliary::Run()
 
 double FGAuxiliary::GetHeadWind(void)
 {
-  double psiw,vw,psi;
+  double psiw,vw;
 
   psiw = Atmosphere->GetWindPsi();
-  psi = Rotation->Getpsi();
   vw = Atmosphere->GetWindNED().Magnitude();
 
-  return vw*cos(psiw - psi);
+  return vw*cos(psiw - Propagate->GetEuler(ePsi));
 }
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 double FGAuxiliary::GetCrossWind(void)
 {
-  double psiw,vw,psi;
+  double psiw,vw;
 
   psiw = Atmosphere->GetWindPsi();
-  psi = Rotation->Getpsi();
   vw = Atmosphere->GetWindNED().Magnitude();
 
-  return  vw*sin(psiw - psi);
+  return  vw*sin(psiw - Propagate->GetEuler(ePsi));
 }
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -204,34 +266,53 @@ double FGAuxiliary::GetCrossWind(void)
 void FGAuxiliary::bind(void)
 {
   typedef double (FGAuxiliary::*PMF)(int) const;
-  PropertyManager->Tie("velocities/vc-fps", this,
-                       &FGAuxiliary::GetVcalibratedFPS);
-  PropertyManager->Tie("velocities/vc-kts", this,
-                       &FGAuxiliary::GetVcalibratedKTS);
-  PropertyManager->Tie("velocities/ve-fps", this,
-                       &FGAuxiliary::GetVequivalentFPS);
-  PropertyManager->Tie("velocities/ve-kts", this,
-                       &FGAuxiliary::GetVequivalentKTS);
-  PropertyManager->Tie("accelerations/a-pilot-x-ft_sec2", this,1,
-                       (PMF)&FGAuxiliary::GetPilotAccel);
-  PropertyManager->Tie("accelerations/a-pilot-y-ft_sec2", this,2,
-                       (PMF)&FGAuxiliary::GetPilotAccel);
-  PropertyManager->Tie("accelerations/a-pilot-z-ft_sec2", this,3,
-                       (PMF)&FGAuxiliary::GetPilotAccel);
-  PropertyManager->Tie("accelerations/n-pilot-x-norm", this,1,
-                       (PMF)&FGAuxiliary::GetNpilot);
-  PropertyManager->Tie("accelerations/n-pilot-y-norm", this,2,
-                       (PMF)&FGAuxiliary::GetNpilot);
-  PropertyManager->Tie("accelerations/n-pilot-z-norm", this,3,
-                       (PMF)&FGAuxiliary::GetNpilot);
-  PropertyManager->Tie("position/epa-rad", this,
-                       &FGAuxiliary::GetEarthPositionAngle);
-  /* PropertyManager->Tie("atmosphere/headwind-fps", this,
-                       &FGAuxiliary::GetHeadWind,
-                       true);
-  PropertyManager->Tie("atmosphere/crosswind-fps", this,
-                       &FGAuxiliary::GetCrossWind,
-                       true); */
+  typedef double (FGAuxiliary::*PF)(void) const;
+  PropertyManager->Tie("velocities/vc-fps", this, &FGAuxiliary::GetVcalibratedFPS);
+  PropertyManager->Tie("velocities/vc-kts", this, &FGAuxiliary::GetVcalibratedKTS);
+  PropertyManager->Tie("velocities/ve-fps", this, &FGAuxiliary::GetVequivalentFPS);
+  PropertyManager->Tie("velocities/ve-kts", this, &FGAuxiliary::GetVequivalentKTS);
+  PropertyManager->Tie("velocities/machU", this, &FGAuxiliary::GetMachU);
+  PropertyManager->Tie("velocities/tat-r", this, &FGAuxiliary::GetTotalTemperature);
+  PropertyManager->Tie("velocities/tat-c", this, &FGAuxiliary::GetTAT_C);
+  PropertyManager->Tie("velocities/pt-lbs_sqft", this, &FGAuxiliary::GetTotalPressure);
+  PropertyManager->Tie("velocities/p-aero-rad_sec", this, eX, (PMF)&FGAuxiliary::GetAeroPQR);
+  PropertyManager->Tie("velocities/q-aero-rad_sec", this, eY, (PMF)&FGAuxiliary::GetAeroPQR);
+  PropertyManager->Tie("velocities/r-aero-rad_sec", this, eZ, (PMF)&FGAuxiliary::GetAeroPQR);
+  PropertyManager->Tie("velocities/phidot-rad_sec", this, ePhi, (PMF)&FGAuxiliary::GetEulerRates);
+  PropertyManager->Tie("velocities/thetadot-rad_sec", this, eTht, (PMF)&FGAuxiliary::GetEulerRates);
+  PropertyManager->Tie("velocities/psidot-rad_sec", this, ePsi, (PMF)&FGAuxiliary::GetEulerRates);
+  PropertyManager->Tie("velocities/u-aero-fps", this, eU, (PMF)&FGAuxiliary::GetAeroUVW);
+  PropertyManager->Tie("velocities/v-aero-fps", this, eV, (PMF)&FGAuxiliary::GetAeroUVW);
+  PropertyManager->Tie("velocities/w-aero-fps", this, eW, (PMF)&FGAuxiliary::GetAeroUVW);
+  PropertyManager->Tie("velocities/vt-fps", this, &FGAuxiliary::GetVt, &FGAuxiliary::SetVt, true);
+  PropertyManager->Tie("velocities/mach-norm", this, &FGAuxiliary::GetMach, &FGAuxiliary::SetMach, true);
+  PropertyManager->Tie("velocities/vg-fps", this, &FGAuxiliary::GetVground);
+  PropertyManager->Tie("accelerations/a-pilot-x-ft_sec2", this, eX, (PMF)&FGAuxiliary::GetPilotAccel);
+  PropertyManager->Tie("accelerations/a-pilot-y-ft_sec2", this, eY, (PMF)&FGAuxiliary::GetPilotAccel);
+  PropertyManager->Tie("accelerations/a-pilot-z-ft_sec2", this, eZ, (PMF)&FGAuxiliary::GetPilotAccel);
+  PropertyManager->Tie("accelerations/n-pilot-x-norm", this, eX, (PMF)&FGAuxiliary::GetNpilot);
+  PropertyManager->Tie("accelerations/n-pilot-y-norm", this, eY, (PMF)&FGAuxiliary::GetNpilot);
+  PropertyManager->Tie("accelerations/n-pilot-z-norm", this, eZ, (PMF)&FGAuxiliary::GetNpilot);
+  PropertyManager->Tie("position/epa-rad", this, &FGAuxiliary::GetEarthPositionAngle);
+  /* PropertyManager->Tie("atmosphere/headwind-fps", this, &FGAuxiliary::GetHeadWind, true);
+  PropertyManager->Tie("atmosphere/crosswind-fps", this, &FGAuxiliary::GetCrossWind, true); */
+  PropertyManager->Tie("aero/alpha-rad", this, (PF)&FGAuxiliary::Getalpha, &FGAuxiliary::Setalpha, true);
+  PropertyManager->Tie("aero/beta-rad", this, (PF)&FGAuxiliary::Getbeta, &FGAuxiliary::Setbeta, true);
+  PropertyManager->Tie("aero/mag-beta-rad", this, (PF)&FGAuxiliary::GetMagBeta);
+  PropertyManager->Tie("aero/alpha-deg", this, inDegrees, (PMF)&FGAuxiliary::Getalpha);
+  PropertyManager->Tie("aero/beta-deg", this, inDegrees, (PMF)&FGAuxiliary::Getbeta);
+  PropertyManager->Tie("aero/mag-beta-deg", this, inDegrees, (PMF)&FGAuxiliary::GetMagBeta);
+  PropertyManager->Tie("aero/qbar-psf", this, &FGAuxiliary::Getqbar, &FGAuxiliary::Setqbar, true);
+  PropertyManager->Tie("aero/qbarUW-psf", this, &FGAuxiliary::GetqbarUW, &FGAuxiliary::SetqbarUW, true);
+  PropertyManager->Tie("aero/qbarUV-psf", this, &FGAuxiliary::GetqbarUV, &FGAuxiliary::SetqbarUV, true);
+  PropertyManager->Tie("aero/alphadot-rad_sec", this, (PF)&FGAuxiliary::Getadot, &FGAuxiliary::Setadot, true);
+  PropertyManager->Tie("aero/betadot-rad_sec", this, (PF)&FGAuxiliary::Getbdot, &FGAuxiliary::Setbdot, true);
+  PropertyManager->Tie("aero/alphadot-deg_sec", this, inDegrees, (PMF)&FGAuxiliary::Getadot);
+  PropertyManager->Tie("aero/betadot-deg_sec", this, inDegrees, (PMF)&FGAuxiliary::Getbdot);
+  PropertyManager->Tie("aero/h_b-cg-ft", this, &FGAuxiliary::GetHOverBCG);
+  PropertyManager->Tie("aero/h_b-mac-ft", this, &FGAuxiliary::GetHOverBMAC);
+  PropertyManager->Tie("flight-path/gamma-rad", this, &FGAuxiliary::GetGamma, &FGAuxiliary::SetGamma);
+  PropertyManager->Tie("flight-path/psi-gt-rad", this, &FGAuxiliary::GetGroundTrack);
 }
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -242,6 +323,22 @@ void FGAuxiliary::unbind(void)
   PropertyManager->Untie("velocities/vc-kts");
   PropertyManager->Untie("velocities/ve-fps");
   PropertyManager->Untie("velocities/ve-kts");
+  PropertyManager->Untie("velocities/machU");
+  PropertyManager->Untie("velocities/tat-r");
+  PropertyManager->Untie("velocities/tat-c");
+  PropertyManager->Untie("velocities/p-aero-rad_sec");
+  PropertyManager->Untie("velocities/q-aero-rad_sec");
+  PropertyManager->Untie("velocities/r-aero-rad_sec");
+  PropertyManager->Untie("velocities/pt-lbs_sqft");
+  PropertyManager->Untie("velocities/phidot-rad_sec");
+  PropertyManager->Untie("velocities/thetadot-rad_sec");
+  PropertyManager->Untie("velocities/psidot-rad_sec");
+  PropertyManager->Untie("velocities/u-aero-fps");
+  PropertyManager->Untie("velocities/v-aero-fps");
+  PropertyManager->Untie("velocities/w-aero-fps");
+  PropertyManager->Untie("velocities/vt-fps");
+  PropertyManager->Untie("velocities/mach-norm");
+  PropertyManager->Untie("velocities/vg-fps");
   PropertyManager->Untie("accelerations/a-pilot-x-ft_sec2");
   PropertyManager->Untie("accelerations/a-pilot-y-ft_sec2");
   PropertyManager->Untie("accelerations/a-pilot-z-ft_sec2");
@@ -251,18 +348,23 @@ void FGAuxiliary::unbind(void)
   PropertyManager->Untie("position/epa-rad");
   /* PropertyManager->Untie("atmosphere/headwind-fps");
   PropertyManager->Untie("atmosphere/crosswind-fps"); */
-
-}
-
-//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-void FGAuxiliary::GetState(void)
-{
-  qbar = Translation->Getqbar();
-  mach = Translation->GetMach();
-  p = Atmosphere->GetPressure();
-  rhosl = Atmosphere->GetDensitySL();
-  psl = Atmosphere->GetPressureSL();
+  PropertyManager->Untie("aero/qbar-psf");
+  PropertyManager->Untie("aero/qbarUW-psf");
+  PropertyManager->Untie("aero/qbarUV-psf");
+  PropertyManager->Untie("aero/alpha-rad");
+  PropertyManager->Untie("aero/beta-rad");
+  PropertyManager->Untie("aero/alpha-deg");
+  PropertyManager->Untie("aero/beta-deg");
+  PropertyManager->Untie("aero/alphadot-rad_sec");
+  PropertyManager->Untie("aero/betadot-rad_sec");
+  PropertyManager->Untie("aero/mag-beta-rad");
+  PropertyManager->Untie("aero/alphadot-deg_sec");
+  PropertyManager->Untie("aero/betadot-deg_sec");
+  PropertyManager->Untie("aero/mag-beta-deg");
+  PropertyManager->Untie("aero/h_b-cg-ft");
+  PropertyManager->Untie("aero/h_b-mac-ft");
+  PropertyManager->Untie("flight-path/gamma-rad");
+  PropertyManager->Untie("flight-path/psi-gt-rad");
 }
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -302,6 +404,10 @@ void FGAuxiliary::Debug(int from)
   if (debug_lvl & 8 ) { // Runtime state variables
   }
   if (debug_lvl & 16) { // Sanity checking
+    if (Mach > 100 || Mach < 0.00)
+      cout << "FGPropagate::Mach is out of bounds: " << Mach << endl;
+    if (qbar > 1e6 || qbar < 0.00)
+      cout << "FGPropagate::qbar is out of bounds: " << qbar << endl;
   }
   if (debug_lvl & 64) {
     if (from == 0) { // Constructor
@@ -311,3 +417,4 @@ void FGAuxiliary::Debug(int from)
   }
 }
 
+} // namespace JSBSim