FGExternalReactions Class Reference

#include <FGExternalReactions.h>

Inherits FGModel.

List of all members.


Detailed Description

The external reactions capability in JSBSim really should be named "arbitrary forces", because this feature can be used to model a wide variety of forces that act on a vehicle. Some examples include: parachutes, catapult, arresting hook, and tow line.

This class acts similarly to the other "manager classes" (FGPropulsion, FGFCS, FGGroundReactions, FGAerodynamics) because it manages collections of constituent forces. The individual forces are implemented with the FGExternalForce class.

The format of the optional external reactions section in the config file is as follows:

<external_reactions>

  <!-- Interface properties, a.k.a. property declarations -->
  <property> ... </property>
    
  <force name="name" frame="BODY | LOCAL | WIND" unit="unit">
    ...
  </force>

  <!-- Additional force definitions may follow -->
  <force name="name" frame="BODY | LOCAL | WIND" unit="unit">
    ...
  </force>

</external_reactions>

See the FGExternalForce class for more information on the format of the force specification itself.

When force elements are encountered in the configuration file, a new instance of the FGExternalForce class is created and a pointer to the class is pushed onto the Forces vector.

This class is one of a few of the manager classes that allows properties to be "declared". In code, these are represented by the interface_properties vector. Properties that have not yet been created in an already parsed section of the configuration file and that are used in the definition of an external force should be declared in the external_reactions section because they will not be created automatically, and so would cause an error, since the property cannot be found to exist.

See the FGExternalForce documentation for details on how forces are actually calculated.

Definition at line 116 of file FGExternalReactions.h.


Public Member Functions

 FGExternalReactions (FGFDMExec *fdmex)
 Constructor.
FGColumnVector3 GetForces (void)
 Retrieves the total forces defined in the external reactions.
FGColumnVector3 GetMoments (void)
 Retrieves the total moment resulting from the forces defined in the external reactions.
bool InitModel (void)
bool Load (Element *el)
 Loads the external forces from the XML configuration file.
bool Run (void)
 Sum all the constituent forces for this cycle.
 ~FGExternalReactions (void)
 Destructor.

Constructor & Destructor Documentation

FGExternalReactions ( FGFDMExec fdmex  ) 

Parameters:
fdmex pointer to the main executive class.

Definition at line 59 of file FGExternalReactions.cpp.

~FGExternalReactions ( void   ) 

Within the destructor the Forces and interface_properties vectors are cleared out and the items pointed to are deleted.

Definition at line 106 of file FGExternalReactions.cpp.


Member Function Documentation

FGColumnVector3 GetForces ( void   )  [inline]

Returns:
the total force in pounds.

Definition at line 148 of file FGExternalReactions.h.

FGColumnVector3 GetMoments ( void   )  [inline]

Returns:
the total moment in foot-pounds.

Definition at line 153 of file FGExternalReactions.h.

bool Load ( Element el  )  [virtual]

If the external_reactions section is encountered in the vehicle configuration file, this Load() method is called. All external forces will be parsed, and a FGExternalForce object will be instantiated for each force definition.

Parameters:
el a pointer to the XML element holding the external reactions definition.

Reimplemented from FGModel.

Definition at line 67 of file FGExternalReactions.cpp.

bool Run ( void   )  [virtual]

Returns:
true always.

Reimplemented from FGModel.

Definition at line 126 of file FGExternalReactions.cpp.


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

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