43 #ifndef FGINITIALCONDITION_H 44 #define FGINITIALCONDITION_H 50 #include "math/FGLocation.h" 51 #include "math/FGQuaternion.h" 52 #include "simgear/misc/sg_path.hxx" 58 #define ID_INITIALCONDITION "$Id: FGInitialCondition.h,v 1.48 2017/02/25 14:23:18 bcoconni Exp $" 68 class FGColumnVector3;
71 class FGPropertyManager;
74 typedef enum { setvt, setvc, setve, setmach, setuvw, setned, setvg } speedset;
75 typedef enum { setasl, setagl } altitudeset;
76 typedef enum { setgeoc, setgeod } latitudeset;
273 void ResetIC(
double u0,
double v0,
double w0,
double p0,
double q0,
double r0,
274 double alpha0,
double beta0,
double phi0,
double theta0,
double psi0,
275 double latitudeRad0,
double longitudeRad0,
double altitudeAGL0,
500 return _vt_NED - vUVW_NED;
536 return Tl2b * vUVW_NED;
681 bool Load(
const SGPath& rstname,
bool useStoredPath =
true );
686 bool IsEngineRunning(
unsigned int n)
const {
return (enginesRunning & (1 << n)) != 0; }
690 bool NeedTrim(
void)
const {
return needTrim == 0 ? false :
true; }
707 speedset lastSpeedSet;
708 altitudeset lastAltitudeSet;
709 latitudeset lastLatitudeSet;
710 unsigned int enginesRunning;
717 bool Load_v1(
Element* document);
718 bool Load_v2(
Element* document);
720 void InitializeIC(
void);
721 void SetEulerAngleRadIC(
int idx,
double angle);
722 void SetBodyVelFpsIC(
int idx,
double vel);
723 void SetNEDVelFpsIC(
int idx,
double vel);
724 double GetBodyWindFpsIC(
int idx)
const;
725 double GetNEDWindFpsIC(
int idx)
const;
726 double GetBodyVelFpsIC(
int idx)
const;
729 double ComputeGeodAltitude(
double geodLatitude);
730 bool LoadLatitude(
Element* position_el);
731 void Debug(
int from);
Encapsulates an Aircraft and its systems.
double GetAlphaDegIC(void) const
Gets the initial angle of attack.
double GetLatitudeRadIC(void) const
Gets the initial latitude.
void SetThetaDegIC(double theta)
Sets pitch angle initial condition in degrees.
void SetThetaRadIC(double theta)
Sets the initial pitch angle.
void SetVEastFpsIC(double ve)
Sets the initial local axis east velocity.
double GetThetaDegIC(void) const
Gets the initial pitch angle.
Models the Quaternion representation of rotations.
double GetGeodLatitudeRadIC(void) const
Gets the initial geodetic latitude.
double GetVgroundFpsIC(void) const
Gets the initial ground velocity.
double GetBetaRadIC(void) const
Gets the initial angle of sideslip.
double GetVtrueFpsIC(void) const
Gets the initial true velocity.
double GetFlightPathAngleRadIC(void) const
Gets the initial flight path angle.
FGInitialCondition(FGFDMExec *fdmex)
Constructor.
double GetVDownFpsIC(void) const
Gets the initial local frame Z (Down) velocity.
void SetVtrueFpsIC(double vt)
Sets the initial true airspeed.
const FGMatrix33 & GetT(void) const
Transformation matrix.
void SetLatitudeRadIC(double lat)
Sets the initial latitude.
double GetLongitudeDegIC(void) const
Gets the initial longitude.
double GetVtrueKtsIC(void) const
Gets the initial true velocity.
void SetVNorthFpsIC(double vn)
Sets the initial local axis north velocity.
double GetBetaDegIC(void) const
Gets the initial sideslip angle.
double GetEulerDeg(int i) const
Retrieves the Euler angles.
double GetRRadpsIC() const
Gets the initial body axis yaw rate.
void SetSeaLevelRadiusFtIC(double slr)
Sets the initial sea level radius from planet center.
double GetAltitudeASL(void) const
Get the altitude above sea level.
~FGInitialCondition()
Destructor.
double GetTerrainElevationFtIC(void) const
Gets the initial terrain elevation.
const FGColumnVector3 GetPQRRadpsIC(void) const
Gets the initial body rotation rate.
double GetVequivalentKtsIC(void) const
Gets the initial equivalent airspeed.
double GetAltitudeAGLFtIC(void) const
Gets the initial altitude above ground level.
void SetPhiRadIC(double phi)
Sets the initial roll angle.
void SetBetaDegIC(double b)
Sets angle of sideslip initial condition in degrees.
double GetGeodLatitudeDeg(void) const
Get the geodetic latitude in degrees.
double GetPhiRadIC(void) const
Gets the initial roll angle.
double GetUBodyFpsIC(void) const
Gets the initial body axis X velocity.
double GetVgroundKtsIC(void) const
Gets the initial ground speed.
double GetLatitude() const
Get the latitude.
void SetClimbRateFpsIC(double roc)
Sets the initial climb rate.
const FGMatrix33 & GetTInv(void) const
Backward transformation matrix.
FGLocation holds an arbitrary location in the Earth centered Earth fixed reference frame (ECEF)...
void SetClimbRateFpmIC(double roc)
Sets the climb rate initial condition in feet/minute.
void SetWindDownKtsIC(double wD)
Sets the initial wind downward speed.
double GetQRadpsIC() const
Gets the initial body axis pitch rate.
double GetVBodyFpsIC(void) const
Gets the initial body axis Y velocity.
void SetQRadpsIC(double Q)
Sets the initial body axis pitch rate.
void SetFlightPathAngleDegIC(double gamma)
Sets the flight path angle initial condition in degrees.
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 SetUBodyFpsIC(double ubody)
Sets the initial body axis X velocity.
void SetWindDirDegIC(double dir)
Sets the initial wind direction.
void SetVequivalentKtsIC(double ve)
Set equivalent airspeed initial condition in knots.
void SetGeodLatitudeRadIC(double glat)
Sets the initial geodetic latitude.
void SetWindNEDFpsIC(double wN, double wE, double wD)
Sets the initial wind velocity.
double GetLongitudeRadIC(void) const
Gets the initial longitude.
void SetTerrainElevationFtIC(double elev)
Sets the initial terrain elevation.
const FGColumnVector3 GetUVWFpsIC(void) const
Gets the initial body velocity.
void SetFlightPathAngleRadIC(double gamma)
Sets the initial flight path angle.
void SetGeodLatitudeDegIC(double glat)
Sets the initial geodetic latitude.
double GetWindNFpsIC(void) const
Gets the initial wind velocity in local frame.
double GetPRadpsIC() const
Gets the initial body axis roll rate.
void SetWindMagKtsIC(double mag)
Sets the initial total wind speed.
double GetVcalibratedKtsIC(void) const
Gets the initial calibrated airspeed.
void SetHeadWindKtsIC(double head)
Sets the initial headwind velocity.
double GetLongitude() const
Get the longitude.
speedset GetSpeedSet(void) const
Gets the initial speedset.
void SetRRadpsIC(double R)
Sets the initial body axis yaw rate.
double GetWindDirDegIC(void) const
Gets the initial wind direction.
void SetVgroundFpsIC(double vg)
Sets the initial ground speed.
bool NeedTrim(void) const
Does initialization file call for trim ?
double GetTargetNlfIC(void) const
Gets the target normal load factor set from IC.
void SetLatitudeDegIC(double lat)
Sets the initial latitude.
double GetFlightPathAngleDegIC(void) const
Gets the initial flight path angle.
double GetGeodLatitudeDegIC(void) const
Gets the initial geodetic latitude.
void SetVBodyFpsIC(double vbody)
Sets the initial body axis Y velocity.
double GetPsiDegIC(void) const
Gets the initial heading angle.
void SetVgroundKtsIC(double vg)
Set ground speed initial condition in knots.
void SetTargetNlfIC(double nlf)
Sets the target normal load factor.
double GetWindEFpsIC(void) const
Gets the initial wind velocity in local frame.
double GetPsiRadIC(void) const
Gets the initial heading angle.
void SetVcalibratedKtsIC(double vc)
Set calibrated airspeed initial condition in knots.
void SetVtrueKtsIC(double vtrue)
Set true airspeed initial condition in knots.
double GetVEastFpsIC(void) const
Gets the initial local frame Y (East) velocity.
double GetWindUFpsIC(void) const
Gets the initial body axis X wind velocity.
void SetLongitudeDegIC(double lon)
Sets the initial longitude.
bool Load(const SGPath &rstname, bool useStoredPath=true)
Loads the initial conditions.
double GetPhiDegIC(void) const
Gets the initial roll angle.
const FGQuaternion & GetOrientation(void) const
Gets the initial orientation.
void SetAltitudeAGLFtIC(double agl)
Sets the initial Altitude above ground level.
void SetPhiDegIC(double phi)
Sets the roll angle initial condition in degrees.
Models an empty, abstract base atmosphere class.
This class implements a 3 element column vector.
void SetAlphaDegIC(double a)
Sets angle of attack initial condition in degrees.
void SetVDownFpsIC(double vd)
Sets the initial local axis down velocity.
void SetCrossWindKtsIC(double cross)
Sets the initial crosswind speed.
Initializes the simulation run.
double GetGeodLatitudeRad(void) const
Get the geodetic latitude.
double GetLongitudeDeg() const
Get the longitude.
double GetWindDFpsIC(void) const
Gets the initial wind velocity in local frame.
void SetAlphaRadIC(double alpha)
Sets the initial angle of attack.
const FGColumnVector3 GetWindNEDFpsIC(void) const
Gets the initial wind velocity in the NED local frame.
void SetPsiDegIC(double psi)
Sets the heading angle initial condition in degrees.
double GetVNorthFpsIC(void) const
Gets the initial local frame X (North) velocity.
double GetAlphaRadIC(void) const
Gets the initial angle of attack.
double GetLatitudeDegIC(void) const
Gets the initial latitude.
Handles matrix math operations.
double GetWindVFpsIC(void) const
Gets the initial body axis Y wind velocity.
bool IsEngineRunning(unsigned int n) const
Is an engine running ?
double Magnitude(void) const
Length of the vector.
double GetLatitudeDeg() const
Get the latitude.
const FGColumnVector3 & GetEuler(void) const
Retrieves the Euler angles.
double GetWindWFpsIC(void) const
Gets the initial body axis Z wind velocity.
double GetMachIC(void) const
Gets the initial mach.
void SetPRadpsIC(double P)
Sets the initial body axis roll rate.
void SetWBodyFpsIC(double wbody)
Sets the initial body axis Z velocity.
void SetLongitudeRadIC(double lon)
Sets the initial longitude.
double GetClimbRateFpmIC(void) const
Gets the initial climb rate.
double GetThetaRadIC(void) const
Gets the initial pitch angle.
double GetWBodyFpsIC(void) const
Gets the initial body axis Z velocity.
Encapsulates the JSBSim simulation executive.
void SetBetaRadIC(double beta)
Sets the initial sideslip angle.
double GetWindFpsIC(void) const
Gets the initial total wind velocity in feet/sec.
void SetMachIC(double mach)
Set mach initial condition.
void SetAltitudeASLFtIC(double altitudeASL)
Sets the altitude above sea level initial condition in feet.
void SetPsiRadIC(double psi)
Sets the initial heading angle.
double GetAltitudeASLFtIC(void) const
Gets the initial altitude above sea level.
double GetClimbRateFpsIC(void) const
Gets the initial climb rate.
const FGLocation & GetPosition(void) const
Gets the initial position.