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
DtSurfaceEntityMoveAlongController Class Reference

DtSurfaceEntityMoveAlongController is a controller that models movement of a ship along a route.

End User Description: DtSurfaceEntityMoveAlongController (surfEntMvAlgCtl.h) is derived from DtSurfaceEntityMoveToLocationController.
It overrides DtTaskControllerComponent::registerTaskMsgCallbacks() and registers the callback function moveAlongCallback() for DtMoveAlongType. When a message is received, the callback invokes processMoveAlongTask(), which looks up the route in the object manager and stores a pointer to it in myRoute.
Uses Descriptor Type: DtSurfaceEntityPilotControllerDescriptor

Inheritance diagram for DtSurfaceEntityMoveAlongController:
Inheritance graph
[legend]

Public Member Functions

 DtSurfaceEntityMoveAlongController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtSurfaceEntityMoveAlongController ()
 
virtual const chartype () const
 
virtual bool init ()
 
virtual void preFirstTickInit ()
 
virtual void clearTask ()
 
virtual void processMoveAlongTask (DtSimMessage *msg)
 
virtual void processRouteChanged ()
 
virtual bool atGoal ()
 
virtual bool passedGoal ()
 
virtual bool targetNextVertex ()
 
virtual void tick ()
 
virtual void taskComplete (bool success=true)
 
- Public Member Functions inherited from DtSurfaceEntityMoveToLocationController
 DtSurfaceEntityMoveToLocationController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtSurfaceEntityMoveToLocationController ()
 
virtual void processMoveToLocationTask (DtSimMessage *msg)
 
virtual void initializeLocals (const DtVector &globalTarget)
 
virtual double getAtDistance ()
 
- Public Member Functions inherited from DtSurfaceEntityPilotController
 DtSurfaceEntityPilotController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtSurfaceEntityPilotController ()
 
virtual bool createSurfaceControlPortGroup ()
 
- Public Member Functions inherited from DtSingleTaskControllerComponent
 DtSingleTaskControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *compDesc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtSingleTaskControllerComponent ()
 
virtual void postTick () override
 
virtual bool beginProcessingTask (const DtTaskMessage &task, DtSimTaskStatePtr taskState) override
 
virtual void taskNotify (const DtSimTask &task) override
 
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 DtSubtaskStatusEntrysubtaskStatus (int subtaskId)
 
virtual void clearCurrentTaskMessage ()
 
virtual DtTaskMessagecurrentTaskMessage () const
 
virtual DtSimTaskStatePtr currentTaskState () const
 
virtual void giveUpTask ()
 
virtual bool taskActive (int taskId) const override
 
virtual bool clearTopLevelTasks () override
 
virtual void clearConflictingTopLevelTasks (const DtSimTaskMessageType &conflictType) override
 
virtual void clearTasksByType (const DtSimTaskMessageType &taskType) override
 
virtual void clearTaskById (int taskId) override
 
virtual DtSuspendedTaskInfosuspendTaskById (int taskId) override
 
virtual DtSuspendedTaskInfosuspendSubtaskById (int taskId, int subtaskId) override
 
virtual std::list
< DtTaskMessage * > 
currentTaskMessages () const
 
virtual DtTaskWithTaskStateListPtr topLevelTasks () const override
 
virtual void disable () override
 
- Public Member Functions inherited from DtTaskControllerComponent
 DtTaskControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *compDesc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtTaskControllerComponent ()
 
virtual AcceptLevel acceptTask (const DtTaskMessage &task)
 
virtual bool showCurrentTaskInGui () const
 
virtual void setRadio (DtSimRadio *radio) override
 
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 () override
 
virtual void sendTaskCanceled (DtTaskMessage *taskMsg)
 
virtual bool taskVisualizationsActive () const override
 
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 enableScritedTask (const DtString &scriptId)
 
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, 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)
 
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 void isClutterChanged ()
 
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 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 moveAlongCallback (DtSimMessage *msg, void *usr)
 
static DtSimComponentcreator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
static DtReaderWriterprovideCurrentMinTurnRadius (void *controller)
 
static DtReaderWriterprovideTurnRadiusForOrderedSpeed (void *controller)
 
static DtReaderWriterprovideNextRoutePointIndex (void *controller)
 
- Static Public Member Functions inherited from DtSurfaceEntityMoveToLocationController
static void moveToLocationCallback (DtSimMessage *msg, void *usr)
 
static DtSimComponentcreator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
- Static Public Member Functions inherited from DtSurfaceEntityPilotController
static DtSimComponentcreator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
static DtReaderWriterprovideOrderedSpeed (void *controller)
 
- 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

 DtSurfaceEntityMoveAlongController ()
 
 DtSurfaceEntityMoveAlongController (const DtSurfaceEntityMoveAlongController &orig)
 
const
DtSurfaceEntityMoveAlongController
operator= (const DtSurfaceEntityMoveAlongController &orig)
 
virtual bool getNextRoutePoint (int &index, DtVector *&point)
 
virtual DtVector previousRoutePoint ()
 
virtual void setStateForCurrentPoint ()
 
virtual bool setupControlPoint ()
 
virtual void controlMovement ()
 
virtual void moveToMiddleOrFinalPoint ()
 
virtual bool shouldMoveToRouteSegment (double &distanceToSegment)
 
virtual void controlMovementToRouteSegment (double distanceToSegment)
 
virtual DtReal computeStartTurnDistance2 ()
 
virtual DtReal minTurnRadiusForSpeed (double speed) const
 
virtual
DtVrfMovingObjectStateRepository
getSR ()
 
virtual DtSurfaceMovementPSRgetPSR ()
 
virtual const
DtSurfaceEntityParameters
getParams ()
 
virtual void registerTaskMsgCallbacks ()
 
virtual void emptyVertexList ()
 
virtual void processEstimatedTotCalculation ()
 
virtual bool createPorts ()
 
virtual void processMoveAlongTask (DtMoveAlongTask *moveAlong)
 
virtual double integralControl () const
 
virtual double integratedErrorDecayRate () const
 
virtual double integralControlGain () const
 
- Protected Member Functions inherited from DtSurfaceEntityMoveToLocationController
virtual void updateTaskVisualizations ()
 
- Protected Member Functions inherited from DtSurfaceEntityPilotController
virtual void moveToWithFinalSpeed (const DtVector &localDestination, const double cruiseSpeed, const double finalSpeed)
 
virtual void moveToWithFinalSpeed (const double goalHeading, const double cruiseSpeed, const double finalSpeed)
 
virtual void turn (double desiredRate)
 
virtual void turn (double desiredRate, double desiredHeading)
 
virtual void immediateNormalStop ()
 
virtual double calculateControlForTurn (double yawAngle, double desiredRate)
 
virtual double calculateNormalAcceleration (double cruiseSpeed, double distance, double turnAngle, double finalSpeed)
 
virtual double calculateNormalAcceleration (double desiredSpeed)
 
virtual double limitedAcceleration (double desiredAcceleration, double desiredSpeed)
 
virtual double followerAcceleration (double dT, double distance, double maxDeceleration, double followerSpeed, double leaderSpeed)
 
virtual bool createPortGroups ()
 
virtual void lookupAndCacheProcessSR ()
 
virtual bool postAddComponentsInit ()
 
virtual bool decideToGiveUpTask () const
 
DtPlatformLocalObjectFacadeplatformLocalObjectFacade ()
 
 DtSurfaceEntityPilotController ()
 
 DtSurfaceEntityPilotController (const DtSurfaceEntityPilotController &orig)
 
const
DtSurfaceEntityPilotController
operator= (const DtSurfaceEntityPilotController &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 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

double myMinManeuverDistance2
 
double myIntegratedAlignmentError
 
DtVectorOutputPortmyCurrentVertexLocationOutputPort
 
DtSimObjectReference myRoute
 
bool myReprocessTask
 
- Protected Attributes inherited from DtSurfaceEntityMoveToLocationController
DtLocation3D myEntityPoint
 
DtBoolean myPassedGoal
 
DtBoolean myAtGoal
 
DtVector2D myCurrentGoalToEntity2DVector
 
DtVector2D myCurrentEntityToGoal2DVector
 
DtLocation3D myAimingPoint
 
double myAtDistance
 
const double DtEstimatedTotCalcInterval = 5.0
 
bool myEstimatedTotCalcEnabled
 
double myEstimatedTotValue
 
double myEstimatedTotLastCalcTime
 
DtVector myEstimatedTotTextPos
 
- Protected Attributes inherited from DtSurfaceEntityPilotController
DtVrfMovingObjectStateRepositorymyEntityState
 
DtSurfaceEntityPilotControllerDescriptormyDescriptor
 
const DtSurfaceEntityParametersmyParameters
 
DtSurfaceMovementPSRmyProcessState
 
double myDistanceSquared
 
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
 
DtAnalogOutputPortmyAccelerationPort
 
DtAnalogOutputPortmyClampSpeedPort
 
DtAnalogOutputPortmyTurnRatePort
 
DtAnalogOutputPortmyFinalHeadingPort
 
DtOutputPortGroupmySurfaceControlPortGroup
 
- 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 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
 
- 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 DtTaskControllerComponent
enum  AcceptLevel { AcceptLevel_Accept = 0, AcceptLevel_Partial = 1, AcceptLevel_Error = 2, AcceptLevel_NoAccept = 99 }
 
- 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

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

Destructor.

Removes any remaining vertices changed callback added by processMoveAlongTask. Deletes myControlPoint. Calls emptyVertexList().

DtSurfaceEntityMoveAlongController::DtSurfaceEntityMoveAlongController ( )
protected

default constructor; not implemented

DtSurfaceEntityMoveAlongController::DtSurfaceEntityMoveAlongController ( const DtSurfaceEntityMoveAlongController orig)
protected

copy constructor; not implemented

Member Function Documentation

virtual const char* DtSurfaceEntityMoveAlongController::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
DtSurfaceEntityMoveAlongType

Reimplemented from DtSurfaceEntityMoveToLocationController.

Reimplemented in DtSurfaceEntityPatrolRouteController.

virtual bool DtSurfaceEntityMoveAlongController::init ( )
virtual

Calls the parent init, then registers the attribute provider functions.

Reimplemented from DtSurfaceEntityPilotController.

virtual void DtSurfaceEntityMoveAlongController::preFirstTickInit ( )
virtual

Checks to see if there is a route, and if so registers for verticesChangedCallback for the route. This make sures that the callback is registered if the task was loaded from a scenario.

Reimplemented from DtSimComponent.

virtual void DtSurfaceEntityMoveAlongController::clearTask ( )
virtual

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

Reimplemented from DtSurfaceEntityPilotController.

static void DtSurfaceEntityMoveAlongController::moveAlongCallback ( DtSimMessage msg,
void *  usr 
)
static

Called when a move along message is received.

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

virtual void DtSurfaceEntityMoveAlongController::processMoveAlongTask ( DtSimMessage msg)
virtual

Retrieves the route name from the task message.

Called by moveAlongCallback to lookup the route stored in the move to message and store a pointer to it in myRoute. The name of the route and the reverse flag are saved in the process state repository. A verticies changed callback is registered on the route with routeChangedCallback as the function pointer. The myRouteHasChanged flag is then set to false. Start at closest point is checked, and setCurrentVertexToClosestInDirectionOfTraversal() is used to set the current route point. Finally, setupControlPoint() is called.

static DtReaderWriter* DtSurfaceEntityMoveAlongController::provideCurrentMinTurnRadius ( void *  controller)
static

Attribute access functions. These functions are registered with the parent system in init().Provides the current-min-turn-radius attribute for the surface entity movement system. This is computed from current speed and maximum lateral acceleration. It also considers the entity's minimum turn radius parameter.

static DtReaderWriter* DtSurfaceEntityMoveAlongController::provideTurnRadiusForOrderedSpeed ( void *  controller)
static

Provides the turn-radius-for-ordered-speed attribute for the surface entity movement system. Depends on maximum lateral acceleration; it also considers the entity's minimum turn radius and maximum speed parameters. This attribute is useful when planning a route that will be followed at the ordered speed, regardless of what the current entity speed is now.

static DtReaderWriter* DtSurfaceEntityMoveAlongController::provideNextRoutePointIndex ( void *  controller)
static

Provides the index of the route point the entity is moving towards.

virtual void DtSurfaceEntityMoveAlongController::processRouteChanged ( )
virtual

Handles changes to the verticies in the route.

Checks to make sure that the route is not null, that it's name matches the name stored in the process state repository, and that the controller is tasked. Iterates over the vertices in the route and compares them to the route vertices stored in the process state repository. If one of the verticies differs, myRouteHasChanged is set to true.

virtual bool DtSurfaceEntityMoveAlongController::atGoal ( )
virtual

Overridden to head to the next vertex in the route every time a vertex is reached until the end of the route is reached.

Calls down to DtSurfaceEntityMoveToController::atGoal() to determine if the current vertex has been reached. If not, false is returned. If the base class returns true, targetNextVertex is called to advance the target waypoint. If this call returns false, it indicates that the last vertex in the route has been reached and atGoal will return true.

Reimplemented from DtSurfaceEntityMoveToLocationController.

virtual bool DtSurfaceEntityMoveAlongController::passedGoal ( )
virtual

Overridden to head to the next vertex in the route every time a vertex is reached until the end of the route is reached.

Calls down to DtSurfaceEntityMoveToController::passedGoal() to determine if the current vertex has been passed. If not, false is returned. If the base class returns true, targetNextVertex is called to advance the target waypoint. If this call returns false, it indicates that the last vertex in the route has been passed and passedGoal will return true.

Reimplemented from DtSurfaceEntityMoveToLocationController.

virtual bool DtSurfaceEntityMoveAlongController::targetNextVertex ( )
virtual

virtual void doMoving(double desiredSpeed);

Advance to the next vertex in the route state.

Checks to see if the current vertex stored in the route state of the process state repository is the last vertex in the route. If so, false is returned. If not, the route state is advanced and setupControlPoint() is called. If successful, doMoving is called with findDesiredSpeed. If not, false is returned.

Reimplemented in DtSurfaceEntityPatrolRouteController.

static DtSimComponent* DtSurfaceEntityMoveAlongController::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 DtSurfaceEntityMoveAlongController::tick ( )
virtual

Overridden to check for valid myProcessState pointer. If it is null a warning is printed to the object console.

Reimplemented from DtSurfaceEntityMoveToLocationController.

virtual void DtSurfaceEntityMoveAlongController::taskComplete ( bool  success = true)
virtual

If we are currently tasked, this will cause us to notify the entity that we're done and delete the task. To indicate that the task has failed (and is being abandoned) call this method with success set to false.

Reimplemented from DtSingleTaskControllerComponent.

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

assignment operator; not implemented

virtual bool DtSurfaceEntityMoveAlongController::getNextRoutePoint ( int index,
DtVector *&  point 
)
protectedvirtual

Determines the next point along the route to use. Starting from the current route point, the function walks down the route points until a threshold distance is reached. The last point before this threshold is taken as the next point. This procedure is necessary to let the entity look ahead some when the route points are very close together. Ideally the move-along controller would plan a fine-motion path between closely spaced downstream points so as to best stay on the route; skipping ahead some distance is a rough substitute for such planning. The gotcha is the waypoint just beyond this threshold where the path may make a sharp turn.
Uses the current turn radius as a threshold.
Provides the index of the next point, and the next point that are more than the threshold beyond the current point, and returns true in the normal case. If the current point is the last point in the route, then the index and point will be the same as the current point, and the function returns false. If there are more points in the route beyond the current point, but the route ends before the threshold distance, then the index and point for the last point in the route are provided, and the function returns false.

virtual DtVector DtSurfaceEntityMoveAlongController::previousRoutePoint ( )
protectedvirtual

Gets the previous route point, before the current aim point; used for computing the route direction to the aim point. Uses the PSR prevRouteIndex.

virtual void DtSurfaceEntityMoveAlongController::setStateForCurrentPoint ( )
protectedvirtual

Set up Process State for current route point.

Sets the localAimPoint, startTurnDistance2, and goalVector in the process state repository for the current point in the routeState. This is called when a new route task is processed, when the route is changed, and when the entity arrives at a point and sets up the next point.

virtual bool DtSurfaceEntityMoveAlongController::setupControlPoint ( )
protectedvirtual

Makes sure the route state is valid (in case this is the first tick since a scenario load).

Reimplemented from DtSurfaceEntityMoveToLocationController.

virtual void DtSurfaceEntityMoveAlongController::controlMovement ( )
protectedvirtual

Executes the control function for the task, to produce control port outputs.

Executes the control function for the task for normal movement along a route; i.e. it moves directly toward the next route point. For the move-along-route controller, this function calls shouldMoveToRouteSegment() and possibly controlMovementToRouteSegment(); otherwise calls moveToMiddleOrFinalPoint().

Reimplemented from DtSurfaceEntityMoveToLocationController.

virtual void DtSurfaceEntityMoveAlongController::moveToMiddleOrFinalPoint ( )
protectedvirtual

Checks the PSR routeState to see if the current target point is the last in the route or not, and then calls MoveToWithFinalSpeed either with the orderedSpeed or 0.0 as the final speed.

Reimplemented in DtSurfaceEntityPatrolRouteController.

virtual bool DtSurfaceEntityMoveAlongController::shouldMoveToRouteSegment ( double distanceToSegment)
protectedvirtual

Tests the current position and orientation of the entity with respect to the current route segment (i.e., the direct line between the last route point and the current target route point) to determine if the entity should make some special maneuvers to move onto the route segment rather than just heading toward the target route point.

Returns
True if the entity is in a condition in which it should move toward the route segment line; false if the entity should just move toward the next route point.
Parameters
distanceToSegmentis the distance from the entity to the current segment of the route that the entity is following; it is computed in this function, and passed back for use by the calling code. This output parameter is undefined if the function returns false.
virtual void DtSurfaceEntityMoveAlongController::controlMovementToRouteSegment ( double  distanceToSegment)
protectedvirtual

Controls the entity to move it toward the current route segment.

Parameters
distanceToSegmentis the distance of the entity from the route segment it is currently following.
virtual DtReal DtSurfaceEntityMoveAlongController::computeStartTurnDistance2 ( )
protectedvirtual

Computes how far before the next control point the ship has to start turning toward the following route point to keep the ship close to the route without overshooting the control point. Returns the square of this distance. Looks at the heading change required to the following point, estimates the turning radius the ship will take based on its speed and lateral acceleration limit, and determines where the circular turn path will start.

virtual DtReal DtSurfaceEntityMoveAlongController::minTurnRadiusForSpeed ( double  speed) const
protectedvirtual

Compute the minimum turn radius based on given speed, normal lateral acceleration, and minimum turn radius parameter.

virtual DtVrfMovingObjectStateRepository* DtSurfaceEntityMoveAlongController::getSR ( )
inlineprotectedvirtual

Gets the entity state repository for purposes of providing attributes.

Reimplemented from DtSurfaceEntityPilotController.

References DtSurfaceEntityPilotController::myEntityState.

virtual DtSurfaceMovementPSR* DtSurfaceEntityMoveAlongController::getPSR ( )
inlineprotectedvirtual

Gets the process state repository for purposes of providing attributes.

References DtSurfaceEntityPilotController::myProcessState.

virtual const DtSurfaceEntityParameters* DtSurfaceEntityMoveAlongController::getParams ( )
inlineprotectedvirtual

Gets the entity parameters for the purposes of providing attributes.

References DtSurfaceEntityPilotController::myParameters.

virtual void DtSurfaceEntityMoveAlongController::registerTaskMsgCallbacks ( )
protectedvirtual

Registers interest in move along tasks by calling addTaskProcessorCallback with moveAlongCallback as the function pointer and the 'this' pointer as the user data.

Reimplemented from DtSurfaceEntityMoveToLocationController.

Reimplemented in DtSurfaceEntityPatrolRouteController.

virtual void DtSurfaceEntityMoveAlongController::emptyVertexList ( )
protectedvirtual

Removes and deletes vertices from the vertex list in process state repository (calls process state repository's emptyRouteVertices()).

virtual double DtSurfaceEntityMoveAlongController::integralControl ( ) const
protectedvirtual

A correction term based on Integral control (i.e., accumulated error) that is used when the entity is within the threshold distance of the route line and steering directly to the next waypoint. Over long distances, the steering control and actuator will sometimes cause the entity to drift outside this threshold distance, due to subtle (and unsolved) problems with computing long distance and short distance headings on an ellipsoidal earth. The error each tick is normalized (to the threshold for this entity) and added to myIntegratedAlignmentError. The accumulated value is reduced by integratedErrorDecayRate() each second. The accumulated error is multiplied by integralControlGain() and added to the computed heading to the next route point.

virtual double DtSurfaceEntityMoveAlongController::integratedErrorDecayRate ( ) const
inlineprotectedvirtual

The reduction factor in the accumulated error, per second. Must be < 1.0.

virtual double DtSurfaceEntityMoveAlongController::integralControlGain ( ) const
inlineprotectedvirtual

Returns radian offset per accumulated normalized error. Positive because positive error is to left, requiring positive angle adjustment.

virtual void DtSurfaceEntityMoveAlongController::processEstimatedTotCalculation ( )
protectedvirtual

calculate estimated tot

Reimplemented from DtSurfaceEntityMoveToLocationController.

virtual bool DtSurfaceEntityMoveAlongController::createPorts ( )
protectedvirtual

Overridden to call createThrottlePort() and createRudderPort().

Reimplemented from DtSurfaceEntityPilotController.

virtual void DtSurfaceEntityMoveAlongController::processMoveAlongTask ( DtMoveAlongTask moveAlong)
protectedvirtual

Member Data Documentation

double DtSurfaceEntityMoveAlongController::myMinManeuverDistance2
protected

Caches a threshold distance inside of which the entity will not consider moving to the route line, vs. heading directly to the route point.

double DtSurfaceEntityMoveAlongController::myIntegratedAlignmentError
protected

This is the accumulated error of normalized distance from the route segment line. This value is used for Integral control while the entity is within the threshold distance to the line and trying to steer directly to the next waypoint.

DtVectorOutputPort* DtSurfaceEntityMoveAlongController::myCurrentVertexLocationOutputPort
protected

Output Port Name: current-vertex-location
Output Port Description: Specifies the current vertex location of the entity's route in local coordinates. Output Port Range:
Output Group Parent:
.

DtSimObjectReference DtSurfaceEntityMoveAlongController::myRoute
protected
bool DtSurfaceEntityMoveAlongController::myReprocessTask
protected

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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)