VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtFixedWingActuatorComponent Class Reference

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

Inheritance diagram for DtFixedWingActuatorComponent:
Inheritance graph
[legend]

Public Member Functions

 DtFixedWingActuatorComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtFixedWingActuatorComponent ()
 
virtual bool init ()
 
virtual const chartype () const
 
virtual void tick ()
 
virtual void calculateBodyVelocity (const DtVector &oldRelativeVelocity, const DtDcm &newLocalOrientation, DtVector &newBodyVelocity)
 
virtual void calculateAirborneAcceleration (const DtVector oldLocalPosition, double oldSpeed, const DtDcm &newLocalOrientation, const DtVector &newBodyVelocity, double throttle, DtVector &newRelativeAcceleration)
 
- Public Member Functions inherited from DtActuatorComponent
virtual ~DtActuatorComponent ()
 
virtual DtSimRadioradio ()
 
virtual bool tickWhileDestroyed () const
 
- Public Member Functions inherited from DtSimComponent
 DtSimComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtSimComponent ()
 
virtual void setParentSystem (DtComponentSystem *system)
 
DtComponentSystemparentSystem () const
 
virtual bool postAddComponentsInit ()
 
virtual void registerAttributeFunctions ()
 
virtual void preFirstTickInit ()
 
virtual void postTick ()
 
virtual void timedTick ()
 
virtual void setMinTickPeriod (double minTickPeriod)
 
virtual double minTickPeriod () const
 
virtual void setMinTickPeriodVariance (double minTickPeriodVariance)
 
virtual double minTickPeriodVariance () const
 
virtual void setNextTickTime (double nextTickTime)
 
virtual double nextTickTime () const
 
virtual double calculateNextTickTime () const
 
virtual double calculateFirstTickTime () const
 
virtual void setEntity (DtLocalObject *entity)
 
virtual DtSimComponentnextComponent ()
 
virtual DtSimComponentprevComponent ()
 
virtual void setListItem (DtListItem *item)
 
virtual DtListItem * listItem ()
 
virtual void putData (std::string &fp, int indentLevel=0)
 
virtual DtlObjPtr getData (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
 
virtual void addInputPort (DtInputPort *port)
 
virtual void removeInputPort (DtInputPort *port)
 
virtual DtInputPortlookupInputPort (const DtString &portName)
 
virtual DtList inputPortList () const
 
virtual void addOutputPort (DtOutputPort *port)
 
virtual void removeOutputPort (DtOutputPort *port)
 
virtual DtOutputPortlookupOutputPort (const DtString &portName)
 
virtual DtList outputPortList () const
 
virtual void addInputPortGroup (DtInputPortGroup *group)
 
virtual void removeInputPortGroup (DtInputPortGroup *group)
 
virtual DtInputPortGrouplookupInputPortGroup (const DtString &groupName)
 
virtual DtList inputPortGroupList () const
 
virtual void addOutputPortGroup (DtOutputPortGroup *group)
 
virtual void removeOutputPortGroup (DtOutputPortGroup *group)
 
virtual DtOutputPortGrouplookupOutputPortGroup (const DtString &groupName)
 
virtual DtList outputPortGroupList () const
 
virtual int priority () const
 
virtual void setPriority (int priority)
 
double dT () const
 
virtual void setDT (double deltaT)
 
virtual void setComponentDescriptor (DtComponentDescriptor *componentDescriptor)
 
virtual const
DtComponentDescriptor
componentDescriptor () const
 
DtVrfProcessStateRepositoryManagerpsrManager ()
 
virtual const DtSymbolStringcomponentFullName () const
 
DtPhysicalWorldphysicalWorld ()
 
const DtPhysicalWorldphysicalWorld () const
 
const DtAttachedTerrainterrainAttachedTo () const
 
DtLocalObjectentity ()
 
const DtLocalObjectentity () const
 
DtSimulationServicessimulationServices ()
 
const DtSimulationServicessimulationServices () const
 
const Coordinate_SystemcoordinateSystem () const
 
virtual bool taskVisualizationsActive () const
 
virtual bool taskVisualizationsEnabled () const
 
virtual void onRestore ()
 
makVrf::DtTaskVisualizationMaptaskVisualizations ()
 
virtual void enable ()
 
virtual void disable ()
 
virtual bool isEnabled ()
 
virtual void setIsEnabled (bool yesNo)
 
virtual DtOutputStream & objectConsoleDebug (const DtString &channel="") const
 
virtual DtOutputStream & objectConsoleVerbose (const DtString &channel="") const
 
virtual DtOutputStream & objectConsoleInfo (const DtString &channel="") const
 
virtual DtOutputStream & objectConsoleWarn (const DtString &channel="") const
 
virtual DtOutputStream & objectConsoleError (const DtString &channel="") const
 
virtual int notifyLevel () const
 
virtual DtSimResourceManagerresourceManager ()
 
virtual const
DtSimResourceManager
resourceManager () const
 
VRF4API_METHOD const
DtSimulationServices
simManager () const
 
- Public Member Functions inherited from DtReaderWriter
 DtReaderWriter ()
 
 DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtReaderWriter (const DtReaderWriter &, DtReaderWriterRegistry *parentRegistry=NULL)
 
const DtReaderWriteroperator= (const DtReaderWriter &orig)
 
bool operator== (const DtReaderWriter &) const
 
bool operator!= (const DtReaderWriter &rhs)
 
virtual ~DtReaderWriter ()
 
virtual void putSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 
virtual void postPutSelf ()
 
virtual void prePutSelf ()
 
virtual void getSelf (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
virtual void postGetSelf ()
 
virtual void preGetSelf ()
 
virtual void writeSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 
virtual DtSymbolString name () const
 
virtual void addAlias (const DtSymbolString &alias)
 
virtual void addAlias (const DtString &alias)
 
virtual bool hasAlias (const DtSymbolString &alias)
 
virtual const aliasContaineraliases () const
 
virtual void setReadonly (bool flag)
 
bool isReadonly () const
 
virtual void reset ()
 
virtual int alignment () const
 
virtual bool variableIsBound () const
 
virtual void unbindVariable ()
 
virtual void setName (const DtString &)
 
virtual const charreaderWriterType () const
 
virtual const charxmlType () const
 
virtual DtString prettyPrint () const
 
std::string debugText () const
 
virtual void bindVariables (DtVariableBindingsList variableBindings)
 
virtual std::list
< DtVariableNameType
unboundVariables () const
 
bool invalid () const
 
virtual bool hasChild (const DtReaderWriter *p) const
 
virtual bool hasVariableReference () const
 
virtual void bindLocalVariables (const DtVariableBindingsList &variableBindings)
 
virtual void recordUpdateTime () const
 
virtual bool wasUpdatedSince (DtTime t) const
 
virtual bool changedSinceLastChecked ()
 
virtual bool peekChangedSinceLastChecked () const
 
virtual void setValueSpecified (bool specified, bool recurse=false)
 
virtual bool valueSpecified () const
 
virtual bool isVariableReference () const
 
virtual void setIsVariableReference (bool value)
 
virtual void clearAllVariableReferenceFlags ()
 
virtual DtSymbolString variableName () const
 
virtual void setVariableName (const DtSymbolString variableName)
 
virtual const DtReaderWriterdefaultRWValue () const
 
virtual DtReaderWriterdefaultRWValue ()
 
virtual void setDefaultRWValue (DtReaderWriter *)
 
virtual bool checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
const DtReaderWriterRegistryregistry () const
 
DtReaderWriterRegistryregistry ()
 
virtual DtPropertyInterfaceproperty ()
 
virtual const DtPropertyInterfaceproperty () const
 
virtual DtString toXml () const
 
virtual DtRwVariableBindingsgenerateVariableBindings () const
 
virtual bool toXml (const DtFilename &) const
 
virtual bool fromXml (const DtString &)
 
virtual bool fromXmlFile (const DtFilename &)
 
virtual void putSelf (DtEnvironmentSP, DtEnvValueSP parent) const
 
virtual void putData (DtEnvironmentSP, DtEnvValueSP value) const
 
virtual void putVariableReference (DtEnvironmentSP, DtEnvValueSP value) const
 
virtual void getSelf (const DtEnvironmentSP, const DtEnvValueSP root, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 
virtual void getData (const DtEnvironmentSP, const DtEnvValueSP, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 
virtual void unrecognizedItem (const DtEnvironmentSP env, const DtEnvValueSP root, const SearchPaths &searchPaths, const DtVariableBindingsList &varBindings)
 
virtual void getVariableReference (DtEnvironmentSP, DtEnvValueSP value)
 

Static Public Member Functions

static DtSimComponentcreator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
- Static Public Member Functions inherited from DtSimComponent
static DtSimComponentFactoryfactory ()
 
static void setFactory (DtSimComponentFactory *factory)
 
static DtSimComponentcreateComponent (const DtString &name, const DtString &type, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentSystem *parentSystem, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
static void addSimComponentCreatorFcn (const DtString &type, DtSimComponentCreatorFcn fcn)
 
static VRF4API_METHOD
DtSimComponent
MarkThreadSafe (DtSimComponent *comp)
 
- Static Public Member Functions inherited from DtReaderWriter
static void putIndent (std::string &fp, int indentLevel)
 
static const
DtVariableBindingsList
nullVariableReference ()
 
static void setPostGetSelfCallback (DtGetSelfCallbackFcn fcn, void *usrData)
 
static void setPrePutSelfCallback (DtPutSelfCallbackFcn fcn, void *usrData)
 
static void setPutIndent (bool)
 
static bool putIndent ()
 
static const chartheXmlType ()
 
static const DtFilename & appPath ()
 
static void setFactoryCreatorFunction (DtReaderWriterFactoryCreatorFcn fcn)
 
static void createReaderWriterFactory ()
 
static void cleanupFactory ()
 
static DtReaderWriterFactoryfactory ()
 
static void setOutputStream (DtOutputStream *stream)
 
static DtOutputStream & outputStream ()
 
static DtReaderWritercreateFromXmlFile (const DtFilename &, bool createAsProperty=false)
 
static DtReaderWritercreateFromXml (const DtString &, bool createAsProperty=false)
 
static DtReaderWritercreateFromEnvironment (DtEnvironmentSP, bool createAsProperty=false)
 
static DtString getAttribute (DtEnvironmentSP env, const DtString &name, DtEnvValueSP root)
 

Protected Member Functions

virtual void doFlying ()
 
virtual void doTaxiing ()
 
virtual bool isTouchingDown (const DtVector &newLocalPosition, const DtVector &newRelativeVelocity)
 
virtual bool isTakingOff (bool isOnGround, double speed)
 
virtual bool updateGroundInteractionPoints (DtGroundInteractionPt *left, DtGroundInteractionPt *right, DtGroundInteractionPt *nose, DtGroundInteractionPt *center, const DtDcm &localOrientation, const DtVector &localPosition, double halfHeightOfTerrainIntersectChord)
 
virtual double calculateYawRate (double pedal)
 
virtual double calculatePitchRate (double stickYValue)
 
virtual double calculateRollRate (double stickXValue)
 
virtual void calculateBodyRotationRates (double pedal, double stickXValue, double stickYValue, DtVector &newBodyRotationRates)
 
virtual void calculateOrientation (const DtDcm &oldLocalOrientation, const DtVector &newBodyRotationRates, DtDcm &newLocalOrientation)
 
virtual void calculateBodyGravity (const DtVector oldLocalPosition, const DtDcm &newLocalOrientation, DtVector &newBodyGravityAcceleration)
 
virtual void calculateThrustAcceleration (double throttle, DtVector &newBodyThrustAccleration)
 
virtual void calculateDragAcceleration (double oldSpeed, const DtVector &newBodyVelocity, bool flapsDeployed, DtVector &newBodyDragAccleration)
 
virtual void fallFromSky (const DtString &reason=DtString::nullString())
 
virtual bool collidesWithGround (const DtVector &oldLocalPosition, const DtVector &newLocalPosition, DtVector &localCenterGoundPosition)
 
void integrate (const DtVector &oldLocalPosition, const DtVector &oldRelativeVelocity, const DtVector &newRelativeAcceleration, DtVector &newLocalPosition, DtVector &newRelativeVelocity, double maxSpeed=0)
 
virtual void useFuel (double fuelUsed)
 
virtual double fuelLeft () const
 
virtual double fullMass () const
 
virtual double currentMass () const
 
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 updateAirspeedToRepository (const DtVector &newLocalPosition, const double altitude)
 
virtual void updateDisplay () const
 
virtual double maxThrustAcceleration () const
 
virtual double maxClimbRate () const
 
virtual double maxYawVelocity () const
 
virtual double maxPitchVelocity () const
 
virtual double maxRollVelocity () const
 
virtual double maxAltitude () const
 
virtual bool createPortGroups ()
 
virtual bool createPorts ()
 
virtual bool createPSR ()
 
virtual bool createFuelConsumptionModel ()
 
virtual void sendDetonation (const DtVector &geocentricPosition)
 
virtual void updateOrderedSpeed ()
 
 DtFixedWingActuatorComponent ()
 
 DtFixedWingActuatorComponent (const DtFixedWingActuatorComponent &orig)
 
const
DtFixedWingActuatorComponent
operator= (const DtFixedWingActuatorComponent &orig)
 
virtual double calculateHeading (double oldHeading, double steering, double dT, double speed, double turningRadius)
 
virtual void calculateScalarVelocityAndAcceleration (double oldPitch, double &scalarVelocity, double &scalarAcceleration)
 
virtual double calculateMaxGroundSpeed ()
 
virtual double calculateMaxGroundAcceleration ()
 
virtual double calculateAcceleration (double pitch, double maxSpeed, double maxAccel, double newSpeed)
 
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)
 
- Protected Member Functions inherited from DtActuatorComponent
 DtActuatorComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual void setRadio (DtSimRadio *radio)
 
 DtActuatorComponent ()
 
- Protected Member Functions inherited from DtSimComponent
virtual double computeCurrentTime ()
 
bool testInvariant () const
 
DtVrfProcessStateRepositorycreateComponentPsr (const DtString &defaultPsrType, const DtString &defaultPsrName, bool useDescriptorParams=true)
 
virtual void updateTaskVisualizations ()
 
virtual void destroyTaskVisualizations ()
 
virtual void destroyTaskVisualization (const DtString &name)
 
virtual
makVrf::DtPointTaskVisualizationPtr 
pointTaskVisualization (const DtString &name)
 
virtual
makVrf::DtLineTaskVisualizationPtr 
lineTaskVisualization (const DtString &name)
 
virtual
makVrf::DtAreaTaskVisualizationPtr 
areaTaskVisualization (const DtString &name)
 
virtual
makVrf::DtTextTaskVisualizationPtr 
textTaskVisualization (const DtString &name)
 
double calculateNextTaskVisTickTime () const
 
DtVrfObjectStateRepositorylocalStateRepository ()
 
const DtVrfObjectStateRepositorylocalStateRepository () const
 
void addSimObjectPredicateCallback (DtSimObjectReference, DtVrfObjectPredicateCallbackFunction function, const DtVrfObjectPredicate &predicate, DtTime evaluationPeriod=0, void *userData=0)
 
void removeSimObjectPredicateCallback (const DtSimObject *, DtVrfObjectPredicateCallbackFunction function, const DtVrfObjectPredicate &predicate, DtTime evaluationPeriod=0, void *userData=0)
 
void invokeSimObjectPredicateCallbacks ()
 
virtual void clearPredicateCallbacks ()
 
- Protected Member Functions inherited from DtReaderWriter
virtual void bindToRwAsVariable (const DtReaderWriter *rw)
 

Protected Attributes

DtFixedWingEntityStateRepositorymyFixedWingEntityState
 
DtFixedWingActuatorDescriptormyFixedWingActuatorDescriptor
 
DtAircraftFuelConsumptionModelmyFuelConsumptionModel
 
DtFixedWingFlightPSRmyProcessState
 
bool mySentFallingMessage
 
bool myPutTaxiingPlaneOnGround
 
DtUpdateRepositoryOutputPortGroupmyUpdateRepositoryOutputPortGroup
 
bool myPreviouslyHadData
 
bool myKeepParentPosition
 
DtAirspeedCalculatormyAirSpeedCalculator
 
double myLastSpeed
 
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
 
Ports and Port Groups
DtInputPortGroupmyFixedWingControlPortGroup
 
DtConstrainedAnalogInputPortmyThrottlePort
 
DtConstrainedDualAxisAnalogInputPortmyStickPort
 
DtConstrainedAnalogInputPortmyPedalPort
 
DtConstrainedAnalogInputPortmyBrakePort
 
DtBooleanInputPortmyFlapsDeployedPort
 
- Protected Attributes inherited from DtActuatorComponent
DtSimRadiomyRadio
 
- Protected Attributes inherited from DtSimComponent
DtLocalObjectmyEntity
 
DtComponentSystemmySystem
 
DtListItem * myListItem
 
DtInputPortMap myInputPortList
 
DtOutputPortMap myOutputPortList
 
DtInputPortGroupMap myInputPortGroupList
 
DtOutputPortGroupMap myOutputPortGroupList
 
int myPriority
 
double myMinTickPeriod
 
double myMinTickPeriodVariance
 
double myNextTickTime
 
double myLastTickSimTime
 
double myDT
 
bool myIsEnabled
 
bool myFirstTick
 
const DtComponentDescriptormyComponentDescriptor
 
std::list
< DtVrfProcessStateRepository * > 
myComponentPsrs
 
bool myTickEveryFrame
 
makVrf::DtTaskVisualizationMap myTaskVisualizations
 
double myNextTaskVisTickTime
 
DtSymbolString myFullComponentName
 
DtSimulationServicesmySimServices
 
DtPredicateCallbackManager myPredicateCallbackManager
 
- Protected Attributes inherited from DtReaderWriter
const DtSymbolString myName
 
DtReaderWriterRegistry myRegistry
 
DtReaderWriterRegistrymyParentRegistry
 
bool myValueSpecified
 
bool myReadOnlyFlag
 
bool myIsVariableReference
 
DtSymbolString myVariableName
 
bool myVariableIsBound
 
DtReaderWritermyDefaultValue
 
aliasContainer myAliases
 
bool myInvalid
 
bool myChangedFlag
 

Additional Inherited Members

- Public Types inherited from DtReaderWriter
typedef std::vector
< DtSymbolString
aliasContainer
 
typedef std::vector
< DtSymbolString >::iterator 
aliasIter
 
typedef std::vector
< DtSymbolString >
::const_iterator 
aliasConstIter
 
typedef std::vector< DtFilename > SearchPaths
 
typedef std::pair
< DtSymbolString, DtString
DtVariableNameType
 
typedef DtReaderWriterFactory *(* DtReaderWriterFactoryCreatorFcn )()
 
- Protected Types inherited from DtSimComponent
typedef std::map< DtString,
DtInputPort * > 
DtInputPortMap
 
typedef std::map< DtString,
DtOutputPort * > 
DtOutputPortMap
 
typedef std::map< DtString,
DtInputPortGroup * > 
DtInputPortGroupMap
 
typedef std::map< DtString,
DtOutputPortGroup * > 
DtOutputPortGroupMap
 
- Static Protected Attributes inherited from DtSimComponent
static DtSimComponentFactorymyFactory
 
- Static Protected Attributes inherited from DtReaderWriter
static DtString theUnspecifiedValue
 
static DtGetSelfCallbackInfo thePostGetSelfCallback
 
static DtPutSelfCallbackInfo thePrePutSelfCallback
 
static const DtVariableBindingsList theEmptyVariableBindingsList
 
static bool theCreatorFcnSet
 
static DtReaderWriterFactorytheFactory
 
static
DtReaderWriterFactoryCreatorFcn 
theFactoryCreatorFcn
 
static bool thePutIndent
 
static DtOutputStream * theOutputStream
 

Constructor & Destructor Documentation

DtFixedWingActuatorComponent::DtFixedWingActuatorComponent ( const DtString name,
DtLocalObject owner,
DtSimulationServices simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
)

Parameters
nameReader writer name of this component.
ownerThe DtLocalObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer 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

Member Function Documentation

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 const char* 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. Warning: this function should always return the same pointer and it should be valid forever. This means the data should be static.

Returns
DtFixedWingActuatorType

Implements 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,
DtLocalObject owner,
DtSimulationServices simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
)
static

Parameters
nameReader writer name of this component.
ownerThe DtLocalObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
Returns
New instance of this class.
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 ( )
protectedvirtual

When the plane is in the air, this does the actual flying.

virtual void DtFixedWingActuatorComponent::doTaxiing ( )
protectedvirtual

When the FWE is on the ground, this does the actual taxiing.

virtual bool DtFixedWingActuatorComponent::isTouchingDown ( const DtVector newLocalPosition,
const DtVector newRelativeVelocity 
)
protectedvirtual

Returns true of false depending on whether the aircraft is currently landing or not.

virtual bool DtFixedWingActuatorComponent::isTakingOff ( bool  isOnGround,
double  speed 
)
protectedvirtual

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 
)
protectedvirtual
virtual double DtFixedWingActuatorComponent::calculateYawRate ( double  pedal)
protectedvirtual

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)
protectedvirtual

Find pitch rate.

virtual double DtFixedWingActuatorComponent::calculateRollRate ( double  stickXValue)
protectedvirtual

Find roll rate.

virtual void DtFixedWingActuatorComponent::calculateBodyRotationRates ( double  pedal,
double  stickXValue,
double  stickYValue,
DtVector newBodyRotationRates 
)
protectedvirtual
virtual void DtFixedWingActuatorComponent::calculateOrientation ( const DtDcm &  oldLocalOrientation,
const DtVector newBodyRotationRates,
DtDcm &  newLocalOrientation 
)
protectedvirtual

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 
)
protectedvirtual

Put acceleration due to gravity in body coordinates.

virtual void DtFixedWingActuatorComponent::calculateThrustAcceleration ( double  throttle,
DtVector newBodyThrustAccleration 
)
protectedvirtual

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 
)
protectedvirtual

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())
protectedvirtual

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 
)
protectedvirtual
void DtFixedWingActuatorComponent::integrate ( const DtVector oldLocalPosition,
const DtVector oldRelativeVelocity,
const DtVector newRelativeAcceleration,
DtVector newLocalPosition,
DtVector newRelativeVelocity,
double  maxSpeed = 0 
)
protected

Integrates myRelativeVelocity and myLocalPosition.

virtual void DtFixedWingActuatorComponent::useFuel ( double  fuelUsed)
protectedvirtual

Assumes the fuel resource has resource name "fuel" If not found, fuel consumption not will not be modeled.

virtual double DtFixedWingActuatorComponent::fuelLeft ( ) const
protectedvirtual
virtual double DtFixedWingActuatorComponent::fullMass ( ) const
protectedvirtual

Mass when fuel tank is full.

virtual double DtFixedWingActuatorComponent::currentMass ( ) const
protectedvirtual

Calculates the current mass of the aircraft including fuel.

virtual double DtFixedWingActuatorComponent::calculateHeading ( double  oldHeading,
double  steering,
double  dT,
double  speed,
double  turningRadius 
)
protectedvirtual

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 
)
protectedvirtual

Computes the speed and acceleration for this tick, i.e. to publish.

virtual double DtFixedWingActuatorComponent::calculateMaxGroundSpeed ( )
protectedvirtual

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 double DtFixedWingActuatorComponent::calculateMaxGroundAcceleration ( )
protectedvirtual

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 double DtFixedWingActuatorComponent::calculateAcceleration ( double  pitch,
double  maxSpeed,
double  maxAccel,
double  newSpeed 
)
protectedvirtual

Calculate the acceleration based on the speed now (i.e., updated from last tick's speed using last tick's acceleration) and the max speed and accel limits.

virtual double DtFixedWingActuatorComponent::calculateAccelerationFromThrottle ( )
protectedvirtual

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 double DtFixedWingActuatorComponent::calculateAccelerationFromSlope ( double  slope)
protectedvirtual

Slope is rise over run, i.e. tan(pitch)

virtual double DtFixedWingActuatorComponent::calculateAccelerationFromResistance ( double  maxSpeed,
double  maxAccel 
)
protectedvirtual

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 double DtFixedWingActuatorComponent::calculateAccelerationFromBrake ( double  otherAccels)
protectedvirtual

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 DtVector DtFixedWingActuatorComponent::calculateProjectedLocation ( const DtVector oldLocalPosition,
const DtVector newBodyAcceleration,
const DtVector oldBodyVelocity,
double  newHeading 
)
protectedvirtual

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::calculateOrientationAndPositionOnGround ( const DtVector newLocalProjectedLocation,
double  newHeading,
DtDcm &  newLocalOrientation,
DtVector newLocalPosition 
)
protectedvirtual

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::updateRepository ( const DtVector newLocalPosition,
const DtVector newRelativeVelocity,
const DtVector newRelativeAcceleration,
const DtDcm &  newLocalOrientation,
const DtVector newBodyRotationRates,
bool  isOnGround,
const DtAppearance &  newAppearance 
)
protectedvirtual
virtual void DtFixedWingActuatorComponent::updateAirspeedToRepository ( const DtVector newLocalPosition,
const double  altitude 
)
protectedvirtual

/brief Called from updateRepository(). Override this method to calculate air speed and set state properties. Uses position and altitude passed in from updateRepository(). Sets state properties "IndicatedAirspeed", "TrueAirspeed", "MachNumber". Uses myAirSpeedCalculator to calculate from ground speed (i.e. entity velocity). To use a different air speed calculator, see DtAirspeedCalculatorFactory in airspeedCalculator.h. Register a class derived from DtAirspeedCalculator with the factory. During registration, either override the default type "DtAirspeedCalculator" or register a new type. See DtFixedWingActuatorDescriptor::myAirspeedCalculatorType in vrfobjparam. See also "data/simulationModelSets/EntityLevel/vrfSim/systems/movement/fixed-wing-fighter-jet.sysdef. Factory changes can be made at application initialization, e.g. in DtInitializeVrfPlugin(DtCgf* cgf). Just make a call to DtAirspeedCalculatorFactory::instance().registerAirSpeedCalculatorCreator(<string>, <static_creator_function>);

virtual void DtFixedWingActuatorComponent::updateDisplay ( ) const
protectedvirtual
virtual double DtFixedWingActuatorComponent::maxThrustAcceleration ( ) const
protectedvirtual

These accessors to the actuator's parameters are provided for use by the controllers that must control it.

virtual double DtFixedWingActuatorComponent::maxClimbRate ( ) const
protectedvirtual
virtual double DtFixedWingActuatorComponent::maxYawVelocity ( ) const
protectedvirtual
virtual double DtFixedWingActuatorComponent::maxPitchVelocity ( ) const
protectedvirtual
virtual double DtFixedWingActuatorComponent::maxRollVelocity ( ) const
protectedvirtual
virtual double DtFixedWingActuatorComponent::maxAltitude ( ) const
protectedvirtual
virtual bool DtFixedWingActuatorComponent::createPortGroups ( )
protectedvirtual

Creates the local port groups.

Reimplemented from DtSimComponent.

virtual bool DtFixedWingActuatorComponent::createPorts ( )
protectedvirtual

Creates the input ports and adds them to the component.

Reimplemented from DtSimComponent.

virtual bool DtFixedWingActuatorComponent::createPSR ( )
protectedvirtual

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 bool DtFixedWingActuatorComponent::createFuelConsumptionModel ( )
protectedvirtual

Creates the fuel consumption model.

virtual void DtFixedWingActuatorComponent::sendDetonation ( const DtVector geocentricPosition)
protectedvirtual
virtual void DtFixedWingActuatorComponent::updateOrderedSpeed ( )
protectedvirtual

Update the ordered speed with the ordered air speed.

const DtFixedWingActuatorComponent& DtFixedWingActuatorComponent::operator= ( const DtFixedWingActuatorComponent orig)
protected

assignment operator; not implemented

Member Data Documentation

DtFixedWingEntityStateRepository* DtFixedWingActuatorComponent::myFixedWingEntityState
protected
DtFixedWingActuatorDescriptor* DtFixedWingActuatorComponent::myFixedWingActuatorDescriptor
protected
DtAircraftFuelConsumptionModel* DtFixedWingActuatorComponent::myFuelConsumptionModel
protected
DtInputPortGroup* DtFixedWingActuatorComponent::myFixedWingControlPortGroup
protected

Input Port Group Name: fixed-wing-control
Input Port Group Description: Provides input to the fixed-wing actuator (flight-kinematics).

DtConstrainedAnalogInputPort* DtFixedWingActuatorComponent::myThrottlePort
protected

Input Port Name: throttle
Input Port Description:
Input Port Range: 0. to 1.
Input Port Default Value:
Input Group Parent: fixed-wing-control.

DtConstrainedDualAxisAnalogInputPort* DtFixedWingActuatorComponent::myStickPort
protected

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.

DtConstrainedAnalogInputPort* DtFixedWingActuatorComponent::myPedalPort
protected

Input Port Name: pedal
Input Port Description:
Input Port Range: -1. to 1.
Input Port Default Value:
Input Group Parent: fixed-wing-control.

DtConstrainedAnalogInputPort* DtFixedWingActuatorComponent::myBrakePort
protected

Input Port Name: brake
Input Port Description:
Input Port Range: 0. to 1.
Input Port Default Value:
Input Group Parent: fixed-wing-control.

DtBooleanInputPort* DtFixedWingActuatorComponent::myFlapsDeployedPort
protected

Input Port Name: flaps
Input Port Description:
Input Port Range:
Input Port Default Value: false
Input Group Parent: fixed-wing-control.

DtFixedWingFlightPSR* DtFixedWingActuatorComponent::myProcessState
protected

Container for state data associated with this component. This state is saved and restored as part of a scenario (or checkpoint).

bool DtFixedWingActuatorComponent::mySentFallingMessage
protected

Used to make sure fall message is only sent once.

bool DtFixedWingActuatorComponent::myPutTaxiingPlaneOnGround
protected

Used to make sure a taxiing, destroyed aircraft is only set down on the terrain once.

DtUpdateRepositoryOutputPortGroup* DtFixedWingActuatorComponent::myUpdateRepositoryOutputPortGroup
protected

Port group used to set what values should be set into the VRF state repository. All values are in local coordinates.

bool DtFixedWingActuatorComponent::myPreviouslyHadData
protected
bool DtFixedWingActuatorComponent::myKeepParentPosition
protected
DtAirspeedCalculator* DtFixedWingActuatorComponent::myAirSpeedCalculator
protected

Air Speed Calculator for updating state properties Created in init()

double DtFixedWingActuatorComponent::myLastSpeed
protected

myLastSpeed is used in tick() to catch velocity changes while paused, due to setCurrentSpeed() or setAltitude(). When current speed does not match last speed while paused, recalculate true air speed.

DtPlatformLocalObjectFacade DtFixedWingActuatorComponent::myPlatformLocalObjectFacade
protected

Member to allow for access to platform specific data.


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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)