VR-Forces 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 | Private Member Functions
DtSimpleRotaryWingPilot Class Reference

DtSimpleRotaryWingPilot is a controller that represents the autopilot aspects of a rotary-wing pilot.

End User Description: It sets the helicopter controls to achieve desired position, velocity, acceleration, and orientation. These values are provided over a set of input ports. The controller than uses these values to calculate the needed control inputs for the actuator, and sends these values on the output ports.

Uses Descriptor Type: DtRotaryWingPilotDescriptor

Inheritance diagram for DtSimpleRotaryWingPilot:
Inheritance graph
[legend]

Public Member Functions

 DtSimpleRotaryWingPilot (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtSimpleRotaryWingPilot () override
 
virtual bool init () override
 
virtual bool createPorts () override
 
virtual const chartype () const override
 
virtual void tick () override
 
virtual bool taskVisualizationsActive () const override
 
virtual void updateTaskVisualizations () override
 
- Public Member Functions inherited from DtRotaryWingPilotController
 DtRotaryWingPilotController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtRotaryWingPilotController () override
 
virtual
DtConstrainedAnalogOutputPort
throttlePort ()
 
virtual
DtConstrainedAnalogOutputPort
collectivePort ()
 
virtual
DtConstrainedDualAxisAnalogOutputPort
cyclicPort ()
 
virtual
DtConstrainedAnalogOutputPort
pedalPort ()
 
virtual bool createGuidancePortGroup ()
 
virtual bool createDesiredPositionPort ()
 
virtual bool createContinueMovementPort ()
 
virtual bool createDesiredVelocityPort ()
 
virtual bool createDesiredAccelerationPort ()
 
virtual bool createDesiredHeadingPort ()
 
virtual bool createPositionSelectorPort ()
 
virtual bool createVelocitySelectorPort ()
 
virtual bool createAccelerationSelectorPort ()
 
virtual bool createHeadingSelectorPort ()
 
virtual bool createPowerDownPort ()
 
virtual bool createAggressivenessPort ()
 
virtual DtAnalogInputPortaggressivenessPort ()
 
virtual DtVectorInputPortdesiredPositionPort ()
 
virtual DtBooleanInputPortcontinueMovementPort ()
 
virtual DtVectorInputPortdesiredVelocityPort ()
 
virtual DtVectorInputPortdesiredAccelerationPort ()
 
virtual DtAnalogInputPortdesiredHeadingPort ()
 
virtual DtAnalogInputPortpositionSelectorPort ()
 
virtual DtAnalogInputPortvelocitySelectorPort ()
 
virtual DtAnalogInputPortaccelerationSelectorPort ()
 
virtual DtAnalogInputPortheadingSelectorPort ()
 
virtual DtBooleanInputPortpowerDownPort ()
 
virtual bool createRotaryWingControlPortGroup ()
 
virtual bool createThrottlePort ()
 
virtual bool createCollectivePort ()
 
virtual bool createCyclicPort ()
 
virtual bool createPedalPort ()
 
- Public Member Functions inherited from DtControllerComponent
 DtControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtControllerComponent () override
 
virtual DtSimRadioradio ()
 
virtual void taskNotify (const DtSimTask &task)
 
virtual void clearTask ()
 
virtual void enableTaskTypes ()
 
virtual void enableScriptedTask (const DtString &scriptId)
 
virtual void disableTaskTypes ()
 
virtual void enable () override
 
- Public Member Functions inherited from DtSimComponent
 DtSimComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtSimComponent () override
 
virtual void setParentSystem (DtComponentSystem *system)
 
DtComponentSystemparentSystem () const
 
virtual void registerAttributeFunctions ()
 
virtual void preFirstTickInit ()
 
virtual void postTick ()
 
virtual void timedTick ()
 
virtual void setMinTickPeriod (double minTickPeriod, double minTickPeriodVariance)
 
virtual void setupFirstTickTime ()
 
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) override
 
virtual DtlObjPtr getData (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings) override
 
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
 
virtual bool tickWhileDestroyed () 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 void isClutterChanged ()
 
virtual bool taskVisualizationsEnabled () const
 
makVrf::DtTaskVisualizationMaptaskVisualizations ()
 
virtual void updateImgui ()
 
virtual bool debugActive () const
 
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) const
 
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 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 DtReal xyDistSquared (DtVector a, DtVector b)
 
- Static Public Member Functions inherited from DtRotaryWingPilotController
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 computeDesiredLinearAccel (DtVector &desiredHorizBodyAccel, double &desiredYawAccel)
 
virtual void computeDesiredTopoAccelToPosition (const double maxAccel, const double period, DtVector &desiredTopoAccel, double &yawAccel)
 
virtual void computeDesiredTopoAccelToVelocity (const DtVector &desiredVel, const double period, DtVector &desiredTopoAccel)
 
virtual double desiredHeadingWithNoMoveGoal ()
 
virtual void computeDesiredTopoAccelToHeading (const double desiredHeading, const double desiredSpeed, const double period, DtVector &desiredTopoAccel)
 
virtual void checkLandNoFuel ()
 
virtual void findEarthCurveDeltaPosition (DtVector fromPosition, DtVector toPosition, DtVector &deltaPosition, const Coordinate_System *coordinateSystem)
 
virtual void limitAccelFromMaxAcceleration (DtVector &horizBodyAccel)
 
virtual void computeTopoDeltaPosition (DtVector &topoDeltaPosition)
 
virtual void computeTopoDesiredEndVelocity (const DtVector &topoXyDeltaPos, DtVector &topoXyEndDirection, double &topoXyEndSpeed)
 
virtual double limitedVerticalControlAcceleration (const double verticalControlAccel, const double verticalError, const double currentVerticalVelocity, const double period)
 
virtual bool isCloseToGoalPosition (const DtVector &topoDeltaPos)
 
virtual void setCollectiveAndCyclicFromAccel (const DtVector &desiredAcceleration)
 
virtual void setPedalFromDesiredYawAcceleration (const double yawAccel)
 
virtual void setThrottle ()
 
void limitAccelForFixedFlightSlope (DtVector &topoEntToGoal, DtVector &topoCurrentVel, double period, DtVector &desiredTopoAccel)
 
virtual DtReal terrainAvoidanceVelocity () const
 
virtual void calculateTargetAlignmentAngle (DtReal &headingToTarget) const
 
virtual void computeYawAccelerationToHeading (const double headingToPoint, const double period, double &yawAccel)
 
virtual void getTransformationMatrices ()
 
virtual void clearControlState ()
 
virtual double stationaryGoalSpeedThreshold ()
 
virtual double catchUpSpeedFactor ()
 
virtual void lookupAndCacheProcessSR ()
 
virtual bool postAddComponentsInit () override
 
- Protected Member Functions inherited from DtRotaryWingPilotController
virtual bool createPortGroups () override
 
virtual void setStateFromPorts ()
 
 DtRotaryWingPilotController ()
 
 DtRotaryWingPilotController (const DtRotaryWingPilotController &orig)
 
const DtRotaryWingPilotControlleroperator= (const DtRotaryWingPilotController &orig)
 
- Protected Member Functions inherited from DtControllerComponent
 DtControllerComponent ()
 
 DtControllerComponent (const DtControllerComponent &orig)
 
const DtControllerComponentoperator= (const DtControllerComponent &orig)
 
virtual void onRestore () override
 
virtual void initializeTargetingControlTableFromDescriptor (const DtReaderWriter *)
 
virtual void setRadio (DtSimRadio *radio)
 
virtual void sendCapableSetsAndTasks ()
 
- Protected Member Functions inherited from DtSimComponent
virtual void setupTimedTickLogic (double minTickPeriod, double minTickPeriodVariance)
 
virtual double computeCurrentTime ()
 
bool testInvariant () const
 
DtVrfProcessStateRepositorycreateComponentPsr (const DtString &defaultPsrType, const DtString &defaultPsrName, bool useDescriptorParams=true)
 
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
 
DtPropertyInterfacecachedNextFrameStateProperty (DtPropertyInterface **prop, const DtString &propName)
 
template<typename ValType >
void setCachedNextFrameStatePropertyValue (DtPropertyInterface **prop, const DtString &propName, ValType value)
 
const DtPropertyInterfacecachedCurrentFrameStateProperty (const DtPropertyInterface **prop, const DtString &propName) const
 
template<typename ValType >
bool getCachedCurrentFrameStatePropertyValue (const DtPropertyInterface **prop, const DtString &propName, ValType &value) 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

DtRotaryWingPilotDescriptormyPilotDescriptor
 
DtDcm myBodyToRef
 
DtDcm myLocalToTopoDcm
 
DtDcm myTopoToLocalDcm
 
DtDcm myTopoToBodyHeadingDcm
 
DtRotaryWingFlightPSRmyProcessState
 
DtVector myLastIntegralDistError
 
double myLastYawDerivativeControl
 
Ports and Port Groups
DtVectorInputPortmyTargetLocationInputPort
 
- Protected Attributes inherited from DtRotaryWingPilotController
DtRotaryWingEntityStateRepositorymyRotaryWingEntityState
 
DtVector myNormalizedBodyVelocity
 
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
 
DtOutputPortGroupmyRotaryWingControlPortGroup
 
DtConstrainedAnalogOutputPortmyThrottlePort
 
DtConstrainedAnalogOutputPortmyCollectivePort
 
DtConstrainedDualAxisAnalogOutputPortmyCyclicPort
 
DtConstrainedAnalogOutputPortmyPedalPort
 
DtInputPortGroupmyGuidancePortGroup
 
DtVectorInputPortmyDesiredPositionPort
 
DtVectorInputPortmyDesiredVelocityPort
 
DtVectorInputPortmyDesiredAccelerationPort
 
DtAnalogInputPortmyDesiredHeadingPort
 
DtAnalogInputPortmyPositionSelectorPort
 
DtBooleanInputPortmyContinueMovementPort
 
DtAnalogInputPortmyVelocitySelectorPort
 
DtAnalogInputPortmyAccelerationSelectorPort
 
DtAnalogInputPortmyHeadingSelectorPort
 
DtAnalogInputPortmyAggressivenessPort
 
DtBooleanInputPortmyPowerDownPort
 
- Protected Attributes inherited from DtControllerComponent
DtSimRadiomyRadio
 
bool myTaskTypesEnabled
 
bool myInitialized
 
- Protected Attributes inherited from DtSimComponent
DtLocalObjectmyEntity
 
DtComponentSystemmySystem
 
DtListItem * myListItem
 
DtInputPortMap myInputPortList
 
DtOutputPortMap myOutputPortList
 
DtInputPortGroupMap myInputPortGroupList
 
DtOutputPortGroupMap myOutputPortGroupList
 
int myPriority
 
double myLastTickSimTime
 
std::unique_ptr< DtTimedTickLogicmyTimedTickLogic
 
double myDT
 
bool myIsEnabled
 
bool myFirstTick
 
const DtComponentDescriptormyComponentDescriptor
 
std::list
< DtVrfProcessStateRepository * > 
myComponentPsrs
 
makVrf::DtTaskVisualizationMap myTaskVisualizations
 
double myNextTaskVisTickTime
 
DtSymbolString myFullComponentName
 
DtSimulationServicesmySimServices
 
DtPredicateCallbackManagermyPredicateCallbackManager
 
boost::signals2::scoped_connection myIsClutterChangedConnection
 
bool myLocalDebug
 
- 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
 

Private Member Functions

 DtSimpleRotaryWingPilot ()
 
 DtSimpleRotaryWingPilot (const DtSimpleRotaryWingPilot &orig)
 
DtSimpleRotaryWingPilotoperator= (const DtSimpleRotaryWingPilot &orig)
 

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

DtSimpleRotaryWingPilot::DtSimpleRotaryWingPilot ( 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 DtSimpleRotaryWingPilot::~DtSimpleRotaryWingPilot ( )
overridevirtual

destructor

DtSimpleRotaryWingPilot::DtSimpleRotaryWingPilot ( )
private

default constructor not implemented

DtSimpleRotaryWingPilot::DtSimpleRotaryWingPilot ( const DtSimpleRotaryWingPilot orig)
private

copy constructor not implemented

Member Function Documentation

virtual bool DtSimpleRotaryWingPilot::init ( )
overridevirtual

Calls the parent’s init() to initialize the ports. Returns true if initialization was successful.

Reimplemented from DtRotaryWingPilotController.

virtual bool DtSimpleRotaryWingPilot::createPorts ( )
overridevirtual

Overridden to create rotary wing ports.

Reimplemented from DtRotaryWingPilotController.

virtual const char* DtSimpleRotaryWingPilot::type ( ) const
overridevirtual

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
DtRotaryWingPilotControllerType

Reimplemented from DtRotaryWingPilotController.

virtual void DtSimpleRotaryWingPilot::tick ( )
overridevirtual

Calculate new control values.

Reimplemented from DtRotaryWingPilotController.

static DtSimComponent* DtSimpleRotaryWingPilot::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 bool DtSimpleRotaryWingPilot::taskVisualizationsActive ( ) const
overridevirtual

Returns true if task visualizations are currently active for this component. Default behavior is to return false. Must be overridden in subclasses to enable task visualizations.

Reimplemented from DtSimComponent.

virtual void DtSimpleRotaryWingPilot::updateTaskVisualizations ( )
overridevirtual

Called to update task visualizations after every tick. Implemented by subclasses.

Reimplemented from DtSimComponent.

DtSimpleRotaryWingPilot& DtSimpleRotaryWingPilot::operator= ( const DtSimpleRotaryWingPilot orig)
private

assignment operator not implemented

virtual void DtSimpleRotaryWingPilot::computeDesiredLinearAccel ( DtVector &  desiredHorizBodyAccel,
double desiredYawAccel 
)
protectedvirtual

Computes the desired linear acceleration (and estimate of desired body velocity) based on the control inputs, as identified by the selector port inputs. Looks at the various selector inputs (position, velocity, acceleration, heading) to figure out what the goal is. For example, velocity alone is taken as the desired instantaneous velocity, but if there is position and velocity input, velocity is taken to be the desired velocity at the goal point.

Parameters
desiredHorizBodyAccelis an output; it is the desired acceleration in a coordinate system with x a horizontal component in the forward direction (i.e. like body-x, but with no pitch); y a horizontal component to the right, and z the down component.
desiredYawAccelerationis an output giving desired rotation around the down axis.
virtual void DtSimpleRotaryWingPilot::computeDesiredTopoAccelToPosition ( const double  maxAccel,
const double  period,
DtVector &  desiredTopoAccel,
double yawAccel 
)
protectedvirtual

Computes the desired topo acceleration for movement toward a goal point, with or without a goal velocity at that point. This function handles 3 possibilities:

  • Goal velocity is zero or not specified, and entity is > a body length from the goal: head toward the goal and control forward speed.
  • Same, but within a body length: freeze heading and move laterally as necessary toward goal.
  • Goal velocity is non-zero: move toward the line defined by the velocity vector and the point, and control speed along the line to get to the point at the desired speed.
virtual void DtSimpleRotaryWingPilot::computeDesiredTopoAccelToVelocity ( const DtVector &  desiredVel,
const double  period,
DtVector &  desiredTopoAccel 
)
protectedvirtual

Computes the desired topo acceleration and yaw acceleration for movement controlled by a desired velocity vector alone. Adds terrain avoidance velocity if required. If the desired speed is very small, then the function checks to see if there are targets (calculateTargetAlignmentAngle) to face.

virtual double DtSimpleRotaryWingPilot::desiredHeadingWithNoMoveGoal ( )
protectedvirtual

Computes the desired heading when there isn't a position or velocity goal input. If the current speed is > the maxSpeedForHeadingControl, then the heading is just the direction of velocity. Otherwise, if there is a heading control input, that is the heading. Otherwise, if there is a target, then it's bearing is the heading. Otherwise, the current heading is returned.

virtual void DtSimpleRotaryWingPilot::computeDesiredTopoAccelToHeading ( const double  desiredHeading,
const double  desiredSpeed,
const double  period,
DtVector &  desiredTopoAccel 
)
protectedvirtual

Computes the desired topo acceleration and yaw acceleration for movement along a heading. Ordered speed and altitude are followed.

virtual void DtSimpleRotaryWingPilot::checkLandNoFuel ( )
protectedvirtual

.................

Lands the entity if the fuel is used up.

virtual void DtSimpleRotaryWingPilot::findEarthCurveDeltaPosition ( DtVector  fromPosition,
DtVector  toPosition,
DtVector &  deltaPosition,
const Coordinate_System coordinateSystem 
)
protectedvirtual

Given from and to positions in local coordinates, and a coordinate system, compute a delta position whose vertical component is the difference in altitudes of the from and to positions. This will be a vector to follow around the curve of the earth, vs. a straight line in space between the positions. The length of the vector will not be accurate (neither straight line distance or around-the-earth distance, exactly) but it is assumed that the length is long enough to max out the control system anyway.

virtual void DtSimpleRotaryWingPilot::limitAccelFromMaxAcceleration ( DtVector &  horizBodyAccel)
protectedvirtual

Limit acceleration based on maxAcceleration and maxStoppingDeceleration parameter limits. Argument horizBodyAccel is a vector containing the input (desired) acceleration with X aligned with the entity's heading and Y to the right. This vector is modified if limiting is required. (Z is not changed.)

virtual void DtSimpleRotaryWingPilot::computeTopoDeltaPosition ( DtVector &  topoDeltaPosition)
protectedvirtual

Computes the position error to the goal point in topo coordinates. If the horizontal distance is > 5km, then the difference in altitudes is used for dz, rather than the difference in topo z coordinates of the current and goal points (to accommodate earth curvature).

virtual void DtSimpleRotaryWingPilot::computeTopoDesiredEndVelocity ( const DtVector &  topoXyDeltaPos,
DtVector &  topoXyEndDirection,
double topoXyEndSpeed 
)
protectedvirtual

Determines the direction and magnitude of the velocity at the goal point. If the velocity selector input is 0, then 0 speed is output, with a direction corresponding to the delta position.

virtual double DtSimpleRotaryWingPilot::limitedVerticalControlAcceleration ( const double  verticalControlAccel,
const double  verticalError,
const double  currentVerticalVelocity,
const double  period 
)
protectedvirtual

Takes the desired Vertical Control Acceleration (topographic, i.e. +down) and the other data (also in topo), and computes a limited acceleration that accounts for entity parameters such as maximum climb rate, max lift with collective at 0 and 1, and required terrain avoidance climb rate. Period is dt.

virtual bool DtSimpleRotaryWingPilot::isCloseToGoalPosition ( const DtVector &  topoDeltaPos)
protectedvirtual

True if the horizontal distance to the goal position is less than a body length. Within this distance, the pilot does not try to orient towards the goal point, but just translates the entity without changing the heading to get exactly to the goal.

virtual void DtSimpleRotaryWingPilot::setCollectiveAndCyclicFromAccel ( const DtVector &  desiredAcceleration)
protectedvirtual

Sets the collective and collective from a desired acceleration input. The acceleration is a topographic acceleration oriented to the entity heading, i.e. X is the horizontal acceleration in the heading of the entity, Y is the horizontal acceleration to the right of the heading of the entity, and Z is the down acceleration. Note that Z must include acceleration for counteracting gravity; i.e. if Z = -G, the entity will not accelerate up or down.

These values will be converted to values between -1 and 1 (each axis of cyclic) or 0 and 1 (collective) based on the entity max-acceleration and max-climb rates. Side effect is the setting of the cyclic and collective ports.

virtual void DtSimpleRotaryWingPilot::setPedalFromDesiredYawAcceleration ( const double  yawAccel)
protectedvirtual
virtual void DtSimpleRotaryWingPilot::setThrottle ( )
protectedvirtual

Sets the throttle control output value.

void DtSimpleRotaryWingPilot::limitAccelForFixedFlightSlope ( DtVector &  topoEntToGoal,
DtVector &  topoCurrentVel,
double  period,
DtVector &  desiredTopoAccel 
)
protected

Limit the acceleration in the Z direction so that the Z speed is a proportion of the horizontal speed, in such a way as to maintain a fixed flight slope toward the goal. Assumes the horizontal speed is toward the goal.

virtual DtReal DtSimpleRotaryWingPilot::terrainAvoidanceVelocity ( ) const
protectedvirtual

Calculate an upward desired velocity to maintain a safe distance from the terrain.

virtual void DtSimpleRotaryWingPilot::calculateTargetAlignmentAngle ( DtReal &  headingToTarget) const
protectedvirtual

Calculate the angle to the target position input (port), or if none any target in a weapon PSR. This function is used when the entity is stationary and has 0 desired velocity.

Parameters
headingToTargetOutput parameter. The heading (radians) to the target, if any. If there is no target, this parameter is unchanged.
virtual void DtSimpleRotaryWingPilot::computeYawAccelerationToHeading ( const double  headingToPoint,
const double  period,
double yawAccel 
)
protectedvirtual

Computes a desired yaw acceleration to point the entity toward the given heading.

virtual void DtSimpleRotaryWingPilot::getTransformationMatrices ( )
protectedvirtual

Sets the myBodyToRef, myLocalToTopoDcm, and myTopoToLocalDcm.

virtual void DtSimpleRotaryWingPilot::clearControlState ( )
protectedvirtual

Zeros out the past error (derivative control) and accumulated error (integral control).

virtual double DtSimpleRotaryWingPilot::stationaryGoalSpeedThreshold ( )
inlineprotectedvirtual

Constants.

When moving toward a goal point, how slow the point (i.e. desired velocity control input) has to be moving before being considered stationary. When the goal point is moving, if the entity is close to it it will orient to the direction of movement; if the point is stationary, the entity will just maintain a constant orientation as it moves toward the goal. In mps.

virtual double DtSimpleRotaryWingPilot::catchUpSpeedFactor ( )
inlineprotectedvirtual

When moving toward a moving goal, how much faster than the goal's speed the entity is allowed to move while it is approaching. (If this is less than the ordered speed, the entity will move at ordered speed.)

virtual void DtSimpleRotaryWingPilot::lookupAndCacheProcessSR ( )
protectedvirtual
virtual bool DtSimpleRotaryWingPilot::postAddComponentsInit ( )
overrideprotectedvirtual

Calls enableTaskTypes()

Reimplemented from DtControllerComponent.

static DtReal DtSimpleRotaryWingPilot::xyDistSquared ( DtVector  a,
DtVector  b 
)
static

Calculate the distance squared between the projections of the points onto the x-y plane. Used by some other controllers.

Member Data Documentation

DtVectorInputPort* DtSimpleRotaryWingPilot::myTargetLocationInputPort
protected

Input Port Name: target-location
Input Port Description: Accepts local database location of a target which the pilot should orient the aircraft to face, in the absence of other tasks.
Input Port Range: Local database locations.
.

DtRotaryWingPilotDescriptor* DtSimpleRotaryWingPilot::myPilotDescriptor
protected

A pointer to the descriptor for this controller.

DtDcm DtSimpleRotaryWingPilot::myBodyToRef
protected

The local orientation matrix.

DtDcm DtSimpleRotaryWingPilot::myLocalToTopoDcm
protected

The local to topographic coordinate transformation matrix.

DtDcm DtSimpleRotaryWingPilot::myTopoToLocalDcm
protected

The topographic to local coordinate transformation matrix.

DtDcm DtSimpleRotaryWingPilot::myTopoToBodyHeadingDcm
protected

The 2D rotation about the yaw axis only.

DtRotaryWingFlightPSR* DtSimpleRotaryWingPilot::myProcessState
protected
DtVector DtSimpleRotaryWingPilot::myLastIntegralDistError
protected

PID state variables. In topo coordinates. Note – Integral control not employed currently.

double DtSimpleRotaryWingPilot::myLastYawDerivativeControl
protected

D state variable for yaw control.


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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)