VR-Forces 5.0.3 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
DtSurfaceEntityFollowEntityController Class Reference

DtSurfaceEntityFollowEntityController is a controller that models station keeping behavior for surface entities.

Inheritance diagram for DtSurfaceEntityFollowEntityController:
Inheritance graph
[legend]

Public Member Functions

 DtSurfaceEntityFollowEntityController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtSurfaceEntityFollowEntityController ()
 
virtual const chartype () const
 
virtual bool init ()
 
virtual void processFollowEntityTask (DtSimMessage *msg)
 
virtual void registerTaskMsgCallbacks ()
 
virtual void tick ()
 
virtual void clearTask ()
 
virtual bool createSurfaceControlPortGroup ()
 
- Public Member Functions inherited from DtSingleTaskControllerComponent
 DtSingleTaskControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *compDesc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtSingleTaskControllerComponent ()
 
virtual void postTick ()
 
virtual bool beginProcessingTask (const DtTaskMessage &task, DtSimTaskStatePtr taskState)
 
virtual void taskNotify (const DtSimTask &task)
 
virtual void taskComplete (bool success=true)
 
virtual void suspendTask ()
 
virtual int sendSubtask (DtSimTask &task)
 
virtual void clearSubtask (int subtaskId)
 
virtual void addPendingSubtaskId (int subtaskId)
 
virtual bool findPendingSubtaskId (int subtaskId)
 
virtual bool isSubtasked () const
 
virtual void removePendingSubtaskId (int subtaskId)
 
virtual void removeAllPendingSubtaskIds ()
 
virtual std::vector< intcurrentPendingSubstaskIds () const
 
virtual void clearCurrentTaskMessage ()
 
virtual DtTaskMessagecurrentTaskMessage () const
 
virtual DtSimTaskStatePtr currentTaskState () const
 
virtual void giveUpTask ()
 
virtual bool taskActive (int taskId) const
 
virtual bool clearTopLevelTasks ()
 
virtual void clearConflictingTopLevelTasks (const DtSimTaskMessageType &conflictType)
 
virtual void clearTasksByType (const DtSimTaskMessageType &taskType)
 
virtual void clearTaskById (int taskId)
 
virtual DtSuspendedTaskInfosuspendTaskById (int taskId)
 
virtual DtSuspendedTaskInfosuspendSubtaskById (int taskId, int subtaskId)
 
virtual std::list
< DtTaskMessage * > 
currentTaskMessages () const
 
virtual DtTaskWithTaskStateListPtr topLevelTasks () const
 
virtual void disable ()
 
- Public Member Functions inherited from DtTaskControllerComponent
 DtTaskControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *compDesc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtTaskControllerComponent ()
 
virtual bool showCurrentTaskInGui () const
 
virtual void setRadio (DtSimRadio *radio)
 
virtual void addTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtTaskMessageCallbackFcn fcn, void *usr)
 
virtual void addTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtMessageCallbackFcn fcn, void *usr)
 
virtual void removeTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtMessageCallbackFcn fcn, void *usr)
 
virtual void removeTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtTaskMessageCallbackFcn fcn, void *usr)
 
virtual void enable ()
 
virtual void sendTaskCanceled (DtTaskMessage *taskMsg)
 
virtual bool taskVisualizationsActive () const
 
virtual void setTasked (bool tasked)
 
virtual bool tasked () const
 
- Public Member Functions inherited from DtControllerComponent
 DtControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtControllerComponent ()
 
virtual DtSimRadioradio ()
 
virtual void enableTaskTypes ()
 
virtual void disableTaskTypes ()
 
- 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 void registerAttributeFunctions ()
 
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
 
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 bool taskVisualizationsEnabled () const
 
makVrf::DtTaskVisualizationMaptaskVisualizations ()
 
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 void followEntityCallback (DtSimMessage *msg, void *usrData)
 
static DtSimComponentcreator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
- Static Public Member Functions inherited from DtTaskControllerComponent
static void deprecatedTaskProcessorCallbackAdapter (DtSimMessage *msg, void *usr, DtSimTaskStatePtr taskState)
 
- 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 bool setupControlPoint ()
 
virtual void controlMovement ()
 
virtual void moveTowardProjectedStationPosition (double distanceToStation, double approachDistance)
 
virtual void moveBackToApproachPoint (bool onLeftSide, double approachDistance, double turnRadius)
 
virtual void turnToProjectedStationLine (bool isOnLeft, double radius, double distanceToSegment)
 
virtual void accelToCatchUp (double stationSpeed, double entitySpeed, double distanceBehindStation)
 
virtual void accelToDropBack (double stationSpeed, double entitySpeed, double distanceAheadOfStation, double distanceFromLine)
 
virtual void turnAtSpeed (double desiredHeading, double desiredSpeed)
 
virtual bool willOverrunPoint (double distanceAhead, double distanceFromLine, double entitySpeed, double turnRadius, double pointSpeed, double maxWaitTime)
 
virtual double calculateAcceleration (double desiredSpeed)
 
virtual double limitAcceleration (double desiredAcceleration, double desiredSpeed)
 
virtual bool createPortGroups ()
 
virtual bool createPorts ()
 
virtual void lookupAndCacheProcessSR ()
 
virtual bool postAddComponentsInit ()
 
virtual bool decideToGiveUpTask () const
 
virtual void preFirstTickInit () override
 
 DtSurfaceEntityFollowEntityController ()
 
 DtSurfaceEntityFollowEntityController (const DtSurfaceEntityFollowEntityController &orig)
 
const
DtSurfaceEntityFollowEntityController
operator= (const DtSurfaceEntityFollowEntityController &orig)
 
- Protected Member Functions inherited from DtSingleTaskControllerComponent
virtual void clearPendingSubtasks ()
 
virtual void clearSubtasksByType (const DtSimTaskMessageType &taskType)
 
virtual void cleanupInactiveSubtaskStatus ()
 
- Protected Member Functions inherited from DtTaskControllerComponent
virtual void suspendSubtasksOfTask (int taskId, DtSuspendedTaskInfo *suspendInfo)
 
virtual void suspendSubtaskOfTask (int taskId, int subtaskId, DtSuspendedTaskInfo *suspendInfo)
 
virtual DtSimTaskMessageType remapScriptId (const DtSimTaskMessageType &) const
 
- Protected Member Functions inherited from DtControllerComponent
 DtControllerComponent ()
 
 DtControllerComponent (const DtControllerComponent &orig)
 
const DtControllerComponentoperator= (const DtControllerComponent &orig)
 
virtual void onRestore ()
 
virtual void initializeTargetingControlTableFromDescriptor (const DtReaderWriter *)
 
virtual void sendCapableSetsAndTasks ()
 
- 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

DtVrfMovingObjectStateRepositorymyEntityState
 
DtSurfaceEntityPilotControllerDescriptormyDescriptor
 
const DtSurfaceEntityParametersmyParameters
 
DtSurfaceMovementPSRmyProcessState
 
DtReal myApproachSpeed
 
bool myIgnoreApproach
 
DtSurfFollowState myFollowState
 
DtMovementSimObjectFacade myLeaderPointerSimObjectFacade
 
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
 
Ports and Port Groups

Acceleration can be positive or negative.

DtAnalogOutputPortmyAccelerationPort
 
DtAnalogOutputPortmyClampSpeedPort
 
DtAnalogOutputPortmyTurnRatePort
 
DtAnalogOutputPortmyFinalHeadingPort
 
DtOutputPortGroupmySurfaceControlPortGroup
 
DtSimObjectReference myLeaderPointer
 
DtLocation3D myGeodCurrentPosition
 
DtVector2D myNEStationToEntity
 
DtLocation3D myGeodStationPosition
 
DtVector2D myUnitNEStationDirection
 
double myStationSpeed
 
- Protected Attributes inherited from DtTaskControllerComponent
DtTaskCallbackMap myTaskCallbackMap
 
std::list
< DtTaskProcessorCallbackInfo * > 
myTaskProcessorCallbackInfoList
 
bool myTaskIsRunning
 
- 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 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 DtTaskControllerComponent
typedef std::pair
< DtTaskMessageCallbackFcn,
void * > 
DtTaskCallbackMapPair
 
typedef std::map
< DtSimTaskMessageType,
DtTaskCallbackMapPair
DtTaskCallbackMap
 
- 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

DtSurfaceEntityFollowEntityController::DtSurfaceEntityFollowEntityController ( 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 DtSurfaceEntityFollowEntityController::~DtSurfaceEntityFollowEntityController ( )
virtual

Destructor.

Deletes myControlPoint

DtSurfaceEntityFollowEntityController::DtSurfaceEntityFollowEntityController ( )
protected

Default constructor; not implemented.

DtSurfaceEntityFollowEntityController::DtSurfaceEntityFollowEntityController ( const DtSurfaceEntityFollowEntityController orig)
protected

copy constructor; not implemented

Member Function Documentation

virtual const char* DtSurfaceEntityFollowEntityController::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
DtSurfaceEntityFollowEntityType

Implements DtTaskControllerComponent.

virtual bool DtSurfaceEntityFollowEntityController::init ( )
virtual

Calls down to the base class and then caches a pointer to the state repository in mySurfaceEntityState.

Reimplemented from DtControllerComponent.

static void DtSurfaceEntityFollowEntityController::followEntityCallback ( DtSimMessage msg,
void *  usrData 
)
static

Called when a follow entity message is received.

Instances of this component will register this callback in registerTaskMsgCallbacks (with their own 'this' pointer as user data) by calling addTaskProcessorCallback in order to request for notification of follow entity tasks. When this callback is activated, the user data pointer is cast to an instance of this class upon which processFollowEntityTask is called with the follow task message.

virtual void DtSurfaceEntityFollowEntityController::processFollowEntityTask ( DtSimMessage msg)
virtual

Retrieves the entity to follow and offset from the task message.

Called by followEntityCallback to take the name of the entity to follow and the follow offset and store them in the process state repository. The name of the entity is also stored in the PSR as the control object name for debugging purposes.

virtual void DtSurfaceEntityFollowEntityController::registerTaskMsgCallbacks ( )
virtual

Registers interest in follow entity tasks by calling addTaskProcessorCallback with followEntityCallback as the function pointer, and the 'this' pointer as the user data.

Reimplemented from DtTaskControllerComponent.

virtual void DtSurfaceEntityFollowEntityController::tick ( )
virtual

This gives the thread of control to the component. The component is ticked once each simulation from by the component list it's on. This base class tick has no functionality.

Reimplemented from DtSimComponent.

virtual void DtSurfaceEntityFollowEntityController::clearTask ( )
virtual

Calls down to the base class and then calls allowDeactivation() on mySurfaceControlPortGroup.

Reimplemented from DtSingleTaskControllerComponent.

virtual bool DtSurfaceEntityFollowEntityController::createSurfaceControlPortGroup ( )
virtual

Creates the surface control output port group.

virtual bool DtSurfaceEntityFollowEntityController::setupControlPoint ( )
protectedvirtual

Sets myControlPoint to the follow location.

Checks to make sure the leader is still valid. Updates the station location and velocity based on the leader. Velocity includes rotation of the offset position around the leader when the leader is rotating.

virtual void DtSurfaceEntityFollowEntityController::controlMovement ( )
protectedvirtual

Computes the acceleration and turn needed to follow the station.

Assesses the configuration of the entity relative to the station– station position and direction, station speed, entity speed, distance of entity from station and distance ahead (or behind) of entity's position projected onto the station's direction line; then

  • if far away, moves toward a projected station position;
  • if generally aligned with the station move direction, moves toward the direction line and adjusts speed to intercept the station going the same speed as the station;
  • if oriented opposite to the station direction, moves to an approach point behind and to the side of the station so it has room to turn around and approach the station from the rear;
  • if it is aligned with station direction but out in front, more than a threshold distance, and the station will not "catch up" to it in a threshold time, then the entity will circle back to an approach point.

The follow task is only allowed with forward movement. If the entity is moving backwards, it is first stopped.

Ordered speed is ignored, as the entity's task is to match the speed of the station. When it has to catch up, the entity moves at up to max speed.

virtual void DtSurfaceEntityFollowEntityController::moveTowardProjectedStationPosition ( double  distanceToStation,
double  approachDistance 
)
protectedvirtual

For the case when the entity starts far away from the station. Estimate the movement of the station, and move the entity toward a point approachDistance behind the projected position. Calls turnAtSpeed to set port outputs for heading to target position, at max speed.

Parameters
approachDistanceDtVector& stationDirection, double approachDistance);
virtual void DtSurfaceEntityFollowEntityController::moveBackToApproachPoint ( bool  onLeftSide,
double  approachDistance,
double  turnRadius 
)
protectedvirtual

If the entity is too far in front of the station, or oriented in the opposite direction as the station is moving, then this function is called to move the entity back toward a point approachDistance behind the station and one turnRadius to the side. The acceleration output maintains speed through this point. Calls turnAtSpeed to set port outputs for heading to target position, at max speed * normalAccelerationFraction.

Parameters
turnRadiusdouble turnRadius, DtVector &stationDirection);
virtual void DtSurfaceEntityFollowEntityController::turnToProjectedStationLine ( bool  isOnLeft,
double  radius,
double  distanceToSegment 
)
protectedvirtual

Set the turn rate port (via turnAtspeed()) to move toward and 

then align with the line extending from the station in the given direction. Calls turnAtSpeed to set port outputs for heading toward line, at max speed * normalAccelerationFraction. virtual void turnToProjectedStationLine(DtVector &stationDirection,

virtual void DtSurfaceEntityFollowEntityController::accelToCatchUp ( double  stationSpeed,
double  entitySpeed,
double  distanceBehindStation 
)
protectedvirtual

Set the acceleration port to make the entity catch up to the (moving) station, decelerating to the station's speed just as it it reaches the station. Output is implicit: acceleration & clamp speed output ports are set.

virtual void DtSurfaceEntityFollowEntityController::accelToDropBack ( double  stationSpeed,
double  entitySpeed,
double  distanceAheadOfStation,
double  distanceFromLine 
)
protectedvirtual

Set the acceleration port to make the entity decelerate to a speed below the station's speed–possibly stopping for a time– before accelerating again to meet the (moving) station just as the station catches the entity. DistanceAheadOfStation is based on the entity's location projected onto a line in front of the station its direction of movement. DistanceFromLine is the distance of the entity from this line; this is used to ensure a minimal speed if the entity has not yet merged into the line. Output is implicit: acceleration & clamp speed output ports are set.

virtual void DtSurfaceEntityFollowEntityController::turnAtSpeed ( double  desiredHeading,
double  desiredSpeed 
)
protectedvirtual

Turn and go at the given speed. Turns in the closest direction to the desired heading. Assumes forward speed >= 0. Sets the turn rate and acceleration ports appropriately. Output is implicit: output ports are set.

virtual bool DtSurfaceEntityFollowEntityController::willOverrunPoint ( double  distanceAhead,
double  distanceFromLine,
double  entitySpeed,
double  turnRadius,
double  pointSpeed,
double  maxWaitTime 
)
protectedvirtual

Test to see if the entity moving at entitySpeed, after decelerating at its max rate to a stop, will still be > maxWaitTime in front of a point that is distanceAhead behind the entity, traveling at pointSpeed. In addition to the wait-time test, the function checks distance; if the entity would stop within a distance threshold (proportional to entity size) of the station, this function will return false.

virtual double DtSurfaceEntityFollowEntityController::calculateAcceleration ( double  desiredSpeed)
protectedvirtual

Computes the acceleration needed to reach the given speed, based on the difference between current and desired speeds. Calls limitAcceleration to constrain it.

virtual double DtSurfaceEntityFollowEntityController::limitAcceleration ( double  desiredAcceleration,
double  desiredSpeed 
)
protectedvirtual

Constrains the acceleration to maxes defined in the parameters and avoids more acceleration than is needed to get to the desired speed in dT.

virtual bool DtSurfaceEntityFollowEntityController::createPortGroups ( )
protectedvirtual

Overridden to call createSurfaceControlPortGroup().

Reimplemented from DtSimComponent.

virtual bool DtSurfaceEntityFollowEntityController::createPorts ( )
protectedvirtual

Overridden to call createThrottlePort() and createRudderPort().

Reimplemented from DtSimComponent.

virtual void DtSurfaceEntityFollowEntityController::lookupAndCacheProcessSR ( )
protectedvirtual

This function looks up a process state repository in the process state repository manager by name, and caches a pointer to it in myProcessState. The name (if it exists) is given in the component descriptor (DtComponentDescriptor::processStateRepositoryName). If the name does not exist, it uses the appropriate default name defined in procSRTypes.h. Another component is responsible for creating and destroying the process state repository.

virtual bool DtSurfaceEntityFollowEntityController::postAddComponentsInit ( )
protectedvirtual

Calls lookupAndCacheProcessSR(), to look up our process state repository after all of the components have been created and loaded.

Returns
true if myProcessState is not null

Reimplemented from DtControllerComponent.

virtual bool DtSurfaceEntityFollowEntityController::decideToGiveUpTask ( ) const
protectedvirtual

If the entity is embarked and the target of the current movement task is not embarked on the same object return true, and otherwise return a call to the base class.

Reimplemented from DtSingleTaskControllerComponent.

virtual void DtSurfaceEntityFollowEntityController::preFirstTickInit ( )
overrideprotectedvirtual

This function can be overridden to initialize a component before it is ticked for the first time. The implementation for this function is empty. It is called by timedTick if myFirstTick is true.

Reimplemented from DtSimComponent.

static DtSimComponent* DtSurfaceEntityFollowEntityController::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.
const DtSurfaceEntityFollowEntityController& DtSurfaceEntityFollowEntityController::operator= ( const DtSurfaceEntityFollowEntityController orig)
protected

assignment operator; not implemented

Member Data Documentation

DtVrfMovingObjectStateRepository* DtSurfaceEntityFollowEntityController::myEntityState
protected
DtSurfaceEntityPilotControllerDescriptor* DtSurfaceEntityFollowEntityController::myDescriptor
protected
const DtSurfaceEntityParameters* DtSurfaceEntityFollowEntityController::myParameters
protected

Cache a pointer to the entity parameters.

DtSurfaceMovementPSR* DtSurfaceEntityFollowEntityController::myProcessState
protected

Pointer to a process state repository used to store state data associated with this component. This process state repository is shared with other components. Another component is responsible for creating and destroying the process state repository. This state is saved and restored as part of a scenario (or checkpoint).

DtAnalogOutputPort* DtSurfaceEntityFollowEntityController::myAccelerationPort
protected

The goal speed; used by the actuator to prevent accelerating past the desired speed if dT is much longer than expected.

DtAnalogOutputPort* DtSurfaceEntityFollowEntityController::myClampSpeedPort
protected

The goal speed; used by the actuator to prevent accelerating past the desired speed if dT is much longer than expected.

DtAnalogOutputPort* DtSurfaceEntityFollowEntityController::myTurnRatePort
protected

Rotation rate in radians/sec. Positive is to the right.

DtAnalogOutputPort* DtSurfaceEntityFollowEntityController::myFinalHeadingPort
protected

A clamp heading, similar to clamp speed.

DtOutputPortGroup* DtSurfaceEntityFollowEntityController::mySurfaceControlPortGroup
protected

Output Port Group Name: surface-control
Output Port Group Description: acceleration, clamp speed, turn rate, and final heading ports.

DtSimObjectReference DtSurfaceEntityFollowEntityController::myLeaderPointer
protected

Set fresh each frame by setupControlPoint.

DtLocation3D DtSurfaceEntityFollowEntityController::myGeodCurrentPosition
protected

DtVector myLocalStationPosition; // local coordinates DtVector myLocalStationVelocity; // local coordinates.

DtVector2D DtSurfaceEntityFollowEntityController::myNEStationToEntity
protected

Set fresh each frame by setupControlPoint.

DtLocation3D DtSurfaceEntityFollowEntityController::myGeodStationPosition
protected

Set fresh each frame by setupControlPoint.

DtVector2D DtSurfaceEntityFollowEntityController::myUnitNEStationDirection
protected

Set fresh each frame by setupControlPoint.

double DtSurfaceEntityFollowEntityController::myStationSpeed
protected

Set fresh each frame by setupControlPoint.

DtReal DtSurfaceEntityFollowEntityController::myApproachSpeed
protected

The nominal speed to use for approach maneuvers. This will be the ordered speed unless that is zero (or negative), in which case a fraction of max speed is used arbitrarily. Computed every tick.

bool DtSurfaceEntityFollowEntityController::myIgnoreApproach
protected

This is set when the station is moving more than a couple knots. It forces the entity to ignore the "back-facing" condition to go back to an approach point. This situation arises when the leader is turning and the station-following geometry changes in abrupt ways.

DtSurfFollowState DtSurfaceEntityFollowEntityController::myFollowState
protected

For debugging.

DtMovementSimObjectFacade DtSurfaceEntityFollowEntityController::myLeaderPointerSimObjectFacade
protected
DtPlatformLocalObjectFacade DtSurfaceEntityFollowEntityController::myPlatformLocalObjectFacade
protected

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

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)