FlightGear next
JSBSim::FGPropagate Class Reference

Models the EOM and integration/propagation of state. More...

#include <FGPropagate.h>

Inherits JSBSim::FGModel.

Classes

struct  Inputs
 
struct  VehicleState
 The current vehicle state vector structure contains the translational and angular position, and the translational and angular velocity. More...
 

Public Types

enum  eIntegrateType {
  eNone = 0 , eRectEuler , eTrapezoidal , eAdamsBashforth2 ,
  eAdamsBashforth3 , eAdamsBashforth4 , eBuss1 , eBuss2 ,
  eLocalLinearization , eAdamsBashforth5
}
 These define the indices use to select the various integrators. More...
 
- Public Types inherited from JSBSim::FGJSBBase
enum  { eL = 1 , eM , eN }
 Moments L, M, N. More...
 
enum  { eP = 1 , eQ , eR }
 Rates P, Q, R. More...
 
enum  { eU = 1 , eV , eW }
 Velocities U, V, W. More...
 
enum  { eX = 1 , eY , eZ }
 Positions X, Y, Z. More...
 
enum  { ePhi = 1 , eTht , ePsi }
 Euler angles Phi, Theta, Psi. More...
 
enum  { eDrag = 1 , eSide , eLift }
 Stability axis forces, Drag, Side force, Lift. More...
 
enum  { eRoll = 1 , ePitch , eYaw }
 Local frame orientation Roll, Pitch, Yaw. More...
 
enum  { eNorth = 1 , eEast , eDown }
 Local frame position North, East, Down. More...
 
enum  { eLat = 1 , eLong , eRad }
 Locations Radius, Latitude, Longitude. More...
 
enum  {
  inNone = 0 , inDegrees , inRadians , inMeters ,
  inFeet
}
 Conversion specifiers. More...
 

Public Member Functions

 FGPropagate (FGFDMExec *Executive)
 Constructor.
 
 ~FGPropagate ()
 Destructor.
 
bool InitModel (void)
 Initializes the FGPropagate class after instantiation and prior to first execution.
 
void InitializeDerivatives ()
 
bool Run (bool Holding)
 Runs the state propagation model; called by the Executive Can pass in a value indicating if the executive is directing the simulation to Hold.
 
const FGColumnVector3GetVel (void) const
 Retrieves the velocity vector.
 
const FGColumnVector3GetUVW (void) const
 Retrieves the body frame vehicle velocity vector.
 
const FGColumnVector3GetPQR (void) const
 Retrieves the body angular rates vector, relative to the ECEF frame.
 
const FGColumnVector3GetPQRi (void) const
 Retrieves the body angular rates vector, relative to the ECI (inertial) frame.
 
const FGQuaternionGetQuaterniondot (void) const
 Retrieves the time derivative of the body orientation quaternion.
 
const FGColumnVector3GetEuler (void) const
 Retrieves the Euler angles that define the vehicle orientation.
 
FGColumnVector3 GetEulerDeg (void) const
 Retrieves the Euler angles (in degrees) that define the vehicle orientation.
 
double GetUVW (int idx) const
 Retrieves a body frame velocity component.
 
double GetVel (int idx) const
 Retrieves a Local frame velocity component.
 
double GetInertialVelocityMagnitude (void) const
 Retrieves the total inertial velocity in ft/sec.
 
double GetNEDVelocityMagnitude (void) const
 Retrieves the total local NED velocity in ft/sec.
 
const FGColumnVector3GetInertialVelocity (void) const
 Retrieves the inertial velocity vector in ft/sec.
 
double GetInertialVelocity (int i) const
 
const FGColumnVector3GetInertialPosition (void) const
 Retrieves the inertial position vector.
 
double GetInertialPosition (int i) const
 
FGColumnVector3 GetECEFVelocity (void) const
 Calculates and retrieves the velocity vector relative to the earth centered earth fixed (ECEF) frame.
 
double GetECEFVelocity (int idx) const
 Calculates and retrieves the velocity vector relative to the earth centered earth fixed (ECEF) frame for a particular axis.
 
double GetAltitudeASL (void) const
 Returns the current altitude above sea level.
 
double GetAltitudeASLmeters (void) const
 Returns the current altitude above sea level.
 
double GetPQR (int axis) const
 Retrieves a body frame angular velocity component relative to the ECEF frame.
 
double GetPQRi (int axis) const
 Retrieves a body frame angular velocity component relative to the ECI (inertial) frame.
 
double GetEuler (int axis) const
 Retrieves a vehicle Euler angle component.
 
double GetEulerDeg (int axis) const
 Retrieves a vehicle Euler angle component in degrees.
 
double GetCosEuler (int idx) const
 Retrieves the cosine of a vehicle Euler angle component.
 
double GetSinEuler (int idx) const
 Retrieves the sine of a vehicle Euler angle component.
 
double Gethdot (void) const
 Returns the current altitude rate.
 
double GetLocalTerrainRadius (void) const
 Returns the "constant" LocalTerrainRadius.
 
double GetEarthPositionAngle (void) const
 Returns the Earth position angle.
 
double GetEarthPositionAngleDeg (void) const
 Returns the Earth position angle in degrees.
 
const FGColumnVector3GetTerrainVelocity (void) const
 
const FGColumnVector3GetTerrainAngularVelocity (void) const
 
void RecomputeLocalTerrainVelocity ()
 
double GetTerrainElevation (void) const
 
double GetDistanceAGL (void) const
 
double GetDistanceAGLKm (void) const
 
double GetRadius (void) const
 
double GetLongitude (void) const
 
double GetLatitude (void) const
 
double GetGeodLatitudeRad (void) const
 
double GetGeodLatitudeDeg (void) const
 
double GetGeodeticAltitude (void) const
 
double GetGeodeticAltitudeKm (void) const
 
double GetLongitudeDeg (void) const
 
double GetLatitudeDeg (void) const
 
const FGLocationGetLocation (void) const
 
double GetLocation (int i) const
 
const FGMatrix33GetTl2b (void) const
 Retrieves the local-to-body transformation matrix.
 
const FGMatrix33GetTb2l (void) const
 Retrieves the body-to-local transformation matrix.
 
const FGMatrix33GetTec2b (void) const
 Retrieves the ECEF-to-body transformation matrix.
 
const FGMatrix33GetTb2ec (void) const
 Retrieves the body-to-ECEF transformation matrix.
 
const FGMatrix33GetTi2b (void) const
 Retrieves the ECI-to-body transformation matrix.
 
const FGMatrix33GetTb2i (void) const
 Retrieves the body-to-ECI transformation matrix.
 
const FGMatrix33GetTec2i (void) const
 Retrieves the ECEF-to-ECI transformation matrix.
 
const FGMatrix33GetTi2ec (void) const
 Retrieves the ECI-to-ECEF transformation matrix.
 
const FGMatrix33GetTec2l (void) const
 Retrieves the ECEF-to-local transformation matrix.
 
const FGMatrix33GetTl2ec (void) const
 Retrieves the local-to-ECEF transformation matrix.
 
const FGMatrix33GetTl2i (void) const
 Retrieves the local-to-inertial transformation matrix.
 
const FGMatrix33GetTi2l (void) const
 Retrieves the inertial-to-local transformation matrix.
 
const VehicleStateGetVState (void) const
 
void SetVState (const VehicleState &vstate)
 
void SetEarthPositionAngle (double EPA)
 Sets the Earth position angle.
 
void SetInertialOrientation (const FGQuaternion &Qi)
 
void SetInertialVelocity (const FGColumnVector3 &Vi)
 
void SetInertialRates (const FGColumnVector3 &vRates)
 
const FGQuaternion GetQuaternion (void) const
 Returns the quaternion that goes from Local to Body.
 
const FGQuaternion GetQuaternionECI (void) const
 Returns the quaternion that goes from ECI to Body.
 
const FGQuaternion GetQuaternionECEF (void) const
 Returns the quaternion that goes from ECEF to Body.
 
void SetPQR (unsigned int i, double val)
 
void SetUVW (unsigned int i, double val)
 
void SetLongitude (double lon)
 
void SetLongitudeDeg (double lon)
 
void SetLatitude (double lat)
 
void SetLatitudeDeg (double lat)
 
void SetRadius (double r)
 
void SetAltitudeASL (double altASL)
 
void SetAltitudeASLmeters (double altASL)
 
void SetTerrainElevation (double tt)
 
void SetDistanceAGL (double tt)
 
void SetDistanceAGLKm (double tt)
 
void SetInitialState (const FGInitialCondition *)
 
void SetLocation (const FGLocation &l)
 
void SetLocation (const FGColumnVector3 &lv)
 
void SetPosition (const double Lon, const double Lat, const double Radius)
 
void NudgeBodyLocation (const FGColumnVector3 &deltaLoc)
 
void SetHoldDown (bool hd)
 Sets the property forces/hold-down.
 
void DumpState (void)
 
- Public Member Functions inherited from JSBSim::FGModel
 FGModel (FGFDMExec *)
 Constructor.
 
 ~FGModel () override
 Destructor.
 
void SetRate (unsigned int tt)
 Set the ouput rate for the model in frames.
 
unsigned int GetRate (void)
 Get the output rate for the model in frames.
 
FGFDMExecGetExec (void)
 
void SetPropertyManager (FGPropertyManager *fgpm)
 
virtual SGPath FindFullPathName (const SGPath &path) const
 
const std::string & GetName (void)
 
virtual bool Load (Element *el)
 
- Public Member Functions inherited from JSBSim::FGModelFunctions
virtual ~FGModelFunctions ()
 
void RunPreFunctions (void)
 
void RunPostFunctions (void)
 
bool Load (Element *el, FGFDMExec *fdmex, std::string prefix="")
 
void PreLoad (Element *el, FGFDMExec *fdmex, std::string prefix="")
 
void PostLoad (Element *el, FGFDMExec *fdmex, std::string prefix="")
 
std::string GetFunctionStrings (const std::string &delimeter) const
 Gets the strings for the current set of functions.
 
std::string GetFunctionValues (const std::string &delimeter) const
 Gets the function values.
 
FGFunctionGetPreFunction (const std::string &name)
 Get one of the "pre" function.
 
- Public Member Functions inherited from JSBSim::FGJSBBase
 FGJSBBase ()
 Constructor for FGJSBBase.
 
virtual ~FGJSBBase ()
 Destructor for FGJSBBase.
 
void PutMessage (const Message &msg)
 Places a Message structure on the Message queue.
 
void PutMessage (const std::string &text)
 Creates a message with the given text and places it on the queue.
 
void PutMessage (const std::string &text, bool bVal)
 Creates a message with the given text and boolean value and places it on the queue.
 
void PutMessage (const std::string &text, int iVal)
 Creates a message with the given text and integer value and places it on the queue.
 
void PutMessage (const std::string &text, double dVal)
 Creates a message with the given text and double value and places it on the queue.
 
int SomeMessages (void) const
 Reads the message on the queue (but does not delete it).
 
void ProcessMessage (void)
 Reads the message on the queue and removes it from the queue.
 
MessageProcessNextMessage (void)
 Reads the next message on the queue and removes it from the queue.
 
void disableHighLighting (void)
 Disables highlighting in the console output.
 

Public Attributes

struct JSBSim::FGPropagate::Inputs in
 

Additional Inherited Members

static const std::string & GetVersion (void)
 Returns the version number of JSBSim.
 
static constexpr double KelvinToFahrenheit (double kelvin)
 Converts from degrees Kelvin to degrees Fahrenheit.
 
static constexpr double CelsiusToRankine (double celsius)
 Converts from degrees Celsius to degrees Rankine.
 
static constexpr double RankineToCelsius (double rankine)
 Converts from degrees Rankine to degrees Celsius.
 
static constexpr double KelvinToRankine (double kelvin)
 Converts from degrees Kelvin to degrees Rankine.
 
static constexpr double RankineToKelvin (double rankine)
 Converts from degrees Rankine to degrees Kelvin.
 
static constexpr double FahrenheitToCelsius (double fahrenheit)
 Converts from degrees Fahrenheit to degrees Celsius.
 
static constexpr double CelsiusToFahrenheit (double celsius)
 Converts from degrees Celsius to degrees Fahrenheit.
 
static constexpr double CelsiusToKelvin (double celsius)
 Converts from degrees Celsius to degrees Kelvin.
 
static constexpr double KelvinToCelsius (double kelvin)
 Converts from degrees Kelvin to degrees Celsius.
 
static constexpr double FeetToMeters (double measure)
 Converts from feet to meters.
 
static double PitotTotalPressure (double mach, double p)
 Compute the total pressure in front of the Pitot tube.
 
static double MachFromImpactPressure (double qc, double p)
 Compute the Mach number from the differential pressure (qc) and the static pressure.
 
static double VcalibratedFromMach (double mach, double p)
 Calculate the calibrated airspeed from the Mach number.
 
static double MachFromVcalibrated (double vcas, double p)
 Calculate the Mach number from the calibrated airspeed.Based on the formulas in the US Air Force Aircraft Performance Flight Testing Manual (AFFTC-TIH-99-01).
 
static bool EqualToRoundoff (double a, double b)
 Finite precision comparison.
 
static bool EqualToRoundoff (float a, float b)
 Finite precision comparison.
 
static bool EqualToRoundoff (float a, double b)
 Finite precision comparison.
 
static bool EqualToRoundoff (double a, float b)
 Finite precision comparison.
 
static constexpr double Constrain (double min, double value, double max)
 Constrain a value between a minimum and a maximum value.
 
static constexpr double sign (double num)
 
static double GaussianRandomNumber (void)
 
- Static Public Attributes inherited from JSBSim::FGJSBBase
static char highint [5] = {27, '[', '1', 'm', '\0' }
 highlights text
 
static char halfint [5] = {27, '[', '2', 'm', '\0' }
 low intensity text
 
static char normint [6] = {27, '[', '2', '2', 'm', '\0' }
 normal intensity text
 
static char reset [5] = {27, '[', '0', 'm', '\0' }
 resets text properties
 
static char underon [5] = {27, '[', '4', 'm', '\0' }
 underlines text
 
static char underoff [6] = {27, '[', '2', '4', 'm', '\0' }
 underline off
 
static char fgblue [6] = {27, '[', '3', '4', 'm', '\0' }
 blue text
 
static char fgcyan [6] = {27, '[', '3', '6', 'm', '\0' }
 cyan text
 
static char fgred [6] = {27, '[', '3', '1', 'm', '\0' }
 red text
 
static char fggreen [6] = {27, '[', '3', '2', 'm', '\0' }
 green text
 
static char fgdef [6] = {27, '[', '3', '9', 'm', '\0' }
 default text
 
static short debug_lvl = 1
 
- Protected Member Functions inherited from JSBSim::FGModel
bool Upload (Element *el, bool preLoad)
 Uploads this model in memory.
 
static std::string CreateIndexedPropertyName (const std::string &Property, int index)
 
- Protected Attributes inherited from JSBSim::FGModel
unsigned int exe_ctr
 
unsigned int rate
 
std::string Name
 
FGFDMExecFDMExec
 
FGPropertyManagerPropertyManager
 
- Protected Attributes inherited from JSBSim::FGModelFunctions
std::vector< FGFunction * > PreFunctions
 
std::vector< FGFunction * > PostFunctions
 
FGPropertyReader LocalProperties
 
static Message localMsg
 
static std::queue< MessageMessages
 
static unsigned int messageId = 0
 
static constexpr double radtodeg = 180. / 3.14159265358979323846
 
static constexpr double degtorad = 3.14159265358979323846 / 180.
 
static constexpr double hptoftlbssec = 550.0
 
static constexpr double psftoinhg = 0.014138
 
static constexpr double psftopa = 47.88
 
static constexpr double ktstofps = 1.68781
 
static constexpr double fpstokts = 1.0 / ktstofps
 
static constexpr double inchtoft = 1.0/12.0
 
static constexpr double fttom = 0.3048
 
static constexpr double m3toft3 = 1.0/(fttom*fttom*fttom)
 
static constexpr double in3tom3 = inchtoft*inchtoft*inchtoft/m3toft3
 
static constexpr double inhgtopa = 3386.38
 
static constexpr double slugtolb = 32.174049
 Note that definition of lbtoslug by the inverse of slugtolb and not to a different constant you can also get from some tables will make lbtoslug*slugtolb == 1 up to the magnitude of roundoff.
 
static constexpr double lbtoslug = 1.0/slugtolb
 
static constexpr double kgtolb = 2.20462
 
static constexpr double kgtoslug = 0.06852168
 
static const std::string needed_cfg_version = "2.0"
 
static const std::string JSBSim_version = JSBSIM_VERSION " " __DATE__ " " __TIME__
 
static int gaussian_random_number_phase = 0
 

Detailed Description

Models the EOM and integration/propagation of state.

The Equations of Motion (EOM) for JSBSim are integrated to propagate the state of the vehicle given the forces and moments that act on it. The integration accounts for a rotating Earth.

Integration of rotational and translation position and rate can be customized as needed or frozen by the selection of no integrator. The selection of which integrator to use is done through the setting of the associated property. There are four properties which can be set:

simulation/integrator/rate/rotational
simulation/integrator/rate/translational
simulation/integrator/position/rotational
simulation/integrator/position/translational
unsigned int rate
Definition FGModel.h:102

Each of the integrators listed above can be set to one of the following values:

0: No integrator (Freeze)
1: Rectangular Euler
2: Trapezoidal
3: Adams Bashforth 2
4: Adams Bashforth 3
5: Adams Bashforth 4
Author
Jon S. Berndt, Mathias Froehlich, Bertrand Coconnier

Definition at line 93 of file FGPropagate.h.

Member Enumeration Documentation

◆ eIntegrateType

These define the indices use to select the various integrators.

Enumerator
eNone 
eRectEuler 
eTrapezoidal 
eAdamsBashforth2 
eAdamsBashforth3 
eAdamsBashforth4 
eBuss1 
eBuss2 
eLocalLinearization 
eAdamsBashforth5 

Definition at line 153 of file FGPropagate.h.

Constructor & Destructor Documentation

◆ FGPropagate()

JSBSim::FGPropagate::FGPropagate ( FGFDMExec * Executive)
explicit

Constructor.

The constructor initializes several variables, and sets the initial set of integrators to use as follows:

  • integrator, rotational rate = Adams Bashforth 2
  • integrator, translational rate = Adams Bashforth 2
  • integrator, rotational position = Trapezoidal
  • integrator, translational position = Trapezoidal
    Parameters
    Executivea pointer to the parent executive object

These define the indices use to select the various integrators.

Definition at line 82 of file FGPropagate.cpp.

◆ ~FGPropagate()

JSBSim::FGPropagate::~FGPropagate ( void )

Destructor.

Definition at line 111 of file FGPropagate.cpp.

Member Function Documentation

◆ DumpState()

void JSBSim::FGPropagate::DumpState ( void )

Definition at line 650 of file FGPropagate.cpp.

◆ GetAltitudeASL()

double JSBSim::FGPropagate::GetAltitudeASL ( void ) const

Returns the current altitude above sea level.

This function returns the altitude above sea level. units ft

Returns
The current altitude above sea level in feet.

Definition at line 523 of file FGPropagate.cpp.

◆ GetAltitudeASLmeters()

double JSBSim::FGPropagate::GetAltitudeASLmeters ( void ) const
inline

Returns the current altitude above sea level.

This function returns the altitude above sea level. units meters

Returns
The current altitude above sea level in meters.

Definition at line 335 of file FGPropagate.h.

◆ GetCosEuler()

double JSBSim::FGPropagate::GetCosEuler ( int idx) const
inline

Retrieves the cosine of a vehicle Euler angle component.

Retrieves the cosine of an Euler angle (Phi, Theta, or Psi) from the quaternion that stores the vehicle orientation relative to the Local frame. The order of rotations used is Yaw-Pitch-Roll. The Euler angle with subscript (1) is Phi. Various convenience enumerators are defined in FGJSBBase. The relevant enumerators for the Euler angle referred to in this call are, ePhi=1, eTht=2, ePsi=3 (e.g. GetCosEuler(eTht) returns cos(theta)). units none

Returns
The cosine of an Euler angle.

Definition at line 397 of file FGPropagate.h.

◆ GetDistanceAGL()

double JSBSim::FGPropagate::GetDistanceAGL ( void ) const

Definition at line 577 of file FGPropagate.cpp.

◆ GetDistanceAGLKm()

double JSBSim::FGPropagate::GetDistanceAGLKm ( void ) const

Definition at line 584 of file FGPropagate.cpp.

◆ GetEarthPositionAngle()

double JSBSim::FGPropagate::GetEarthPositionAngle ( void ) const
inline

Returns the Earth position angle.

Returns
Earth position angle in radians.

Definition at line 429 of file FGPropagate.h.

◆ GetEarthPositionAngleDeg()

double JSBSim::FGPropagate::GetEarthPositionAngleDeg ( void ) const
inline

Returns the Earth position angle in degrees.

Returns
Earth position angle in degrees.

Definition at line 434 of file FGPropagate.h.

◆ GetECEFVelocity() [1/2]

double JSBSim::FGPropagate::GetECEFVelocity ( int idx) const
inline

Calculates and retrieves the velocity vector relative to the earth centered earth fixed (ECEF) frame for a particular axis.

Definition at line 321 of file FGPropagate.h.

◆ GetECEFVelocity() [2/2]

FGColumnVector3 JSBSim::FGPropagate::GetECEFVelocity ( void ) const
inline

Calculates and retrieves the velocity vector relative to the earth centered earth fixed (ECEF) frame.

Definition at line 316 of file FGPropagate.h.

◆ GetEuler() [1/2]

double JSBSim::FGPropagate::GetEuler ( int axis) const
inline

Retrieves a vehicle Euler angle component.

Retrieves an Euler angle (Phi, Theta, or Psi) from the quaternion that stores the vehicle orientation relative to the Local frame. The order of rotations used is Yaw-Pitch-Roll. The Euler angle with subscript (1) is Phi. Various convenience enumerators are defined in FGJSBBase. The relevant enumerators for the Euler angle returned by this call are, ePhi=1, eTht=2, ePsi=3 (e.g. GetEuler(eTht) returns Theta). units radians

Returns
An Euler angle.

Definition at line 373 of file FGPropagate.h.

◆ GetEuler() [2/2]

const FGColumnVector3 & JSBSim::FGPropagate::GetEuler ( void ) const
inline

Retrieves the Euler angles that define the vehicle orientation.

Extracts the Euler angles from the quaternion that stores the orientation in the Local frame. The order of rotation used is Yaw-Pitch-Roll. The vector returned is represented by an FGColumnVector reference. The vector for the Euler angles is organized (Phi, Theta, Psi). The vector is 1-based, so that the first element can be retrieved using the "()" operator. In other words, the returned vector item with subscript (1) is Phi. Various convenience enumerators are defined in FGJSBBase. The relevant enumerators for the vector returned by this call are, ePhi=1, eTht=2, ePsi=3. units radians

Returns
The Euler angle vector, where the first item in the vector is the angle about the X axis, the second is the angle about the Y axis, and the third item is the angle about the Z axis (Phi, Theta, Psi).

Definition at line 251 of file FGPropagate.h.

◆ GetEulerDeg() [1/2]

double JSBSim::FGPropagate::GetEulerDeg ( int axis) const
inline

Retrieves a vehicle Euler angle component in degrees.

Retrieves an Euler angle (Phi, Theta, or Psi) from the quaternion that stores the vehicle orientation relative to the Local frame. The order of rotations used is Yaw-Pitch-Roll. The Euler angle with subscript (1) is Phi. Various convenience enumerators are defined in FGJSBBase. The relevant enumerators for the Euler angle returned by this call are, ePhi=1, eTht=2, ePsi=3 (e.g. GetEuler(eTht) returns Theta). units degrees

Returns
An Euler angle in degrees.

Definition at line 385 of file FGPropagate.h.

◆ GetEulerDeg() [2/2]

FGColumnVector3 JSBSim::FGPropagate::GetEulerDeg ( void ) const

Retrieves the Euler angles (in degrees) that define the vehicle orientation.

Extracts the Euler angles from the quaternion that stores the orientation in the Local frame. The order of rotation used is Yaw-Pitch-Roll. The vector returned is represented by an FGColumnVector reference. The vector for the Euler angles is organized (Phi, Theta, Psi). The vector is 1-based, so that the first element can be retrieved using the "()" operator. In other words, the returned vector item with subscript (1) is Phi. Various convenience enumerators are defined in FGJSBBase. The relevant enumerators for the vector returned by this call are, ePhi=1, eTht=2, ePsi=3. units degrees

Returns
The Euler angle vector, where the first item in the vector is the angle about the X axis, the second is the angle about the Y axis, and the third item is the angle about the Z axis (Phi, Theta, Psi).

Definition at line 643 of file FGPropagate.cpp.

◆ GetGeodeticAltitude()

double JSBSim::FGPropagate::GetGeodeticAltitude ( void ) const
inline

Definition at line 453 of file FGPropagate.h.

◆ GetGeodeticAltitudeKm()

double JSBSim::FGPropagate::GetGeodeticAltitudeKm ( void ) const
inline

Definition at line 454 of file FGPropagate.h.

◆ GetGeodLatitudeDeg()

double JSBSim::FGPropagate::GetGeodLatitudeDeg ( void ) const
inline

Definition at line 451 of file FGPropagate.h.

◆ GetGeodLatitudeRad()

double JSBSim::FGPropagate::GetGeodLatitudeRad ( void ) const
inline

Definition at line 450 of file FGPropagate.h.

◆ Gethdot()

double JSBSim::FGPropagate::Gethdot ( void ) const
inline

Returns the current altitude rate.

Returns the current altitude rate (rate of climb). units ft/sec

Returns
The current rate of change in altitude.

Definition at line 416 of file FGPropagate.h.

◆ GetInertialPosition() [1/2]

double JSBSim::FGPropagate::GetInertialPosition ( int i) const
inline

Definition at line 312 of file FGPropagate.h.

◆ GetInertialPosition() [2/2]

const FGColumnVector3 & JSBSim::FGPropagate::GetInertialPosition ( void ) const
inline

Retrieves the inertial position vector.

Definition at line 311 of file FGPropagate.h.

◆ GetInertialVelocity() [1/2]

double JSBSim::FGPropagate::GetInertialVelocity ( int i) const
inline

Definition at line 307 of file FGPropagate.h.

◆ GetInertialVelocity() [2/2]

const FGColumnVector3 & JSBSim::FGPropagate::GetInertialVelocity ( void ) const
inline

Retrieves the inertial velocity vector in ft/sec.

Definition at line 306 of file FGPropagate.h.

◆ GetInertialVelocityMagnitude()

double JSBSim::FGPropagate::GetInertialVelocityMagnitude ( void ) const
inline

Retrieves the total inertial velocity in ft/sec.

Definition at line 298 of file FGPropagate.h.

◆ GetLatitude()

double JSBSim::FGPropagate::GetLatitude ( void ) const
inline

Definition at line 448 of file FGPropagate.h.

◆ GetLatitudeDeg()

double JSBSim::FGPropagate::GetLatitudeDeg ( void ) const
inline

Definition at line 457 of file FGPropagate.h.

◆ GetLocalTerrainRadius()

double JSBSim::FGPropagate::GetLocalTerrainRadius ( void ) const

Returns the "constant" LocalTerrainRadius.

The LocalTerrainRadius parameter is set by the calling application or set to sea level + terrain elevation if JSBSim is running in standalone mode. units feet

Returns
distance of the local terrain from the center of the earth.

Definition at line 567 of file FGPropagate.cpp.

◆ GetLocation() [1/2]

double JSBSim::FGPropagate::GetLocation ( int i) const
inline

Definition at line 459 of file FGPropagate.h.

◆ GetLocation() [2/2]

const FGLocation & JSBSim::FGPropagate::GetLocation ( void ) const
inline

Definition at line 458 of file FGPropagate.h.

◆ GetLongitude()

double JSBSim::FGPropagate::GetLongitude ( void ) const
inline

Definition at line 447 of file FGPropagate.h.

◆ GetLongitudeDeg()

double JSBSim::FGPropagate::GetLongitudeDeg ( void ) const
inline

Definition at line 456 of file FGPropagate.h.

◆ GetNEDVelocityMagnitude()

double JSBSim::FGPropagate::GetNEDVelocityMagnitude ( void ) const
inline

Retrieves the total local NED velocity in ft/sec.

Definition at line 302 of file FGPropagate.h.

◆ GetPQR() [1/2]

double JSBSim::FGPropagate::GetPQR ( int axis) const
inline

Retrieves a body frame angular velocity component relative to the ECEF frame.

Retrieves a body frame angular velocity component. The angular velocity returned is extracted from the vPQR vector (an FGColumnVector). The vector for the angular velocity in Body frame is organized (P, Q, R). The vector is 1-based. In other words, GetPQR(1) returns P (roll rate). Various convenience enumerators are defined in FGJSBBase. The relevant enumerators for the angular velocity returned by this call are, eP=1, eQ=2, eR=3. units rad/sec

Parameters
axisthe index of the angular velocity component desired (1-based).
Returns
The body frame angular velocity component.

Definition at line 348 of file FGPropagate.h.

◆ GetPQR() [2/2]

const FGColumnVector3 & JSBSim::FGPropagate::GetPQR ( void ) const
inline

Retrieves the body angular rates vector, relative to the ECEF frame.

Retrieves the body angular rates (p, q, r), which are calculated by integration of the angular acceleration. The vector returned is represented by an FGColumnVector3 reference. The vector for the angular velocity in Body frame is organized (P, Q, R). The vector is 1-based, so that the first element can be retrieved using the "()" operator. In other words, vPQR(1) is P. Various convenience enumerators are defined in FGJSBBase. The relevant enumerators for the vector returned by this call are, eP=1, eQ=2, eR=3. units rad/sec

Returns
The body frame angular rates in rad/sec.

Definition at line 209 of file FGPropagate.h.

◆ GetPQRi() [1/2]

double JSBSim::FGPropagate::GetPQRi ( int axis) const
inline

Retrieves a body frame angular velocity component relative to the ECI (inertial) frame.

Retrieves a body frame angular velocity component. The angular velocity returned is extracted from the vPQR vector (an FGColumnVector). The vector for the angular velocity in Body frame is organized (P, Q, R). The vector is 1-based. In other words, GetPQR(1) returns P (roll rate). Various convenience enumerators are defined in FGJSBBase. The relevant enumerators for the angular velocity returned by this call are, eP=1, eQ=2, eR=3. units rad/sec

Parameters
axisthe index of the angular velocity component desired (1-based).
Returns
The body frame angular velocity component.

Definition at line 361 of file FGPropagate.h.

◆ GetPQRi() [2/2]

const FGColumnVector3 & JSBSim::FGPropagate::GetPQRi ( void ) const
inline

Retrieves the body angular rates vector, relative to the ECI (inertial) frame.

Retrieves the body angular rates (p, q, r), which are calculated by integration of the angular acceleration. The vector returned is represented by an FGColumnVector reference. The vector for the angular velocity in Body frame is organized (P, Q, R). The vector is 1-based, so that the first element can be retrieved using the "()" operator. In other words, vPQR(1) is P. Various convenience enumerators are defined in FGJSBBase. The relevant enumerators for the vector returned by this call are, eP=1, eQ=2, eR=3. units rad/sec

Returns
The body frame inertial angular rates in rad/sec.

Definition at line 223 of file FGPropagate.h.

◆ GetQuaternion()

const FGQuaternion JSBSim::FGPropagate::GetQuaternion ( void ) const
inline

Returns the quaternion that goes from Local to Body.

Definition at line 537 of file FGPropagate.h.

◆ GetQuaterniondot()

const FGQuaternion & JSBSim::FGPropagate::GetQuaterniondot ( void ) const
inline

Retrieves the time derivative of the body orientation quaternion.

Retrieves the time derivative of the body orientation quaternion based on the rate of change of the orientation between the body and the ECI frame. The quaternion returned is represented by an FGQuaternion reference. The quaternion is 1-based, so that the first element can be retrieved using the "()" operator. units rad/sec^2

Returns
The time derivative of the body orientation quaternion.

Definition at line 234 of file FGPropagate.h.

◆ GetQuaternionECEF()

const FGQuaternion JSBSim::FGPropagate::GetQuaternionECEF ( void ) const
inline

Returns the quaternion that goes from ECEF to Body.

Definition at line 543 of file FGPropagate.h.

◆ GetQuaternionECI()

const FGQuaternion JSBSim::FGPropagate::GetQuaternionECI ( void ) const
inline

Returns the quaternion that goes from ECI to Body.

Definition at line 540 of file FGPropagate.h.

◆ GetRadius()

double JSBSim::FGPropagate::GetRadius ( void ) const
inline

Definition at line 443 of file FGPropagate.h.

◆ GetSinEuler()

double JSBSim::FGPropagate::GetSinEuler ( int idx) const
inline

Retrieves the sine of a vehicle Euler angle component.

Retrieves the sine of an Euler angle (Phi, Theta, or Psi) from the quaternion that stores the vehicle orientation relative to the Local frame. The order of rotations used is Yaw-Pitch-Roll. The Euler angle with subscript (1) is Phi. Various convenience enumerators are defined in FGJSBBase. The relevant enumerators for the Euler angle referred to in this call are, ePhi=1, eTht=2, ePsi=3 (e.g. GetSinEuler(eTht) returns sin(theta)). units none

Returns
The sine of an Euler angle.

Definition at line 409 of file FGPropagate.h.

◆ GetTb2ec()

const FGMatrix33 & JSBSim::FGPropagate::GetTb2ec ( void ) const
inline

Retrieves the body-to-ECEF transformation matrix.

Returns
a reference to the body-to-ECEF matrix.

Definition at line 479 of file FGPropagate.h.

◆ GetTb2i()

const FGMatrix33 & JSBSim::FGPropagate::GetTb2i ( void ) const
inline

Retrieves the body-to-ECI transformation matrix.

Returns
a reference to the body-to-ECI matrix.

Definition at line 487 of file FGPropagate.h.

◆ GetTb2l()

const FGMatrix33 & JSBSim::FGPropagate::GetTb2l ( void ) const
inline

Retrieves the body-to-local transformation matrix.

The quaternion class, being the means by which the orientation of the vehicle is stored, manages the body-to-local transformation matrix.

Returns
a reference to the body-to-local matrix.

Definition at line 471 of file FGPropagate.h.

◆ GetTec2b()

const FGMatrix33 & JSBSim::FGPropagate::GetTec2b ( void ) const
inline

Retrieves the ECEF-to-body transformation matrix.

Returns
a reference to the ECEF-to-body transformation matrix.

Definition at line 475 of file FGPropagate.h.

◆ GetTec2i()

const FGMatrix33 & JSBSim::FGPropagate::GetTec2i ( void ) const
inline

Retrieves the ECEF-to-ECI transformation matrix.

Returns
a reference to the ECEF-to-ECI transformation matrix.
See also
SetEarthPositionAngle

Definition at line 492 of file FGPropagate.h.

◆ GetTec2l()

const FGMatrix33 & JSBSim::FGPropagate::GetTec2l ( void ) const
inline

Retrieves the ECEF-to-local transformation matrix.

Retrieves the ECEF-to-local transformation matrix. Note that the so-called local from is also know as the NED frame (for North, East, Down).

Returns
a reference to the ECEF-to-local matrix.

Definition at line 503 of file FGPropagate.h.

◆ GetTerrainAngularVelocity()

const FGColumnVector3 & JSBSim::FGPropagate::GetTerrainAngularVelocity ( void ) const
inline

Definition at line 437 of file FGPropagate.h.

◆ GetTerrainElevation()

double JSBSim::FGPropagate::GetTerrainElevation ( void ) const

Definition at line 549 of file FGPropagate.cpp.

◆ GetTerrainVelocity()

const FGColumnVector3 & JSBSim::FGPropagate::GetTerrainVelocity ( void ) const
inline

Definition at line 436 of file FGPropagate.h.

◆ GetTi2b()

const FGMatrix33 & JSBSim::FGPropagate::GetTi2b ( void ) const
inline

Retrieves the ECI-to-body transformation matrix.

Returns
a reference to the ECI-to-body transformation matrix.

Definition at line 483 of file FGPropagate.h.

◆ GetTi2ec()

const FGMatrix33 & JSBSim::FGPropagate::GetTi2ec ( void ) const
inline

Retrieves the ECI-to-ECEF transformation matrix.

Returns
a reference to the ECI-to-ECEF matrix.
See also
SetEarthPositionAngle

Definition at line 497 of file FGPropagate.h.

◆ GetTi2l()

const FGMatrix33 & JSBSim::FGPropagate::GetTi2l ( void ) const
inline

Retrieves the inertial-to-local transformation matrix.

Returns
a reference to the inertial-to-local matrix.
See also
SetEarthPositionAngle

Definition at line 519 of file FGPropagate.h.

◆ GetTl2b()

const FGMatrix33 & JSBSim::FGPropagate::GetTl2b ( void ) const
inline

Retrieves the local-to-body transformation matrix.

The quaternion class, being the means by which the orientation of the vehicle is stored, manages the local-to-body transformation matrix.

Returns
a reference to the local-to-body transformation matrix.

Definition at line 465 of file FGPropagate.h.

◆ GetTl2ec()

const FGMatrix33 & JSBSim::FGPropagate::GetTl2ec ( void ) const
inline

Retrieves the local-to-ECEF transformation matrix.

Retrieves the local-to-ECEF transformation matrix. Note that the so-called local from is also know as the NED frame (for North, East, Down).

Returns
a reference to the local-to-ECEF matrix.

Definition at line 509 of file FGPropagate.h.

◆ GetTl2i()

const FGMatrix33 & JSBSim::FGPropagate::GetTl2i ( void ) const
inline

Retrieves the local-to-inertial transformation matrix.

Returns
a reference to the local-to-inertial transformation matrix.
See also
SetEarthPositionAngle

Definition at line 514 of file FGPropagate.h.

◆ GetUVW() [1/2]

double JSBSim::FGPropagate::GetUVW ( int idx) const
inline

Retrieves a body frame velocity component.

Retrieves a body frame velocity component. The velocity returned is extracted from the vUVW vector (an FGColumnVector). The vector for the velocity in Body frame is organized (Vx, Vy, Vz). The vector is 1-based. In other words, GetUVW(1) returns Vx. Various convenience enumerators are defined in FGJSBBase. The relevant enumerators for the velocity returned by this call are, eX=1, eY=2, eZ=3. units ft/sec

Parameters
idxthe index of the velocity component desired (1-based).
Returns
The body frame velocity component.

Definition at line 281 of file FGPropagate.h.

◆ GetUVW() [2/2]

const FGColumnVector3 & JSBSim::FGPropagate::GetUVW ( void ) const
inline

Retrieves the body frame vehicle velocity vector.

The vector returned is represented by an FGColumnVector3 reference. The vector for the velocity in Body frame is organized (Vx, Vy, Vz). The vector is 1-based, so that the first element can be retrieved using the "()" operator. In other words, vUVW(1) is Vx. Various convenience enumerators are defined in FGJSBBase. The relevant enumerators for the vector returned by this call are, eX=1, eY=2, eZ=3. units ft/sec

Returns
The body frame vehicle velocity vector in ft/sec.

Definition at line 195 of file FGPropagate.h.

◆ GetVel() [1/2]

double JSBSim::FGPropagate::GetVel ( int idx) const
inline

Retrieves a Local frame velocity component.

Retrieves a Local frame velocity component. The velocity returned is extracted from the vVel vector (an FGColumnVector). The vector for the velocity in Local frame is organized (Vnorth, Veast, Vdown). The vector is 1-based. In other words, GetVel(1) returns Vnorth. Various convenience enumerators are defined in FGJSBBase. The relevant enumerators for the velocity returned by this call are, eNorth=1, eEast=2, eDown=3. units ft/sec

Parameters
idxthe index of the velocity component desired (1-based).
Returns
The body frame velocity component.

Definition at line 294 of file FGPropagate.h.

◆ GetVel() [2/2]

const FGColumnVector3 & JSBSim::FGPropagate::GetVel ( void ) const
inline

Retrieves the velocity vector.

The vector returned is represented by an FGColumnVector reference. The vector for the velocity in Local frame is organized (Vnorth, Veast, Vdown). The vector is 1-based, so that the first element can be retrieved using the "()" operator. In other words, vVel(1) is Vnorth. Various convenience enumerators are defined in FGJSBBase. The relevant enumerators for the vector returned by this call are, eNorth=1, eEast=2, eDown=3. units ft/sec

Returns
The vehicle velocity vector with respect to the Earth centered frame, expressed in Local horizontal frame.

Definition at line 183 of file FGPropagate.h.

◆ GetVState()

const VehicleState & JSBSim::FGPropagate::GetVState ( void ) const
inline

Definition at line 521 of file FGPropagate.h.

◆ InitializeDerivatives()

void JSBSim::FGPropagate::InitializeDerivatives ( )

Definition at line 190 of file FGPropagate.cpp.

◆ InitModel()

bool JSBSim::FGPropagate::InitModel ( void )
virtual

Initializes the FGPropagate class after instantiation and prior to first execution.

The base class FGModel::InitModel is called first, initializing pointers to the other FGModel objects (and others).

Reimplemented from JSBSim::FGModel.

Definition at line 118 of file FGPropagate.cpp.

◆ NudgeBodyLocation()

void JSBSim::FGPropagate::NudgeBodyLocation ( const FGColumnVector3 & deltaLoc)
inline

Definition at line 595 of file FGPropagate.h.

◆ RecomputeLocalTerrainVelocity()

void JSBSim::FGPropagate::RecomputeLocalTerrainVelocity ( )

Definition at line 539 of file FGPropagate.cpp.

◆ Run()

bool JSBSim::FGPropagate::Run ( bool Holding)
virtual

Runs the state propagation model; called by the Executive Can pass in a value indicating if the executive is directing the simulation to Hold.

Parameters
Holdingif true, the executive has been directed to hold the sim from advancing time. Some models may ignore this flag, such as the Input model, which may need to be active to listen on a socket for the "Resume" command to be given.
Returns
false if no error

Reimplemented from JSBSim::FGModel.

Definition at line 218 of file FGPropagate.cpp.

◆ SetAltitudeASL()

void JSBSim::FGPropagate::SetAltitudeASL ( double altASL)

Definition at line 530 of file FGPropagate.cpp.

◆ SetAltitudeASLmeters()

void JSBSim::FGPropagate::SetAltitudeASLmeters ( double altASL)
inline

Definition at line 576 of file FGPropagate.h.

◆ SetDistanceAGL()

void JSBSim::FGPropagate::SetDistanceAGL ( double tt)

Definition at line 591 of file FGPropagate.cpp.

◆ SetDistanceAGLKm()

void JSBSim::FGPropagate::SetDistanceAGLKm ( double tt)

Definition at line 599 of file FGPropagate.cpp.

◆ SetEarthPositionAngle()

void JSBSim::FGPropagate::SetEarthPositionAngle ( double EPA)
inline

Sets the Earth position angle.

This is the relative angle around the Z axis of the ECEF frame with respect to the inertial frame.

Parameters
EPAEarth position angle in radians.

Definition at line 530 of file FGPropagate.h.

◆ SetHoldDown()

void JSBSim::FGPropagate::SetHoldDown ( bool hd)

Sets the property forces/hold-down.

This allows to do hard 'hold-down' such as for rockets on a launch pad with engines ignited.

Parameters
hdenables the 'hold-down' function if non-zero

Definition at line 284 of file FGPropagate.cpp.

◆ SetInertialOrientation()

void JSBSim::FGPropagate::SetInertialOrientation ( const FGQuaternion & Qi)

Definition at line 496 of file FGPropagate.cpp.

◆ SetInertialRates()

void JSBSim::FGPropagate::SetInertialRates ( const FGColumnVector3 & vRates)

Definition at line 515 of file FGPropagate.cpp.

◆ SetInertialVelocity()

void JSBSim::FGPropagate::SetInertialVelocity ( const FGColumnVector3 & Vi)

Definition at line 507 of file FGPropagate.cpp.

◆ SetInitialState()

void JSBSim::FGPropagate::SetInitialState ( const FGInitialCondition * FGIC)

Definition at line 143 of file FGPropagate.cpp.

◆ SetLatitude()

void JSBSim::FGPropagate::SetLatitude ( double lat)
inline

Definition at line 563 of file FGPropagate.h.

◆ SetLatitudeDeg()

void JSBSim::FGPropagate::SetLatitudeDeg ( double lat)
inline

Definition at line 568 of file FGPropagate.h.

◆ SetLocation() [1/2]

void JSBSim::FGPropagate::SetLocation ( const FGColumnVector3 & lv)
inline

Definition at line 584 of file FGPropagate.h.

◆ SetLocation() [2/2]

void JSBSim::FGPropagate::SetLocation ( const FGLocation & l)

Definition at line 635 of file FGPropagate.cpp.

◆ SetLongitude()

void JSBSim::FGPropagate::SetLongitude ( double lon)
inline

Definition at line 557 of file FGPropagate.h.

◆ SetLongitudeDeg()

void JSBSim::FGPropagate::SetLongitudeDeg ( double lon)
inline

Definition at line 562 of file FGPropagate.h.

◆ SetPosition()

void JSBSim::FGPropagate::SetPosition ( const double Lon,
const double Lat,
const double Radius )
inline

Definition at line 589 of file FGPropagate.h.

◆ SetPQR()

void JSBSim::FGPropagate::SetPQR ( unsigned int i,
double val )
inline

Definition at line 545 of file FGPropagate.h.

◆ SetRadius()

void JSBSim::FGPropagate::SetRadius ( double r)
inline

Definition at line 569 of file FGPropagate.h.

◆ SetTerrainElevation()

void JSBSim::FGPropagate::SetTerrainElevation ( double tt)

Definition at line 560 of file FGPropagate.cpp.

◆ SetUVW()

void JSBSim::FGPropagate::SetUVW ( unsigned int i,
double val )
inline

Definition at line 550 of file FGPropagate.h.

◆ SetVState()

void JSBSim::FGPropagate::SetVState ( const VehicleState & vstate)

Definition at line 606 of file FGPropagate.cpp.

Member Data Documentation

◆ in

struct JSBSim::FGPropagate::Inputs JSBSim::FGPropagate::in

The documentation for this class was generated from the following files: