![]() |
VR-Forces 4.0.4 Class Documentation
|
DtRotaryWingActuatorComponent is a kinematics-based model of a rotary wing aircraft that converts collective, cyclic, and pedal into acceleration, velocity, position, rotational velocity, and orientation. More...

Public Member Functions | |
| DtRotaryWingActuatorComponent (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtRotaryWingActuatorComponent () |
| destructor Removes process state from process state manager before deleting it. | |
| virtual bool | init () |
| to get access to the entity's localStateRepository, which this component will update, and then connect to the controller's ports. | |
| virtual DtString | type () const |
| Returns a string identifies the class type of component. | |
| virtual void | tick () |
| Calculate new kinematic state. | |
| virtual void | useFuel (double fuelUsed) |
| Fuel manipulation functions. | |
| virtual double | fuelLeft () const |
| virtual double | calculateFuel () const |
| Calculate the fuel used in the last time step. | |
| virtual void | fallFromSky () |
| This member function is called when an entity has been destroyed and is still in the air. | |
Static Public Member Functions | |
| static DtSimComponent * | creator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
Protected Member Functions | |
| virtual bool | createPortGroups () |
| Creates the local port groups. | |
| virtual bool | createPorts () |
| Creates the input ports and adds them to the component. | |
| virtual bool | createPSR () |
| Creates myProcessState data member, and adds it to our process state repository manager. | |
| virtual void | clampFrameRate () |
| Clamp the frame rate if the rate is too slow. | |
| virtual void | setLanded (const DtVector &localIntersectionPoint) |
| Sets the parameters for a landed entity. | |
| virtual bool | checkFlyingWithoutFuel () |
| Check to see if the entity is flying without fuel, and call fallFromSky if so. | |
| virtual void | calculateYawAcceleration () |
| Find yaw acceleration and new rate. | |
| virtual void | calculateYawRate () |
| virtual void | calculatePitchAcceleration () |
| Find pitch acceleration and new rate. | |
| virtual void | calculatePitchRate () |
| virtual void | calculateRollAcceleration () |
| Find roll acceleration and new rate. | |
| virtual void | calculateRollRate () |
| virtual void | calculateOrientation () |
| Uses current local orientation, rotationRates in SR, and dT. | |
| virtual void | calculateNormalizedBodyVelocity () |
| Put current velocity into body coordinates (AFTER rotating body). | |
| virtual void | calculateBodyGravity () |
| Put acceleration due to gravity in body coordinates. | |
| virtual void | calculateLiftAcceleration () |
| Calculate scalar accel in direction of lift (perpendicular to wings). | |
| virtual void | calculateDragAcceleration () |
| Calculate scalar drag accel opposite direction of current velocity. | |
| virtual void | calculateResultantAcceleration () |
| Sum the accelerations produced by forces acting on the body, and put the result into world coordinates. | |
| virtual void | integrate () |
| Find the new velocity and position. | |
| virtual void | updateRepository () |
| Sets the state to locally calculated values. | |
| virtual void | updateDisplay () const |
| Can be used to print control values in the console window. | |
| virtual void | checkLandedOrCrashed () |
| Check if the entity landed on the ground or crashed. | |
| virtual bool | isCrashedIntoGround (const DtVector &localPosition, DtVector &localIntersectionPoint) const |
| Determines if the entity has crashed into the ground. | |
| virtual void | sendDetonation (const DtVector &geocentricLocation) const |
| Sends a detonation interaction at the specified location, in geocentric coordinates. | |
| virtual bool | isSubsurface () const |
| Determine whether or not the configured entity is a subsurface entity or not. | |
| virtual bool | componentInitialized () const |
| Determine if the component has been properly initialized. | |
| virtual bool | engineOperational () const |
Protected Attributes | |
| DtRotaryWingEntityStateRepository * | myRotaryWingEntityState |
| DtRotaryWingActuatorDescriptor * | myRotaryWingActuatorDescriptor |
| DtReal | myMaxDragAcceleration |
| DtVector | myBodyRotationalAcceleration |
| DtVector | myBodyRotationRates |
| DtTaitBryan | myOrientation |
| DtDcm | myBodyToLocalMatrix |
| DtDcm | myLocalToBodyMatrix |
| DtReal | mySpeedRatioSquared |
| DtVector | myBodyVelocity |
| DtVector | myNormalizedBodyVelocity |
| DtVector | myBodyDrag |
| DtVector | myBodyGravity |
| DtVector | myBodyLift |
| DtVector | myBodyAcceleration |
| DtVector | myRelativeAcceleration |
| DtVector | myRelativeVelocity |
| DtReal | mySpeed |
| DtVector | myLocalPosition |
| DtVector | myLocalOrientation |
| DtReal | myAltitude |
| DtVector | myPreviousGroundClampedPosition |
| bool | myPrintedOutOfFuelMessage |
| DtRotaryWingFlightPSR * | myProcessState |
| Container for state data associated with this component. | |
Ports and Port Groups | |
| DtInputPortGroup * | myRotaryWingControlPortGroup |
| Input Port Group Name: rotary-wing-control Input Port Group Description: | |
| DtConstrainedAnalogInputPort * | myThrottlePort |
| Input Port Name: throttle Input Port Description: Input Port Range: 0. | |
| DtConstrainedDualAxisAnalogInputPort * | myCyclicPort |
| Input Port Name: cyclic Input Port Description: Input Port Range: X: -1. | |
| DtConstrainedAnalogInputPort * | myPedalPort |
| Input Port Name: pedal Input Port Description: Input Port Range: -1. | |
| DtConstrainedAnalogInputPort * | myCollectivePort |
| Input Port Name: collective Input Port Description: Input Port Range: 0. | |
Private Member Functions | |
| DtRotaryWingActuatorComponent () | |
| default constructor; not implemented | |
| DtRotaryWingActuatorComponent (const DtRotaryWingActuatorComponent &orig) | |
| copy constructor; not implemented | |
| DtRotaryWingActuatorComponent & | operator= (const DtRotaryWingActuatorComponent &orig) |
| assignment operator; not implemented | |
DtRotaryWingActuatorComponent is a kinematics-based model of a rotary wing aircraft that converts collective, cyclic, and pedal into acceleration, velocity, position, rotational velocity, and orientation.
End User Description: In addition, the actuator implements ground detection.
Uses Descriptor Type: DtRotaryWingActuatorDescriptor
| DtRotaryWingActuatorComponent::DtRotaryWingActuatorComponent | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = 0, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
(const DtString&,DtVrfObject*,DtSimManager*,
| name | Reader writer name of this component. |
| owner | The DtVrfObject that owns this component |
| simManager | The simulation manager (provides access to terrain, message interface, simulation clock). |
| desc | The component descriptor used to initialize this component. |
| parentRegistry | Pointer to the parent reader writer registry (the containing object that reads/writes this object). |
| virtual DtRotaryWingActuatorComponent::~DtRotaryWingActuatorComponent | ( | ) | [virtual] |
destructor Removes process state from process state manager before deleting it.
default constructor; not implemented
| DtRotaryWingActuatorComponent::DtRotaryWingActuatorComponent | ( | const DtRotaryWingActuatorComponent & | orig | ) | [private] |
copy constructor; not implemented
| virtual bool DtRotaryWingActuatorComponent::init | ( | ) | [virtual] |
to get access to the entity's localStateRepository, which this component will update, and then connect to the controller's ports.
Reimplemented from DtActuatorComponent.
| virtual DtString DtRotaryWingActuatorComponent::type | ( | ) | const [virtual] |
Returns a string identifies the class type of component.
Type values are defined in compTypes.h. DtSimComponent creation functions are registered with the DtSimComponentFactory using the type values as the key.
Reimplemented from DtSimComponent.
| virtual void DtRotaryWingActuatorComponent::tick | ( | ) | [virtual] |
Calculate new kinematic state.
Reimplemented from DtSimComponent.
| virtual void DtRotaryWingActuatorComponent::useFuel | ( | double | fuelUsed | ) | [virtual] |
Fuel manipulation functions.
Assumes the fuel resource has resource name "fuel" If not found, fuel consumption not will not be modeled.
| virtual double DtRotaryWingActuatorComponent::fuelLeft | ( | ) | const [virtual] |
| virtual double DtRotaryWingActuatorComponent::calculateFuel | ( | ) | const [virtual] |
Calculate the fuel used in the last time step.
| virtual void DtRotaryWingActuatorComponent::fallFromSky | ( | ) | [virtual] |
This member function is called when an entity has been destroyed and is still in the air.
The only acceleration applied is gravity. All rotation rates are set to 0.0. When the entity intersects the ground, a detonation interaction is generated at the point of impact. A munition type of <2, 0, 0, 0, 0, 0, 0> is used.
| static DtSimComponent* DtRotaryWingActuatorComponent::creator | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = 0, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) | [static] |
(const DtString&,DtVrfObject*,DtSimManager*,
| name | Reader writer name of this component. |
| owner | The DtVrfObject that owns this component |
| simManager | The simulation manager (provides access to terrain, message interface, simulation clock). |
| desc | The component descriptor used to initialize this component. |
| parentRegistry | Pointer to the parent reader writer registry (the containing object that reads/writes this object). |
| virtual bool DtRotaryWingActuatorComponent::createPortGroups | ( | ) | [protected, virtual] |
Creates the local port groups.
Reimplemented from DtSimComponent.
| virtual bool DtRotaryWingActuatorComponent::createPorts | ( | ) | [protected, virtual] |
Creates the input ports and adds them to the component.
Reimplemented from DtSimComponent.
| virtual bool DtRotaryWingActuatorComponent::createPSR | ( | ) | [protected, virtual] |
Creates myProcessState data member, and adds it to our process state repository manager.
Passes in the name and type specified in the component descriptor (if they exist) to the DtVrfProcessStateRepository::createRepository factory method. If name and/or type is not specified, uses the appropriate default strings defined in procSRTypes.h.
| virtual void DtRotaryWingActuatorComponent::clampFrameRate | ( | ) | [protected, virtual] |
Clamp the frame rate if the rate is too slow.
| virtual void DtRotaryWingActuatorComponent::setLanded | ( | const DtVector & | localIntersectionPoint | ) | [protected, virtual] |
Sets the parameters for a landed entity.
| virtual bool DtRotaryWingActuatorComponent::checkFlyingWithoutFuel | ( | ) | [protected, virtual] |
Check to see if the entity is flying without fuel, and call fallFromSky if so.
| virtual void DtRotaryWingActuatorComponent::calculateYawAcceleration | ( | ) | [protected, virtual] |
Find yaw acceleration and new rate.
| virtual void DtRotaryWingActuatorComponent::calculateYawRate | ( | ) | [protected, virtual] |
| virtual void DtRotaryWingActuatorComponent::calculatePitchAcceleration | ( | ) | [protected, virtual] |
Find pitch acceleration and new rate.
| virtual void DtRotaryWingActuatorComponent::calculatePitchRate | ( | ) | [protected, virtual] |
| virtual void DtRotaryWingActuatorComponent::calculateRollAcceleration | ( | ) | [protected, virtual] |
Find roll acceleration and new rate.
| virtual void DtRotaryWingActuatorComponent::calculateRollRate | ( | ) | [protected, virtual] |
| virtual void DtRotaryWingActuatorComponent::calculateOrientation | ( | ) | [protected, virtual] |
Uses current local orientation, rotationRates in SR, and dT.
Results placed in object pointed to by orientation argument.
| virtual void DtRotaryWingActuatorComponent::calculateNormalizedBodyVelocity | ( | ) | [protected, virtual] |
Put current velocity into body coordinates (AFTER rotating body).
| virtual void DtRotaryWingActuatorComponent::calculateBodyGravity | ( | ) | [protected, virtual] |
Put acceleration due to gravity in body coordinates.
| virtual void DtRotaryWingActuatorComponent::calculateLiftAcceleration | ( | ) | [protected, virtual] |
Calculate scalar accel in direction of lift (perpendicular to wings).
| virtual void DtRotaryWingActuatorComponent::calculateDragAcceleration | ( | ) | [protected, virtual] |
Calculate scalar drag accel opposite direction of current velocity.
| virtual void DtRotaryWingActuatorComponent::calculateResultantAcceleration | ( | ) | [protected, virtual] |
Sum the accelerations produced by forces acting on the body, and put the result into world coordinates.
| virtual void DtRotaryWingActuatorComponent::integrate | ( | ) | [protected, virtual] |
Find the new velocity and position.
| virtual void DtRotaryWingActuatorComponent::updateRepository | ( | ) | [protected, virtual] |
Sets the state to locally calculated values.
| virtual void DtRotaryWingActuatorComponent::updateDisplay | ( | ) | const [protected, virtual] |
Can be used to print control values in the console window.
| virtual void DtRotaryWingActuatorComponent::checkLandedOrCrashed | ( | ) | [protected, virtual] |
Check if the entity landed on the ground or crashed.
If landed, ground clamp the actuator. If crashed, set isDestroyed and isSmoking. Checks to see if the entity is below ground. If it is, the entity is set to destroyed, flaming, and smoking. Its velocity and acceleration vectors are set to <0.0, 0.0, 0.0>, and its Z-coordinate is set to the height of the terrain at that <X, Y> coordinate. If it is not below ground, checkLandedOrCrashed() checks to see if the following criteria are met for being in a landed state: Velocity along the (database) Z axis is greater than -3.0 meters/second, but less than 2.0 * dT meters/second Height above terrain is less than 2.0 meters Overall entity speed is less than 4.0 meters/second. If one or more of these criteria is false, checkLandedOrCrashed() sets the SR Landed flag to false and returns. Otherwise, the variables myLandPosition and myLandHeading are set to the entity’s current position and heading, and DtRotaryWingEntity::land() is called. The velocity, acceleration, and rotational velocity vectors are all set to <0.0, 0.0, 0.0>.
| virtual bool DtRotaryWingActuatorComponent::isCrashedIntoGround | ( | const DtVector & | localPosition, |
| DtVector & | localIntersectionPoint | ||
| ) | const [protected, virtual] |
Determines if the entity has crashed into the ground.
| localPosition | The position to test, in database coordinates. |
| physWorld | The physicalWorld to test against. |
| localIntersectionPoint | This parameter is filled with the results of the intersection test with the terrain database. |
| virtual void DtRotaryWingActuatorComponent::sendDetonation | ( | const DtVector & | geocentricLocation | ) | const [protected, virtual] |
Sends a detonation interaction at the specified location, in geocentric coordinates.
| virtual bool DtRotaryWingActuatorComponent::isSubsurface | ( | ) | const [protected, virtual] |
Determine whether or not the configured entity is a subsurface entity or not.
| virtual bool DtRotaryWingActuatorComponent::componentInitialized | ( | ) | const [protected, virtual] |
Determine if the component has been properly initialized.
The component must have a valid sim manager, entity state, actuator descriptor, and process state rep to be initialized properly. Additionally, it must have a valid terrain database, a valid coordinate system in the terrain database, and a valid exercise clock in order to be used. If any of these are missing, then the function returns false.
| virtual bool DtRotaryWingActuatorComponent::engineOperational | ( | ) | const [protected, virtual] |
| DtRotaryWingActuatorComponent& DtRotaryWingActuatorComponent::operator= | ( | const DtRotaryWingActuatorComponent & | orig | ) | [private] |
assignment operator; not implemented
DtRotaryWingEntityStateRepository* DtRotaryWingActuatorComponent::myRotaryWingEntityState [protected] |
DtRotaryWingActuatorDescriptor* DtRotaryWingActuatorComponent::myRotaryWingActuatorDescriptor [protected] |
Input Port Group Name: rotary-wing-control
Input Port Group Description:
Input Port Name: throttle
Input Port Description:
Input Port Range: 0.
to 1.
Input Port Default Value:
Input Group Parent: rotary-wing-control
Input Port Name: cyclic
Input Port Description:
Input Port Range: X: -1.
to 1. Y: -1. to 1.
Input Port Default Value:
Input Group Parent: rotary-wing-control
Input Port Name: pedal
Input Port Description:
Input Port Range: -1.
to 1.
Input Port Default Value:
Input Group Parent: rotary-wing-control
Input Port Name: collective
Input Port Description:
Input Port Range: 0.
to 1.
Input Port Default Value:
Input Group Parent: rotary-wing-control
DtReal DtRotaryWingActuatorComponent::myMaxDragAcceleration [protected] |
DtTaitBryan DtRotaryWingActuatorComponent::myOrientation [protected] |
DtDcm DtRotaryWingActuatorComponent::myBodyToLocalMatrix [protected] |
DtDcm DtRotaryWingActuatorComponent::myLocalToBodyMatrix [protected] |
DtReal DtRotaryWingActuatorComponent::mySpeedRatioSquared [protected] |
DtVector DtRotaryWingActuatorComponent::myBodyDrag [protected] |
DtVector DtRotaryWingActuatorComponent::myBodyGravity [protected] |
DtVector DtRotaryWingActuatorComponent::myBodyLift [protected] |
DtReal DtRotaryWingActuatorComponent::mySpeed [protected] |
DtReal DtRotaryWingActuatorComponent::myAltitude [protected] |
Container for state data associated with this component.
This state is saved and restored as part of a scenario (or checkpoint).