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 ()
 
virtual bool init ()
 
virtual void preFirstTickInit ()
 
virtual void tick ()
 
virtual const chartype () const
 
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 ()
 
virtual DtFixedWingFlightPSRgetPSR ()
 
virtual DtSimTaskStatePtr currentTaskState () const
 
- Public Member Functions inherited from DtFixedWingPilotController
 DtFixedWingPilotController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtFixedWingPilotController ()
 
virtual double maxTurningGs () const
 
virtual bool terrainAvoidanceEnabled ()
 
virtual double terrainAvoidanceLookaheadTime ()
 
virtual void registerAttributeFunctions ()
 
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)
 
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 DtBooleanOutputPortflapsDeployedPort ()
 
virtual void setMaxThrustAcceleration (double maxThrustAcceleration)
 
virtual void setTakeOffDir (const DtVector &takeOffDir)
 
virtual const DtVectortakeOffDir () 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 ()
 
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< intcurrentPendingSubstaskIds () const
 
virtual DtSubtaskStatusEntrysubtaskStatus (int subtaskId)
 
virtual void clearCurrentTaskMessage ()
 
virtual DtTaskMessagecurrentTaskMessage () 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 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 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 DtReaderWriterprovideNextRoutePointIndex (void *c)
 
static DtSimComponentcreator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
- Static Public Member Functions inherited from DtFixedWingPilotController
static DtSimComponentcreator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
static DtReaderWriterprovideMaxThrustAcceleration (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

virtual void processMoveAlong (const DtTaskMessage &msg, DtSimTaskStatePtr taskStatePtr)
 
 DtFixedWingMoveAlongController ()
 
 DtFixedWingMoveAlongController (const DtFixedWingMoveAlongController &orig)
 
DtFixedWingMoveAlongControlleroperator= (const DtFixedWingMoveAlongController &orig)
 
void clearStoredRoute ()
 
void updateTakeOffDir ()
 
void updateLandingDir ()
 
void processEntityLocationChange ()
 
virtual bool setMovementStatusFromRoute ()
 
virtual void resetValues ()
 
virtual void clearTask ()
 
virtual void updateTaskVisualizations ()
 
virtual void processEstimatedTotCalculation ()
 
virtual bool createPorts ()
 
- Protected Member Functions inherited from DtFixedWingPilotController
virtual DtReaderWriterprocessProvideMaxThrustAcceleration ()
 
virtual bool createPortGroups ()
 
virtual void lookupAndCacheProcessSR ()
 
virtual bool postAddComponentsInit ()
 
virtual bool decideToGiveUpTask () const
 
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 DtFixedWingPilotControlleroperator= (const DtFixedWingPilotController &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

DtSimObjectReference myRoute
 
bool myRouteHasChanged
 
bool myWarnedForMovementStatus
 
DtVectorOutputPortmyCurrentVertexLocationOutputPort
 
bool myChangedLocation = false
 
- Protected Attributes inherited from DtFixedWingPilotController
DtFixedWingEntityStateRepositorymyFixedWingEntityState
 
DtFixedWingFlightPSRmyProcessState
 
DtAirspeedCalculatormyAirSpeedCalculator
 
const double DtEstimatedTotCalcInterval = 5.0
 
bool myEstimatedTotCalcEnabled
 
double myEstimatedTotValue
 
double myEstimatedTotLastCalcTime
 
DtVector myEstimatedTotTextPos
 
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
 
DtOutputPortGroupmyFixedWingControlPortGroup
 
DtConstrainedAnalogOutputPortmyThrottlePort
 
DtConstrainedDualAxisAnalogOutputPortmyStickPort
 
DtConstrainedAnalogOutputPortmyPedalPort
 
DtConstrainedAnalogOutputPortmyBrakePort
 
DtBooleanOutputPortmyFlapsDeployedPort
 
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
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

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

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

Registers the attribute function with the parent system.

Reimplemented from DtFixedWingPilotController.

virtual void DtFixedWingMoveAlongController::preFirstTickInit ( )
virtual

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

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

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
virtual
Returns
Current execution state of the task. At the base class level, returns 0. 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 ( )
protectedvirtual

Calls resetValues.

Reimplemented from DtFixedWingPilotController.

virtual void DtFixedWingMoveAlongController::updateTaskVisualizations ( )
protectedvirtual

update visualizations

Reimplemented from DtFixedWingPilotController.

virtual void DtFixedWingMoveAlongController::processEstimatedTotCalculation ( )
protectedvirtual

calculate estimated tot

Reimplemented from DtFixedWingPilotController.

virtual bool DtFixedWingMoveAlongController::createPorts ( )
protectedvirtual

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 Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)