43#ifndef FGINITIALCONDITION_H
44#define FGINITIALCONDITION_H
52#include "simgear/misc/sg_path.hxx"
266 void ResetIC(
double u0,
double v0,
double w0,
double p0,
double q0,
double r0,
267 double alpha0,
double beta0,
double phi0,
double theta0,
double psi0,
268 double latitudeRad0,
double longitudeRad0,
double altitudeAGL0,
372 {
return position.GetGeodLatitudeDeg(); }
491 const FGMatrix33& Tb2l = orientation.GetTInv();
493 return _vt_NED - vUVW_NED;
520 const FGMatrix33& Tb2l = orientation.GetTInv();
529 return Tl2b * vUVW_NED;
640 {
return position.GetGeodLatitudeRad(); }
674 bool Load(
const SGPath& rstname,
bool useStoredPath =
true );
679 bool IsEngineRunning(
unsigned int n)
const {
return (enginesRunning & (1 << n)) != 0; }
706 unsigned int enginesRunning;
713 bool Load_v1(
Element* document);
714 bool Load_v2(
Element* document);
716 void SetEulerAngleRadIC(
int idx,
double angle);
717 void SetBodyVelFpsIC(
int idx,
double vel);
718 void SetNEDVelFpsIC(
int idx,
double vel);
719 double GetBodyWindFpsIC(
int idx)
const;
720 double GetNEDWindFpsIC(
int idx)
const;
721 double GetBodyVelFpsIC(
int idx)
const;
724 double ComputeGeodAltitude(
double geodLatitude);
725 bool LoadLatitude(
Element* position_el);
726 void SetTrimRequest(std::string
trim);
727 void Debug(
int from);
Encapsulates an Aircraft and its systems.
This class implements a 3 element column vector.
void SetClimbRateFpmIC(double roc)
Sets the climb rate initial condition in feet/minute.
double GetUBodyFpsIC(void) const
Gets the initial body axis X velocity.
double GetVcalibratedKtsIC(void) const
Gets the initial calibrated airspeed.
void SetQRadpsIC(double Q)
Sets the initial body axis pitch rate.
double GetVgroundKtsIC(void) const
Gets the initial ground speed.
double GetQRadpsIC() const
Gets the initial body axis pitch rate.
void SetPsiRadIC(double psi)
Sets the initial heading angle.
void SetAlphaRadIC(double alpha)
Sets the initial angle of attack.
double GetVgroundFpsIC(void) const
Gets the initial ground velocity.
void SetLatitudeRadIC(double lat)
Sets the initial latitude.
double GetFlightPathAngleRadIC(void) const
Gets the initial flight path angle.
double GetMachIC(void) const
Gets the initial mach.
void SetPhiRadIC(double phi)
Sets the initial roll angle.
void SetAlphaDegIC(double a)
Sets angle of attack initial condition in degrees.
void SetWindDirDegIC(double dir)
Sets the initial wind direction.
double GetGeodLatitudeDegIC(void) const
Gets the initial geodetic latitude.
void SetLatitudeDegIC(double lat)
Sets the initial latitude.
void SetVEastFpsIC(double ve)
Sets the initial local axis east velocity.
const FGQuaternion & GetOrientation(void) const
Gets the initial orientation.
double GetVBodyFpsIC(void) const
Gets the initial body axis Y velocity.
void InitializeIC(void)
Initialize the initial conditions to default values.
void SetGeodLatitudeDegIC(double glat)
Sets the initial geodetic latitude.
int TrimRequested(void) const
Does initialization file call for trim ?
void SetVBodyFpsIC(double vbody)
Sets the initial body axis Y velocity.
double GetPhiRadIC(void) const
Gets the initial roll angle.
void SetThetaRadIC(double theta)
Sets the initial pitch angle.
double GetBetaRadIC(void) const
Gets the initial angle of sideslip.
double GetLongitudeDegIC(void) const
Gets the initial longitude.
double GetWindUFpsIC(void) const
Gets the initial body axis X wind velocity.
double GetWindFpsIC(void) const
Gets the initial total wind velocity in feet/sec.
~FGInitialCondition()
Destructor.
void SetVtrueFpsIC(double vt)
Sets the initial true airspeed.
void SetWindMagKtsIC(double mag)
Sets the initial total wind speed.
double GetLatitudeDegIC(void) const
Gets the initial latitude.
void SetPhiDegIC(double phi)
Sets the roll angle initial condition in degrees.
double GetPRadpsIC() const
Gets the initial body axis roll rate.
bool Load(const SGPath &rstname, bool useStoredPath=true)
Loads the initial conditions.
void SetHeadWindKtsIC(double head)
Sets the initial headwind velocity.
void SetRRadpsIC(double R)
Sets the initial body axis yaw rate.
void SetPsiDegIC(double psi)
Sets the heading angle initial condition in degrees.
bool IsEngineRunning(unsigned int n) const
Is an engine running ?
double GetPsiDegIC(void) const
Gets the initial heading angle.
FGInitialCondition(FGFDMExec *fdmex)
Constructor.
void SetLongitudeRadIC(double lon)
Sets the initial longitude.
double GetWindNFpsIC(void) const
Gets the initial wind velocity in local frame.
double GetVNorthFpsIC(void) const
Gets the initial local frame X (North) velocity.
double GetLatitudeRadIC(void) const
Gets the initial latitude.
void SetGeodLatitudeRadIC(double glat)
Sets the initial geodetic latitude.
void SetBetaRadIC(double beta)
Sets the initial sideslip angle.
double GetTargetNlfIC(void) const
Gets the target normal load factor set from IC.
double GetClimbRateFpsIC(void) const
Gets the initial climb rate.
void SetAltitudeASLFtIC(double altitudeASL)
Sets the altitude above sea level initial condition in feet.
double GetAltitudeAGLFtIC(void) const
Gets the initial altitude above ground level.
void SetClimbRateFpsIC(double roc)
Sets the initial climb rate.
double GetGeodLatitudeRadIC(void) const
Gets the initial geodetic latitude.
double GetTerrainElevationFtIC(void) const
Gets the initial terrain elevation.
double GetVtrueKtsIC(void) const
Gets the initial true velocity.
void SetVcalibratedKtsIC(double vc)
Set calibrated airspeed initial condition in knots.
double GetFlightPathAngleDegIC(void) const
Gets the initial flight path angle.
void SetMachIC(double mach)
Set mach initial condition.
const FGColumnVector3 GetPQRRadpsIC(void) const
Gets the initial body rotation rate.
const FGLocation & GetPosition(void) const
Gets the initial position.
double GetWindDirDegIC(void) const
Gets the initial wind direction.
void SetCrossWindKtsIC(double cross)
Sets the initial crosswind speed.
double GetBetaDegIC(void) const
Gets the initial sideslip angle.
double GetThetaRadIC(void) const
Gets the initial pitch angle.
double GetAlphaRadIC(void) const
Gets the initial angle of attack.
void SetLongitudeDegIC(double lon)
Sets the initial longitude.
double GetVequivalentKtsIC(void) const
Gets the initial equivalent airspeed.
double GetPsiRadIC(void) const
Gets the initial heading angle.
double GetVDownFpsIC(void) const
Gets the initial local frame Z (Down) velocity.
void SetVgroundKtsIC(double vg)
Set ground speed initial condition in knots.
double GetAlphaDegIC(void) const
Gets the initial angle of attack.
void SetTerrainElevationFtIC(double elev)
Sets the initial terrain elevation.
void SetVDownFpsIC(double vd)
Sets the initial local axis down velocity.
void SetTargetNlfIC(double nlf)
Sets the target normal load factor.
void SetVNorthFpsIC(double vn)
Sets the initial local axis north velocity.
void SetWBodyFpsIC(double wbody)
Sets the initial body axis Z velocity.
void SetVequivalentKtsIC(double ve)
Set equivalent airspeed initial condition in knots.
void SetBetaDegIC(double b)
Sets angle of sideslip initial condition in degrees.
void SetAltitudeAGLFtIC(double agl)
Sets the initial Altitude above ground level.
void SetWindNEDFpsIC(double wN, double wE, double wD)
Sets the initial wind velocity.
double GetEarthPositionAngleIC(void) const
Gets the initial Earth position angle.
void SetVtrueKtsIC(double vtrue)
Set true airspeed initial condition in knots.
double GetAltitudeASLFtIC(void) const
Gets the initial altitude above sea level.
double GetWBodyFpsIC(void) const
Gets the initial body axis Z velocity.
const FGColumnVector3 GetWindNEDFpsIC(void) const
Gets the initial wind velocity in the NED local frame.
void SetPRadpsIC(double P)
Sets the initial body axis roll rate.
speedset GetSpeedSet(void) const
Gets the initial speedset.
double GetWindDFpsIC(void) const
Gets the initial wind velocity in local frame.
double GetWindEFpsIC(void) const
Gets the initial wind velocity in local frame.
void SetFlightPathAngleRadIC(double gamma)
Sets the initial flight path angle.
void SetWindDownKtsIC(double wD)
Sets the initial wind downward speed.
void SetVgroundFpsIC(double vg)
Sets the initial ground speed.
double GetVtrueFpsIC(void) const
Gets the initial true velocity.
const FGColumnVector3 GetUVWFpsIC(void) const
Gets the initial body velocity.
double GetLongitudeRadIC(void) const
Gets the initial longitude.
double GetClimbRateFpmIC(void) const
Gets the initial climb rate.
double GetWindVFpsIC(void) const
Gets the initial body axis Y wind velocity.
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 SetThetaDegIC(double theta)
Sets pitch angle initial condition in degrees.
void bind(FGPropertyManager *pm)
void SetUBodyFpsIC(double ubody)
Sets the initial body axis X velocity.
double GetRRadpsIC() const
Gets the initial body axis yaw rate.
double GetThetaDegIC(void) const
Gets the initial pitch angle.
void SetFlightPathAngleDegIC(double gamma)
Sets the flight path angle initial condition in degrees.
double GetPhiDegIC(void) const
Gets the initial roll angle.
double GetVEastFpsIC(void) const
Gets the initial local frame Y (East) velocity.
double GetWindWFpsIC(void) const
Gets the initial body axis Z wind velocity.
static constexpr double radtodeg
static constexpr double ktstofps
FGJSBBase()
Constructor for FGJSBBase.
static constexpr double fpstokts
static constexpr double degtorad
FGLocation holds an arbitrary location in the Earth centered Earth fixed reference frame (ECEF).
Handles matrix math operations.
Models the Quaternion representation of rotations.
std::string & trim(std::string &str)