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

DtFixedWingMoveAlongController is a controller that models the movement of a fixed wing entity along a route.

Developer Description: DtFixedWingMoveAlongController implements the move-along task for fixed-wing entities. It creates, in init(), a DtRouteState object (pointed to by the process state repository member myRouteState). This object is used by a DtRoute object to maintain the state of a route following task. All of its data and members are hidden from all but the DtRoute object; however, since it is created (and destroyed) by the controller, and not the DtRoute itself, it is possible for any number of controllers to follow the same DtRoute. DtFixedWingMoveAlongController overrides DtTaskControllerComponent:: registerTaskMsgCallbacks() and registers the callback function moveAlongCallback() for DtMoveAlongType radio messages.

Uses Descriptor Type: DtFixedWingPilotControllerDescriptor

Inheritance diagram for DtFixedWingMoveAlongController:
Inheritance graph
[legend]

Public Member Functions

 DtFixedWingMoveAlongController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtFixedWingMoveAlongController () override
 
virtual bool init () override
 
virtual void preFirstTickInit () override
 
virtual void tick () override
 
virtual const char * type () const override
 
virtual void doFinishing ()
 
virtual void doFinishingForFlying ()
 
virtual void doFinishingForTaxiing ()
 
virtual void doMoving ()
 
virtual void doFlying ()
 
virtual void doTaxiing ()
 
virtual void doTakeOff ()
 
virtual void doLanding ()
 
virtual double findDesiredSpeed ()
 
virtual bool nearGoal ()
 
virtual bool atGoal ()
 
virtual bool passedGoal ()
 
virtual bool processFlyAlongTask (DtSimTask *msg, DtSimTaskStatePtr taskStatePtr)
 
virtual bool processMoveAlongTask (DtSimTask *msg, DtSimTaskStatePtr taskStatePtr)
 
virtual void processRouteChanged ()
 
virtual void processSetAltitude (DtSimMessage *msg)
 
virtual void processSetOrderedAltitude (DtSimMessage *msg)
 
virtual void processSetLocation (DtSimMessage *msg)
 
virtual void processSetRestore (DtSimMessage *msg)
 
virtual void processModifyVrfObject (DtSimMessage *msg)
 
virtual bool setupRoute ()
 
virtual void registerTaskMsgCallbacks () override
 
virtual DtFixedWingFlightPSR * getPSR ()
 
virtual DtSimTaskStatePtr currentTaskState () const override
 
- Public Member Functions inherited from DtFixedWingPilotController
 DtFixedWingPilotController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtFixedWingPilotController () override
 
virtual double maxTurningGs () const
 
virtual bool terrainAvoidanceEnabled () const
 
virtual double terrainAvoidanceLookaheadTime ()
 
virtual void registerAttributeFunctions () override
 
virtual void taxiTo (const DtVector &destination, double speed)
 
virtual void taxi (double speed, double turnRate)
 
virtual double calculateSteering (double turnAngle) const
 
virtual double approximateThrottle (double speed)
 
virtual double calculateCurrentBrakingDistance () const
 
virtual void flyTo (const DtVector &destination, double speed, double maxTerrainAvoidanceLookaheadDist=-1)
 
virtual void flyToDirect (const DtVector &destination, double speed, double maxTerrainAvoidanceLookaheadDist=-1)
 
virtual void fly (double speed, double turnRate, double climbRate, double maxTerrainAvoidanceLookaheadDist=-1)
 
virtual void flyFixedPitch (double speed, double turnRate, double desiredPitch, double maxTerrainAvoidanceLookaheadDist=-1)
 
virtual double terrainAvoidancePitch (double speed, double desiredPitch, double maxTerrainAvoidanceLookaheadDist)
 
virtual bool clearPathTo (const DtVector &localPosition, bool &dataAvailable, double minAltitude)
 
virtual void circle (const DtVector &center, double radius, double speed, double altitude, bool clockwise=true)
 
virtual double calcControlForRoll (double rollRate)
 
virtual double calcControlForThrottle (double speed, bool &deployFlaps)
 
virtual double decelerationLimitedClimbRate (double altitudeError, double desiredSpeed, double finalClimbRate=0.0)
 
virtual void calcControlForTurnAndClimb (double turnRate, double climbRate, double &stickX, double &pedal)
 
virtual void calcControlForTurnAndPitch (double turnRate, double desiredPitch, double &stickX, double &pedal, double rollRate=0.0)
 
virtual double calculateClimbRate (double altitude, double climbTime) const
 
virtual double calculateTurnRate (double turnAngle, double additionalTurnRate=0) const
 
virtual double calculateRollAngle (double turnRate, double speed) const
 
virtual double calculateRollRate (double rollAngle, double turnRate)
 
virtual void calculateNormalizedBodyVelocity ()
 
virtual void calculateLocalAngularVelocity ()
 
virtual void calculateSpeedRatioSquared ()
 
virtual void initializeControllerForTick ()
 
virtual bool createFixedWingControlPortGroup ()
 
virtual bool createThrottlePort ()
 
virtual bool createStickPort ()
 
virtual bool createPedalPort ()
 
virtual bool createBrakePort ()
 
virtual bool createFlapsDeployedPort ()
 
virtual
DtConstrainedAnalogOutputPort * 
throttlePort ()
 
virtual
DtConstrainedDualAxisAnalogOutputPort * 
stickPort ()
 
virtual
DtConstrainedAnalogOutputPort * 
pedalPort ()
 
virtual
DtConstrainedAnalogOutputPort * 
brakePort ()
 
virtual DtBooleanOutputPort * flapsDeployedPort ()
 
virtual void setMaxThrustAcceleration (double maxThrustAcceleration)
 
virtual void setTakeOffDir (const DtVector &takeOffDir)
 
virtual const DtVector & takeOffDir () const
 
virtual DtReal maxTurningGsForTask () const
 
virtual DtReal maxTurnRateCutoffAngle () const
 
virtual DtReal maxTaxiingTurnSpeed () const
 
virtual DtReal taxiingNearDistance () const
 
virtual DtReal taxiingAtDistance () const
 
virtual DtReal taxiingApproachSpeed () const
 
virtual DtReal maxPitchAngle () const
 
virtual DtReal timeToTargetAltitude () const
 
- Public Member Functions inherited from DtSingleTaskControllerComponent
 DtSingleTaskControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *compDesc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtSingleTaskControllerComponent () override
 
virtual void postTick () override
 
virtual bool beginProcessingTask (const DtTaskMessage &task, DtSimTaskStatePtr taskState) override
 
virtual void taskNotify (const DtSimTask &task) override
 
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< int > currentPendingSubstaskIds () const
 
virtual DtSubtaskStatusEntry * subtaskStatus (int subtaskId)
 
virtual void clearCurrentTaskMessage ()
 
virtual DtTaskMessage * currentTaskMessage () 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 DtSuspendedTaskInfo * suspendTaskById (int taskId) override
 
virtual DtSuspendedTaskInfo * suspendSubtaskById (int taskId, int subtaskId) override
 
virtual std::list
< DtTaskMessage * > 
currentTaskMessages () const override
 
virtual DtTaskWithTaskStateListPtr topLevelTasks () const override
 
virtual void updateImgui () override
 
virtual void initializeTaskInformationStateProperty (const DtSimTaskMessageType &taskType)
 
virtual void updateCurrentTaskInformationStatusProperty (const DtString &status)
 
virtual DtString taskInformationStatusPropertyValue (const DtSimTaskMessageType &taskType) const
 
virtual DtString currentTaskInformationStatusPropertyValue () const
 
virtual DtRwPropertiesStructure * taskInformationProperty (const DtSimTaskMessageType &taskType)
 
virtual DtRwPropertiesStructure * currentTaskInformationProperty ()
 
- Public Member Functions inherited from DtTaskControllerComponent
 DtTaskControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *compDesc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtTaskControllerComponent () override
 
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, bool hidden=false)
 
virtual void addTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtMessageCallbackFcn fcn, void *usr, bool hidden=false)
 
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 disable () 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 () override
 
virtual DtSimRadio * radio ()
 
virtual void enableTaskTypes ()
 
virtual void enableScriptedTask (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 () override
 
virtual void setParentSystem (DtComponentSystem *system)
 
DtComponentSystem * parentSystem () const
 
virtual void timedTick ()
 
virtual void setMinTickPeriod (double minTickPeriod, double minTickPeriodVariance)
 
virtual void setupFirstTickTime ()
 
virtual void setEntity (DtLocalObject *entity)
 
virtual DtSimComponent * nextComponent ()
 
virtual DtSimComponent * prevComponent ()
 
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 DtInputPort * lookupInputPort (const DtString &portName)
 
virtual DtList inputPortList () const
 
virtual void addOutputPort (DtOutputPort *port)
 
virtual void removeOutputPort (DtOutputPort *port)
 
virtual DtOutputPort * lookupOutputPort (const DtString &portName)
 
virtual DtList outputPortList () const
 
virtual void addInputPortGroup (DtInputPortGroup *group)
 
virtual void removeInputPortGroup (DtInputPortGroup *group)
 
virtual DtInputPortGroup * lookupInputPortGroup (const DtString &groupName)
 
virtual DtList inputPortGroupList () const
 
virtual void addOutputPortGroup (DtOutputPortGroup *group)
 
virtual void removeOutputPortGroup (DtOutputPortGroup *group)
 
virtual DtOutputPortGroup * lookupOutputPortGroup (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
 
DtString toString (const DtEntityType &entityType) const
 
DtVrfProcessStateRepositoryManager * psrManager ()
 
virtual const DtSymbolString & componentFullName () const
 
DtPhysicalWorld * physicalWorld ()
 
const DtPhysicalWorld * physicalWorld () const
 
const DtAttachedTerrain * terrainAttachedTo () const
 
DtLocalObject * entity ()
 
const DtLocalObject * entity () const
 
DtSimulationServices * simulationServices ()
 
const DtSimulationServices * simulationServices () const
 
const Coordinate_System * coordinateSystem () const
 
virtual void isClutterChanged ()
 
virtual bool taskVisualizationsEnabled () const
 
makVrf::DtTaskVisualizationMap & taskVisualizations ()
 
virtual bool debugActive () const
 
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 DtSimResourceManager & resourceManager ()
 
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 DtReaderWriter & operator= (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 aliasContainer & aliases () 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 char * readerWriterType () const
 
virtual const char * xmlType () 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 DtReaderWriter * defaultRWValue () const
 
virtual DtReaderWriter * defaultRWValue ()
 
virtual void setDefaultRWValue (DtReaderWriter *)
 
virtual bool checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
const DtReaderWriterRegistry & registry () const
 
DtReaderWriterRegistry & registry ()
 
virtual DtPropertyInterface * property ()
 
virtual const DtPropertyInterface * property () const
 
virtual DtString toXml () const
 
virtual DtRwVariableBindings * generateVariableBindings () 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 setAltitudeCallback (DtSimMessage *msg, void *usrData)
 
static void setOrderedAltitudeCallback (DtSimMessage *msg, void *usrData)
 
static void setLocationCallback (DtSimMessage *msg, void *usrData)
 
static void setRestoreCallback (DtSimMessage *msg, void *usrData)
 
static void modifyVrfObjectCallback (DtSimMessage *msg, void *usr)
 
static void moveAlongCallback (DtSimMessage *msg, void *usr, DtSimTaskStatePtr taskStatePtr)
 
static DtReaderWriter * provideNextRoutePointIndex (void *c)
 
static DtSimComponent * creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
- Static Public Member Functions inherited from DtFixedWingPilotController
static DtSimComponent * creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
static DtReaderWriter * provideMaxThrustAcceleration (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 DtSimComponentFactory * factory ()
 
static void setFactory (DtSimComponentFactory *factory)
 
static DtSimComponent * createComponent (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 char * theXmlType ()
 
static const DtFilename & appPath ()
 
static void setFactoryCreatorFunction (DtReaderWriterFactoryCreatorFcn fcn)
 
static void createReaderWriterFactory ()
 
static void cleanupFactory ()
 
static DtReaderWriterFactory * factory ()
 
static void setOutputStream (DtOutputStream *stream)
 
static DtOutputStream & outputStream ()
 
static DtReaderWriter * createFromXmlFile (const DtFilename &, bool createAsProperty=false)
 
static DtReaderWriter * createFromXml (const DtString &, bool createAsProperty=false)
 
static DtReaderWriter * createFromEnvironment (DtEnvironmentSP, bool createAsProperty=false)
 
static DtString getAttribute (DtEnvironmentSP env, const DtString &name, DtEnvValueSP root)
 

Protected Member Functions

virtual void processMoveAlong (const DtTaskMessage &msg, DtSimTaskStatePtr taskStatePtr)
 
 DtFixedWingMoveAlongController ()
 
 DtFixedWingMoveAlongController (const DtFixedWingMoveAlongController &orig)
 
DtFixedWingMoveAlongController & operator= (const DtFixedWingMoveAlongController &orig)
 
void clearStoredRoute ()
 
void updateTakeOffDir ()
 
void updateLandingDir ()
 
void processEntityLocationChange ()
 
virtual bool setMovementStatusFromRoute ()
 
virtual void resetValues ()
 
virtual void clearTask () override
 
virtual void updateTaskVisualizations () override
 
virtual void processEstimatedTotCalculation () override
 
virtual bool createPorts () override
 
- Protected Member Functions inherited from DtFixedWingPilotController
virtual DtReaderWriter * processProvideMaxThrustAcceleration ()
 
virtual bool createPortGroups () override
 
virtual void lookupAndCacheProcessSR ()
 
virtual bool postAddComponentsInit () override
 
virtual bool decideToGiveUpTask () const override
 
virtual void updateCurrentState ()
 
virtual double calculateCollisionLookAhead (const double climbRate, const double speed, const double desiredAltitude)
 
virtual double convertSpeedtoGroundSpeed (double speed, double currentAlt, DtAirSpeedType speedType)
 
 DtFixedWingPilotController ()
 
 DtFixedWingPilotController (const DtFixedWingPilotController &orig)
 
const DtFixedWingPilotController & operator= (const DtFixedWingPilotController &orig)
 
- Protected Member Functions inherited from DtSingleTaskControllerComponent
virtual void clearPendingSubtasks ()
 
virtual void clearSubtasksByType (const DtSimTaskMessageType &taskType)
 
virtual void cleanupInactiveSubtaskStatus ()
 
virtual void taskHandlingOnDisable () override
 
- 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 DtControllerComponent & operator= (const DtControllerComponent &orig)
 
virtual void onRestore () override
 
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
 
DtVrfProcessStateRepository * createComponentPsr (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
 
DtVrfObjectStateRepository * localStateRepository ()
 
const DtVrfObjectStateRepository * localStateRepository () const
 
DtPropertyInterface * cachedNextFrameStateProperty (DtPropertyInterface **prop, const DtString &propName)
 
template<typename ValType >
void setCachedNextFrameStatePropertyValue (DtPropertyInterface **prop, const DtString &propName, ValType value)
 
const DtPropertyInterface * cachedCurrentFrameStateProperty (const DtPropertyInterface **prop, const DtString &propName) const
 
template<typename ValType >
bool getCachedCurrentFrameStatePropertyValue (const DtPropertyInterface **prop, const DtString &propName, ValType &value) const
 
void addSimObjectPredicateCallback (DtSimObjectReference simObject, DtVrfObjectPredicateCallbackFunction function, const DtVrfObjectPredicate &predicate, DtTime evaluationPeriod=0, void *userData=0)
 
void removeSimObjectPredicateCallback (const DtSimObject *simObject, 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

DtSimObjectReference myRoute
 
bool myRouteHasChanged
 
bool myWarnedForMovementStatus
 
DtVectorOutputPort * myCurrentVertexLocationOutputPort
 
bool myChangedLocation = false
 
- Protected Attributes inherited from DtFixedWingPilotController
DtFixedWingEntityStateRepository * myFixedWingEntityState
 
DtFixedWingFlightPSR * myProcessState
 
DtAirspeedCalculator * myAirSpeedCalculator
 
const double DtEstimatedTotCalcInterval = 5.0
 
bool myEstimatedTotCalcEnabled
 
double myEstimatedTotValue
 
double myEstimatedTotLastCalcTime
 
DtVector myEstimatedTotTextPos
 
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
 
DtOutputPortGroup * myFixedWingControlPortGroup
 
DtConstrainedAnalogOutputPort * myThrottlePort
 
DtConstrainedDualAxisAnalogOutputPort * myStickPort
 
DtConstrainedAnalogOutputPort * myPedalPort
 
DtConstrainedAnalogOutputPort * myBrakePort
 
DtBooleanOutputPort * myFlapsDeployedPort
 
DtVector myCurrentLocalPosition
 
DtVector myCurrentLocalVelocity
 
double myCurrentSpeed
 
DtDcm myCurrentOrientationMatrix
 
double myCurrentHeading
 
double myCurrentTopoPitch
 
double myCurrentTopoRoll
 
DtDcm myLocalToTopoDcm
 
- Protected Attributes inherited from DtTaskControllerComponent
DtTaskCallbackMap myTaskCallbackMap
 
std::list
< DtTaskProcessorCallbackInfo * > 
myTaskProcessorCallbackInfoList
 
bool myTaskIsRunning
 
- Protected Attributes inherited from DtControllerComponent
DtSimRadio * myRadio
 
bool myTaskTypesEnabled
 
bool myInitialized
 
- Protected Attributes inherited from DtSimComponent
DtLocalObject * myEntity
 
DtComponentSystem * mySystem
 
DtListItem * myListItem
 
DtInputPortMap myInputPortList
 
DtOutputPortMap myOutputPortList
 
DtInputPortGroupMap myInputPortGroupList
 
DtOutputPortGroupMap myOutputPortGroupList
 
int myPriority
 
double myLastTickSimTime
 
std::unique_ptr< DtTimedTickLogic > myTimedTickLogic
 
double myDT
 
bool myIsEnabled
 
bool myFirstTick
 
const DtComponentDescriptor * myComponentDescriptor
 
std::list
< DtVrfProcessStateRepository * > 
myComponentPsrs
 
makVrf::DtTaskVisualizationMap myTaskVisualizations
 
double myNextTaskVisTickTime
 
DtSymbolString myFullComponentName
 
DtSimulationServices * mySimServices
 
DtPredicateCallbackManager * myPredicateCallbackManager
 
boost::signals2::scoped_connection myIsClutterChangedConnection
 
bool myLocalDebug
 
- Protected Attributes inherited from DtReaderWriter
const DtSymbolString myName
 
DtReaderWriterRegistry myRegistry
 
DtReaderWriterRegistry * myParentRegistry
 
bool myValueSpecified
 
bool myReadOnlyFlag
 
bool myIsVariableReference
 
DtSymbolString myVariableName
 
bool myVariableIsBound
 
DtReaderWriter * myDefaultValue
 
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 )()
 
- Public Attributes inherited from DtSingleTaskControllerComponent
const DtString TaskStatusRunning = "TaskRunning"
 
const DtString TaskStatusNotActive = "TaskNotActive"
 
- 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 DtSimComponentFactory * myFactory
 
- Static Protected Attributes inherited from DtReaderWriter
static DtString theUnspecifiedValue
 
static DtGetSelfCallbackInfo thePostGetSelfCallback
 
static DtPutSelfCallbackInfo thePrePutSelfCallback
 
static const DtVariableBindingsList theEmptyVariableBindingsList
 
static bool theCreatorFcnSet
 
static DtReaderWriterFactory * theFactory
 
static
DtReaderWriterFactoryCreatorFcn 
theFactoryCreatorFcn
 
static bool thePutIndent
 
static DtOutputStream * theOutputStream
 

Constructor & Destructor Documentation

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

destructor

DtFixedWingMoveAlongController::DtFixedWingMoveAlongController ( )
protected

default constructor - should not be called

DtFixedWingMoveAlongController::DtFixedWingMoveAlongController ( const DtFixedWingMoveAlongController &  orig)
protected

copy constructor

Member Function Documentation

virtual bool DtFixedWingMoveAlongController::init ( )
overridevirtual

Registers the attribute function with the parent system.

Reimplemented from DtFixedWingPilotController.

virtual void DtFixedWingMoveAlongController::preFirstTickInit ( )
overridevirtual

If tasked and if the process state has a route name, setupRoute is called. If successful, a vertices changed callback is registered on myRoute with routeChangedCallback. The ordered altitude is set to the altitude of the current vertex in the route. Finally setMovementStatusFromRoute is called.

Reimplemented from DtSimComponent.

virtual void DtFixedWingMoveAlongController::tick ( )
overridevirtual

Calculate new control values. If myWaitingToSetMovementStatus is set in myProcessState, then setMovementStatusFromRoute is called to see if the required terrain data is now available.

Reimplemented from DtFixedWingPilotController.

virtual const char* DtFixedWingMoveAlongController::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
DtFixedWingMoveAlongControllerType

Reimplemented from DtFixedWingPilotController.

Reimplemented in DtFixedWingPatrolRouteController, and DtCruiseMissileMoveAlongController.

virtual void DtFixedWingMoveAlongController::doFinishing ( )
virtual

Based on the current movement status of the entity, calls the appropriate doFinishing function.

virtual void DtFixedWingMoveAlongController::doFinishingForFlying ( )
virtual

Checks to see if the entity is within two seconds of being at the waypoint, or if the entity’s distance from the waypoint is greater than it was the previous frame (by comparing myProcessState->distanceSquared() to myProcessState->lastDistanceSquared()). If so, all port values are set to 0.0, myFinishing is set to false, and taskComplete() is called. Otherwise, flyTo() is called, and myProcessState->lastDistanceSquared() is set to myDistanceSquared.

Reimplemented in DtFixedWingPatrolRouteController.

virtual void DtFixedWingMoveAlongController::doFinishingForTaxiing ( )
virtual

Only called if the entity is near its goal. Checks to see if the entity is at the goal or passed it. If so, then it stops. Otherwise, it continues to taxi, but at its approach speed if it has one.

Reimplemented in DtFixedWingPatrolRouteController.

virtual void DtFixedWingMoveAlongController::doMoving ( )
virtual

Determines what state the entity is currently in and then calls the appropriate doMoving function for that state..

virtual void DtFixedWingMoveAlongController::doFlying ( )
virtual

Determines if the entity is five seconds or fewer away from being at the waypoint using the entity’s speed and myDistanceSquared. If it is, it sets the myFinishing flag to true; The myProcessState->lastDistanceSquared() is set to myDistanceSquared. otherwise, it calls the flyTo() function provided by its parent class.

virtual void DtFixedWingMoveAlongController::doTaxiing ( )
virtual

Determines if the entity is near its goal. If it is, it sets the finishing flag to true. The myProcessState->lastDistanceSquared() is set to myDistanceSquared. Otherwise, it calls the taxiTo() function provided by its parent class.

virtual void DtFixedWingMoveAlongController::doTakeOff ( )
virtual

Changes the ordered speed to be the max ground speed and then taxi's in the direction of the waypoint. By setting the ordered speed to be the max ground speed, the plane will accelerate until either maxing out its speed or reaching min lift speed and taking off.

virtual void DtFixedWingMoveAlongController::doLanding ( )
virtual

Checks to see if the entity is on the ground. If so, it assumes that the entity has landed, updates the movement status, and calls makes sure the correct movement takes place. If not, then it creates the landing direction vector if it doesn't exist, ensures that the ordered altitude is set appropriately, and proceeds to fly towards the touch down point at the desired speed.

Reimplemented in DtFixedWingPatrolRouteController.

virtual double DtFixedWingMoveAlongController::findDesiredSpeed ( )
virtual

This function returns the appropriate speed for the movement status of the FWE. Flying - the ordered speed. For now, the ordered speed doesn't change whether approaching a goal or not. Taxiing - the ordered ground speed unless it is approaching the goal, at which point it will return the approach speed. Landing - the minimum lift speed Taking off - the maximum ground speed.

virtual bool DtFixedWingMoveAlongController::nearGoal ( )
virtual

Determines if the entity is close enough to the waypoint that it can be considered near its goal. For ground motion, this means determining if its breaking distance is greater than or equal to the specified near distance. For flying, this determines if the entity is within near-time of the goal at current speed or orientation. NOTE: if the entity is not, but because it is at it's maximum altitude and the altitude is further above, it then determines if it is close enough to the goal as if that goal was at its altitude. Note that for flying, the tick period x 4 is the lower bound for near-time.

virtual bool DtFixedWingMoveAlongController::atGoal ( )
virtual

Determines if the entity is "at" the goal. For taxiing, it determines if entity is within the specified at-distance. For flying, it basically performs the same calculation for closeness, including altitude conditions, as nearGoal(), but for within at-time. The tick-period lower bound is 2 x tick period.

virtual bool DtFixedWingMoveAlongController::passedGoal ( )
virtual

Determines if the entity will move passed the control point to which it is moving. It has passed the goal if it crosses a line through the point perpendicular to the next route segment.

static void DtFixedWingMoveAlongController::setAltitudeCallback ( DtSimMessage *  msg,
void *  usrData 
)
static

Instances of this component will register these callbacks with their own 'this' pointer as user data with the msg executive requesting notification of move-along tasks. ASSUMPTION: All of these functions assume that the messages and the associated data are valid.

static void DtFixedWingMoveAlongController::setOrderedAltitudeCallback ( DtSimMessage *  msg,
void *  usrData 
)
static
static void DtFixedWingMoveAlongController::setLocationCallback ( DtSimMessage *  msg,
void *  usrData 
)
static
static void DtFixedWingMoveAlongController::setRestoreCallback ( DtSimMessage *  msg,
void *  usrData 
)
static
static void DtFixedWingMoveAlongController::modifyVrfObjectCallback ( DtSimMessage *  msg,
void *  usr 
)
static
virtual bool DtFixedWingMoveAlongController::processFlyAlongTask ( DtSimTask *  msg,
DtSimTaskStatePtr  taskStatePtr 
)
virtual
virtual bool DtFixedWingMoveAlongController::processMoveAlongTask ( DtSimTask *  msg,
DtSimTaskStatePtr  taskStatePtr 
)
virtual
virtual void DtFixedWingMoveAlongController::processRouteChanged ( )
virtual

Called when the route to which this entity is tasked is modified. The function determines if the route change warrants updating the internal state and, if so, updates the internal state appropriately.

virtual void DtFixedWingMoveAlongController::processSetAltitude ( DtSimMessage *  msg)
virtual

In all of the process functions, if an altitude change occurred, then the function redetermines the proper value for the movement status and any other state variables.

virtual void DtFixedWingMoveAlongController::processSetOrderedAltitude ( DtSimMessage *  msg)
virtual
virtual void DtFixedWingMoveAlongController::processSetLocation ( DtSimMessage *  msg)
virtual
virtual void DtFixedWingMoveAlongController::processSetRestore ( DtSimMessage *  msg)
virtual
virtual void DtFixedWingMoveAlongController::processModifyVrfObject ( DtSimMessage *  msg)
virtual

If the entity is tasked, the route is valid, and the object moved was the entity, then this resets the current route state to the closest point on the route. If the current movement status is taking off then it also resets the take off direction vector.

virtual bool DtFixedWingMoveAlongController::setupRoute ( )
virtual
virtual void DtFixedWingMoveAlongController::registerTaskMsgCallbacks ( )
overridevirtual

Overrides this so it can register it's interest in the radio messages defined above.

Reimplemented from DtTaskControllerComponent.

Reimplemented in DtFixedWingPatrolRouteController.

static void DtFixedWingMoveAlongController::moveAlongCallback ( DtSimMessage *  msg,
void *  usr,
DtSimTaskStatePtr  taskStatePtr 
)
static
static DtReaderWriter* DtFixedWingMoveAlongController::provideNextRoutePointIndex ( void *  c)
static

A callback to provide a controller attribute ("next-route-point-index")

virtual DtFixedWingFlightPSR* DtFixedWingMoveAlongController::getPSR ( )
inlinevirtual

Gets the process state repository for purposes of providing attributes.

References DtFixedWingPilotController::myProcessState.

virtual DtSimTaskStatePtr DtFixedWingMoveAlongController::currentTaskState ( ) const
overridevirtual
Returns
Current execution state of the task. This is called when a task is being suspended. The returned state object will be passed into beginProcessingTask() when the task is resumed. At the base class level, returns a null pointer. Derived classes that have tasks with DtTaskState (data associated with execution of the task) may return a new DtTaskState instance, filled out with the appropriate information about the current task execution state. Task controllers that do not need to return task state do not need to override this function.

Reimplemented from DtSingleTaskControllerComponent.

Reimplemented in DtFixedWingPatrolRouteController.

static DtSimComponent* DtFixedWingMoveAlongController::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 DtFixedWingMoveAlongController::processMoveAlong ( const DtTaskMessage &  msg,
DtSimTaskStatePtr  taskStatePtr 
)
protectedvirtual
DtFixedWingMoveAlongController& DtFixedWingMoveAlongController::operator= ( const DtFixedWingMoveAlongController &  orig)
protected

assignment operator

void DtFixedWingMoveAlongController::clearStoredRoute ( )
protected

deletes the route currently stored.

void DtFixedWingMoveAlongController::updateTakeOffDir ( )
protected

Updates the take off direction vector in the process state repository by calculating the direction from the current location to the current route point.

void DtFixedWingMoveAlongController::updateLandingDir ( )
protected
void DtFixedWingMoveAlongController::processEntityLocationChange ( )
protected

This function is meant to be called after the entity's location has been changed by the user. Usually this is through a setLocation, setAltitude, or drag and drop in the front end, but not necessarily. It resets the route state to the closest point in the route to the entity. Then it resets all necessary state including the ordered altitude and the current movement status. "Finishing" state is set to false and the lastDistanceSquared value is also reset.

virtual bool DtFixedWingMoveAlongController::setMovementStatusFromRoute ( )
protectedvirtual

Looks at the current point in the route and the entity's position and determines which type of movement status is appropriate. NOTE: The following objects must be valid before this function can be called or its behavior is undefined:

  • myProcessState and myProcessState->routeState()
  • myFixedWingEntityState
  • simManager() && entity()->terrainAttachedTo() The movement status is set as follows: Entity Current Pt. in Rt. Movement Status on ground on ground taxi (only if there are no further points in the route or the next point is on the ground as well. on ground on ground take off (ONLY if next point in route is in the air) on ground in air take off in air on ground landing in air in air flying If the terrain data under each point in the route is not available, myWaitingToSetMovementStatus in myProcessState is set to true, the movement state is left unchanged and false is returned. Otherwise the movement state is set as described above, myWaitingToSetMovementStatus is set to false and true is returned.

Reimplemented in DtCruiseMissileMoveAlongController.

virtual void DtFixedWingMoveAlongController::resetValues ( )
protectedvirtual

This method will clear out internal values for new calculations.

virtual void DtFixedWingMoveAlongController::clearTask ( )
overrideprotectedvirtual

Calls resetValues.

Reimplemented from DtFixedWingPilotController.

virtual void DtFixedWingMoveAlongController::updateTaskVisualizations ( )
overrideprotectedvirtual

update visualizations

Reimplemented from DtFixedWingPilotController.

virtual void DtFixedWingMoveAlongController::processEstimatedTotCalculation ( )
overrideprotectedvirtual

calculate estimated tot

Reimplemented from DtFixedWingPilotController.

virtual bool DtFixedWingMoveAlongController::createPorts ( )
overrideprotectedvirtual

Overridden to create the fixed wing ports.

Reimplemented from DtFixedWingPilotController.

Member Data Documentation

DtSimObjectReference DtFixedWingMoveAlongController::myRoute
protected

This is looked up once per tick - assumed unchanging while we have control.

bool DtFixedWingMoveAlongController::myRouteHasChanged
protected
bool DtFixedWingMoveAlongController::myWarnedForMovementStatus
protected
DtVectorOutputPort* DtFixedWingMoveAlongController::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:
.

bool DtFixedWingMoveAlongController::myChangedLocation = false
protected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)