FGPropagate Class Reference

#include <FGPropagate.h>

Inherits FGModel.

List of all members.


Detailed Description

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

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

Author:
Jon S. Berndt, Mathias Froehlich
Version:
Id
FGPropagate.h,v 1.28 2009/05/26 05:35:42 jberndt Exp

Definition at line 99 of file FGPropagate.h.


Public Types

enum  eIntegrateType {
  eNone = 0, eRectEuler, eTrapezoidal, eAdamsBashforth2,
  eAdamsBashforth3
}
 These define the indices use to select the various integrators.

Public Member Functions

void CalculateLocationdot (void)
void CalculatePQRdot (void)
void CalculateQuatdot (void)
void CalculateUVWdot (void)
 FGPropagate (FGFDMExec *Executive)
 Constructor.
double GetAltitudeASL (void) const
 Returns the current altitude above sea level.
double GetAltitudeASLmeters (void) const
 Returns the current altitude above sea level.
double GetCosEuler (int idx) const
 Retrieves the cosine of a vehicle Euler angle component.
double GetDistanceAGL (void) const
double GetEuler (int axis) const
 Retrieves a vehicle Euler angle component.
const FGColumnVector3GetEuler (void) const
 Retrieves the Euler angles that define the vehicle orientation.
double GetGeodeticAltitude (void) const
double GetGeodLatitudeDeg (void) const
double GetGeodLatitudeRad (void) const
double Gethdot (void) const
 Returns the current altitude rate.
double GetInertialVelocityMagnitude (void) const
 Retrieves the total inertial velocity in ft/sec.
double GetLatitude (void) const
double GetLatitudeDeg (void) const
double GetLocalTerrainRadius (void) const
 Returns the "constant" LocalTerrainRadius.
const FGLocationGetLocation (void) const
double GetLongitude (void) const
double GetLongitudeDeg (void) const
double GetPQR (int axis) const
 Retrieves a body frame angular velocity component relative to the ECEF frame.
const FGColumnVector3GetPQR (void) const
 Retrieves the body angular rates vector, relative to the ECEF frame.
double GetPQRdot (int axis) const
 Retrieves a body frame angular acceleration component.
const FGColumnVector3GetPQRdot (void) const
 Retrieves the body axis angular acceleration vector.
double GetPQRi (int axis) const
 Retrieves a body frame angular velocity component relative to the ECI (inertial) frame.
const FGColumnVector3GetPQRi (void) const
 Retrieves the body angular rates vector, relative to the ECI (inertial) frame.
const FGQuaternion GetQuaternion (void) const
double GetRadius (void) const
double GetSeaLevelRadius (void) const
double GetSinEuler (int idx) const
 Retrieves the sine of a vehicle Euler angle component.
const FGMatrix33GetTb2ec (void) const
 Retrieves the body-to-ECEF 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 FGMatrix33GetTec2i (void)
 Retrieves the ECEF-to-ECI transformation matrix.
const FGMatrix33GetTec2l (void) const
 Retrieves the ECEF-to-local transformation matrix.
double GetTerrainElevation (void) const
const FGMatrix33GetTi2ec (void)
 Retrieves the ECI-to-ECEF transformation matrix.
const FGMatrix33GetTl2b (void) const
 Retrieves the local-to-body transformation matrix.
const FGMatrix33GetTl2ec (void) const
 Retrieves the local-to-ECEF transformation matrix.
double GetUVW (int idx) const
 Retrieves a body frame velocity component.
const FGColumnVector3GetUVW (void) const
 Retrieves the body frame vehicle velocity vector.
double GetUVWdot (int idx) const
 Retrieves a body frame acceleration component.
const FGColumnVector3GetUVWdot (void) const
 Retrieves the body axis acceleration.
double GetVel (int idx) const
 Retrieves a Local frame velocity component.
const FGColumnVector3GetVel (void) const
 Retrieves the velocity vector.
VehicleStateGetVState (void)
bool InitModel (void)
 Initializes the FGPropagate class after instantiation and prior to first execution.
void RecomputeLocalTerrainRadius (void)
bool Run (void)
 Runs the Propagate model; called by the Executive.
void SetAltitudeASL (double altASL)
void SetAltitudeASLmeters (double altASL)
void SetDistanceAGL (double tt)
void SetInitialState (const FGInitialCondition *)
void SetLatitude (double lat)
void SetLatitudeDeg (double lat)
void SetLocation (const FGLocation &l)
void SetLongitude (double lon)
void SetLongitudeDeg (double lon)
void SetPQR (unsigned int i, double val)
void SetRadius (double r)
void SetSeaLevelRadius (double tt)
void SetTerrainElevation (double tt)
void SetUVW (unsigned int i, double val)
void SetVState (VehicleState *vstate)
 ~FGPropagate ()
 Destructor.

Classes

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

Constructor & Destructor Documentation

FGPropagate ( FGFDMExec Executive  ) 

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:
    Executive a pointer to the parent executive object

Definition at line 76 of file FGPropagate.cpp.


Member Function Documentation

double GetAltitudeASL ( void   )  const [inline]

This function returns the altitude above sea level. units ft

Returns:
The current altitude above sea level in feet.

Definition at line 294 of file FGPropagate.h.

double GetAltitudeASLmeters ( void   )  const [inline]

This function returns the altitude above sea level. units meters

Returns:
The current altitude above sea level in meters.

Definition at line 301 of file FGPropagate.h.

double GetCosEuler ( int  idx  )  const [inline]

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 365 of file FGPropagate.h.

double GetEuler ( int  axis  )  const [inline]

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 353 of file FGPropagate.h.

const FGColumnVector3& GetEuler ( void   )  const [inline]

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 244 of file FGPropagate.h.

double Gethdot ( void   )  const [inline]

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

Returns:
The current rate of change in altitude.

Definition at line 384 of file FGPropagate.h.

double GetLocalTerrainRadius ( void   )  const

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 475 of file FGPropagate.cpp.

double GetPQR ( int  axis  )  const [inline]

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:
axis the index of the angular velocity component desired (1-based).
Returns:
The body frame angular velocity component.

Definition at line 314 of file FGPropagate.h.

const FGColumnVector3& GetPQR ( void   )  const [inline]

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 angular rates in rad/sec.

Definition at line 198 of file FGPropagate.h.

double GetPQRdot ( int  axis  )  const [inline]

Retrieves a body frame angular acceleration component. The angular acceleration returned is extracted from the vPQRdot vector (an FGColumnVector). The vector for the angular acceleration in Body frame is organized (Pdot, Qdot, Rdot). The vector is 1-based. In other words, GetPQRdot(1) returns Pdot (roll acceleration). Various convenience enumerators are defined in FGJSBBase. The relevant enumerators for the angular acceleration returned by this call are, eP=1, eQ=2, eR=3. units rad/sec^2

Parameters:
axis the index of the angular acceleration component desired (1-based).
Returns:
The body frame angular acceleration component.

Definition at line 341 of file FGPropagate.h.

const FGColumnVector3& GetPQRdot ( void   )  const [inline]

Retrieves the body axis angular acceleration vector in rad/sec^2. The angular acceleration vector is determined from the applied forces and accounts for a rotating frame. The vector returned is represented by an FGColumnVector reference. The vector for the angular acceleration in Body frame is organized (Pdot, Qdot, Rdot). The vector is 1-based, so that the first element can be retrieved using the "()" operator. In other words, vPQRdot(1) is Pdot. 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^2

Returns:
The angular acceleration vector.

Definition at line 227 of file FGPropagate.h.

double GetPQRi ( int  axis  )  const [inline]

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:
axis the index of the angular velocity component desired (1-based).
Returns:
The body frame angular velocity component.

Definition at line 327 of file FGPropagate.h.

const FGColumnVector3& GetPQRi ( void   )  const [inline]

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 angular rates in rad/sec.

Definition at line 212 of file FGPropagate.h.

double GetSinEuler ( int  idx  )  const [inline]

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 377 of file FGPropagate.h.

const FGMatrix33& GetTb2ec ( void   )  const [inline]

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

Definition at line 431 of file FGPropagate.h.

const FGMatrix33& GetTb2l ( void   )  const [inline]

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 423 of file FGPropagate.h.

const FGMatrix33& GetTec2b ( void   )  const [inline]

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

Definition at line 427 of file FGPropagate.h.

const FGMatrix33 & GetTec2i ( void   ) 

Returns:
a reference to the ECEF-to-ECI transformation matrix.

Definition at line 461 of file FGPropagate.cpp.

const FGMatrix33& GetTec2l ( void   )  const [inline]

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 445 of file FGPropagate.h.

const FGMatrix33 & GetTi2ec ( void   ) 

Returns:
a reference to the ECI-to-ECEF matrix.

Definition at line 454 of file FGPropagate.cpp.

const FGMatrix33& GetTl2b ( void   )  const [inline]

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 417 of file FGPropagate.h.

const FGMatrix33& GetTl2ec ( void   )  const [inline]

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 451 of file FGPropagate.h.

double GetUVW ( int  idx  )  const [inline]

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:
idx the index of the velocity component desired (1-based).
Returns:
The body frame velocity component.

Definition at line 257 of file FGPropagate.h.

const FGColumnVector3& GetUVW ( void   )  const [inline]

The vector returned is represented by an FGColumnVector 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 170 of file FGPropagate.h.

double GetUVWdot ( int  idx  )  const [inline]

Retrieves a body frame acceleration component. The acceleration returned is extracted from the vUVWdot vector (an FGColumnVector). The vector for the acceleration in Body frame is organized (Ax, Ay, Az). The vector is 1-based. In other words, GetUVWdot(1) returns Ax. Various convenience enumerators are defined in FGJSBBase. The relevant enumerators for the acceleration returned by this call are, eX=1, eY=2, eZ=3. units ft/sec^2

Parameters:
idx the index of the acceleration component desired (1-based).
Returns:
The body frame acceleration component.

Definition at line 270 of file FGPropagate.h.

const FGColumnVector3& GetUVWdot ( void   )  const [inline]

Retrieves the computed body axis accelerations based on the applied forces and accounting for a rotating body frame. The vector returned is represented by an FGColumnVector reference. The vector for the acceleration in Body frame is organized (Ax, Ay, Az). The vector is 1-based, so that the first element can be retrieved using the "()" operator. In other words, vUVWdot(1) is Ax. 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^2

Returns:
Body axis translational acceleration in ft/sec^2.

Definition at line 184 of file FGPropagate.h.

double GetVel ( int  idx  )  const [inline]

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:
idx the index of the velocity component desired (1-based).
Returns:
The body frame velocity component.

Definition at line 283 of file FGPropagate.h.

const FGColumnVector3& GetVel ( void   )  const [inline]

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 158 of file FGPropagate.h.

bool InitModel ( void   )  [virtual]

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

Reimplemented from FGModel.

Definition at line 117 of file FGPropagate.cpp.

bool Run ( void   )  [virtual]

Returns:
false if no error

Reimplemented from FGModel.

Definition at line 214 of file FGPropagate.cpp.


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

Generated on Tue May 26 00:55:12 2009 for JSBSim Flight Dynamics Model by  doxygen 1.5.5