#include <FGExternalForce.h>
Inherits FGForce.
Much of the substance of this class is located in the FGForce base class, from which this class is derived.
Here is the XML definition of a force (optional items are in []):
<force name="name" frame="BODY | LOCAL | WIND"> [<function> ... </function>] <location unit="{IN | M}"> <x> {number} </x> <y> {number} </y> <z> {number} </z> </location> [<direction> <!-- optional initial direction vector --> <x> {number} </x> <y> {number} </y> <z> {number} </z> </direction>] </force>
The initial direction can optionally be set by specifying a unit vector in the chosen frame (body, local, or wind). The direction is specified at runtime through setting any/all of the following properties:
external_reactions/{force name}/x
external_reactions/{force name}/y
external_reactions/{force name}/z
As an example, a parachute can be defined oriented in the wind axis frame so the drag always acts in the drag direction - opposite the positive X axis. That does not include the effects of parachute oscillations, but those could be handled in the calling application.
The force direction is not actually required to be specified as a unit vector, but prior to the force vector being calculated, the direction vector is normalized.
Definition at line 131 of file FGExternalForce.h.
Public Member Functions | |
| FGExternalForce (const FGExternalForce &extForce) | |
| Copy Constructor. | |
| FGExternalForce (FGFDMExec *FDMExec, Element *el, int index) | |
| Constructor. | |
| FGExternalForce (FGFDMExec *FDMExec) | |
| Constructor. | |
| double | GetAzimuth (void) const |
| FGColumnVector3 & | GetBodyForces (void) |
| double | GetMagnitude (void) const |
| double | GetX (void) const |
| double | GetY (void) const |
| double | GetZ (void) const |
| void | SetAzimuth (double az) |
| void | SetMagnitude (double mag) |
| void | SetX (double x) |
| void | SetY (double y) |
| void | SetZ (double z) |
| ~FGExternalForce () | |
| Destructor. | |
| FGExternalForce | ( | FGFDMExec * | FDMExec | ) |
| FDMExec | pointer to the main executive class. |
| FGExternalForce | ( | FGFDMExec * | FDMExec, | |
| Element * | el, | |||
| int | index | |||
| ) |
| FDMExec | pointer to the main executive class. | |
| el | pointer to the XML element defining an individual force. | |
| index | the position of this force object in the whole list. |
Definition at line 64 of file FGExternalForce.cpp.
| FGExternalForce | ( | const FGExternalForce & | extForce | ) |
| extForce | a reference to an existing FGExternalForce object |
Definition at line 138 of file FGExternalForce.cpp.
1.5.5