]> git.mxchange.org Git - flightgear.git/blob - src/FDM/JSBSim/models/FGAuxiliary.cpp
Sync. w. JSBSim cvs
[flightgear.git] / src / FDM / JSBSim / models / FGAuxiliary.cpp
1 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
3  Module:       FGAuxiliary.cpp
4  Author:       Tony Peden, Jon Berndt
5  Date started: 01/26/99
6  Purpose:      Calculates additional parameters needed by the visual system, etc.
7  Called by:    FGSimExec
8
9  ------------- Copyright (C) 1999  Jon S. Berndt (jsb@hal-pc.org) -------------
10
11  This program is free software; you can redistribute it and/or modify it under
12  the terms of the GNU Lesser General Public License as published by the Free Software
13  Foundation; either version 2 of the License, or (at your option) any later
14  version.
15
16  This program is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18  FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
19  details.
20
21  You should have received a copy of the GNU Lesser General Public License along with
22  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
23  Place - Suite 330, Boston, MA  02111-1307, USA.
24
25  Further information about the GNU Lesser General Public License can also be found on
26  the world wide web at http://www.gnu.org.
27
28 FUNCTIONAL DESCRIPTION
29 --------------------------------------------------------------------------------
30 This class calculates various auxiliary parameters.
31
32 REFERENCES
33   Anderson, John D. "Introduction to Flight", 3rd Edition, McGraw-Hill, 1989
34                     pgs. 112-126
35 HISTORY
36 --------------------------------------------------------------------------------
37 01/26/99   JSB   Created
38
39 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
40 INCLUDES
41 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
42
43 #include "FGAuxiliary.h"
44 #include "FGAerodynamics.h"
45 #include "FGPropagate.h"
46 #include "FGAtmosphere.h"
47 #include <FGFDMExec.h>
48 #include "FGAircraft.h"
49 #include "FGInertial.h"
50 #include "FGExternalReactions.h"
51 #include "FGBuoyantForces.h"
52 #include "FGGroundReactions.h"
53 #include "FGPropulsion.h"
54 #include <input_output/FGPropertyManager.h>
55
56 namespace JSBSim {
57
58 static const char *IdSrc = "$Id$";
59 static const char *IdHdr = ID_AUXILIARY;
60
61 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
62 CLASS IMPLEMENTATION
63 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
64
65
66 FGAuxiliary::FGAuxiliary(FGFDMExec* fdmex) : FGModel(fdmex)
67 {
68   Name = "FGAuxiliary";
69   vcas = veas = pt = tat = 0;
70   psl = rhosl = 1;
71   qbar = 0;
72   qbarUW = 0.0;
73   qbarUV = 0.0;
74   Re = 0.0;
75   Mach = 0.0;
76   alpha = beta = 0.0;
77   adot = bdot = 0.0;
78   gamma = Vt = Vground = 0.0;
79   psigt = 0.0;
80   day_of_year = 1;
81   seconds_in_day = 0.0;
82   hoverbmac = hoverbcg = 0.0;
83   tatc = RankineToCelsius(tat);
84
85   vPilotAccel.InitMatrix();
86   vPilotAccelN.InitMatrix();
87   vToEyePt.InitMatrix();
88   vAeroPQR.InitMatrix();
89   vEulerRates.InitMatrix();
90
91   bind();
92
93   Debug(0);
94 }
95
96 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
97
98 bool FGAuxiliary::InitModel(void)
99 {
100   if (!FGModel::InitModel()) return false;
101
102   vcas = veas = pt = tat = 0;
103   psl = rhosl = 1;
104   qbar = 0;
105   qbarUW = 0.0;
106   qbarUV = 0.0;
107   Mach = 0.0;
108   alpha = beta = 0.0;
109   adot = bdot = 0.0;
110   gamma = Vt = Vground = 0.0;
111   psigt = 0.0;
112   day_of_year = 1;
113   seconds_in_day = 0.0;
114   hoverbmac = hoverbcg = 0.0;
115
116   vPilotAccel.InitMatrix();
117   vPilotAccelN.InitMatrix();
118   vToEyePt.InitMatrix();
119   vAeroPQR.InitMatrix();
120   vEulerRates.InitMatrix();
121
122   return true;
123 }
124   
125 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
126
127 FGAuxiliary::~FGAuxiliary()
128 {
129   Debug(1);
130 }
131
132 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
133
134 bool FGAuxiliary::Run()
135 {
136   double A,B,D;
137
138   if (FGModel::Run()) return true; // return true if error returned from base class
139   if (FDMExec->Holding()) return false;
140
141   const FGColumnVector3& vPQR = Propagate->GetPQR();
142   const FGColumnVector3& vUVW = Propagate->GetUVW();
143   const FGColumnVector3& vUVWdot = Propagate->GetUVWdot();
144   const FGColumnVector3& vVel = Propagate->GetVel();
145
146   p = Atmosphere->GetPressure();
147   rhosl = Atmosphere->GetDensitySL();
148   psl = Atmosphere->GetPressureSL();
149   sat = Atmosphere->GetTemperature();
150
151 // Rotation
152
153   double cTht = Propagate->GetCosEuler(eTht);
154   double sTht = Propagate->GetSinEuler(eTht);
155   double cPhi = Propagate->GetCosEuler(ePhi);
156   double sPhi = Propagate->GetSinEuler(ePhi);
157
158   vEulerRates(eTht) = vPQR(eQ)*cPhi - vPQR(eR)*sPhi;
159   if (cTht != 0.0) {
160     vEulerRates(ePsi) = (vPQR(eQ)*sPhi + vPQR(eR)*cPhi)/cTht;
161     vEulerRates(ePhi) = vPQR(eP) + vEulerRates(ePsi)*sTht;
162   }
163
164 // 12/16/2005, JSB: For ground handling purposes, at this time, let's ramp
165 // in the effects of wind from 10 fps to 30 fps when there is weight on the
166 // landing gear wheels.
167
168   if (GroundReactions->GetWOW() && vUVW(eU) < 10) {
169     vAeroPQR = vPQR;
170     vAeroUVW = vUVW;
171   } else if (GroundReactions->GetWOW() && vUVW(eU) < 30) {
172     double factor = (vUVW(eU) - 10.0)/20.0;
173     vAeroPQR = vPQR - factor*Atmosphere->GetTurbPQR();
174     vAeroUVW = vUVW - factor*Propagate->GetTl2b()*Atmosphere->GetTotalWindNED();
175   } else {
176     FGColumnVector3 wind = Propagate->GetTl2b()*Atmosphere->GetTotalWindNED();
177     vAeroPQR = vPQR - Atmosphere->GetTurbPQR();
178     vAeroUVW = vUVW - wind;
179   }
180
181   Vt = vAeroUVW.Magnitude();
182   if ( Vt > 0.05) {
183     if (vAeroUVW(eW) != 0.0)
184       alpha = vAeroUVW(eU)*vAeroUVW(eU) > 0.0 ? atan2(vAeroUVW(eW), vAeroUVW(eU)) : 0.0;
185     if (vAeroUVW(eV) != 0.0)
186       beta = vAeroUVW(eU)*vAeroUVW(eU)+vAeroUVW(eW)*vAeroUVW(eW) > 0.0 ? atan2(vAeroUVW(eV),
187              sqrt(vAeroUVW(eU)*vAeroUVW(eU) + vAeroUVW(eW)*vAeroUVW(eW))) : 0.0;
188
189     double mUW = (vAeroUVW(eU)*vAeroUVW(eU) + vAeroUVW(eW)*vAeroUVW(eW));
190     double signU=1;
191     if (vAeroUVW(eU) != 0.0)
192       signU = vAeroUVW(eU)/fabs(vAeroUVW(eU));
193
194     if ( (mUW == 0.0) || (Vt == 0.0) ) {
195       adot = 0.0;
196       bdot = 0.0;
197     } else {
198       adot = (vAeroUVW(eU)*vUVWdot(eW) - vAeroUVW(eW)*vUVWdot(eU))/mUW;
199       bdot = (signU*mUW*vUVWdot(eV) - vAeroUVW(eV)*(vAeroUVW(eU)*vUVWdot(eU)
200               + vAeroUVW(eW)*vUVWdot(eW)))/(Vt*Vt*sqrt(mUW));
201     }
202   } else {
203     alpha = beta = adot = bdot = 0;
204   }
205
206   Re = Vt * Aircraft->Getcbar() / Atmosphere->GetKinematicViscosity();
207
208   qbar = 0.5*Atmosphere->GetDensity()*Vt*Vt;
209   qbarUW = 0.5*Atmosphere->GetDensity()*(vAeroUVW(eU)*vAeroUVW(eU) + vAeroUVW(eW)*vAeroUVW(eW));
210   qbarUV = 0.5*Atmosphere->GetDensity()*(vAeroUVW(eU)*vAeroUVW(eU) + vAeroUVW(eV)*vAeroUVW(eV));
211   Mach = Vt / Atmosphere->GetSoundSpeed();
212   MachU = vMachUVW(eU) = vAeroUVW(eU) / Atmosphere->GetSoundSpeed();
213   vMachUVW(eV) = vAeroUVW(eV) / Atmosphere->GetSoundSpeed();
214   vMachUVW(eW) = vAeroUVW(eW) / Atmosphere->GetSoundSpeed();
215
216 // Position
217
218   Vground = sqrt( vVel(eNorth)*vVel(eNorth) + vVel(eEast)*vVel(eEast) );
219
220   psigt = atan2(vVel(eEast), vVel(eNorth));
221   if (psigt < 0.0) psigt += 2*M_PI;
222   gamma = atan2(-vVel(eDown), Vground);
223
224   tat = sat*(1 + 0.2*Mach*Mach); // Total Temperature, isentropic flow
225   tatc = RankineToCelsius(tat);
226
227   if (MachU < 1) {   // Calculate total pressure assuming isentropic flow
228     pt = p*pow((1 + 0.2*MachU*MachU),3.5);
229   } else {
230     // Use Rayleigh pitot tube formula for normal shock in front of pitot tube
231     B = 5.76*MachU*MachU/(5.6*MachU*MachU - 0.8);
232     D = (2.8*MachU*MachU-0.4)*0.4167;
233     pt = p*pow(B,3.5)*D;
234   }
235
236   A = pow(((pt-p)/psl+1),0.28571);
237   if (MachU > 0.0) {
238     vcas = sqrt(7*psl/rhosl*(A-1));
239     veas = sqrt(2*qbar/rhosl);
240   } else {
241     vcas = veas = 0.0;
242   }
243
244   vPilotAccel.InitMatrix();
245   if ( Vt > 1.0 ) {
246      vAircraftAccel = Aerodynamics->GetForces()
247                     + Propulsion->GetForces()
248                     + GroundReactions->GetForces()
249                     + ExternalReactions->GetForces()
250                     + BuoyantForces->GetForces();
251
252      vAircraftAccel /= MassBalance->GetMass();
253      // Nz is Acceleration in "g's", along normal axis (-Z body axis)
254      Nz = -vAircraftAccel(eZ)/Inertial->gravity();
255      vToEyePt = MassBalance->StructuralToBody(Aircraft->GetXYZep());
256      vPilotAccel = vAircraftAccel + Propagate->GetPQRdot() * vToEyePt;
257      vPilotAccel += vPQR * (vPQR * vToEyePt);
258   } else {
259      // The line below handles low velocity (and on-ground) cases, basically
260      // representing the opposite of the force that the landing gear would
261      // exert on the ground (which is just the total weight). This eliminates
262      // any jitter that could be introduced by the landing gear. Theoretically,
263      // this branch could be eliminated, with a penalty of having a short
264      // transient at startup (lasting only a fraction of a second).
265      vPilotAccel = Propagate->GetTl2b() * FGColumnVector3( 0.0, 0.0, -Inertial->gravity() );
266      Nz = -vPilotAccel(eZ)/Inertial->gravity();
267   }
268
269   vPilotAccelN = vPilotAccel/Inertial->gravity();
270
271   // VRP computation
272   const FGLocation& vLocation = Propagate->GetLocation();
273   FGColumnVector3 vrpStructural = Aircraft->GetXYZvrp();
274   FGColumnVector3 vrpBody = MassBalance->StructuralToBody( vrpStructural );
275   FGColumnVector3 vrpLocal = Propagate->GetTb2l() * vrpBody;
276   vLocationVRP = vLocation.LocalToLocation( vrpLocal );
277
278   // Recompute some derived values now that we know the dependent parameters values ...
279   hoverbcg = Propagate->GetDistanceAGL() / Aircraft->GetWingSpan();
280
281   FGColumnVector3 vMac = Propagate->GetTb2l()*MassBalance->StructuralToBody(Aircraft->GetXYZrp());
282   hoverbmac = (Propagate->GetDistanceAGL() + vMac(3)) / Aircraft->GetWingSpan();
283
284   // when all model are executed, 
285   // please calculate the distance from the initial point
286
287   CalculateRelativePosition();
288
289   return false;
290 }
291
292 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
293 //
294 // A positive headwind is blowing with you, a negative headwind is blowing against you.
295 // psi is the direction the wind is blowing *towards*.
296
297 double FGAuxiliary::GetHeadWind(void) const
298 {
299   double psiw,vw;
300
301   psiw = Atmosphere->GetWindPsi();
302   vw = Atmosphere->GetTotalWindNED().Magnitude();
303
304   return vw*cos(psiw - Propagate->GetEuler(ePsi));
305 }
306
307 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
308 //
309 // A positive crosswind is blowing towards the right (from teh perspective of the
310 // pilot). A negative crosswind is blowing towards the -Y direction (left).
311 // psi is the direction the wind is blowing *towards*.
312
313 double FGAuxiliary::GetCrossWind(void) const
314 {
315   double psiw,vw;
316
317   psiw = Atmosphere->GetWindPsi();
318   vw = Atmosphere->GetTotalWindNED().Magnitude();
319
320   return  vw*sin(psiw - Propagate->GetEuler(ePsi));
321 }
322
323 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
324
325 void FGAuxiliary::bind(void)
326 {
327   typedef double (FGAuxiliary::*PMF)(int) const;
328   typedef double (FGAuxiliary::*PF)(void) const;
329   PropertyManager->Tie("propulsion/tat-r", this, &FGAuxiliary::GetTotalTemperature);
330   PropertyManager->Tie("propulsion/tat-c", this, &FGAuxiliary::GetTAT_C);
331   PropertyManager->Tie("propulsion/pt-lbs_sqft", this, &FGAuxiliary::GetTotalPressure);
332   PropertyManager->Tie("velocities/vc-fps", this, &FGAuxiliary::GetVcalibratedFPS);
333   PropertyManager->Tie("velocities/vc-kts", this, &FGAuxiliary::GetVcalibratedKTS);
334   PropertyManager->Tie("velocities/ve-fps", this, &FGAuxiliary::GetVequivalentFPS);
335   PropertyManager->Tie("velocities/ve-kts", this, &FGAuxiliary::GetVequivalentKTS);
336   PropertyManager->Tie("velocities/machU", this, &FGAuxiliary::GetMachU);
337   PropertyManager->Tie("velocities/p-aero-rad_sec", this, eX, (PMF)&FGAuxiliary::GetAeroPQR);
338   PropertyManager->Tie("velocities/q-aero-rad_sec", this, eY, (PMF)&FGAuxiliary::GetAeroPQR);
339   PropertyManager->Tie("velocities/r-aero-rad_sec", this, eZ, (PMF)&FGAuxiliary::GetAeroPQR);
340   PropertyManager->Tie("velocities/phidot-rad_sec", this, ePhi, (PMF)&FGAuxiliary::GetEulerRates);
341   PropertyManager->Tie("velocities/thetadot-rad_sec", this, eTht, (PMF)&FGAuxiliary::GetEulerRates);
342   PropertyManager->Tie("velocities/psidot-rad_sec", this, ePsi, (PMF)&FGAuxiliary::GetEulerRates);
343   PropertyManager->Tie("velocities/u-aero-fps", this, eU, (PMF)&FGAuxiliary::GetAeroUVW);
344   PropertyManager->Tie("velocities/v-aero-fps", this, eV, (PMF)&FGAuxiliary::GetAeroUVW);
345   PropertyManager->Tie("velocities/w-aero-fps", this, eW, (PMF)&FGAuxiliary::GetAeroUVW);
346   PropertyManager->Tie("velocities/vt-fps", this, &FGAuxiliary::GetVt, &FGAuxiliary::SetVt, true);
347   PropertyManager->Tie("velocities/mach", this, &FGAuxiliary::GetMach, &FGAuxiliary::SetMach, true);
348   PropertyManager->Tie("velocities/vg-fps", this, &FGAuxiliary::GetVground);
349   PropertyManager->Tie("accelerations/a-pilot-x-ft_sec2", this, eX, (PMF)&FGAuxiliary::GetPilotAccel);
350   PropertyManager->Tie("accelerations/a-pilot-y-ft_sec2", this, eY, (PMF)&FGAuxiliary::GetPilotAccel);
351   PropertyManager->Tie("accelerations/a-pilot-z-ft_sec2", this, eZ, (PMF)&FGAuxiliary::GetPilotAccel);
352   PropertyManager->Tie("accelerations/n-pilot-x-norm", this, eX, (PMF)&FGAuxiliary::GetNpilot);
353   PropertyManager->Tie("accelerations/n-pilot-y-norm", this, eY, (PMF)&FGAuxiliary::GetNpilot);
354   PropertyManager->Tie("accelerations/n-pilot-z-norm", this, eZ, (PMF)&FGAuxiliary::GetNpilot);
355   PropertyManager->Tie("accelerations/Nz", this, &FGAuxiliary::GetNz);
356   /* PropertyManager->Tie("atmosphere/headwind-fps", this, &FGAuxiliary::GetHeadWind, true);
357   PropertyManager->Tie("atmosphere/crosswind-fps", this, &FGAuxiliary::GetCrossWind, true); */
358   PropertyManager->Tie("aero/alpha-rad", this, (PF)&FGAuxiliary::Getalpha, &FGAuxiliary::Setalpha, true);
359   PropertyManager->Tie("aero/beta-rad", this, (PF)&FGAuxiliary::Getbeta, &FGAuxiliary::Setbeta, true);
360   PropertyManager->Tie("aero/mag-beta-rad", this, (PF)&FGAuxiliary::GetMagBeta);
361   PropertyManager->Tie("aero/alpha-deg", this, inDegrees, (PMF)&FGAuxiliary::Getalpha);
362   PropertyManager->Tie("aero/beta-deg", this, inDegrees, (PMF)&FGAuxiliary::Getbeta);
363   PropertyManager->Tie("aero/mag-beta-deg", this, inDegrees, (PMF)&FGAuxiliary::GetMagBeta);
364   PropertyManager->Tie("aero/Re", this, &FGAuxiliary::GetReynoldsNumber);
365   PropertyManager->Tie("aero/qbar-psf", this, &FGAuxiliary::Getqbar, &FGAuxiliary::Setqbar, true);
366   PropertyManager->Tie("aero/qbarUW-psf", this, &FGAuxiliary::GetqbarUW, &FGAuxiliary::SetqbarUW, true);
367   PropertyManager->Tie("aero/qbarUV-psf", this, &FGAuxiliary::GetqbarUV, &FGAuxiliary::SetqbarUV, true);
368   PropertyManager->Tie("aero/alphadot-rad_sec", this, (PF)&FGAuxiliary::Getadot, &FGAuxiliary::Setadot, true);
369   PropertyManager->Tie("aero/betadot-rad_sec", this, (PF)&FGAuxiliary::Getbdot, &FGAuxiliary::Setbdot, true);
370   PropertyManager->Tie("aero/alphadot-deg_sec", this, inDegrees, (PMF)&FGAuxiliary::Getadot);
371   PropertyManager->Tie("aero/betadot-deg_sec", this, inDegrees, (PMF)&FGAuxiliary::Getbdot);
372   PropertyManager->Tie("aero/h_b-cg-ft", this, &FGAuxiliary::GetHOverBCG);
373   PropertyManager->Tie("aero/h_b-mac-ft", this, &FGAuxiliary::GetHOverBMAC);
374   PropertyManager->Tie("flight-path/gamma-rad", this, &FGAuxiliary::GetGamma, &FGAuxiliary::SetGamma);
375   PropertyManager->Tie("flight-path/psi-gt-rad", this, &FGAuxiliary::GetGroundTrack);
376
377   PropertyManager->Tie("position/distance-from-start-lon-mt", this, &FGAuxiliary::GetLongitudeRelativePosition);
378   PropertyManager->Tie("position/distance-from-start-lat-mt", this, &FGAuxiliary::GetLatitudeRelativePosition);
379   PropertyManager->Tie("position/distance-from-start-mag-mt", this, &FGAuxiliary::GetDistanceRelativePosition);
380 }
381
382 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
383
384 void FGAuxiliary::CalculateRelativePosition(void)
385
386   const double earth_radius_mt = Inertial->GetRefRadius()*fttom;
387   lat_relative_position=(FDMExec->GetPropagate()->GetLatitude()  - FDMExec->GetIC()->GetLatitudeDegIC() *degtorad)*earth_radius_mt;
388   lon_relative_position=(FDMExec->GetPropagate()->GetLongitude() - FDMExec->GetIC()->GetLongitudeDegIC()*degtorad)*earth_radius_mt;
389   relative_position = sqrt(lat_relative_position*lat_relative_position + lon_relative_position*lon_relative_position);
390 };
391
392 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
393 //    The bitmasked value choices are as follows:
394 //    unset: In this case (the default) JSBSim would only print
395 //       out the normally expected messages, essentially echoing
396 //       the config files as they are read. If the environment
397 //       variable is not set, debug_lvl is set to 1 internally
398 //    0: This requests JSBSim not to output any messages
399 //       whatsoever.
400 //    1: This value explicity requests the normal JSBSim
401 //       startup messages
402 //    2: This value asks for a message to be printed out when
403 //       a class is instantiated
404 //    4: When this value is set, a message is displayed when a
405 //       FGModel object executes its Run() method
406 //    8: When this value is set, various runtime state variables
407 //       are printed out periodically
408 //    16: When set various parameters are sanity checked and
409 //       a message is printed out when they go out of bounds
410
411 void FGAuxiliary::Debug(int from)
412 {
413   if (debug_lvl <= 0) return;
414
415   if (debug_lvl & 1) { // Standard console startup message output
416     if (from == 0) { // Constructor
417
418     }
419   }
420   if (debug_lvl & 2 ) { // Instantiation/Destruction notification
421     if (from == 0) cout << "Instantiated: FGAuxiliary" << endl;
422     if (from == 1) cout << "Destroyed:    FGAuxiliary" << endl;
423   }
424   if (debug_lvl & 4 ) { // Run() method entry print for FGModel-derived objects
425   }
426   if (debug_lvl & 8 ) { // Runtime state variables
427   }
428   if (debug_lvl & 16) { // Sanity checking
429     if (Mach > 100 || Mach < 0.00)
430       cout << "FGPropagate::Mach is out of bounds: " << Mach << endl;
431     if (qbar > 1e6 || qbar < 0.00)
432       cout << "FGPropagate::qbar is out of bounds: " << qbar << endl;
433   }
434   if (debug_lvl & 64) {
435     if (from == 0) { // Constructor
436       cout << IdSrc << endl;
437       cout << IdHdr << endl;
438     }
439   }
440 }
441
442 } // namespace JSBSim