1 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 Header: FGInitialCondition.h
7 ------------- Copyright (C) 1999 Anthony K. Peden (apeden@earthlink.net) -------------
9 This program is free software; you can redistribute it and/or modify it under
10 the terms of the GNU Lesser General Public License as published by the Free Software
11 Foundation; either version 2 of the License, or (at your option) any later
14 This program is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
19 You should have received a copy of the GNU Lesser General Public License along with
20 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21 Place - Suite 330, Boston, MA 02111-1307, USA.
23 Further information about the GNU Lesser General Public License can also be found on
24 the world wide web at http://www.gnu.org.
27 --------------------------------------------------------------------------------
30 FUNCTIONAL DESCRIPTION
31 --------------------------------------------------------------------------------
33 The purpose of this class is to take a set of initial conditions and provide
34 a kinematically consistent set of body axis velocity components, euler
35 angles, and altitude. This class does not attempt to trim the model i.e.
36 the sim will most likely start in a very dynamic state (unless, of course,
37 you have chosen your IC's wisely) even after setting it up with this class.
39 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
43 #ifndef FGINITIALCONDITION_H
44 #define FGINITIALCONDITION_H
46 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
48 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
50 #include <FGFDMExec.h>
51 #include <FGJSBBase.h>
52 #include <math/FGColumnVector3.h>
54 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
56 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
58 #define ID_INITIALCONDITION "$Id$"
60 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
62 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
66 typedef enum { setvt, setvc, setve, setmach, setuvw, setned, setvg } speedset;
67 typedef enum { setwned, setwmd, setwhc } windset;
69 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
71 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
73 /** Initializes the simulation run.
74 Takes a set of initial conditions (IC) and provide a kinematically consistent set
75 of body axis velocity components, euler angles, and altitude. This class
76 does not attempt to trim the model i.e. the sim will most likely start in a
77 very dynamic state (unless, of course, you have chosen your IC's wisely, or
78 started on the ground) even after setting it up with this class.
82 With a valid object of FGFDMExec and an aircraft model loaded:
85 FGInitialCondition fgic=new FGInitialCondition(FDMExec);
86 fgic->SetVcalibratedKtsIC()
87 fgic->SetAltitudeFtIC();
90 FDMExec->GetState()->Initialize(fgic)
94 //or to loop the sim w/o integrating
100 Since vc, ve, vt, and mach all represent speed, the remaining
101 three are recalculated each time one of them is set (using the
102 current altitude). The most recent speed set is remembered so
103 that if and when altitude is reset, the last set speed is used
104 to recalculate the remaining three. Setting any of the body
105 components forces a recalculation of vt and vt then becomes the
106 most recent speed set.
108 <h2>Alpha,Gamma, and Theta</h2>
110 This class assumes that it will be used to set up the sim for a
111 steady, zero pitch rate condition. Since any two of those angles
112 specifies the third gamma (flight path angle) is favored when setting
113 alpha and theta and alpha is favored when setting gamma. i.e.
115 - set alpha : recalculate theta using gamma as currently set
116 - set theta : recalculate alpha using gamma as currently set
117 - set gamma : recalculate theta using alpha as currently set
119 The idea being that gamma is most interesting to pilots (since it
120 is indicative of climb rate).
122 Setting climb rate is, for the purpose of this discussion,
123 considered equivalent to setting gamma.
125 These are the items that can be set in an initialization file:
127 - ubody (velocity, ft/sec)
128 - vbody (velocity, ft/sec)
129 - wbody (velocity, ft/sec)
130 - latitude (position, degrees)
131 - longitude (position, degrees)
132 - phi (orientation, degrees)
133 - theta (orientation, degrees)
134 - psi (orientation, degrees)
135 - alpha (angle, degrees)
136 - beta (angle, degrees)
137 - gamma (angle, degrees)
138 - roc (vertical velocity, ft/sec)
139 - altitude (altitude, ft)
140 - winddir (wind from-angle, degrees)
141 - vwind (magnitude wind speed, ft/sec)
142 - hwind (headwind speed, knots)
143 - xwind (crosswind speed, knots)
144 - vc (calibrated airspeed, ft/sec)
146 - vground (ground speed, ft/sec)
150 @property ic/vc-kts (read/write) Calibrated airspeed initial condition in knots
151 @property ic/ve-kts (read/write) Knots equivalent airspeed initial condition
152 @property ic/vg-kts (read/write) Ground speed initial condition in knots
153 @property ic/vt-kts (read/write) True airspeed initial condition in knots
154 @property ic/mach (read/write) Mach initial condition
155 @property ic/roc-fpm (read/write) Rate of climb initial condition in feet/minute
156 @property ic/gamma-deg (read/write) Flightpath angle initial condition in degrees
157 @property ic/alpha-deg (read/write) Angle of attack initial condition in degrees
158 @property ic/beta-deg (read/write) Angle of sideslip initial condition in degrees
159 @property ic/theta-deg (read/write) Pitch angle initial condition in degrees
160 @property ic/phi-deg (read/write) Roll angle initial condition in degrees
161 @property ic/psi-true-deg (read/write) Heading angle initial condition in degrees
162 @property ic/lat-gc-deg (read/write) Latitude initial condition in degrees
163 @property ic/long-gc-deg (read/write) Longitude initial condition in degrees
164 @property ic/h-sl-ft (read/write) Height above sea level initial condition in feet
165 @property ic/h-agl-ft (read/write) Height above ground level initial condition in feet
166 @property ic/sea-level-radius-ft (read/write) Radius of planet at sea level in feet
167 @property ic/terrain-altitude-ft (read/write) Terrain elevation above sea level in feet
168 @property ic/vg-fps (read/write) Ground speed initial condition in feet/second
169 @property ic/vt-fps (read/write) True airspeed initial condition in feet/second
170 @property ic/vw-bx-fps (read/write) Wind velocity initial condition in Body X frame in feet/second
171 @property ic/vw-by-fps (read/write) Wind velocity initial condition in Body Y frame in feet/second
172 @property ic/vw-bz-fps (read/write) Wind velocity initial condition in Body Z frame in feet/second
173 @property ic/vw-north-fps (read/write) Wind northward velocity initial condition in feet/second
174 @property ic/vw-east-fps (read/write) Wind eastward velocity initial condition in feet/second
175 @property ic/vw-down-fps (read/write) Wind downward velocity initial condition in feet/second
176 @property ic/vw-mag-fps (read/write) Wind velocity magnitude initial condition in feet/sec.
177 @property ic/vw-dir-deg (read/write) Wind direction initial condition, in degrees from north
178 @property ic/roc-fps (read/write) Rate of climb initial condition, in feet/second
179 @property ic/u-fps (read/write) Body frame x-axis velocity initial condition in feet/second
180 @property ic/v-fps (read/write) Body frame y-axis velocity initial condition in feet/second
181 @property ic/w-fps (read/write) Body frame z-axis velocity initial condition in feet/second
182 @property ic/gamma-rad (read/write) Flight path angle initial condition in radians
183 @property ic/alpha-rad (read/write) Angle of attack initial condition in radians
184 @property ic/theta-rad (read/write) Pitch angle initial condition in radians
185 @property ic/beta-rad (read/write) Angle of sideslip initial condition in radians
186 @property ic/phi-rad (read/write) Roll angle initial condition in radians
187 @property ic/psi-true-rad (read/write) Heading angle initial condition in radians
188 @property ic/lat-gc-rad (read/write) Geocentric latitude initial condition in radians
189 @property ic/long-gc-rad (read/write) Longitude initial condition in radians
190 @property ic/p-rad_sec (read/write) Roll rate initial condition in radians/second
191 @property ic/q-rad_sec (read/write) Pitch rate initial condition in radians/second
192 @property ic/r-rad_sec (read/write) Yaw rate initial condition in radians/second
198 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
200 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
202 class FGInitialCondition : public FGJSBBase
206 FGInitialCondition(FGFDMExec *fdmex);
208 ~FGInitialCondition();
210 /** Set calibrated airspeed initial condition in knots.
211 @param vc Calibrated airspeed in knots */
212 void SetVcalibratedKtsIC(double vc);
214 /** Set equivalent airspeed initial condition in knots.
215 @param ve Equivalent airspeed in knots */
216 void SetVequivalentKtsIC(double ve);
218 /** Set true airspeed initial condition in knots.
219 @param vt True airspeed in knots */
220 inline void SetVtrueKtsIC(double vt) { SetVtrueFpsIC(vt*ktstofps); }
222 /** Set ground speed initial condition in knots.
223 @param vg Ground speed in knots */
224 inline void SetVgroundKtsIC(double vg) { SetVgroundFpsIC(vg*ktstofps); }
226 /** Set mach initial condition.
227 @param mach Mach number */
228 void SetMachIC(double mach);
230 /** Sets angle of attack initial condition in degrees.
231 @param a Alpha in degrees */
232 inline void SetAlphaDegIC(double a) { SetAlphaRadIC(a*degtorad); }
234 /** Sets angle of sideslip initial condition in degrees.
235 @param B Beta in degrees */
236 inline void SetBetaDegIC(double B) { SetBetaRadIC(B*degtorad);}
238 /** Sets pitch angle initial condition in degrees.
239 @param theta Theta (pitch) angle in degrees */
240 inline void SetThetaDegIC(double theta) { SetThetaRadIC(theta*degtorad); }
242 /** Sets the roll angle initial condition in degrees.
243 @param phi roll angle in degrees */
244 inline void SetPhiDegIC(double phi) { SetPhiRadIC(phi*degtorad);}
246 /** Sets the heading angle initial condition in degrees.
247 @param psi Heading angle in degrees */
248 inline void SetPsiDegIC(double psi){ SetPsiRadIC(psi*degtorad); }
250 /** Sets the climb rate initial condition in feet/minute.
251 @param roc Rate of Climb in feet/minute */
252 void SetClimbRateFpmIC(double roc);
254 /** Sets the flight path angle initial condition in degrees.
255 @param gamma Flight path angle in degrees */
256 inline void SetFlightPathAngleDegIC(double gamma) { SetFlightPathAngleRadIC(gamma*degtorad); }
258 /** Sets the altitude initial condition in feet.
259 @param alt Altitude in feet */
260 void SetAltitudeFtIC(double alt);
262 /** Sets the initial Altitude above ground level.
263 @param agl Altitude above ground level in feet */
264 void SetAltitudeAGLFtIC(double agl);
266 /** Sets the initial sea level radius from planet center
267 @param sl_rad sea level radius in feet */
268 void SetSeaLevelRadiusFtIC(double sl_rad);
270 /** Sets the initial terrain elevation.
271 @param elev Initial terrain elevation in feet */
272 void SetTerrainAltitudeFtIC(double elev);
274 /** Sets the initial latitude.
275 @param lat Initial latitude in degrees */
276 inline void SetLatitudeDegIC(double lat) { latitude=lat*degtorad; }
278 /** Sets the initial longitude.
279 @param lon Initial longitude in degrees */
280 inline void SetLongitudeDegIC(double lon) { longitude=lon*degtorad; }
282 /** Gets the initial calibrated airspeed.
283 @return Initial calibrated airspeed in knots */
284 inline double GetVcalibratedKtsIC(void) const { return vc*fpstokts; }
286 /** Gets the initial equivalent airspeed.
287 @return Initial equivalent airspeed in knots */
288 inline double GetVequivalentKtsIC(void) const { return ve*fpstokts; }
290 /** Gets the initial ground speed.
291 @return Initial ground speed in knots */
292 inline double GetVgroundKtsIC(void) const { return vg*fpstokts; }
294 /** Gets the initial true velocity.
295 @return Initial true airspeed in knots. */
296 inline double GetVtrueKtsIC(void) const { return vt*fpstokts; }
298 /** Gets the initial mach.
299 @return Initial mach number */
300 inline double GetMachIC(void) const { return mach; }
302 /** Gets the initial climb rate.
303 @return Initial climb rate in feet/minute */
304 inline double GetClimbRateFpmIC(void) const { return hdot*60; }
306 /** Gets the initial flight path angle.
307 @return Initial flight path angle in degrees */
308 inline double GetFlightPathAngleDegIC(void)const { return gamma*radtodeg; }
310 /** Gets the initial angle of attack.
311 @return Initial alpha in degrees */
312 inline double GetAlphaDegIC(void) const { return alpha*radtodeg; }
314 /** Gets the initial sideslip angle.
315 @return Initial beta in degrees */
316 inline double GetBetaDegIC(void) const { return beta*radtodeg; }
318 /** Gets the initial pitch angle.
319 @return Initial pitch angle in degrees */
320 inline double GetThetaDegIC(void) const { return theta*radtodeg; }
322 /** Gets the initial roll angle.
323 @return Initial phi in degrees */
324 inline double GetPhiDegIC(void) const { return phi*radtodeg; }
326 /** Gets the initial heading angle.
327 @return Initial psi in degrees */
328 inline double GetPsiDegIC(void) const { return psi*radtodeg; }
330 /** Gets the initial latitude.
331 @return Initial geocentric latitude in degrees */
332 inline double GetLatitudeDegIC(void) const { return latitude*radtodeg; }
334 /** Gets the initial longitude.
335 @return Initial longitude in degrees */
336 inline double GetLongitudeDegIC(void) const { return longitude*radtodeg; }
338 /** Gets the initial altitude.
339 @return Initial altitude in feet. */
340 inline double GetAltitudeFtIC(void) const { return altitude; }
342 /** Gets the initial altitude above ground level.
343 @return Initial altitude AGL in feet */
344 inline double GetAltitudeAGLFtIC(void) const { return altitude - terrain_altitude; }
346 /** Gets the initial sea level radius.
347 @return Initial sea level radius */
348 inline double GetSeaLevelRadiusFtIC(void) const { return sea_level_radius; }
350 /** Gets the initial terrain elevation.
351 @return Initial terrain elevation in feet */
352 inline double GetTerrainAltitudeFtIC(void) const { return terrain_altitude; }
354 /** Sets the initial ground speed.
355 @param vg Initial ground speed in feet/second */
356 void SetVgroundFpsIC(double vg);
358 /** Sets the initial true airspeed.
359 @param vt Initial true airspeed in feet/second */
360 void SetVtrueFpsIC(double vt);
362 /** Sets the initial body axis X velocity.
363 @param ubody Initial X velocity in feet/second */
364 void SetUBodyFpsIC(double ubody);
366 /** Sets the initial body axis Y velocity.
367 @param vbody Initial Y velocity in feet/second */
368 void SetVBodyFpsIC(double vbody);
370 /** Sets the initial body axis Z velocity.
371 @param wbody Initial Z velocity in feet/second */
372 void SetWBodyFpsIC(double wbody);
374 /** Sets the initial local axis north velocity.
375 @param vn Initial north velocity in feet/second */
376 void SetVnorthFpsIC(double vn);
378 /** Sets the initial local axis east velocity.
379 @param ve Initial east velocity in feet/second */
380 void SetVeastFpsIC(double ve);
382 /** Sets the initial local axis down velocity.
383 @param vd Initial down velocity in feet/second */
384 void SetVdownFpsIC(double vd);
386 /** Sets the initial roll rate.
387 @param P Initial roll rate in radians/second */
388 void SetPRadpsIC(double P) { p = P; }
390 /** Sets the initial pitch rate.
391 @param Q Initial pitch rate in radians/second */
392 void SetQRadpsIC(double Q) { q = Q; }
394 /** Sets the initial yaw rate.
395 @param R initial yaw rate in radians/second */
396 void SetRRadpsIC(double R) { r = R; }
398 /** Sets the initial wind velocity.
399 @param wN Initial wind velocity in local north direction, feet/second
400 @param wE Initial wind velocity in local east direction, feet/second
401 @param wD Initial wind velocity in local down direction, feet/second */
402 void SetWindNEDFpsIC(double wN, double wE, double wD);
404 /** Sets the initial total wind speed.
405 @param mag Initial wind velocity magnitude in knots */
406 void SetWindMagKtsIC(double mag);
408 /** Sets the initial wind direction.
409 @param dir Initial direction wind is coming from in degrees */
410 void SetWindDirDegIC(double dir);
412 /** Sets the initial headwind velocity.
413 @param head Initial headwind speed in knots */
414 void SetHeadWindKtsIC(double head);
416 /** Sets the initial crosswind speed.
417 @param cross Initial crosswind speed, positive from left to right */
418 void SetCrossWindKtsIC(double cross);
420 /** Sets the initial wind downward speed.
421 @param wD Initial downward wind speed in knots*/
422 void SetWindDownKtsIC(double wD);
424 /** Sets the initial climb rate.
425 @param roc Initial Rate of climb in feet/second */
426 void SetClimbRateFpsIC(double roc);
428 /** Gets the initial ground velocity.
429 @return Initial ground velocity in feet/second */
430 inline double GetVgroundFpsIC(void) const { return vg; }
432 /** Gets the initial true velocity.
433 @return Initial true velocity in feet/second */
434 inline double GetVtrueFpsIC(void) const { return vt; }
436 /** Gets the initial body axis X wind velocity.
437 @return Initial body axis X wind velocity in feet/second */
438 inline double GetWindUFpsIC(void) const { return uw; }
440 /** Gets the initial body axis Y wind velocity.
441 @return Initial body axis Y wind velocity in feet/second */
442 inline double GetWindVFpsIC(void) const { return vw; }
444 /** Gets the initial body axis Z wind velocity.
445 @return Initial body axis Z wind velocity in feet/second */
446 inline double GetWindWFpsIC(void) const { return ww; }
448 /** Gets the initial wind velocity in local frame.
449 @return Initial wind velocity toward north in feet/second */
450 inline double GetWindNFpsIC(void) const { return wnorth; }
452 /** Gets the initial wind velocity in local frame.
453 @return Initial wind velocity eastwards in feet/second */
454 inline double GetWindEFpsIC(void) const { return weast; }
456 /** Gets the initial wind velocity in local frame.
457 @return Initial wind velocity downwards in feet/second */
458 inline double GetWindDFpsIC(void) const { return wdown; }
460 /** Gets the initial total wind velocity in feet/sec.
461 @return Initial wind velocity in feet/second */
462 inline double GetWindFpsIC(void) const { return sqrt(wnorth*wnorth + weast*weast); }
464 /** Gets the initial wind direction.
465 @return Initial wind direction in feet/second */
466 double GetWindDirDegIC(void) const;
468 /** Gets the initial climb rate.
469 @return Initial rate of climb in feet/second */
470 inline double GetClimbRateFpsIC(void) const { return hdot; }
472 /** Gets the initial body axis X velocity.
473 @return Initial body axis X velocity in feet/second. */
474 double GetUBodyFpsIC(void) const;
476 /** Gets the initial body axis Y velocity.
477 @return Initial body axis Y velocity in feet/second. */
478 double GetVBodyFpsIC(void) const;
480 /** Gets the initial body axis Z velocity.
481 @return Initial body axis Z velocity in feet/second. */
482 double GetWBodyFpsIC(void) const;
484 /** Gets the initial body axis roll rate.
485 @return Initial body axis roll rate in radians/second */
486 double GetPRadpsIC() const { return p; }
488 /** Gets the initial body axis pitch rate.
489 @return Initial body axis pitch rate in radians/second */
490 double GetQRadpsIC() const { return q; }
492 /** Gets the initial body axis yaw rate.
493 @return Initial body axis yaw rate in radians/second */
494 double GetRRadpsIC() const { return r; }
496 /** Sets the initial flight path angle.
497 @param gamma Initial flight path angle in radians */
498 void SetFlightPathAngleRadIC(double gamma);
500 /** Sets the initial angle of attack.
501 @param alpha Initial angle of attack in radians */
502 void SetAlphaRadIC(double alpha);
504 /** Sets the initial pitch angle.
505 @param theta Initial pitch angle in radians */
506 void SetThetaRadIC(double theta);
508 /** Sets the initial sideslip angle.
509 @param beta Initial angle of sideslip in radians. */
510 void SetBetaRadIC(double beta);
512 /** Sets the initial roll angle.
513 @param phi Initial roll angle in radians */
514 void SetPhiRadIC(double phi);
516 /** Sets the initial heading angle.
517 @param psi Initial heading angle in radians */
518 void SetPsiRadIC(double psi);
520 /** Sets the initial latitude.
521 @param lat Initial latitude in radians */
522 inline void SetLatitudeRadIC(double lat) { latitude=lat; }
524 /** Sets the initial longitude.
525 @param lon Initial longitude in radians */
526 inline void SetLongitudeRadIC(double lon) { longitude=lon; }
528 /** Gets the initial flight path angle.
529 @return Initial flight path angle in radians */
530 inline double GetFlightPathAngleRadIC(void) const { return gamma; }
532 /** Gets the initial angle of attack.
533 @return Initial alpha in radians */
534 inline double GetAlphaRadIC(void) const { return alpha; }
536 /** Gets the initial angle of sideslip.
537 @return Initial sideslip angle in radians */
538 inline double GetBetaRadIC(void) const { return beta; }
540 /** Gets the initial roll angle.
541 @return Initial roll angle in radians */
542 inline double GetPhiRadIC(void) const { return phi; }
544 /** Gets the initial latitude.
545 @return Initial latitude in radians */
546 inline double GetLatitudeRadIC(void) const { return latitude; }
548 /** Gets the initial longitude.
549 @return Initial longitude in radians */
550 inline double GetLongitudeRadIC(void) const { return longitude; }
552 /** Gets the initial pitch angle.
553 @return Initial pitch angle in radians */
554 inline double GetThetaRadIC(void) const { return theta; }
556 /** Gets the initial heading angle.
557 @return Initial heading angle in radians */
558 inline double GetPsiRadIC(void) const { return psi; }
560 /** Gets the initial speedset.
561 @return Initial speedset */
562 inline speedset GetSpeedSet(void) { return lastSpeedSet; }
564 /** Gets the initial windset.
565 @return Initial windset */
566 inline windset GetWindSet(void) { return lastWindSet; }
568 /** Loads the initial conditions.
569 @param rstname The name of an initial conditions file
570 @param useStoredPath true if the stored path to the IC file should be used
571 @return true if successful */
572 bool Load(string rstname, bool useStoredPath = true );
577 double altitude,hdot;
578 double latitude,longitude;
582 double vnorth,veast,vdown;
583 double wnorth,weast,wdown;
584 double whead, wcross, wdir, wmag;
585 double sea_level_radius;
586 double terrain_altitude;
587 double radius_to_vehicle;
589 double alpha, beta, theta, phi, psi, gamma;
590 double salpha,sbeta,stheta,sphi,spsi,sgamma;
591 double calpha,cbeta,ctheta,cphi,cpsi,cgamma;
593 double xlo, xhi,xmin,xmax;
595 typedef double (FGInitialCondition::*fp)(double x);
598 speedset lastSpeedSet;
602 FGPropertyManager *PropertyManager;
606 bool getMachFromVcas(double *Mach,double vcas);
608 double GammaEqOfTheta(double Theta);
609 double GammaEqOfAlpha(double Alpha);
610 double calcVcas(double Mach);
611 void calcUVWfromNED(void);
612 void calcWindUVW(void);
614 bool findInterval(double x,double guess);
615 bool solve(double *y, double x);
618 void Debug(int from);