#include <FGInitialCondition.h>
Inherits FGJSBBase, and FGXMLFileRead.
With a valid object of FGFDMExec and an aircraft model loaded:
FGInitialCondition fgic=new FGInitialCondition(FDMExec); fgic->SetVcalibratedKtsIC() fgic->SetAltitudeAGLFtIC(); // directly into Run FDMExec->GetState()->Initialize(fgic) delete fgic; FDMExec->Run() //or to loop the sim w/o integrating FDMExec->RunIC(fgic)
Since vc, ve, vt, and mach all represent speed, the remaining three are recalculated each time one of them is set (using the current altitude). The most recent speed set is remembered so that if and when altitude is reset, the last set speed is used to recalculate the remaining three. Setting any of the body components forces a recalculation of vt and vt then becomes the most recent speed set.
This class assumes that it will be used to set up the sim for a steady, zero pitch rate condition. Since any two of those angles specifies the third gamma (flight path angle) is favored when setting alpha and theta and alpha is favored when setting gamma. i.e.
The idea being that gamma is most interesting to pilots (since it is indicative of climb rate).
Setting climb rate is, for the purpose of this discussion, considered equivalent to setting gamma.
These are the items that can be set in an initialization file:
Definition at line 209 of file FGInitialCondition.h.
Public Member Functions | |
| FGInitialCondition (FGFDMExec *fdmex) | |
| Constructor. | |
| double | GetAlphaDegIC (void) const |
| Gets the initial angle of attack. | |
| double | GetAlphaRadIC (void) const |
| Gets the initial angle of attack. | |
| double | GetAltitudeAGLFtIC (void) const |
| Gets the initial altitude above ground level. | |
| double | GetAltitudeASLFtIC (void) const |
| Gets the initial altitude above sea level. | |
| double | GetBetaDegIC (void) const |
| Gets the initial sideslip angle. | |
| double | GetBetaRadIC (void) const |
| Gets the initial angle of sideslip. | |
| double | GetClimbRateFpmIC (void) const |
| Gets the initial climb rate. | |
| double | GetClimbRateFpsIC (void) const |
| Gets the initial climb rate. | |
| double | GetFlightPathAngleDegIC (void) const |
| Gets the initial flight path angle. | |
| double | GetFlightPathAngleRadIC (void) const |
| Gets the initial flight path angle. | |
| string | GetInitFile (void) |
| Get init-file name. | |
| double | GetLatitudeDegIC (void) const |
| Gets the initial latitude. | |
| double | GetLatitudeRadIC (void) const |
| Gets the initial latitude. | |
| double | GetLongitudeDegIC (void) const |
| Gets the initial longitude. | |
| double | GetLongitudeRadIC (void) const |
| Gets the initial longitude. | |
| double | GetMachIC (void) const |
| Gets the initial mach. | |
| double | GetPhiDegIC (void) const |
| Gets the initial roll angle. | |
| double | GetPhiRadIC (void) const |
| Gets the initial roll angle. | |
| double | GetPRadpsIC () const |
| Gets the initial body axis roll rate. | |
| double | GetPsiDegIC (void) const |
| Gets the initial heading angle. | |
| double | GetPsiRadIC (void) const |
| Gets the initial heading angle. | |
| double | GetQRadpsIC () const |
| Gets the initial body axis pitch rate. | |
| double | GetRRadpsIC () const |
| Gets the initial body axis yaw rate. | |
| double | GetSeaLevelRadiusFtIC (void) const |
| Gets the initial sea level radius. | |
| speedset | GetSpeedSet (void) |
| Gets the initial speedset. | |
| double | GetTargetNlfIC (void) |
| Gets the target normal load factor set from IC. | |
| double | GetTerrainElevationFtIC (void) const |
| Gets the initial terrain elevation. | |
| double | GetThetaDegIC (void) const |
| Gets the initial pitch angle. | |
| double | GetThetaRadIC (void) const |
| Gets the initial pitch angle. | |
| double | GetUBodyFpsIC (void) const |
| Gets the initial body axis X velocity. | |
| double | GetVBodyFpsIC (void) const |
| Gets the initial body axis Y velocity. | |
| double | GetVcalibratedKtsIC (void) const |
| Gets the initial calibrated airspeed. | |
| double | GetVDownFpsIC (void) const |
| Gets the initial local frame Z (Down) velocity. | |
| double | GetVEastFpsIC (void) const |
| Gets the initial local frame Y (East) velocity. | |
| double | GetVequivalentKtsIC (void) const |
| Gets the initial equivalent airspeed. | |
| double | GetVgroundFpsIC (void) const |
| Gets the initial ground velocity. | |
| double | GetVgroundKtsIC (void) const |
| Gets the initial ground speed. | |
| double | GetVNorthFpsIC (void) const |
| Gets the initial local frame X (North) velocity. | |
| double | GetVtrueFpsIC (void) const |
| Gets the initial true velocity. | |
| double | GetVtrueKtsIC (void) const |
| Gets the initial true velocity. | |
| double | GetWBodyFpsIC (void) const |
| Gets the initial body axis Z velocity. | |
| double | GetWindDFpsIC (void) const |
| Gets the initial wind velocity in local frame. | |
| double | GetWindDirDegIC (void) const |
| Gets the initial wind direction. | |
| double | GetWindEFpsIC (void) const |
| Gets the initial wind velocity in local frame. | |
| double | GetWindFpsIC (void) const |
| Gets the initial total wind velocity in feet/sec. | |
| double | GetWindNFpsIC (void) const |
| Gets the initial wind velocity in local frame. | |
| windset | GetWindSet (void) |
| Gets the initial windset. | |
| double | GetWindUFpsIC (void) const |
| Gets the initial body axis X wind velocity. | |
| double | GetWindVFpsIC (void) const |
| Gets the initial body axis Y wind velocity. | |
| double | GetWindWFpsIC (void) const |
| Gets the initial body axis Z wind velocity. | |
| bool | Load (string rstname, bool useStoredPath=true) |
| Loads the initial conditions. | |
| void | ResetIC (double u0, double v0, double w0, double p0, double q0, double r0, double alpha0, double beta0, double phi0, double theta0, double psi0, double latitudeRad0, double longitudeRad0, double altitudeAGL0, double gamma0) |
| Resets the IC data structure to new values. | |
| void | SetAlphaDegIC (double a) |
| Sets angle of attack initial condition in degrees. | |
| void | SetAlphaRadIC (double alpha) |
| Sets the initial angle of attack. | |
| void | SetAltitudeAGLFtIC (double agl) |
| Sets the initial Altitude above ground level. | |
| void | SetAltitudeASLFtIC (double altitudeASL) |
| Sets the altitude above sea level initial condition in feet. | |
| void | SetBetaDegIC (double B) |
| Sets angle of sideslip initial condition in degrees. | |
| void | SetBetaRadIC (double beta) |
| Sets the initial sideslip angle. | |
| void | SetClimbRateFpmIC (double roc) |
| Sets the climb rate initial condition in feet/minute. | |
| void | SetClimbRateFpsIC (double roc) |
| Sets the initial climb rate. | |
| void | SetCrossWindKtsIC (double cross) |
| Sets the initial crosswind speed. | |
| void | SetFlightPathAngleDegIC (double gamma) |
| Sets the flight path angle initial condition in degrees. | |
| void | SetFlightPathAngleRadIC (double gamma) |
| Sets the initial flight path angle. | |
| void | SetHeadWindKtsIC (double head) |
| Sets the initial headwind velocity. | |
| void | SetInitFile (string f) |
| Set init-file name. | |
| void | SetLatitudeDegIC (double lat) |
| Sets the initial latitude. | |
| void | SetLatitudeRadIC (double lat) |
| Sets the initial latitude. | |
| void | SetLongitudeDegIC (double lon) |
| Sets the initial longitude. | |
| void | SetLongitudeRadIC (double lon) |
| Sets the initial longitude. | |
| void | SetMachIC (double mach) |
| Set mach initial condition. | |
| void | SetPhiDegIC (double phi) |
| Sets the roll angle initial condition in degrees. | |
| void | SetPhiRadIC (double phi) |
| Sets the initial roll angle. | |
| void | SetPRadpsIC (double P) |
| Sets the initial roll rate. | |
| void | SetPsiDegIC (double psi) |
| Sets the heading angle initial condition in degrees. | |
| void | SetPsiRadIC (double psi) |
| Sets the initial heading angle. | |
| void | SetQRadpsIC (double Q) |
| Sets the initial pitch rate. | |
| void | SetRRadpsIC (double R) |
| Sets the initial yaw rate. | |
| void | SetSeaLevelRadiusFtIC (double sl_rad) |
| Sets the initial sea level radius from planet center. | |
| void | SetTargetNlfIC (double nlf) |
| Sets the target normal load factor. | |
| void | SetTerrainElevationFtIC (double elev) |
| Sets the initial terrain elevation. | |
| void | SetThetaDegIC (double theta) |
| Sets pitch angle initial condition in degrees. | |
| void | SetThetaRadIC (double theta) |
| Sets the initial pitch angle. | |
| void | SetUBodyFpsIC (double ubody) |
| Sets the initial body axis X velocity. | |
| void | SetVBodyFpsIC (double vbody) |
| Sets the initial body axis Y velocity. | |
| void | SetVcalibratedKtsIC (double vc) |
| Set calibrated airspeed initial condition in knots. | |
| void | SetVDownFpsIC (double vd) |
| Sets the initial local axis down velocity. | |
| void | SetVEastFpsIC (double ve) |
| Sets the initial local axis east velocity. | |
| void | SetVequivalentKtsIC (double ve) |
| Set equivalent airspeed initial condition in knots. | |
| void | SetVgroundFpsIC (double vg) |
| Sets the initial ground speed. | |
| void | SetVgroundKtsIC (double vg) |
| Set ground speed initial condition in knots. | |
| void | SetVNorthFpsIC (double vn) |
| Sets the initial local axis north velocity. | |
| void | SetVtrueFpsIC (double vt) |
| Sets the initial true airspeed. | |
| void | SetVtrueKtsIC (double vt) |
| Set true airspeed initial condition in knots. | |
| void | SetWBodyFpsIC (double wbody) |
| Sets the initial body axis Z velocity. | |
| void | SetWindDirDegIC (double dir) |
| Sets the initial wind direction. | |
| void | SetWindDownKtsIC (double wD) |
| Sets the initial wind downward speed. | |
| void | SetWindMagKtsIC (double mag) |
| Sets the initial total wind speed. | |
| void | SetWindNEDFpsIC (double wN, double wE, double wD) |
| Sets the initial wind velocity. | |
| void | WriteStateFile (int num) |
| ~FGInitialCondition () | |
| Destructor. | |
| double GetAlphaDegIC | ( | void | ) | const [inline] |
| double GetAlphaRadIC | ( | void | ) | const [inline] |
| double GetAltitudeAGLFtIC | ( | void | ) | const [inline] |
| double GetAltitudeASLFtIC | ( | void | ) | const [inline] |
| double GetBetaDegIC | ( | void | ) | const [inline] |
| double GetBetaRadIC | ( | void | ) | const [inline] |
| double GetClimbRateFpmIC | ( | void | ) | const [inline] |
| double GetClimbRateFpsIC | ( | void | ) | const [inline] |
| double GetFlightPathAngleDegIC | ( | void | ) | const [inline] |
| double GetFlightPathAngleRadIC | ( | void | ) | const [inline] |
| double GetLatitudeDegIC | ( | void | ) | const [inline] |
| double GetLatitudeRadIC | ( | void | ) | const [inline] |
| double GetLongitudeDegIC | ( | void | ) | const [inline] |
| double GetLongitudeRadIC | ( | void | ) | const [inline] |
| double GetMachIC | ( | void | ) | const [inline] |
| double GetPhiDegIC | ( | void | ) | const [inline] |
| double GetPhiRadIC | ( | void | ) | const [inline] |
| double GetPRadpsIC | ( | ) | const [inline] |
Definition at line 512 of file FGInitialCondition.h.
| double GetPsiDegIC | ( | void | ) | const [inline] |
| double GetPsiRadIC | ( | void | ) | const [inline] |
| double GetQRadpsIC | ( | ) | const [inline] |
Definition at line 516 of file FGInitialCondition.h.
| double GetRRadpsIC | ( | ) | const [inline] |
Definition at line 520 of file FGInitialCondition.h.
| double GetSeaLevelRadiusFtIC | ( | void | ) | const [inline] |
| speedset GetSpeedSet | ( | void | ) | [inline] |
| double GetTargetNlfIC | ( | void | ) | [inline] |
| double GetTerrainElevationFtIC | ( | void | ) | const [inline] |
| double GetThetaDegIC | ( | void | ) | const [inline] |
| double GetThetaRadIC | ( | void | ) | const [inline] |
| double GetUBodyFpsIC | ( | void | ) | const |
Definition at line 414 of file FGInitialCondition.cpp.
| double GetVBodyFpsIC | ( | void | ) | const |
Definition at line 423 of file FGInitialCondition.cpp.
| double GetVcalibratedKtsIC | ( | void | ) | const [inline] |
| double GetVDownFpsIC | ( | void | ) | const [inline] |
Definition at line 508 of file FGInitialCondition.h.
| double GetVEastFpsIC | ( | void | ) | const [inline] |
Definition at line 504 of file FGInitialCondition.h.
| double GetVequivalentKtsIC | ( | void | ) | const [inline] |
| double GetVgroundFpsIC | ( | void | ) | const [inline] |
| double GetVgroundKtsIC | ( | void | ) | const [inline] |
| double GetVNorthFpsIC | ( | void | ) | const [inline] |
Definition at line 500 of file FGInitialCondition.h.
| double GetVtrueFpsIC | ( | void | ) | const [inline] |
| double GetVtrueKtsIC | ( | void | ) | const [inline] |
| double GetWBodyFpsIC | ( | void | ) | const |
Definition at line 433 of file FGInitialCondition.cpp.
| double GetWindDFpsIC | ( | void | ) | const [inline] |
Definition at line 472 of file FGInitialCondition.h.
| double GetWindDirDegIC | ( | void | ) | const |
Definition at line 827 of file FGInitialCondition.cpp.
| double GetWindEFpsIC | ( | void | ) | const [inline] |
Definition at line 468 of file FGInitialCondition.h.
| double GetWindFpsIC | ( | void | ) | const [inline] |
| double GetWindNFpsIC | ( | void | ) | const [inline] |
Definition at line 464 of file FGInitialCondition.h.
| windset GetWindSet | ( | void | ) | [inline] |
| double GetWindUFpsIC | ( | void | ) | const [inline] |
Definition at line 452 of file FGInitialCondition.h.
| double GetWindVFpsIC | ( | void | ) | const [inline] |
Definition at line 456 of file FGInitialCondition.h.
| double GetWindWFpsIC | ( | void | ) | const [inline] |
Definition at line 460 of file FGInitialCondition.h.
| bool Load | ( | string | rstname, | |
| bool | useStoredPath = true | |||
| ) |
| rstname | The name of an initial conditions file | |
| useStoredPath | true if the stored path to the IC file should be used |
Definition at line 838 of file FGInitialCondition.cpp.
| void ResetIC | ( | double | u0, | |
| double | v0, | |||
| double | w0, | |||
| double | p0, | |||
| double | q0, | |||
| double | r0, | |||
| double | alpha0, | |||
| double | beta0, | |||
| double | phi0, | |||
| double | theta0, | |||
| double | psi0, | |||
| double | latitudeRad0, | |||
| double | longitudeRad0, | |||
| double | altitudeAGL0, | |||
| double | gamma0 | |||
| ) |
| void SetAlphaDegIC | ( | double | a | ) | [inline] |
| void SetAlphaRadIC | ( | double | alpha | ) |
| alpha | Initial angle of attack in radians |
Definition at line 290 of file FGInitialCondition.cpp.
| void SetAltitudeAGLFtIC | ( | double | agl | ) |
| agl | Altitude above ground level in feet |
Definition at line 571 of file FGInitialCondition.cpp.
| void SetAltitudeASLFtIC | ( | double | altitudeASL | ) |
| altitudeASL | Altitude above sea level in feet |
Definition at line 541 of file FGInitialCondition.cpp.
| void SetBetaDegIC | ( | double | B | ) | [inline] |
| void SetBetaRadIC | ( | double | beta | ) |
| beta | Initial angle of sideslip in radians. |
Definition at line 306 of file FGInitialCondition.cpp.
| void SetClimbRateFpmIC | ( | double | roc | ) |
| void SetClimbRateFpsIC | ( | double | roc | ) |
| roc | Initial Rate of climb in feet/second |
Definition at line 270 of file FGInitialCondition.cpp.
| void SetCrossWindKtsIC | ( | double | cross | ) |
| cross | Initial crosswind speed, positive from left to right |
Definition at line 452 of file FGInitialCondition.cpp.
| void SetFlightPathAngleDegIC | ( | double | gamma | ) | [inline] |
| void SetFlightPathAngleRadIC | ( | double | gamma | ) |
| gamma | Initial flight path angle in radians |
Definition at line 281 of file FGInitialCondition.cpp.
| void SetHeadWindKtsIC | ( | double | head | ) |
| head | Initial headwind speed in knots |
Definition at line 464 of file FGInitialCondition.cpp.
| void SetLatitudeDegIC | ( | double | lat | ) | [inline] |
| void SetLatitudeRadIC | ( | double | lat | ) | [inline] |
| void SetLongitudeDegIC | ( | double | lon | ) | [inline] |
| void SetLongitudeRadIC | ( | double | lon | ) | [inline] |
| void SetMachIC | ( | double | mach | ) |
| void SetPhiDegIC | ( | double | phi | ) | [inline] |
| void SetPhiRadIC | ( | double | phi | ) |
| phi | Initial roll angle in radians |
Definition at line 315 of file FGInitialCondition.cpp.
| void SetPRadpsIC | ( | double | P | ) | [inline] |
| P | Initial roll rate in radians/second |
Definition at line 402 of file FGInitialCondition.h.
| void SetPsiDegIC | ( | double | psi | ) | [inline] |
| void SetPsiRadIC | ( | double | psi | ) |
| psi | Initial heading angle in radians |
Definition at line 323 of file FGInitialCondition.cpp.
| void SetQRadpsIC | ( | double | Q | ) | [inline] |
| Q | Initial pitch rate in radians/second |
Definition at line 406 of file FGInitialCondition.h.
| void SetRRadpsIC | ( | double | R | ) | [inline] |
| R | initial yaw rate in radians/second |
Definition at line 410 of file FGInitialCondition.h.
| void SetSeaLevelRadiusFtIC | ( | double | sl_rad | ) |
| void SetTargetNlfIC | ( | double | nlf | ) | [inline] |
| void SetTerrainElevationFtIC | ( | double | elev | ) |
| elev | Initial terrain elevation in feet |
Definition at line 585 of file FGInitialCondition.cpp.
| void SetThetaDegIC | ( | double | theta | ) | [inline] |
| theta | Theta (pitch) angle in degrees |
Definition at line 247 of file FGInitialCondition.h.
| void SetThetaRadIC | ( | double | theta | ) |
| theta | Initial pitch angle in radians |
Definition at line 298 of file FGInitialCondition.cpp.
| void SetUBodyFpsIC | ( | double | ubody | ) |
| ubody | Initial X velocity in feet/second |
Definition at line 331 of file FGInitialCondition.cpp.
| void SetVBodyFpsIC | ( | double | vbody | ) |
| vbody | Initial Y velocity in feet/second |
Definition at line 339 of file FGInitialCondition.cpp.
| void SetVcalibratedKtsIC | ( | double | vc | ) |
| void SetVDownFpsIC | ( | double | vd | ) |
| vd | Initial down velocity in feet/second |
Definition at line 394 of file FGInitialCondition.cpp.
| void SetVEastFpsIC | ( | double | ve | ) |
| ve | Initial east velocity in feet/second |
Definition at line 375 of file FGInitialCondition.cpp.
| void SetVequivalentKtsIC | ( | double | ve | ) |
| void SetVgroundFpsIC | ( | double | vg | ) |
| vg | Initial ground speed in feet/second |
Definition at line 222 of file FGInitialCondition.cpp.
| void SetVgroundKtsIC | ( | double | vg | ) | [inline] |
| void SetVNorthFpsIC | ( | double | vn | ) |
| vn | Initial north velocity in feet/second |
Definition at line 356 of file FGInitialCondition.cpp.
| void SetVtrueFpsIC | ( | double | vt | ) |
| vt | Initial true airspeed in feet/second |
Definition at line 243 of file FGInitialCondition.cpp.
| void SetVtrueKtsIC | ( | double | vt | ) | [inline] |
| void SetWBodyFpsIC | ( | double | wbody | ) |
| wbody | Initial Z velocity in feet/second |
Definition at line 347 of file FGInitialCondition.cpp.
| void SetWindDirDegIC | ( | double | dir | ) |
| dir | Initial direction wind is coming from in degrees |
Definition at line 494 of file FGInitialCondition.cpp.
| void SetWindDownKtsIC | ( | double | wD | ) |
| wD | Initial downward wind speed in knots |
Definition at line 475 of file FGInitialCondition.cpp.
| void SetWindMagKtsIC | ( | double | mag | ) |
| mag | Initial wind velocity magnitude in knots |
Definition at line 484 of file FGInitialCondition.cpp.
| void SetWindNEDFpsIC | ( | double | wN, | |
| double | wE, | |||
| double | wD | |||
| ) |
| wN | Initial wind velocity in local north direction, feet/second | |
| wE | Initial wind velocity in local east direction, feet/second | |
| wD | Initial wind velocity in local down direction, feet/second |
Definition at line 442 of file FGInitialCondition.cpp.
1.5.5