JSBSim Flight Dynamics Model  1.1.11 (13 Feb 2022)
An Open Source Flight Dynamics and Control Software Library in C++
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: FGFDMExec
8 
9  ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.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
13  Software Foundation; either version 2 of the License, or (at your option) any
14  later 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
22  with this program; if not, write to the Free Software Foundation, Inc., 59
23  Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 
25  Further information about the GNU Lesser General Public License can also be
26  found on 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 <iostream>
44 
45 #include "FGAuxiliary.h"
46 #include "initialization/FGInitialCondition.h"
47 #include "FGFDMExec.h"
48 #include "input_output/FGPropertyManager.h"
49 #include "FGInertial.h"
50 
51 using namespace std;
52 
53 namespace JSBSim {
54 
55 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
56 CLASS IMPLEMENTATION
57 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
58 
59 
60 FGAuxiliary::FGAuxiliary(FGFDMExec* fdmex) : FGModel(fdmex)
61 {
62  Name = "FGAuxiliary";
63  pt = 2116.23; // ISA SL pressure
64  tatc = 15.0; // ISA SL temperature
65  tat = 518.67;
66 
67  vcas = veas = 0.0;
68  qbar = qbarUW = qbarUV = 0.0;
69  Mach = MachU = 0.0;
70  alpha = beta = 0.0;
71  adot = bdot = 0.0;
72  gamma = Vt = Vground = 0.0;
73  psigt = 0.0;
74  day_of_year = 1;
75  seconds_in_day = 0.0;
76  hoverbmac = hoverbcg = 0.0;
77  Re = 0.0;
78  Nx = Ny = Nz = 0.0;
79 
80  vPilotAccel.InitMatrix();
81  vPilotAccelN.InitMatrix();
82  vAeroUVW.InitMatrix();
83  vAeroPQR.InitMatrix();
84  vMachUVW.InitMatrix();
85  vEulerRates.InitMatrix();
86 
87  bind();
88 
89  Debug(0);
90 }
91 
92 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
93 
94 bool FGAuxiliary::InitModel(void)
95 {
96  if (!FGModel::InitModel()) return false;
97 
98  pt = in.Pressure;
99  tat = in.Temperature;
100  tatc = RankineToCelsius(tat);
101 
102  vcas = veas = 0.0;
103  qbar = qbarUW = qbarUV = 0.0;
104  Mach = MachU = 0.0;
105  alpha = beta = 0.0;
106  adot = bdot = 0.0;
107  gamma = Vt = Vground = 0.0;
108  psigt = 0.0;
109  day_of_year = 1;
110  seconds_in_day = 0.0;
111  hoverbmac = hoverbcg = 0.0;
112  Re = 0.0;
113  Nz = Ny = 0.0;
114 
115  vPilotAccel.InitMatrix();
116  vPilotAccelN.InitMatrix();
117  vAeroUVW.InitMatrix();
118  vAeroPQR.InitMatrix();
119  vMachUVW.InitMatrix();
120  vEulerRates.InitMatrix();
121 
122  return true;
123 }
124 
125 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
126 
128 {
129  Debug(1);
130 }
131 
132 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
133 
134 bool FGAuxiliary::Run(bool Holding)
135 {
136  if (FGModel::Run(Holding)) return true; // return true if error returned from base class
137  if (Holding) return false;
138 
139  // Rotation
140 
141  vEulerRates(eTht) = in.vPQR(eQ)*in.CosPhi - in.vPQR(eR)*in.SinPhi;
142  if (in.CosTht != 0.0) {
143  vEulerRates(ePsi) = (in.vPQR(eQ)*in.SinPhi + in.vPQR(eR)*in.CosPhi)/in.CosTht;
144  vEulerRates(ePhi) = in.vPQR(eP) + vEulerRates(ePsi)*in.SinTht;
145  }
146 
147  // Combine the wind speed with aircraft speed to obtain wind relative speed
148  vAeroPQR = in.vPQR - in.TurbPQR;
149  vAeroUVW = in.vUVW - in.Tl2b * in.TotalWindNED;
150 
151  alpha = beta = adot = bdot = 0;
152  double AeroU2 = vAeroUVW(eU)*vAeroUVW(eU);
153  double AeroV2 = vAeroUVW(eV)*vAeroUVW(eV);
154  double AeroW2 = vAeroUVW(eW)*vAeroUVW(eW);
155  double mUW = AeroU2 + AeroW2;
156 
157  double Vt2 = mUW + AeroV2;
158  Vt = sqrt(Vt2);
159 
160  if ( Vt > 0.001 ) {
161  beta = atan2(vAeroUVW(eV), sqrt(mUW));
162 
163  if ( mUW >= 1E-6 ) {
164  alpha = atan2(vAeroUVW(eW), vAeroUVW(eU));
165  double Vtdot = (vAeroUVW(eU)*in.vUVWdot(eU) + vAeroUVW(eV)*in.vUVWdot(eV) + vAeroUVW(eW)*in.vUVWdot(eW))/Vt;
166  adot = (vAeroUVW(eU)*in.vUVWdot(eW) - vAeroUVW(eW)*in.vUVWdot(eU))/mUW;
167  bdot = (in.vUVWdot(eV)*Vt - vAeroUVW(eV)*Vtdot)/(Vt*sqrt(mUW));
168  }
169  }
170 
171  UpdateWindMatrices();
172 
173  Re = Vt * in.Wingchord / in.KinematicViscosity;
174 
175  double densityD2 = 0.5*in.Density;
176 
177  qbar = densityD2 * Vt2;
178  qbarUW = densityD2 * (mUW);
179  qbarUV = densityD2 * (AeroU2 + AeroV2);
180  Mach = Vt / in.SoundSpeed;
181  MachU = vMachUVW(eU) = vAeroUVW(eU) / in.SoundSpeed;
182  vMachUVW(eV) = vAeroUVW(eV) / in.SoundSpeed;
183  vMachUVW(eW) = vAeroUVW(eW) / in.SoundSpeed;
184 
185  // Position
186 
187  Vground = sqrt( in.vVel(eNorth)*in.vVel(eNorth) + in.vVel(eEast)*in.vVel(eEast) );
188 
189  psigt = atan2(in.vVel(eEast), in.vVel(eNorth));
190  if (psigt < 0.0) psigt += 2*M_PI;
191  gamma = atan2(-in.vVel(eDown), Vground);
192 
193  tat = in.Temperature*(1 + 0.2*Mach*Mach); // Total Temperature, isentropic flow
194  tatc = RankineToCelsius(tat);
195 
196  pt = PitotTotalPressure(Mach, in.Pressure);
197 
198  if (abs(Mach) > 0.0) {
199  vcas = VcalibratedFromMach(Mach, in.Pressure);
200  veas = sqrt(2 * qbar / in.DensitySL);
201  }
202  else
203  vcas = veas = 0.0;
204 
205  vPilotAccel.InitMatrix();
206  vNcg = in.vBodyAccel/in.StandardGravity;
207  // Nz is Acceleration in "g's", along normal axis (-Z body axis)
208  Nz = -vNcg(eZ);
209  Ny = vNcg(eY);
210  Nx = vNcg(eX);
211  vPilotAccel = in.vBodyAccel + in.vPQRidot * in.ToEyePt;
212  vPilotAccel += in.vPQRi * (in.vPQRi * in.ToEyePt);
213 
214  vNwcg = mTb2w * vNcg;
215  vNwcg(eZ) = 1.0 - vNwcg(eZ);
216 
217  vPilotAccelN = vPilotAccel / in.StandardGravity;
218 
219  // VRP computation
220  vLocationVRP = in.vLocation.LocalToLocation( in.Tb2l * in.VRPBody );
221 
222  // Recompute some derived values now that we know the dependent parameters values ...
223  hoverbcg = in.DistanceAGL / in.Wingspan;
224 
225  FGColumnVector3 vMac = in.Tb2l * in.RPBody;
226  hoverbmac = (in.DistanceAGL - vMac(3)) / in.Wingspan;
227 
228  return false;
229 }
230 
231 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
232 //
233 // From Stevens and Lewis, "Aircraft Control and Simulation", 3rd Ed., the
234 // transformation from body to wind axes is defined (where "a" is alpha and "B"
235 // is beta):
236 //
237 // cos(a)*cos(B) sin(B) sin(a)*cos(B)
238 // -cos(a)*sin(B) cos(B) -sin(a)*sin(B)
239 // -sin(a) 0 cos(a)
240 //
241 // The transform from wind to body axes is then,
242 //
243 // cos(a)*cos(B) -cos(a)*sin(B) -sin(a)
244 // sin(B) cos(B) 0
245 // sin(a)*cos(B) -sin(a)*sin(B) cos(a)
246 
247 void FGAuxiliary::UpdateWindMatrices(void)
248 {
249  double ca, cb, sa, sb;
250 
251  ca = cos(alpha);
252  sa = sin(alpha);
253  cb = cos(beta);
254  sb = sin(beta);
255 
256  mTw2b(1,1) = ca*cb;
257  mTw2b(1,2) = -ca*sb;
258  mTw2b(1,3) = -sa;
259  mTw2b(2,1) = sb;
260  mTw2b(2,2) = cb;
261  mTw2b(2,3) = 0.0;
262  mTw2b(3,1) = sa*cb;
263  mTw2b(3,2) = -sa*sb;
264  mTw2b(3,3) = ca;
265 
266  mTb2w = mTw2b.Transposed();
267 }
268 
269 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
270 
271 double FGAuxiliary::GetNlf(void) const
272 {
273  if (in.Mass != 0)
274  return (in.vFw(3))/(in.Mass*slugtolb);
275  else
276  return 0.;
277 }
278 
279 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
280 
281 double FGAuxiliary::GetLongitudeRelativePosition(void) const
282 {
283  return in.vLocation.GetDistanceTo(FDMExec->GetIC()->GetLongitudeRadIC(),
284  in.vLocation.GetLatitude())* fttom;
285 }
286 
287 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
288 
289 double FGAuxiliary::GetLatitudeRelativePosition(void) const
290 {
291  return in.vLocation.GetDistanceTo(in.vLocation.GetLongitude(),
292  FDMExec->GetIC()->GetLatitudeRadIC())* fttom;
293 }
294 
295 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
296 
297 double FGAuxiliary::GetDistanceRelativePosition(void) const
298 {
299  FGInitialCondition *ic = FDMExec->GetIC();
300  return in.vLocation.GetDistanceTo(ic->GetLongitudeRadIC(),
301  ic->GetLatitudeRadIC())* fttom;
302 }
303 
304 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
305 
306 void FGAuxiliary::bind(void)
307 {
308  typedef double (FGAuxiliary::*PMF)(int) const;
309  typedef double (FGAuxiliary::*PF)(void) const;
310  PropertyManager->Tie("propulsion/tat-r", this, &FGAuxiliary::GetTotalTemperature);
311  PropertyManager->Tie("propulsion/tat-c", this, &FGAuxiliary::GetTAT_C);
312  PropertyManager->Tie("propulsion/pt-lbs_sqft", this, &FGAuxiliary::GetTotalPressure);
313  PropertyManager->Tie("velocities/vc-fps", this, &FGAuxiliary::GetVcalibratedFPS);
314  PropertyManager->Tie("velocities/vc-kts", this, &FGAuxiliary::GetVcalibratedKTS);
315  PropertyManager->Tie("velocities/ve-fps", this, &FGAuxiliary::GetVequivalentFPS);
316  PropertyManager->Tie("velocities/ve-kts", this, &FGAuxiliary::GetVequivalentKTS);
317  PropertyManager->Tie("velocities/vtrue-fps", this, &FGAuxiliary::GetVtrueFPS);
318  PropertyManager->Tie("velocities/vtrue-kts", this, &FGAuxiliary::GetVtrueKTS);
319  PropertyManager->Tie("velocities/machU", this, &FGAuxiliary::GetMachU);
320  PropertyManager->Tie("velocities/p-aero-rad_sec", this, eX, (PMF)&FGAuxiliary::GetAeroPQR);
321  PropertyManager->Tie("velocities/q-aero-rad_sec", this, eY, (PMF)&FGAuxiliary::GetAeroPQR);
322  PropertyManager->Tie("velocities/r-aero-rad_sec", this, eZ, (PMF)&FGAuxiliary::GetAeroPQR);
323  PropertyManager->Tie("velocities/phidot-rad_sec", this, ePhi, (PMF)&FGAuxiliary::GetEulerRates);
324  PropertyManager->Tie("velocities/thetadot-rad_sec", this, eTht, (PMF)&FGAuxiliary::GetEulerRates);
325  PropertyManager->Tie("velocities/psidot-rad_sec", this, ePsi, (PMF)&FGAuxiliary::GetEulerRates);
326  PropertyManager->Tie("velocities/u-aero-fps", this, eU, (PMF)&FGAuxiliary::GetAeroUVW);
327  PropertyManager->Tie("velocities/v-aero-fps", this, eV, (PMF)&FGAuxiliary::GetAeroUVW);
328  PropertyManager->Tie("velocities/w-aero-fps", this, eW, (PMF)&FGAuxiliary::GetAeroUVW);
329  PropertyManager->Tie("velocities/vt-fps", this, &FGAuxiliary::GetVt);
330  PropertyManager->Tie("velocities/mach", this, &FGAuxiliary::GetMach);
331  PropertyManager->Tie("velocities/vg-fps", this, &FGAuxiliary::GetVground);
332  PropertyManager->Tie("accelerations/a-pilot-x-ft_sec2", this, eX, (PMF)&FGAuxiliary::GetPilotAccel);
333  PropertyManager->Tie("accelerations/a-pilot-y-ft_sec2", this, eY, (PMF)&FGAuxiliary::GetPilotAccel);
334  PropertyManager->Tie("accelerations/a-pilot-z-ft_sec2", this, eZ, (PMF)&FGAuxiliary::GetPilotAccel);
335  PropertyManager->Tie("accelerations/n-pilot-x-norm", this, eX, (PMF)&FGAuxiliary::GetNpilot);
336  PropertyManager->Tie("accelerations/n-pilot-y-norm", this, eY, (PMF)&FGAuxiliary::GetNpilot);
337  PropertyManager->Tie("accelerations/n-pilot-z-norm", this, eZ, (PMF)&FGAuxiliary::GetNpilot);
338  PropertyManager->Tie("accelerations/Nx", this, &FGAuxiliary::GetNx);
339  PropertyManager->Tie("accelerations/Ny", this, &FGAuxiliary::GetNy);
340  PropertyManager->Tie("accelerations/Nz", this, &FGAuxiliary::GetNz);
341  PropertyManager->Tie("forces/load-factor", this, &FGAuxiliary::GetNlf);
342  PropertyManager->Tie("aero/alpha-rad", this, (PF)&FGAuxiliary::Getalpha);
343  PropertyManager->Tie("aero/beta-rad", this, (PF)&FGAuxiliary::Getbeta);
344  PropertyManager->Tie("aero/mag-beta-rad", this, (PF)&FGAuxiliary::GetMagBeta);
345  PropertyManager->Tie("aero/alpha-deg", this, inDegrees, (PMF)&FGAuxiliary::Getalpha);
346  PropertyManager->Tie("aero/beta-deg", this, inDegrees, (PMF)&FGAuxiliary::Getbeta);
347  PropertyManager->Tie("aero/mag-beta-deg", this, inDegrees, (PMF)&FGAuxiliary::GetMagBeta);
348  PropertyManager->Tie("aero/Re", this, &FGAuxiliary::GetReynoldsNumber);
349  PropertyManager->Tie("aero/qbar-psf", this, &FGAuxiliary::Getqbar);
350  PropertyManager->Tie("aero/qbarUW-psf", this, &FGAuxiliary::GetqbarUW);
351  PropertyManager->Tie("aero/qbarUV-psf", this, &FGAuxiliary::GetqbarUV);
352  PropertyManager->Tie("aero/alphadot-rad_sec", this, (PF)&FGAuxiliary::Getadot);
353  PropertyManager->Tie("aero/betadot-rad_sec", this, (PF)&FGAuxiliary::Getbdot);
354  PropertyManager->Tie("aero/alphadot-deg_sec", this, inDegrees, (PMF)&FGAuxiliary::Getadot);
355  PropertyManager->Tie("aero/betadot-deg_sec", this, inDegrees, (PMF)&FGAuxiliary::Getbdot);
356  PropertyManager->Tie("aero/h_b-cg-ft", this, &FGAuxiliary::GetHOverBCG);
357  PropertyManager->Tie("aero/h_b-mac-ft", this, &FGAuxiliary::GetHOverBMAC);
358  PropertyManager->Tie("flight-path/gamma-rad", this, &FGAuxiliary::GetGamma);
359  PropertyManager->Tie("flight-path/gamma-deg", this, inDegrees, (PMF)&FGAuxiliary::GetGamma);
360  PropertyManager->Tie("flight-path/psi-gt-rad", this, &FGAuxiliary::GetGroundTrack);
361 
362  PropertyManager->Tie("position/distance-from-start-lon-mt", this, &FGAuxiliary::GetLongitudeRelativePosition);
363  PropertyManager->Tie("position/distance-from-start-lat-mt", this, &FGAuxiliary::GetLatitudeRelativePosition);
364  PropertyManager->Tie("position/distance-from-start-mag-mt", this, &FGAuxiliary::GetDistanceRelativePosition);
365  PropertyManager->Tie("position/vrp-gc-latitude_deg", &vLocationVRP, &FGLocation::GetLatitudeDeg);
366  PropertyManager->Tie("position/vrp-longitude_deg", &vLocationVRP, &FGLocation::GetLongitudeDeg);
367  PropertyManager->Tie("position/vrp-radius-ft", &vLocationVRP, &FGLocation::GetRadius);
368 }
369 
370 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
371 
372 double FGAuxiliary::BadUnits(void) const
373 {
374  cerr << "Bad units" << endl; return 0.0;
375 }
376 
377 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
378 // The bitmasked value choices are as follows:
379 // unset: In this case (the default) JSBSim would only print
380 // out the normally expected messages, essentially echoing
381 // the config files as they are read. If the environment
382 // variable is not set, debug_lvl is set to 1 internally
383 // 0: This requests JSBSim not to output any messages
384 // whatsoever.
385 // 1: This value explicity requests the normal JSBSim
386 // startup messages
387 // 2: This value asks for a message to be printed out when
388 // a class is instantiated
389 // 4: When this value is set, a message is displayed when a
390 // FGModel object executes its Run() method
391 // 8: When this value is set, various runtime state variables
392 // are printed out periodically
393 // 16: When set various parameters are sanity checked and
394 // a message is printed out when they go out of bounds
395 
396 void FGAuxiliary::Debug(int from)
397 {
398  if (debug_lvl <= 0) return;
399 
400  if (debug_lvl & 1) { // Standard console startup message output
401  if (from == 0) { // Constructor
402 
403  }
404  }
405  if (debug_lvl & 2 ) { // Instantiation/Destruction notification
406  if (from == 0) cout << "Instantiated: FGAuxiliary" << endl;
407  if (from == 1) cout << "Destroyed: FGAuxiliary" << endl;
408  }
409  if (debug_lvl & 4 ) { // Run() method entry print for FGModel-derived objects
410  }
411  if (debug_lvl & 8 ) { // Runtime state variables
412  }
413  if (debug_lvl & 16) { // Sanity checking
414  if (Mach > 100 || Mach < 0.00)
415  cout << "FGPropagate::Mach is out of bounds: " << Mach << endl;
416  if (qbar > 1e6 || qbar < 0.00)
417  cout << "FGPropagate::qbar is out of bounds: " << qbar << endl;
418  }
419  if (debug_lvl & 64) {
420  if (from == 0) { // Constructor
421  }
422  }
423 }
424 
425 } // namespace JSBSim
JSBSim::FGFDMExec
Encapsulates the JSBSim simulation executive.
Definition: FGFDMExec.h:185
JSBSim::FGLocation::GetLongitudeDeg
double GetLongitudeDeg() const
Get the longitude.
Definition: FGLocation.h:240
JSBSim::FGLocation::LocalToLocation
FGLocation LocalToLocation(const FGColumnVector3 &lvec) const
Conversion from Local frame coordinates to a location in the earth centered and fixed frame.
Definition: FGLocation.h:326
JSBSim::FGLocation::GetLatitudeDeg
double GetLatitudeDeg() const
Get the GEOCENTRIC latitude in degrees.
Definition: FGLocation.h:267
JSBSim::FGColumnVector3
This class implements a 3 element column vector.
Definition: FGColumnVector3.h:63
JSBSim::FGAuxiliary::Run
bool Run(bool Holding) override
Runs the Auxiliary routines; called by the Executive Can pass in a value indicating if the executive ...
Definition: FGAuxiliary.cpp:134
JSBSim::FGModel
Base class for all scheduled JSBSim models.
Definition: FGModel.h:68
JSBSim::FGFDMExec::GetIC
FGInitialCondition * GetIC(void)
Returns a pointer to the FGInitialCondition object.
Definition: FGFDMExec.h:387
JSBSim::FGLocation::GetDistanceTo
double GetDistanceTo(double target_longitude, double target_latitude) const
Get the geodetic distance between the current location and a given location.
Definition: FGLocation.cpp:391
JSBSim::FGAuxiliary::FGAuxiliary
FGAuxiliary(FGFDMExec *Executive)
Constructor.
Definition: FGAuxiliary.cpp:60
JSBSim::FGLocation::GetLongitude
double GetLongitude() const
Get the longitude.
Definition: FGLocation.h:234
JSBSim::FGJSBBase::VcalibratedFromMach
static double VcalibratedFromMach(double mach, double p)
Calculate the calibrated airspeed from the Mach number.
Definition: FGJSBBase.cpp:289
JSBSim::FGAuxiliary::GetVequivalentFPS
double GetVequivalentFPS(void) const
Returns equivalent airspeed in feet/second.
Definition: FGAuxiliary.h:129
JSBSim::FGJSBBase::PitotTotalPressure
static double PitotTotalPressure(double mach, double p)
Compute the total pressure in front of the Pitot tube.
Definition: FGJSBBase.cpp:245
JSBSim::FGAuxiliary::GetVtrueFPS
double GetVtrueFPS() const
Returns the true airspeed in feet per second.
Definition: FGAuxiliary.h:133
JSBSim::FGAuxiliary::GetVt
double GetVt(void) const
Gets the magnitude of total vehicle velocity including wind effects in feet per second.
Definition: FGAuxiliary.h:204
JSBSim::FGAuxiliary::GetNx
double GetNx(void) const
The longitudinal acceleration in g's of the aircraft center of gravity.
Definition: FGAuxiliary.h:219
JSBSim::FGLocation::GetRadius
double GetRadius() const
Get the distance from the center of the earth in feet.
Definition: FGLocation.h:291
JSBSim::FGAuxiliary::GetVcalibratedKTS
double GetVcalibratedKTS(void) const
Returns Calibrated airspeed in knots.
Definition: FGAuxiliary.h:127
JSBSim::FGAuxiliary::~FGAuxiliary
~FGAuxiliary()
Destructor.
Definition: FGAuxiliary.cpp:127
JSBSim::FGAuxiliary::GetVground
double GetVground(void) const
Gets the ground speed in feet per second.
Definition: FGAuxiliary.h:210
JSBSim::FGLocation::GetLatitude
double GetLatitude() const
Get the GEOCENTRIC latitude in radians.
Definition: FGLocation.h:252
JSBSim::FGJSBBase::slugtolb
static constexpr double slugtolb
Note that definition of lbtoslug by the inverse of slugtolb and not to a different constant you can a...
Definition: FGJSBBase.h:366
JSBSim::FGMatrix33::Transposed
FGMatrix33 Transposed(void) const
Transposed matrix.
Definition: FGMatrix33.h:221
JSBSim::FGAuxiliary::GetNy
double GetNy(void) const
The lateral acceleration in g's of the aircraft center of gravity.
Definition: FGAuxiliary.h:222
JSBSim::FGAuxiliary::GetVcalibratedFPS
double GetVcalibratedFPS(void) const
Returns Calibrated airspeed in feet/second.
Definition: FGAuxiliary.h:125
JSBSim::FGAuxiliary::GetVtrueKTS
double GetVtrueKTS() const
Returns the true airspeed in knots.
Definition: FGAuxiliary.h:135
JSBSim::FGAuxiliary::GetMachU
double GetMachU(void) const
The mach number calculated using the vehicle X axis velocity.
Definition: FGAuxiliary.h:216
JSBSim::FGInitialCondition::GetLatitudeRadIC
double GetLatitudeRadIC(void) const
Gets the initial latitude.
Definition: FGInitialCondition.h:635
JSBSim::FGJSBBase::RankineToCelsius
static constexpr double RankineToCelsius(double rankine)
Converts from degrees Rankine to degrees Celsius.
Definition: FGJSBBase.h:209
JSBSim::FGAuxiliary::GetTotalPressure
double GetTotalPressure(void) const
Returns the total pressure.
Definition: FGAuxiliary.h:141
JSBSim::FGModel::Run
virtual bool Run(bool Holding)
Runs the model; called by the Executive.
Definition: FGModel.cpp:89
JSBSim::FGAuxiliary::GetMach
double GetMach(void) const
Gets the Mach number.
Definition: FGAuxiliary.h:213
JSBSim::FGAuxiliary::GetTotalTemperature
double GetTotalTemperature(void) const
Returns the total temperature.
Definition: FGAuxiliary.h:151
JSBSim::FGInitialCondition::GetLongitudeRadIC
double GetLongitudeRadIC(void) const
Gets the initial longitude.
Definition: FGInitialCondition.h:644
JSBSim::FGAuxiliary::GetVequivalentKTS
double GetVequivalentKTS(void) const
Returns equivalent airspeed in knots.
Definition: FGAuxiliary.h:131
JSBSim::FGAuxiliary::GetNz
double GetNz(void) const
The vertical acceleration in g's of the aircraft center of gravity.
Definition: FGAuxiliary.h:225
JSBSim::FGPropertyManager::Tie
void Tie(const std::string &name, T *pointer)
Tie a property to an external variable.
Definition: FGPropertyManager.h:449