![]() |
VR-Forces 4.0.4 Class Documentation
|
DtFixedWingActuatorComponent provides a simple, kinematics-based model for air motion based on throttle, stick, and pedal inputs. More...

Public Member Functions | |
| DtFixedWingActuatorComponent (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtFixedWingActuatorComponent () |
| 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 () |
| Calls either doFlying or doTaxiing, based on a onGround() call to myFixedWingEntityState. | |
| virtual void | calculateBodyVelocity (const DtVector &oldRelativeVelocity, const DtDcm &newLocalOrientation, DtVector &newBodyVelocity) |
| Put current velocity into body coordinates (AFTER rotating body). | |
| virtual void | calculateAirborneAcceleration (const DtVector oldLocalPosition, double oldSpeed, const DtDcm &newLocalOrientation, const DtVector &newBodyVelocity, double throttle, DtVector &newRelativeAcceleration) |
| Calculates the sum acceleration from myBodyGravity, myBodyDrag and myBodyThrust. | |
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 void | doFlying () |
| When the plane is in the air, this does the actual flying. | |
| virtual void | doTaxiing () |
| When the FWE is on the ground, this does the actual taxiing. | |
| virtual bool | isTouchingDown (const DtVector &newLocalPosition, const DtVector &newRelativeVelocity) |
| Returns true of false depending on whether the aircraft is currently landing or not. | |
| virtual bool | isTakingOff (bool isOnGround, double speed) |
| Returns true of false depending on whether the aircraft is currently taking off or not. | |
| virtual bool | updateGroundInteractionPoints (DtGroundInteractionPt *left, DtGroundInteractionPt *right, DtGroundInteractionPt *nose, DtGroundInteractionPt *center, const DtDcm &localOrientation, const DtVector &localPosition, double halfHeightOfTerrainIntersectChord) |
| virtual double | calculateYawRate (double pedal) |
| These functions are for when the FWEs are in the AIR. | |
| virtual double | calculatePitchRate (double stickYValue) |
| Find pitch rate. | |
| virtual double | calculateRollRate (double stickXValue) |
| Find roll rate. | |
| virtual void | calculateBodyRotationRates (double pedal, double stickXValue, double stickYValue, DtVector &newBodyRotationRates) |
| virtual void | calculateOrientation (const DtDcm &oldLocalOrientation, const DtVector &newBodyRotationRates, DtDcm &newLocalOrientation) |
| Uses current local orientation, rotationRates in SR, and dT. | |
| virtual void | calculateBodyGravity (const DtVector oldLocalPosition, const DtDcm &newLocalOrientation, DtVector &newBodyGravityAcceleration) |
| Put acceleration due to gravity in body coordinates. | |
| virtual void | calculateThrustAcceleration (double throttle, DtVector &newBodyThrustAccleration) |
| Calculate scalar accel in direction of thrust based on the throttle port and the maximum thrust, and store the value in myBodyThrust[0]. | |
| virtual void | calculateDragAcceleration (double oldSpeed, const DtVector &newBodyVelocity, bool flapsDeployed, DtVector &newBodyDragAccleration) |
| Calculate scalar drag accel opposite direction of current velocity. | |
| virtual void | fallFromSky (const DtString &reason=DtString::nullString()) |
| Causes the entity to fall from the sky. | |
| virtual bool | collidesWithGround (const DtVector &oldLocalPosition, const DtVector &newLocalPosition, DtVector &localCenterGoundPosition) |
| const DtVector& newLocalPosition, const DtDcm& newLocalOrientation, DtVector& localCenterGroundPosition); | |
| void | integrate (const DtVector &oldLocalPosition, const DtVector &oldRelativeVelocity, const DtVector &newRelativeAcceleration, DtVector &newLocalPosition, DtVector &newRelativeVelocity) |
| Integrates myRelativeVelocity and myLocalPosition. | |
| virtual void | useFuel (double fuelUsed) |
| Assumes the fuel resource has resource name "fuel" If not found, fuel consumption not will not be modelled. | |
| virtual double | fuelLeft () const |
| virtual double | calculateHeading (double oldHeading, double steering, double dT, double speed, double turningRadius) |
| These functions are for when the FWEs are on the GROUND. | |
| virtual void | calculateScalarVelocityAndAcceleration (double oldPitch, double &scalarVelocity, double &scalarAcceleration) |
| virtual double | calculateMaxGroundSpeed () |
| virtual double | calculateMaxGroundAcceleration () |
| virtual double | calculateAcceleration (double pitch, double maxSpeed, double maxAccel) |
| virtual double | calculateAccelerationFromThrottle () |
| virtual double | calculateAccelerationFromSlope (double slope) |
| virtual double | calculateAccelerationFromResistance (double maxSpeed, double maxAccel) |
| virtual double | calculateAccelerationFromBrake (double otherAccels) |
| virtual DtVector | calculateProjectedLocation (const DtVector &oldLocalPosition, const DtVector &newBodyAcceleration, const DtVector &oldBodyVelocity, double newHeading) |
| virtual void | calculateOrientationAndPositionOnGround (const DtVector &newLocalProjectedLocation, double newHeading, DtDcm &newLocalOrientation, DtVector &newLocalPosition) |
| virtual void | updateRepository (const DtVector &newLocalPosition, const DtVector &newRelativeVelocity, const DtVector &newRelativeAcceleration, const DtDcm &newLocalOrientation, const DtVector &newBodyRotationRates, bool isOnGround, const DtAppearance &newAppearance) |
| virtual void | updateDisplay () const |
| virtual double | maxThrustAcceleration () const |
| These accessors to the actuator's parameters are provided for use by the controllers that must control it. | |
| virtual double | maxClimbRate () const |
| virtual double | maxYawVelocity () const |
| virtual double | maxPitchVelocity () const |
| virtual double | maxRollVelocity () const |
| virtual double | maxAltitude () const |
| 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 | sendDetonation (const DtVector &geocentricPosition) |
| DtFixedWingActuatorComponent () | |
| default constructor; not implemented | |
| DtFixedWingActuatorComponent (const DtFixedWingActuatorComponent &orig) | |
| copy constructor; not implemented | |
| const DtFixedWingActuatorComponent & | operator= (const DtFixedWingActuatorComponent &orig) |
| assignment operator; not implemented | |
Protected Attributes | |
| DtFixedWingEntityStateRepository * | myFixedWingEntityState |
| DtFixedWingActuatorDescriptor * | myFixedWingActuatorDescriptor |
| DtFixedWingFlightPSR * | myProcessState |
| Container for state data associated with this component. | |
| bool | myFirstTick |
| bool | mySentFallingMessage |
| Used to make sure fall message is only sent once. | |
Ports and Port Groups | |
| DtInputPortGroup * | myFixedWingControlPortGroup |
| Input Port Group Name: fixed-wing-control Input Port Group Description: Provides input to the fixed-wing actuator (flight-kinematics). | |
| DtConstrainedAnalogInputPort * | myThrottlePort |
| Input Port Name: throttle Input Port Description: Input Port Range: 0. | |
| DtConstrainedDualAxisAnalogInputPort * | myStickPort |
| Input Port Name: stick Input Port Description: Input Port Range: X:-1. | |
| DtConstrainedAnalogInputPort * | myPedalPort |
| Input Port Name: pedal Input Port Description: Input Port Range: -1. | |
| DtConstrainedAnalogInputPort * | myBrakePort |
| Input Port Name: brake Input Port Description: Input Port Range: 0. | |
| DtBooleanInputPort * | myFlapsDeployedPort |
| Input Port Name: flaps Input Port Description: Input Port Range: Input Port Default Value: false Input Group Parent: fixed-wing-control. | |
DtFixedWingActuatorComponent provides a simple, kinematics-based model for air motion based on throttle, stick, and pedal inputs.
End User Description: DtFixedWingActuatorComponent is based on the original DtFixedWingActuatorComponent, but instead of stick and pedal control values causing changes in rotational acceleration, in this simplified model they effect changes in rotational velocity instead. So 0 x/y stick and 0 pedal will result in no rotation of the airframe.
Uses Descriptor Type: DtComponentDescriptor
| DtFixedWingActuatorComponent::DtFixedWingActuatorComponent | ( | 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 DtFixedWingActuatorComponent::~DtFixedWingActuatorComponent | ( | ) | [virtual] |
destructor Removes process state from process state manager before deleting it.
| DtFixedWingActuatorComponent::DtFixedWingActuatorComponent | ( | ) | [protected] |
default constructor; not implemented
| DtFixedWingActuatorComponent::DtFixedWingActuatorComponent | ( | const DtFixedWingActuatorComponent & | orig | ) | [protected] |
copy constructor; not implemented
| virtual bool DtFixedWingActuatorComponent::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 DtFixedWingActuatorComponent::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 DtFixedWingActuatorComponent::tick | ( | ) | [virtual] |
Calls either doFlying or doTaxiing, based on a onGround() call to myFixedWingEntityState.
Reimplemented from DtSimComponent.
| static DtSimComponent* DtFixedWingActuatorComponent::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 void DtFixedWingActuatorComponent::calculateBodyVelocity | ( | const DtVector & | oldRelativeVelocity, |
| const DtDcm & | newLocalOrientation, | ||
| DtVector & | newBodyVelocity | ||
| ) | [virtual] |
Put current velocity into body coordinates (AFTER rotating body).
Uses myLocalToBodyMatrix, which is calculated by calculateOrientation(). Stores the result in myNormalizedBodyVelocity.
| virtual void DtFixedWingActuatorComponent::calculateAirborneAcceleration | ( | const DtVector | oldLocalPosition, |
| double | oldSpeed, | ||
| const DtDcm & | newLocalOrientation, | ||
| const DtVector & | newBodyVelocity, | ||
| double | throttle, | ||
| DtVector & | newRelativeAcceleration | ||
| ) | [virtual] |
Calculates the sum acceleration from myBodyGravity, myBodyDrag and myBodyThrust.
Stores the result in myRelativeAcceleration. This function should only be called when the FWE is in the AIR!
| virtual void DtFixedWingActuatorComponent::doFlying | ( | ) | [protected, virtual] |
When the plane is in the air, this does the actual flying.
| virtual void DtFixedWingActuatorComponent::doTaxiing | ( | ) | [protected, virtual] |
When the FWE is on the ground, this does the actual taxiing.
| virtual bool DtFixedWingActuatorComponent::isTouchingDown | ( | const DtVector & | newLocalPosition, |
| const DtVector & | newRelativeVelocity | ||
| ) | [protected, virtual] |
Returns true of false depending on whether the aircraft is currently landing or not.
| virtual bool DtFixedWingActuatorComponent::isTakingOff | ( | bool | isOnGround, |
| double | speed | ||
| ) | [protected, virtual] |
Returns true of false depending on whether the aircraft is currently taking off or not.
| virtual bool DtFixedWingActuatorComponent::updateGroundInteractionPoints | ( | DtGroundInteractionPt * | left, |
| DtGroundInteractionPt * | right, | ||
| DtGroundInteractionPt * | nose, | ||
| DtGroundInteractionPt * | center, | ||
| const DtDcm & | localOrientation, | ||
| const DtVector & | localPosition, | ||
| double | halfHeightOfTerrainIntersectChord | ||
| ) | [protected, virtual] |
| virtual double DtFixedWingActuatorComponent::calculateYawRate | ( | double | pedal | ) | [protected, virtual] |
These functions are for when the FWEs are in the AIR.
They are NOT supposed to be called when the FWEs are on the GROUND.
Find yaw rate.
| virtual double DtFixedWingActuatorComponent::calculatePitchRate | ( | double | stickYValue | ) | [protected, virtual] |
Find pitch rate.
| virtual double DtFixedWingActuatorComponent::calculateRollRate | ( | double | stickXValue | ) | [protected, virtual] |
Find roll rate.
| virtual void DtFixedWingActuatorComponent::calculateBodyRotationRates | ( | double | pedal, |
| double | stickXValue, | ||
| double | stickYValue, | ||
| DtVector & | newBodyRotationRates | ||
| ) | [protected, virtual] |
| virtual void DtFixedWingActuatorComponent::calculateOrientation | ( | const DtDcm & | oldLocalOrientation, |
| const DtVector & | newBodyRotationRates, | ||
| DtDcm & | newLocalOrientation | ||
| ) | [protected, virtual] |
Uses current local orientation, rotationRates in SR, and dT.
Results placed in object pointed to by orientation argument.
| virtual void DtFixedWingActuatorComponent::calculateBodyGravity | ( | const DtVector | oldLocalPosition, |
| const DtDcm & | newLocalOrientation, | ||
| DtVector & | newBodyGravityAcceleration | ||
| ) | [protected, virtual] |
Put acceleration due to gravity in body coordinates.
| virtual void DtFixedWingActuatorComponent::calculateThrustAcceleration | ( | double | throttle, |
| DtVector & | newBodyThrustAccleration | ||
| ) | [protected, virtual] |
Calculate scalar accel in direction of thrust based on the throttle port and the maximum thrust, and store the value in myBodyThrust[0].
| virtual void DtFixedWingActuatorComponent::calculateDragAcceleration | ( | double | oldSpeed, |
| const DtVector & | newBodyVelocity, | ||
| bool | flapsDeployed, | ||
| DtVector & | newBodyDragAccleration | ||
| ) | [protected, virtual] |
Calculate scalar drag accel opposite direction of current velocity.
Stores the result in myBodyDrag. This function should only be called when the FWE is in the AIR! When flapsDeployed is true, the drag from flaps is factored in as well.
| virtual void DtFixedWingActuatorComponent::fallFromSky | ( | const DtString & | reason = DtString::nullString() | ) | [protected, virtual] |
Causes the entity to fall from the sky.
If this is the first time this method was called since the entity has been flying correctly, the optional reason message is passed to the object console for the entity.
| virtual bool DtFixedWingActuatorComponent::collidesWithGround | ( | const DtVector & | oldLocalPosition, |
| const DtVector & | newLocalPosition, | ||
| DtVector & | localCenterGoundPosition | ||
| ) | [protected, virtual] |
const DtVector& newLocalPosition, const DtDcm& newLocalOrientation, DtVector& localCenterGroundPosition);
| void DtFixedWingActuatorComponent::integrate | ( | const DtVector & | oldLocalPosition, |
| const DtVector & | oldRelativeVelocity, | ||
| const DtVector & | newRelativeAcceleration, | ||
| DtVector & | newLocalPosition, | ||
| DtVector & | newRelativeVelocity | ||
| ) | [protected] |
Integrates myRelativeVelocity and myLocalPosition.
| virtual void DtFixedWingActuatorComponent::useFuel | ( | double | fuelUsed | ) | [protected, virtual] |
Assumes the fuel resource has resource name "fuel" If not found, fuel consumption not will not be modelled.
| virtual double DtFixedWingActuatorComponent::fuelLeft | ( | ) | const [protected, virtual] |
| virtual double DtFixedWingActuatorComponent::calculateHeading | ( | double | oldHeading, |
| double | steering, | ||
| double | dT, | ||
| double | speed, | ||
| double | turningRadius | ||
| ) | [protected, virtual] |
These functions are for when the FWEs are on the GROUND.
They are NOT supposed to be called when the FWEs are in the AIR.
| virtual void DtFixedWingActuatorComponent::calculateScalarVelocityAndAcceleration | ( | double | oldPitch, |
| double & | scalarVelocity, | ||
| double & | scalarAcceleration | ||
| ) | [protected, virtual] |
| virtual double DtFixedWingActuatorComponent::calculateMaxGroundSpeed | ( | ) | [protected, virtual] |
| virtual double DtFixedWingActuatorComponent::calculateMaxGroundAcceleration | ( | ) | [protected, virtual] |
| virtual double DtFixedWingActuatorComponent::calculateAcceleration | ( | double | pitch, |
| double | maxSpeed, | ||
| double | maxAccel | ||
| ) | [protected, virtual] |
| virtual double DtFixedWingActuatorComponent::calculateAccelerationFromThrottle | ( | ) | [protected, virtual] |
| virtual double DtFixedWingActuatorComponent::calculateAccelerationFromSlope | ( | double | slope | ) | [protected, virtual] |
| virtual double DtFixedWingActuatorComponent::calculateAccelerationFromResistance | ( | double | maxSpeed, |
| double | maxAccel | ||
| ) | [protected, virtual] |
| virtual double DtFixedWingActuatorComponent::calculateAccelerationFromBrake | ( | double | otherAccels | ) | [protected, virtual] |
| virtual DtVector DtFixedWingActuatorComponent::calculateProjectedLocation | ( | const DtVector & | oldLocalPosition, |
| const DtVector & | newBodyAcceleration, | ||
| const DtVector & | oldBodyVelocity, | ||
| double | newHeading | ||
| ) | [protected, virtual] |
| virtual void DtFixedWingActuatorComponent::calculateOrientationAndPositionOnGround | ( | const DtVector & | newLocalProjectedLocation, |
| double | newHeading, | ||
| DtDcm & | newLocalOrientation, | ||
| DtVector & | newLocalPosition | ||
| ) | [protected, virtual] |
| virtual void DtFixedWingActuatorComponent::updateRepository | ( | const DtVector & | newLocalPosition, |
| const DtVector & | newRelativeVelocity, | ||
| const DtVector & | newRelativeAcceleration, | ||
| const DtDcm & | newLocalOrientation, | ||
| const DtVector & | newBodyRotationRates, | ||
| bool | isOnGround, | ||
| const DtAppearance & | newAppearance | ||
| ) | [protected, virtual] |
| virtual void DtFixedWingActuatorComponent::updateDisplay | ( | ) | const [protected, virtual] |
| virtual double DtFixedWingActuatorComponent::maxThrustAcceleration | ( | ) | const [protected, virtual] |
These accessors to the actuator's parameters are provided for use by the controllers that must control it.
| virtual double DtFixedWingActuatorComponent::maxClimbRate | ( | ) | const [protected, virtual] |
| virtual double DtFixedWingActuatorComponent::maxYawVelocity | ( | ) | const [protected, virtual] |
| virtual double DtFixedWingActuatorComponent::maxPitchVelocity | ( | ) | const [protected, virtual] |
| virtual double DtFixedWingActuatorComponent::maxRollVelocity | ( | ) | const [protected, virtual] |
| virtual double DtFixedWingActuatorComponent::maxAltitude | ( | ) | const [protected, virtual] |
| virtual bool DtFixedWingActuatorComponent::createPortGroups | ( | ) | [protected, virtual] |
Creates the local port groups.
Reimplemented from DtSimComponent.
| virtual bool DtFixedWingActuatorComponent::createPorts | ( | ) | [protected, virtual] |
Creates the input ports and adds them to the component.
Reimplemented from DtSimComponent.
| virtual bool DtFixedWingActuatorComponent::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 DtFixedWingActuatorComponent::sendDetonation | ( | const DtVector & | geocentricPosition | ) | [protected, virtual] |
| const DtFixedWingActuatorComponent& DtFixedWingActuatorComponent::operator= | ( | const DtFixedWingActuatorComponent & | orig | ) | [protected] |
assignment operator; not implemented
DtFixedWingActuatorDescriptor* DtFixedWingActuatorComponent::myFixedWingActuatorDescriptor [protected] |
Input Port Group Name: fixed-wing-control
Input Port Group Description: Provides input to the fixed-wing actuator (flight-kinematics).
Input Port Name: throttle
Input Port Description:
Input Port Range: 0.
to 1.
Input Port Default Value:
Input Group Parent: fixed-wing-control
Input Port Name: stick
Input Port Description:
Input Port Range: X:-1.
to 1., Y:-1. to 1.
Input Port Default Value:
Input Group Parent: fixed-wing-control
Input Port Name: pedal
Input Port Description:
Input Port Range: -1.
to 1.
Input Port Default Value:
Input Group Parent: fixed-wing-control
Input Port Name: brake
Input Port Description:
Input Port Range: 0.
to 1.
Input Port Default Value:
Input Group Parent: fixed-wing-control
Input Port Name: flaps
Input Port Description:
Input Port Range:
Input Port Default Value: false
Input Group Parent: fixed-wing-control.
Container for state data associated with this component.
This state is saved and restored as part of a scenario (or checkpoint).
bool DtFixedWingActuatorComponent::myFirstTick [protected] |
Used to make sure fall message is only sent once.