VR-Forces 4.8 Class Documentation
 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 Attributes
DtSurfaceMovementPSR Class Reference
Inheritance diagram for DtSurfaceMovementPSR:
Inheritance graph
[legend]

Public Member Functions

 DtSurfaceMovementPSR (DtVrfObject *vrfObject, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
 constructor More...
 
 DtSurfaceMovementPSR (const DtSurfaceMovementPSR &orig, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
 copy constructor More...
 
virtual ~DtSurfaceMovementPSR ()
 destructor More...
 
DtSurfaceMovementPSRoperator= (const DtSurfaceMovementPSR &orig)
 assignment operator More...
 
virtual
DtVrfProcessStateRepository
clone (const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const
 returns a newly created copy of this object More...
 
virtual DtString type () const
 Returns the string type of the repository, as defined in procSRTypes.h. More...
 
virtual void setRouteVertices (const DtLocalVectorIterator &routeIterator)
 Set/get route vertices (local coordinates). More...
 
virtual const DtLocalVertexListrouteVertices () const
 
virtual void emptyRouteVertices ()
 Empty route vertices. More...
 
virtual void setReverseFlag (bool flag)
 Set/get the reverse flag (reverse the direction of travel while patrolling - either between points or along a route). More...
 
virtual bool reverseFlag () const
 
virtual void setFirstWaypoint (const DtUUID &)
 Set/get the first waypoint object. More...
 
virtual const
DtRwVrfObjectReference
firstWaypoint () const
 
virtual DtRwVrfObjectReferencefirstWaypoint ()
 
virtual void setSecondWaypoint (const DtUUID &)
 Set/get the second waypoint object. More...
 
virtual const
DtRwVrfObjectReference
secondWaypoint () const
 
virtual DtRwVrfObjectReferencesecondWaypoint ()
 
virtual void setEntityToFollow (const DtUUID &)
 Set/get the entity to follow. More...
 
virtual const
DtRwVrfObjectReference
entityToFollow () const
 
virtual DtRwVrfObjectReferenceentityToFollow ()
 
virtual void setFollowOffsetVector (const DtVector &offset)
 Set/get the entity follow offset (offset vector in body coordinates of the entity to follow, in meters). More...
 
virtual const DtVectorfollowOffsetVector () const
 
virtual void setWaitUntilOrderedSpeedMetToStopTask (bool)
 Accessor for myWaitUntilOrderedSpeedMetToStopTask. More...
 
virtual bool waitUntilOrderedSpeedMetToStopTask ()
 
virtual void setGeodeticAimingPoint (const DtVector &pnt)
 Get/set the point to which this entity is moving towards for a move to location task. More...
 
virtual const DtVector geodeticAimingPoint () const
 
virtual void setGoalVector (const DtVector &goalVector)
 The vector from the goal position (destination) to the entity's position at the start of the move task. More...
 
virtual const DtVectorgoalVector () const
 
virtual void setContinueAtGoal (const bool cont)
 Get/set the flag to determine if entity should continue at speed after reaching the destination. More...
 
virtual bool continueAtGoal (void) const
 
virtual void setIsEmergencyStop (const bool isEmergency)
 
virtual bool isEmergencyStop (void) const
 
virtual void setIsDriftStop (const bool isDriftStop)
 
virtual bool isDriftStop (void) const
 
virtual void putSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtReaderWriter::appPath())
 Override to set myCurrentVertex from route state before writing. More...
 
virtual double forwardSpeed ()
 These accessors return the values that the actuator caches between ticks for kinematic values. More...
 
virtual void setForwardSpeed (const double speed)
 
virtual double forwardAcceleration ()
 
virtual void setForwardAcceleration (const double acceleration)
 
virtual double clampSpeed ()
 
virtual void setClampSpeed (const double speed)
 
virtual double clampHeading ()
 
virtual void setClampHeading (const double clampHeading)
 
virtual double altitudeChangeRate ()
 
virtual void setAltitudeChangeRate (const double altitudeRate)
 
virtual double clampAltitude ()
 
virtual void setClampAltitude (const double altitude)
 
virtual bool hasFuel () const
 Accessors for actuator status info. More...
 
virtual void setHasFuel (const bool hasFuel)
 
virtual bool isAground () const
 
virtual void setIsAground (bool isAground)
 
virtual double goalDepth ()
 Access functions for state variables describing the various movement tasks. More...
 
virtual void setGoalDepth (const double depth)
 
virtual double desiredDepthRate ()
 
virtual void setDesiredDepthRate (const double rate)
 
virtual bool isTurnContinuous ()
 
virtual void setIsTurnContinuous (const bool isContinous)
 
virtual double goalHeading ()
 
virtual void setGoalHeading (const double goalHeading)
 
virtual bool isUsingConstantDiameter ()
 
virtual void setIsUsingConstantDiameter (const bool usingDiameter)
 
virtual bool isTurningRight ()
 
virtual void setIsTurningRight (const bool isContinous)
 
virtual double desiredTurnDiameter ()
 
virtual void setDesiredTurnDiameter (const double desiredTurnDiameter)
 
virtual double desiredTurnRate ()
 
virtual void setDesiredTurnRate (const double desiredTurnRate)
 
virtual bool turnTaskIsControllingSpeed () const
 
virtual void setTurnTaskIsControllingSpeed (const bool isControlling)
 
virtual void setControlObject (const DtUUID &)
 Set/get control object to head towards. More...
 
virtual const
DtRwVrfObjectReference
controlObject () const
 Was: controlObjectName. More...
 
virtual DtRwVrfObjectReferencecontrolObject ()
 
virtual void setRoute (const DtUUID &)
 Set/get route to follow. More...
 
virtual const
DtRwVrfObjectReference
route () const
 Was: routeName. More...
 
virtual DtRwVrfObjectReferenceroute ()
 
virtual DtLocalVectorIteratorrouteState () const
 Get route state (an iterator over the route used to keep track of which point along the route we're heading toward). More...
 
virtual DtReal startTurnDistance2 ()
 Accessors for start-turn-distance squared (see description below). More...
 
virtual void setStartTurnDistance2 (const DtReal distance)
 
virtual int prevRoutePointIndex ()
 Accessors for next- and prev-route-point index. More...
 
virtual void setPrevRoutPointIndex (const int index)
 
virtual int nextRoutePointIndex ()
 
virtual void setNextRoutePointIndex (const int index)
 
virtual void setCurrentRoutePointIndex (const int index)
 
virtual DtRwIntcurrentVertex ()
 Accessors for the current vertex indices (RW) into the route. More...
 
virtual const DtRwIntcurrentVertex () const
 
virtual DtRwIntnextVertex ()
 
virtual const DtRwIntnextVertex () const
 
virtual DtRwIntpreviousVertex ()
 
virtual const DtRwIntpreviousVertex () const
 
virtual DtReal maxYawRate () const
 These accessors are for copies of parameters from the actuator descriptor that are saved in the PSR. More...
 
virtual void setMaxYawRate (DtReal maxYawRate)
 
virtual DtReal maxYawAcceleration () const
 Accessor/mutator for myMaxYawAcceleration. More...
 
virtual void setMaxYawAcceleration (DtReal maxYawAcceleration)
 
virtual double stoppingSpeed () const
 Accessor/mutator for myStoppingSpeed. More...
 
virtual void setStoppingSpeed (DtReal stoppingSpeed)
 
- Public Member Functions inherited from DtVrfProcessStateRepository
 DtVrfProcessStateRepository (DtVrfObject *vrfObject, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
 
 DtVrfProcessStateRepository (const DtVrfProcessStateRepository &orig, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
 
const DtVrfProcessStateRepositoryoperator= (const DtVrfProcessStateRepository &orig)
 
virtual ~DtVrfProcessStateRepository ()
 
virtual bool init ()
 Used for virtual construction. This base method simply returns true. More...
 
virtual bool loadedFromMTL () const
 
virtual void getSelf (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
 Top level to read itself from an input stream. More...
 
- Public Member Functions inherited from DtReaderWriter
 DtReaderWriter ()
 default constructor More...
 
 DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 real constructor Setting the readonly flag prevents object from writing itself to the stream. More...
 
 DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 pseudo-copy constructor More...
 
 DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtReaderWriter (const DtReaderWriter &, DtReaderWriterRegistry *parentRegistry=NULL)
 copy constructor More...
 
const DtReaderWriteroperator= (const DtReaderWriter &orig)
 assignment operator More...
 
bool operator== (const DtReaderWriter &) const
 Equivalence operator. More...
 
bool operator!= (const DtReaderWriter &rhs)
 
virtual ~DtReaderWriter ()
 destructor More...
 
virtual void postPutSelf ()
 Called after either version of put self (file or environment). Default is no-op. More...
 
virtual void prePutSelf ()
 Called before either version of put self (file or environment). Default is no-op. More...
 
virtual void postGetSelf ()
 Called after either version of getSelf (mtl or environment). Default is no-op. More...
 
virtual void preGetSelf ()
 Called before either version of get self (file or environment). Default is no-op. More...
 
virtual void writeSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 Called from putSelf, calls myRegistry.putSelf which in turn calls putSelf on each reader/writer in the registry. More...
 
virtual DtSymbolString name () const
 Accessor for name of this readable/writable object. More...
 
virtual void addAlias (const DtSymbolString &alias)
 Add an alias as an alternative name for this object. More...
 
virtual void addAlias (const DtString &alias)
 
virtual bool hasAlias (const DtSymbolString &alias)
 
virtual const aliasContaineraliases () const
 
virtual void setReadonly (bool flag)
 Set read-only flag. More...
 
bool isReadonly () const
 
virtual void reset ()
 For those reader/writer items that support it, resets the reader/writer value to original state Default is no-op. More...
 
virtual int alignment () const
 For those items that are sent over the network via HLA, this will give the network alignment. More...
 
virtual bool variableIsBound () const
 
virtual void unbindVariable ()
 Sets the myVariableIsBound flag to false. More...
 
virtual void setName (const DtString &)
 Set the name of the object. More...
 
virtual const charreaderWriterType () const
 Used to supply a string type that this reader writer type is. More...
 
virtual const charxmlType () const
 
virtual DtString prettyPrint () const
 Routine to return a human readable form of the reader/writer variable. More...
 
std::string debugText () const
 
virtual void bindVariables (DtVariableBindingsList variableBindings)
 Runs a variable binding pass on this reader writer and any of its children. More...
 
virtual std::list
< DtVariableNameType
unboundVariables () const
 
bool invalid () const
 
virtual bool hasChild (const DtReaderWriter *p) const
 Returns true if this variable has a child p in it's chain. More...
 
virtual bool hasVariableReference () const
 Returns true if this item or any item in the registry (recursive) is a variable reference. More...
 
virtual void bindLocalVariables (const DtVariableBindingsList &variableBindings)
 Checks to see if this RW object is a variable reference that can be bound using the provided bindings. More...
 
virtual void recordUpdateTime () const
 Can be implemented in subclasses to stamp the time when updated. More...
 
virtual bool wasUpdatedSince (DtTime t) const
 Can be implemented in subclasses to return true if an update occurred after the specified time. More...
 
virtual bool changedSinceLastChecked ()
 Returns true if this objects value has changed since the last time this function was called. More...
 
virtual bool peekChangedSinceLastChecked () const
 Returns the value that changedSinceLastChecked would return but does not reset the internal flag. More...
 
virtual void putData (std::string &fp, int indentLevel=0)
 Deriving class overrides these to get/put class specific data. More...
 
virtual DtlObjPtr getData (DtlObjPtr args, const SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
 
virtual void setValueSpecified (bool specified, bool recurse=false)
 The specified flags are used for optional values. More...
 
virtual bool valueSpecified () const
 
virtual bool isVariableReference () const
 Specifies whether or not this reader writer is really a variable that is specified elsewhere. More...
 
virtual void setIsVariableReference (bool value)
 
virtual void clearAllVariableReferenceFlags ()
 Clears out all variable reference flags from all readerwriter items in registry recursively. More...
 
virtual DtSymbolString variableName () const
 The variable name, if this object is a variable reference. More...
 
virtual void setVariableName (const DtSymbolString variableName)
 
virtual const DtReaderWriterdefaultRWValue () const
 The default value to use if the reader/writer object is a variable and that variable is not specified. More...
 
virtual DtReaderWriterdefaultRWValue ()
 
virtual void setDefaultRWValue (DtReaderWriter *)
 Previous default value, if exists, will be removed and replaced with a clone of the supplied variable. More...
 
virtual bool checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 Give the stream, if the stream contains a default value then set it here. More...
 
const DtReaderWriterRegistryregistry () const
 Collection of child DtReaderWriter nodes owned by this object. More...
 
DtReaderWriterRegistryregistry ()
 
virtual DtPropertyInterfaceproperty ()
 
virtual const DtPropertyInterfaceproperty () const
 
virtual DtString toXml () const
 
virtual DtRwVariableBindingsgenerateVariableBindings () const
 Iterates over the registry (recursively) and returns a variable bindings object that contains all the variables that are contained in this read/writer class. More...
 
virtual bool toXml (const DtFilename &) const
 Writes contents of xml result to the given filename. More...
 
virtual bool fromXml (const DtString &)
 Restores object from given xml string. Returns true if valid. More...
 
virtual bool fromXmlFile (const DtFilename &)
 Restores object from given xml file. More...
 
virtual void putSelf (DtEnvironmentSP, DtEnvValueSP parent) const
 
virtual void putData (DtEnvironmentSP, DtEnvValueSP value) const
 Override to add attributes of actual data. More...
 
virtual void putVariableReference (DtEnvironmentSP, DtEnvValueSP value) const
 Called when the item is a variable reference. More...
 
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())
 Gets data from the environment value. More...
 
virtual void unrecognizedItem (const DtEnvironmentSP env, const DtEnvValueSP root, const SearchPaths &searchPaths, const DtVariableBindingsList &varBindings)
 Called when the xml reader tries to parse an unknown reader/writer item. Default is a no-op. More...
 
virtual void getVariableReference (DtEnvironmentSP, DtEnvValueSP value)
 Called when the item is a variable reference. More...
 

Static Public Member Functions

static
DtVrfProcessStateRepository
creator (const DtString &rwName, DtVrfObject *vrfObject, DtReaderWriterRegistry *parentRegistry)
 Returns a newly created instance of this class. More...
 
- Static Public Member Functions inherited from DtVrfProcessStateRepository
static
DtVrfProcessStateRepositoryFactory
factory ()
 a DtVrfProcessStateRepositoryFactory is allocated by the DtSimCreator, and this pointer is set. More...
 
static void setFactory (DtVrfProcessStateRepositoryFactory *factory)
 
static void addVrfProcessStateRepositoryCreatorFcn (const DtString &type, DtVrfProcessStateRepositoryCreatorFcn fcn)
 
static
DtVrfProcessStateRepository
createRepository (const DtString &name, const DtString &type, DtVrfObject *vrfObject, DtReaderWriterRegistry *parentRegistry=0)
 Creates a new state repository object, using the factory. More...
 
- 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 ()
 The type that is used when archiving to an XML stream. More...
 
static const DtFilename & appPath ()
 Gets the current working directory. More...
 
static void setFactoryCreatorFunction (DtReaderWriterFactoryCreatorFcn fcn)
 Sets the function to create the DtReaderWriterFactory. More...
 
static void createReaderWriterFactory ()
 
static void cleanupFactory ()
 
static DtReaderWriterFactoryfactory ()
 
static void setOutputStream (DtOutputStream *stream)
 
static DtOutputStream & outputStream ()
 
static DtReaderWritercreateFromXmlFile (const DtFilename &, bool createAsProperty=false)
 Given a filename, returns a newly created reader/writer object from the object found within. More...
 
static DtReaderWritercreateFromXml (const DtString &, bool createAsProperty=false)
 Given a xml string, returns a newly created reader/writer object from the object found within. More...
 
static DtReaderWritercreateFromEnvironment (DtEnvironmentSP, bool createAsProperty=false)
 Given a xml environment, returns a newly created reader/writer object from the object found within. More...
 
static DtString getAttribute (DtEnvironmentSP env, const DtString &name, DtEnvValueSP root)
 Gets the named attribute from a DtEnvValueSP. More...
 

Protected Attributes

DtRwReal myStartTurnDistance2
 The distance (squared) before the next point that the ship has to start heading for the following point, so that it can make the turn "inside" the route segments (vs. More...
 
DtRwBoolean myReverseFlag
 For patrol-route control. More...
 
DtRwReal myForwardSpeed
 Used in the actuator DtSufaceEntitySimpleActuator. More...
 
DtRwReal myForwardAcceleration
 
DtRwReal myClampSpeed
 
DtRwReal myClampHeading
 
DtRwReal myAltitudeChangeRate
 For the subsurface depth actuator: More...
 
DtRwReal myClampAltitude
 
DtRwBoolean myHasFuel
 Actuator status information. More...
 
DtRwBoolean myIsAground
 Set by the actuator when it detects that the entity is aground. More...
 
DtRwReal myGoalDepth
 This is used by subsurface depth controller. More...
 
DtRwReal myDesiredDepthRate
 The desired depth change rate. This is always positive. More...
 
DtRwBoolean myIsTurnContinuous
 For turn-move: More...
 
DtRwReal myGoalHeading
 
DtRwBoolean myIsUsingConstantDiameter
 If turn rate is set with diameter, then each tick the radians/secc turn rate for the output port has to be computed from the speed. More...
 
DtRwBoolean myIsTurningRight
 If turning on a diameter, this flag indicates which way: More...
 
DtRwReal myDesiredTurnDiameter
 
DtRwReal myDesiredTurnRate
 Positive if turning right, negative if left. Rad/sec. More...
 
DtRwBoolean myTurnTaskControllingSpeed
 True when the task is run; stays true until another movement task runs. More...
 
DtRwBoolean myWaitUntilOrderedSpeedMetToStopTask
 Whether or not to wait until the ordered speed has been met to stop the task. More...
 
DtRwVector myGeodeticAimingPoint
 For Surface Entity Move To Location controller. More...
 
DtRwVector myGoalVector
 The vector from the aiming point (goal) to the start point of the move. More...
 
DtRwBoolean myContinueAtGoal
 Indicates that the entity should continue at speed after hitting the destination location. More...
 
DtRwVrfObjectReference myControlObject
 For move-to [waypoint] control. More...
 
DtRwVrfObjectReference myRoute
 For move-along [route] control. More...
 
DtLocalVectorIteratormyRouteState
 Route state used to get info about the current route we're trying to follow (e.g. More...
 
DtLocalVertexList myVertices
 my copy of the current route More...
 
DtRwInt myCurrentVertex
 Read/write variables to capture route state. More...
 
DtRwInt myNextVertex
 
DtRwInt myPrevVertex
 
DtRwVrfObjectReference myFirstWaypoint
 For patrol-between control. More...
 
DtRwVrfObjectReference mySecondWaypoint
 
DtRwVrfObjectReference myEntityToFollow
 For follow control. More...
 
DtRwVector myFollowOffsetVector
 Following offset vector (in body coordinates of entity to follow, in meters). More...
 
DtRwBoolean myIsEmergencyStop
 For stop task. More...
 
DtRwBoolean myIsDriftStop
 
DtRwReal myStoppingSpeed
 Other variables: not used in the above controllers or actuators. More...
 
DtRwReal myMaxYawRate
 Max yaw rate– used only in DtSurfaceEntityActuator. More...
 
DtRwReal myMaxYawAcceleration
 Max yaw rate acceleration– used only in DtSurfaceEntityActuator. More...
 
- Protected Attributes inherited from DtVrfProcessStateRepository
DtVrfObjectmyVrfObject
 
bool myLoadedFromMTL
 
- Protected Attributes inherited from DtReaderWriter
const DtSymbolString myName
 
DtReaderWriterRegistry myRegistry
 
DtReaderWriterRegistrymyParentRegistry
 
bool myValueSpecified
 
bool myReadOnlyFlag
 
bool myIsVariableReference
 
DtSymbolString myVariableName
 
bool myVariableIsBound
 
DtReaderWritermyDefaultValue
 
aliasContainer myAliases
 Container for the aliases which represent alternative names for the object. More...
 
bool myInvalid
 Set to true if there is a problem reading this item. More...
 
bool myChangedFlag
 Set to true when value changes Set to false when value checked with changedSinceLastChecked. More...
 

Additional Inherited Members

- Public Types inherited from DtReaderWriter
typedef std::vector
< DtSymbolString
aliasContainer
 
typedef std::vector
< DtSymbolString >::iterator 
aliasIter
 
typedef std::vector
< DtSymbolString >
::const_iterator 
aliasConstIter
 
typedef std::vector< DtFilename > SearchPaths
 
typedef std::pair
< DtSymbolString, DtString
DtVariableNameType
 
typedef DtReaderWriterFactory *(* DtReaderWriterFactoryCreatorFcn )()
 
- Protected Member Functions inherited from DtVrfProcessStateRepository
 DtVrfProcessStateRepository ()
 
const DtVrfObjectconst_vrfObject () const
 
- Protected Member Functions inherited from DtReaderWriter
virtual void bindToRwAsVariable (const DtReaderWriter *rw)
 Copies values from the specified DtReaderWriter. More...
 
- Static Protected Attributes inherited from DtVrfProcessStateRepository
static
DtVrfProcessStateRepositoryFactory
theFactory
 
- 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

DtSurfaceMovementPSR::DtSurfaceMovementPSR ( DtVrfObject vrfObject,
const DtString rwName = DtString::nullString(),
DtReaderWriterRegistry parentRegistry = 0 
)

constructor

DtSurfaceMovementPSR::DtSurfaceMovementPSR ( const DtSurfaceMovementPSR orig,
const DtString rwName = DtString::nullString(),
DtReaderWriterRegistry parentRegistry = 0 
)

copy constructor

virtual DtSurfaceMovementPSR::~DtSurfaceMovementPSR ( )
virtual

destructor

Member Function Documentation

DtSurfaceMovementPSR& DtSurfaceMovementPSR::operator= ( const DtSurfaceMovementPSR orig)

assignment operator

virtual DtVrfProcessStateRepository* DtSurfaceMovementPSR::clone ( const DtString rwName = DtString::nullString(),
DtReaderWriterRegistry parentRegistry = 0 
) const
virtual

returns a newly created copy of this object

Implements DtVrfProcessStateRepository.

virtual DtString DtSurfaceMovementPSR::type ( ) const
virtual

Returns the string type of the repository, as defined in procSRTypes.h.

(DtVrfSurfaceMovementProcessStateRepositoryType).

Implements DtVrfProcessStateRepository.

virtual double DtSurfaceMovementPSR::forwardSpeed ( )
inlinevirtual

These accessors return the values that the actuator caches between ticks for kinematic values.

virtual void DtSurfaceMovementPSR::setForwardSpeed ( const double  speed)
inlinevirtual
virtual double DtSurfaceMovementPSR::forwardAcceleration ( )
inlinevirtual
virtual void DtSurfaceMovementPSR::setForwardAcceleration ( const double  acceleration)
inlinevirtual
virtual double DtSurfaceMovementPSR::clampSpeed ( )
inlinevirtual
virtual void DtSurfaceMovementPSR::setClampSpeed ( const double  speed)
inlinevirtual
virtual double DtSurfaceMovementPSR::clampHeading ( )
inlinevirtual
virtual void DtSurfaceMovementPSR::setClampHeading ( const double  clampHeading)
inlinevirtual
virtual double DtSurfaceMovementPSR::altitudeChangeRate ( )
inlinevirtual
virtual void DtSurfaceMovementPSR::setAltitudeChangeRate ( const double  altitudeRate)
inlinevirtual
virtual double DtSurfaceMovementPSR::clampAltitude ( )
inlinevirtual
virtual void DtSurfaceMovementPSR::setClampAltitude ( const double  altitude)
inlinevirtual
virtual bool DtSurfaceMovementPSR::hasFuel ( ) const
inlinevirtual

Accessors for actuator status info.

The accessor is a shortcut for looking up the fuel resource. This flag is set by the actuator when it checks fuel usage.

virtual void DtSurfaceMovementPSR::setHasFuel ( const bool  hasFuel)
inlinevirtual
virtual bool DtSurfaceMovementPSR::isAground ( ) const
inlinevirtual
virtual void DtSurfaceMovementPSR::setIsAground ( bool  isAground)
inlinevirtual
virtual double DtSurfaceMovementPSR::goalDepth ( )
inlinevirtual

Access functions for state variables describing the various movement tasks.

virtual void DtSurfaceMovementPSR::setGoalDepth ( const double  depth)
inlinevirtual
virtual double DtSurfaceMovementPSR::desiredDepthRate ( )
inlinevirtual
virtual void DtSurfaceMovementPSR::setDesiredDepthRate ( const double  rate)
inlinevirtual
virtual bool DtSurfaceMovementPSR::isTurnContinuous ( )
inlinevirtual
virtual void DtSurfaceMovementPSR::setIsTurnContinuous ( const bool  isContinous)
inlinevirtual
virtual double DtSurfaceMovementPSR::goalHeading ( )
inlinevirtual
virtual void DtSurfaceMovementPSR::setGoalHeading ( const double  goalHeading)
virtual
virtual bool DtSurfaceMovementPSR::isUsingConstantDiameter ( )
inlinevirtual
virtual void DtSurfaceMovementPSR::setIsUsingConstantDiameter ( const bool  usingDiameter)
inlinevirtual
virtual bool DtSurfaceMovementPSR::isTurningRight ( )
inlinevirtual
virtual void DtSurfaceMovementPSR::setIsTurningRight ( const bool  isContinous)
inlinevirtual
virtual double DtSurfaceMovementPSR::desiredTurnDiameter ( )
inlinevirtual
virtual void DtSurfaceMovementPSR::setDesiredTurnDiameter ( const double  desiredTurnDiameter)
virtual
virtual double DtSurfaceMovementPSR::desiredTurnRate ( )
inlinevirtual
virtual void DtSurfaceMovementPSR::setDesiredTurnRate ( const double  desiredTurnRate)
virtual
virtual bool DtSurfaceMovementPSR::turnTaskIsControllingSpeed ( ) const
virtual
virtual void DtSurfaceMovementPSR::setTurnTaskIsControllingSpeed ( const bool  isControlling)
virtual
virtual void DtSurfaceMovementPSR::setControlObject ( const DtUUID )
virtual

Set/get control object to head towards.

Was: setControlObjectName

virtual const DtRwVrfObjectReference& DtSurfaceMovementPSR::controlObject ( ) const
virtual

Was: controlObjectName.

virtual DtRwVrfObjectReference& DtSurfaceMovementPSR::controlObject ( )
virtual
virtual void DtSurfaceMovementPSR::setRoute ( const DtUUID )
virtual

Set/get route to follow.

Was: setRouteName

virtual const DtRwVrfObjectReference& DtSurfaceMovementPSR::route ( ) const
virtual

Was: routeName.

virtual DtRwVrfObjectReference& DtSurfaceMovementPSR::route ( )
virtual
virtual void DtSurfaceMovementPSR::setRouteVertices ( const DtLocalVectorIterator routeIterator)
virtual

Set/get route vertices (local coordinates).

Once route is set, can access routeState() to query and set current position along route. The minSpacing parameter allows this function to prune route points that are closer together than this.

virtual const DtLocalVertexList& DtSurfaceMovementPSR::routeVertices ( ) const
virtual
virtual void DtSurfaceMovementPSR::emptyRouteVertices ( )
virtual

Empty route vertices.

virtual DtLocalVectorIterator* DtSurfaceMovementPSR::routeState ( ) const
virtual

Get route state (an iterator over the route used to keep track of which point along the route we're heading toward).

virtual DtReal DtSurfaceMovementPSR::startTurnDistance2 ( )
inlinevirtual

Accessors for start-turn-distance squared (see description below).

virtual void DtSurfaceMovementPSR::setStartTurnDistance2 ( const DtReal  distance)
inlinevirtual
virtual int DtSurfaceMovementPSR::prevRoutePointIndex ( )
inlinevirtual

Accessors for next- and prev-route-point index.

virtual void DtSurfaceMovementPSR::setPrevRoutPointIndex ( const int  index)
virtual
virtual int DtSurfaceMovementPSR::nextRoutePointIndex ( )
inlinevirtual
virtual void DtSurfaceMovementPSR::setNextRoutePointIndex ( const int  index)
virtual
virtual void DtSurfaceMovementPSR::setCurrentRoutePointIndex ( const int  index)
virtual
virtual DtRwInt& DtSurfaceMovementPSR::currentVertex ( )
virtual

Accessors for the current vertex indices (RW) into the route.

virtual const DtRwInt& DtSurfaceMovementPSR::currentVertex ( ) const
virtual
virtual DtRwInt& DtSurfaceMovementPSR::nextVertex ( )
virtual
virtual const DtRwInt& DtSurfaceMovementPSR::nextVertex ( ) const
virtual
virtual DtRwInt& DtSurfaceMovementPSR::previousVertex ( )
virtual
virtual const DtRwInt& DtSurfaceMovementPSR::previousVertex ( ) const
virtual
virtual void DtSurfaceMovementPSR::setReverseFlag ( bool  flag)
virtual

Set/get the reverse flag (reverse the direction of travel while patrolling - either between points or along a route).

virtual bool DtSurfaceMovementPSR::reverseFlag ( ) const
virtual
virtual void DtSurfaceMovementPSR::setFirstWaypoint ( const DtUUID )
virtual

Set/get the first waypoint object.

virtual const DtRwVrfObjectReference& DtSurfaceMovementPSR::firstWaypoint ( ) const
virtual
virtual DtRwVrfObjectReference& DtSurfaceMovementPSR::firstWaypoint ( )
virtual
virtual void DtSurfaceMovementPSR::setSecondWaypoint ( const DtUUID )
virtual

Set/get the second waypoint object.

virtual const DtRwVrfObjectReference& DtSurfaceMovementPSR::secondWaypoint ( ) const
virtual
virtual DtRwVrfObjectReference& DtSurfaceMovementPSR::secondWaypoint ( )
virtual
virtual void DtSurfaceMovementPSR::setEntityToFollow ( const DtUUID )
virtual

Set/get the entity to follow.

virtual const DtRwVrfObjectReference& DtSurfaceMovementPSR::entityToFollow ( ) const
virtual
virtual DtRwVrfObjectReference& DtSurfaceMovementPSR::entityToFollow ( )
virtual
virtual void DtSurfaceMovementPSR::setFollowOffsetVector ( const DtVector offset)
virtual

Set/get the entity follow offset (offset vector in body coordinates of the entity to follow, in meters).

virtual const DtVector& DtSurfaceMovementPSR::followOffsetVector ( ) const
virtual
virtual void DtSurfaceMovementPSR::setWaitUntilOrderedSpeedMetToStopTask ( bool  )
virtual
virtual bool DtSurfaceMovementPSR::waitUntilOrderedSpeedMetToStopTask ( )
virtual
virtual void DtSurfaceMovementPSR::setGeodeticAimingPoint ( const DtVector pnt)
virtual

Get/set the point to which this entity is moving towards for a move to location task.

In a triple (DtVector) containing lat-lon-alt.

virtual const DtVector DtSurfaceMovementPSR::geodeticAimingPoint ( ) const
virtual
virtual void DtSurfaceMovementPSR::setGoalVector ( const DtVector goalVector)
virtual

The vector from the goal position (destination) to the entity's position at the start of the move task.

This vector is used to determine when the entity has passed by the goal location. North-east-down (i.e., like topocentric) data from a DtVector3D.

virtual const DtVector& DtSurfaceMovementPSR::goalVector ( ) const
virtual
virtual void DtSurfaceMovementPSR::setContinueAtGoal ( const bool  cont)
virtual

Get/set the flag to determine if entity should continue at speed after reaching the destination.

virtual bool DtSurfaceMovementPSR::continueAtGoal ( void  ) const
virtual
virtual void DtSurfaceMovementPSR::setIsEmergencyStop ( const bool  isEmergency)
virtual
virtual bool DtSurfaceMovementPSR::isEmergencyStop ( void  ) const
virtual
virtual void DtSurfaceMovementPSR::setIsDriftStop ( const bool  isDriftStop)
virtual
virtual bool DtSurfaceMovementPSR::isDriftStop ( void  ) const
virtual
virtual void DtSurfaceMovementPSR::putSelf ( std::string &  fp,
int  indentLevel = 0,
bool  writeUnspecified = false,
const DtFilename &  path = DtReaderWriter::appPath() 
)
virtual

Override to set myCurrentVertex from route state before writing.

Reimplemented from DtReaderWriter.

virtual DtReal DtSurfaceMovementPSR::maxYawRate ( ) const
virtual

These accessors are for copies of parameters from the actuator descriptor that are saved in the PSR.

Accessor/mutator for myMaxYawRate.

virtual void DtSurfaceMovementPSR::setMaxYawRate ( DtReal  maxYawRate)
virtual
virtual DtReal DtSurfaceMovementPSR::maxYawAcceleration ( ) const
virtual

Accessor/mutator for myMaxYawAcceleration.

virtual void DtSurfaceMovementPSR::setMaxYawAcceleration ( DtReal  maxYawAcceleration)
virtual
virtual double DtSurfaceMovementPSR::stoppingSpeed ( ) const
virtual

Accessor/mutator for myStoppingSpeed.

virtual void DtSurfaceMovementPSR::setStoppingSpeed ( DtReal  stoppingSpeed)
virtual
static DtVrfProcessStateRepository* DtSurfaceMovementPSR::creator ( const DtString rwName,
DtVrfObject vrfObject,
DtReaderWriterRegistry parentRegistry 
)
static

Returns a newly created instance of this class.

Member Data Documentation

DtRwReal DtSurfaceMovementPSR::myForwardSpeed
protected

Used in the actuator DtSufaceEntitySimpleActuator.

These are kinematic values for the previous tick. The first two are caches of values that can be computed from kinematic state; using these values saves computation of transformations. Speed and acceleration are signed values; they are negative if they are in the rearward direction. Clamp speed from the previous tick must be saved in state (the alternative is to use the clamp speed for the next tick, which is available to the actuator on its input port.) Rotation rate is easier to get from kinematic state, so is not saved here. Clamp heading is for the previous tick. If the entity is performing a turn task, this will be the same as myGoalHeading, but myGoalHeading may not be valid for other tasks.

DtRwReal DtSurfaceMovementPSR::myForwardAcceleration
protected
DtRwReal DtSurfaceMovementPSR::myClampSpeed
protected
DtRwReal DtSurfaceMovementPSR::myClampHeading
protected
DtRwReal DtSurfaceMovementPSR::myAltitudeChangeRate
protected

For the subsurface depth actuator:

DtRwReal DtSurfaceMovementPSR::myClampAltitude
protected
DtRwBoolean DtSurfaceMovementPSR::myHasFuel
protected

Actuator status information.

Set by the actuator when it checks fuel.
When the actuator determines that the entity is out of fuel, it will set the power plant appearance to "off." The (pilot) controller can also turn off the power plant to drift. The controller should check fuel before trying to turn the power plant on.

DtRwBoolean DtSurfaceMovementPSR::myIsAground
protected

Set by the actuator when it detects that the entity is aground.

DtRwReal DtSurfaceMovementPSR::myGoalDepth
protected

This is used by subsurface depth controller.

The desired depth. Note this is 0 at sea level and increases with decreasing altitude.

DtRwReal DtSurfaceMovementPSR::myDesiredDepthRate
protected

The desired depth change rate. This is always positive.

DtRwBoolean DtSurfaceMovementPSR::myIsTurnContinuous
protected

For turn-move:

If true, goalHeading is not used:

DtRwReal DtSurfaceMovementPSR::myGoalHeading
protected
DtRwBoolean DtSurfaceMovementPSR::myIsUsingConstantDiameter
protected

If turn rate is set with diameter, then each tick the radians/secc turn rate for the output port has to be computed from the speed.

DtRwBoolean DtSurfaceMovementPSR::myIsTurningRight
protected

If turning on a diameter, this flag indicates which way:

DtRwReal DtSurfaceMovementPSR::myDesiredTurnDiameter
protected
DtRwReal DtSurfaceMovementPSR::myDesiredTurnRate
protected

Positive if turning right, negative if left. Rad/sec.

DtRwBoolean DtSurfaceMovementPSR::myTurnTaskControllingSpeed
protected

True when the task is run; stays true until another movement task runs.

While true, the task keeps controlling speed to match ordered speed, even if the task is complete.

DtRwBoolean DtSurfaceMovementPSR::myWaitUntilOrderedSpeedMetToStopTask
protected

Whether or not to wait until the ordered speed has been met to stop the task.

Default is true to allow for previous tasks that did not use this value to perform the way it does now. This is not set by the task, but rather is set as a function of the DtTurnMoveTaskType. The DtSailHeadingTaskType will set this value to false to stop when it reaches the heading. The entity will still continue to increase it's speed until it matches it's ordered speed

DtRwVector DtSurfaceMovementPSR::myGeodeticAimingPoint
protected

For Surface Entity Move To Location controller.

The current destination location, in a triple that represents lat-lon-alt. Copied to a DtLocation3D each tick.

DtRwVector DtSurfaceMovementPSR::myGoalVector
protected

The vector from the aiming point (goal) to the start point of the move.

Used to determine when the entity has passed the goal (when it's vector to the goal is 90 degrees to this). North-east-down (i.e., like topocentric) data from a DtVector3D.

DtRwBoolean DtSurfaceMovementPSR::myContinueAtGoal
protected

Indicates that the entity should continue at speed after hitting the destination location.

Used in move-to as well.

DtRwVrfObjectReference DtSurfaceMovementPSR::myControlObject
protected

For move-to [waypoint] control.

Object name of a waypoint we're moving toward.

DtRwVrfObjectReference DtSurfaceMovementPSR::myRoute
protected

For move-along [route] control.

Route object we're following.

DtLocalVectorIterator* DtSurfaceMovementPSR::myRouteState
protected

Route state used to get info about the current route we're trying to follow (e.g.

which vertex to move toward).

DtLocalVertexList DtSurfaceMovementPSR::myVertices
protected

my copy of the current route

DtRwInt DtSurfaceMovementPSR::myCurrentVertex
protected

Read/write variables to capture route state.

The route following controller may skip closely-spaced route points, so cannot just use the iterator's prev() and next() functions to get at the points it is actually using.

DtRwInt DtSurfaceMovementPSR::myNextVertex
protected
DtRwInt DtSurfaceMovementPSR::myPrevVertex
protected
DtRwReal DtSurfaceMovementPSR::myStartTurnDistance2
protected

The distance (squared) before the next point that the ship has to start heading for the following point, so that it can make the turn "inside" the route segments (vs.

overshooting the next point), and yet stay close to the route segments (vs. turning away early).

DtRwBoolean DtSurfaceMovementPSR::myReverseFlag
protected

For patrol-route control.

Current direction of patrol (along route or between waypoints).

DtRwVrfObjectReference DtSurfaceMovementPSR::myFirstWaypoint
protected

For patrol-between control.

Object names of the waypoints to patrol between.

DtRwVrfObjectReference DtSurfaceMovementPSR::mySecondWaypoint
protected
DtRwVrfObjectReference DtSurfaceMovementPSR::myEntityToFollow
protected

For follow control.

Object name of entity to follow.

DtRwVector DtSurfaceMovementPSR::myFollowOffsetVector
protected

Following offset vector (in body coordinates of entity to follow, in meters).

DtRwBoolean DtSurfaceMovementPSR::myIsEmergencyStop
protected

For stop task.

DtRwBoolean DtSurfaceMovementPSR::myIsDriftStop
protected
DtRwReal DtSurfaceMovementPSR::myStoppingSpeed
protected

Other variables: not used in the above controllers or actuators.

Copies of parameters in the actuator descriptor.

Stopping speed. This is the epsilon within which the vessel's speed must be of the desired (clamp) speed before the actuator clamps the speed. (PSR version used only in DtSurfaceEntityActuator)

DtRwReal DtSurfaceMovementPSR::myMaxYawRate
protected

Max yaw rate– used only in DtSurfaceEntityActuator.

DtRwReal DtSurfaceMovementPSR::myMaxYawAcceleration
protected

Max yaw rate acceleration– used only in DtSurfaceEntityActuator.


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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)