VR-Link API Documentation for HLA 1.3
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
DtBaseEntityStateRepository Class Reference

Instances of DtBaseEntityStateRepository are used to maintain basic state information needed by all kinds of entities. More...

+ Inheritance diagram for DtBaseEntityStateRepository:
+ Collaboration diagram for DtBaseEntityStateRepository:

Public Member Functions

 DtBaseEntityStateRepository ()
 default constructor
virtual ~DtBaseEntityStateRepository ()
 destructor
 DtBaseEntityStateRepository (const DtBaseEntityStateRepository &orig)
 copy constructor
DtBaseEntityStateRepositoryoperator= (const DtBaseEntityStateRepository &orig)
 assignment operator
virtual DtStateRepositoryclone (bool copy=false) const
 Return a copy/empty object of the same type as this.
void setTimeStampType (DtTimeStampType type)
 Set/Get flag indicating whether we're using absolute timestamps for dead reckoning.
DtTimeStampType timeStampType () const
virtual void setHlaObjectManager (DtHlaObjectManager *mgr)
 Set the HLA/DIS object manager.
virtual void setAmAsSeenByRemote (bool val)
 Mark this state repository as an AsSeenByRemote copy.
virtual const DtDcmbodyToGeoc (DtTime aTime) const
 Get the body to geocentric coordinate matrix.
virtual const DtDcmbodyToGeoc () const
 Get the body to geocentric coordinate matrix.
virtual const DtDcmrelativeBodyToHost (DtTime aTime) const
 Get the body to host DCM.
virtual const DtDcmrelativeBodyToHost () const
 Get the body to host DCM.
virtual void setEntityId (const DtEntityIdentifier &id)
 Set the entity's identifier.
virtual const DtEntityIdentifierentityId () const
 The entity's identifier.
virtual void setEntityType (const DtEntityType &type)
 Set the entity type.
virtual const DtEntityTypeentityType () const
 The entity type.
virtual void setFederateId (const DtFederateId &id)
 Set the federate ID (part of entity ID).
virtual const DtFederateIdfederateId () const
 The federate ID (part of entity ID).
virtual void setApproximator (DtApproximator *approx)
 Get and set the approximator used to provide approximated position and orientation information for the entity.
virtual DtApproximatorapproximator () const
virtual void setRelativeApproximator (DtApproximator *approx)
virtual DtApproximatorrelativeApproximator () const
virtual void useDeadReckoner (DtDeadReckoner *dr)
 Tells the DtBaseEntity to use dr as its DtApproximator, and to notify it when DR algorithm changes.
virtual void useRelativeDeadReckoner (DtDeadReckoner *dr)
 Tells the DtBaseEntity to use dr as its DtApproximator, and to notify it when DR algorithm changes.
virtual void useDeadReckoner (bool yesNo=true)
 Create and use a new (private) dead-reckoner as our approximator.
virtual void useRelativeDeadReckoner (bool yesNo=true)
 Create and use a new (private) dead-reckoner as our approximator.
virtual DtDeadReckonerusingDeadReckoner ()
 If the ESR is using a dead reckoner, returns it. Else returns NULL.
virtual DtDeadReckonerusingRelativeDeadReckoner ()
 If the ESR is using a dead reckoner, returns it. Else returns NULL.
virtual void useSmoother (DtSmoother *sm)
 Tells the ESR to use sm as its approximator, and to notify it when DR algorithm changes.
virtual void useRelativeSmoother (DtSmoother *sm)
 Tells the ESR to use sm as its approximator, and to notify it when DR algorithm changes.
virtual void useSmoother (bool yesNo=true)
 Create and use a new (private) smoother as our approximator.
virtual void useRelativeSmoother (bool yesNo=true)
 Create and use a new (private) smoother as our approximator.
virtual DtSmootherusingSmoother ()
 If the ESR is using a smoother, returns it. Else returns NULL.
virtual DtSmootherusingRelativeSmoother ()
 If the ESR is using a smoother, returns it. Else returns NULL.
virtual DtThresholderthresholder ()
 Returns the SR's thresholder, which contains thresholds needed for encoding.
virtual const DtThresholderthresholder () const
 Returns a const reference the SR's thresholder, which contains thresholds needed for encoding.
virtual DtClockclock () const
 The clock being used for dead reckoning calculations.
virtual void setClock (DtClock *clock)
 Sets the clock being used for dead reckoning calculations.
virtual void printData () const
 Print the state data to the DtInfo stream.
void printDataToStream (std::ostream &str) const
 Prints the state data to the specified stream.
virtual void setTimeForSets (DtTime time)
virtual DtTime timeForSets () const
void computeSpatialFromRelativeSpatial ()
 If this unit has a host, update the esr to reflect the current state of the host.
DtBaseEntityStateRepositoryhostEsr () const
 Returns null if there isn't a host.
Spatial Attributes

TSPI (Time, Space, and Position Information).

Velocity, acceleration, and location in Geocentric World Coordinates. Orientation is represented as a DtTaitBryan which is a set of three Euler Angles in Geocentric World Coordinates. RotationalVelocity is in the Units Body Coordinates. These attributes are mandatory fields for DIS and the RPR FOM, however some fields may not be available through some FOM Mappers. Also, various spatial attributes may be affected if the entity is attached to another entity via the IsPartOf attributes.

Examples
virtual void setLocation (const DtVector &location, DtTime aTime)
 Set the location of the center of mass in geocentric world coordinates at aTime.
virtual void setLocation (const DtVector &location)
 Set the location of the center of mass in geocentric world coordinates at current simulation time, as set in clock()->simTime().
virtual const DtVectorlocation (DtTime aTime) const
 The location in geocentric world coordinates at aTime.
virtual const DtVectorlocation () const
 The location in geocentric world coordinates at the current simulation time, as set in clock()->simTime().
virtual const DtVectorlastSetLocation () const
 Return the value last passed to setLocation, regardless of whether we have an approximator.
virtual void setVelocity (const DtVector &Velocity, DtTime aTime)
 Set the velocity in meters per second at aTime.
virtual void setVelocity (const DtVector &Velocity)
 The velocity in meters per second at the current simulation time, as set in clock()->simTime().
virtual const DtVectorvelocity (DtTime aTime) const
 The velocity in meters per second at aTime.
virtual const DtVectorvelocity () const
 The velocity at the current simulation time, as set in clock()->simTime().
virtual const DtVectorlastSetVelocity () const
 Return the value last passed to setVelocity, regardless of whether we have an approximator.
virtual void setAcceleration (const DtVector &Acceleration, DtTime aTime)
 Sets the acceleration at aTime.
virtual void setAcceleration (const DtVector &Acceleration)
 Sets the acceleration at the current simulation time, as set in clock()->simTime().
virtual const DtVectoracceleration (DtTime aTime) const
 Return the acceleration at aTime.
virtual const DtVectoracceleration () const
 The acceleration at the current simulation time, as set in clock()->simTime().
virtual const DtVectorlastSetAcceleration () const
 The value last passed to setAcceleration, regardless of whether we have an approximator.
virtual void setOrientation (const DtTaitBryan &orient, DtTime aTime)
 Set the orientation at aTime.
virtual void setOrientation (const DtTaitBryan &orient)
 Set the orientation at the current simulation time, as set in clock()->simTime().
virtual const DtTaitBryanorientation (DtTime aTime) const
 The orientation at the passed time.
virtual const DtTaitBryanorientation () const
 The orientation at the current simulation time, as set in clock()->simTime().
virtual const DtTaitBryanlastSetOrientation () const
 The value last passed to setOrientation, regardless of whether we have an approximator.
virtual void setRotationalVelocity (const DtVector &BodyRates, DtTime aTime)
 Set the rotational velocity of an entity at aTime.
virtual void setRotationalVelocity (const DtVector &BodyRates)
 Set the rotational velocity of an entity at the current simulation time, as set in clock()->simTime().
virtual const DtVectorrotationalVelocity (DtTime aTime) const
 The rotational velocity of an entity at aTime.
virtual const DtVectorrotationalVelocity () const
 The rotational velocity of an entity at the current simulation time, as set in clock()->simTime().
virtual const DtVectorlastSetRotationalVelocity () const
 Return the value last passed to setRotationalVelocity, regardless of whether we have an approximator.
virtual void setFrozen (bool on)
 Set entity frozen state. True indicates frozen.
virtual bool frozen () const
 The frozen state of an entity.
virtual void setAlgorithm (DtDeadReckonTypes alg)
 Set the dead reckoning algorithm.
virtual DtDeadReckonTypes algorithm () const
 The dead reckoning algorithm.
Relative Spatial Attributes

Relative TSPI (Time, Space, and Position Information).

These attributes are only used if this entity is part of another entity. At a minimum the hostGlobalId() attribute must be set to point to the entity which is hosting this entity. When this entity is part of another entity both the relative spatial attributes as well as the "normal" spatial attributes must be filled in. RelativeVelocity, RelativeAcceleration, and RelativeLocation in body coordinates, relative to a host entity. RelativeOrientataion is represented as a DtTaitBryan which is a set of three Euler angles in geocentric world coordinates. RelativeRotationalVelocity is in the units body coordinates and is the same as the Spatial attribute rotationalVelocity. These attributes are optional attributes for both DIS and the RPR FOM.

virtual void setRelativeLocation (const DtVector &location, DtTime aTime)
 Set the location of the center of mass in world coordinates at the given time.
virtual void setRelativeLocation (const DtVector &location)
 Set the location of the center of mass in world coordinates at the simTime as set by clock()->simTime().
virtual const DtVectorrelativeLocation (DtTime aTime) const
 The relativeLocation of the entity with respect to the hostGlobalId() or "Host" at the given time.
virtual const DtVectorrelativeLocation () const
 The relativeLocation of the entity with respect to the hostGlobalId() or "Host" at simTime as set by clock()->simTime().
virtual const DtVectorlastSetRelativeLocation () const
 Return the value last passed to setLocation, regardless of whether we have an approximator.
virtual void setRelativeVelocity (const DtVector &Velocity, DtTime aTime)
 Set the relative velocity of the entity in meters per second with respect to the host at aTime.
virtual void setRelativeVelocity (const DtVector &Velocity)
 Set the relative velocity of the entity in meters per second with respect to the host at simTime.
virtual const DtVectorrelativeVelocity (DtTime aTime) const
 The relative velocity of the entity with respect to the host at aTime.
virtual const DtVectorrelativeVelocity () const
 The relative velocity of the entity with respect to the host at simTime.
virtual const DtVectorlastSetRelativeVelocity () const
 Return the value last passed to setVelocity, regardless of whether we have an approximator.
virtual void setRelativeAcceleration (const DtVector &Acceleration, DtTime aTime)
 Set the relative acceleration of the entity with respect to the host at aTime.
virtual void setRelativeAcceleration (const DtVector &Acceleration)
 Set the relative acceleration of the entity with respect to the host at simTime.
virtual const DtVectorrelativeAcceleration (DtTime aTime) const
 The relativeAcceleration of the entity with respect to the host at aTime.
virtual const DtVectorrelativeAcceleration () const
 The relativeAcceleration of the entity with respect to the host at simTime.
virtual const DtVectorlastSetRelativeAcceleration () const
 Return the value last passed to setAcceleration, regardless of whether we have an approximator.
virtual void setRelativeOrientation (const DtTaitBryan &orient, DtTime aTime)
 Set the relative orientation of the entity with respect to the host.
virtual void setRelativeOrientation (const DtTaitBryan &orient)
 Set the relative orientation of the entity with respect to the host.
virtual const DtTaitBryanrelativeOrientation (DtTime aTime) const
 The relative orientation of the entity with respect to the host.
virtual const DtTaitBryanrelativeOrientation () const
 The relative orientation of the entity with respect to the host.
virtual const DtTaitBryanlastSetRelativeOrientation () const
 Return the value last passed to setOrientation, regardless of whether we have an approximator.
virtual void setRelativeRotationalVelocity (const DtVector &BodyRates, DtTime aTime)
 Set the relative rotational velocity.
virtual void setRelativeRotationalVelocity (const DtVector &BodyRates)
 Set the relative rotational velocity.
virtual const DtVectorrelativeRotationalVelocity (DtTime aTime) const
 The relative rotational velocity.
virtual const DtVectorrelativeRotationalVelocity () const
 The relative rotational velocity.
virtual const DtVectorlastSetRelativeRotationalVelocity () const
 Return the value last passed value to setRotationalVelocity, regardless of whether we have an approximator.
virtual void setRelativeFrozen (bool onOff)
 Set relative frozen.
virtual bool relativeFrozen () const
 Returns if the entity is frozen.
virtual void setRelativeAlgorithm (DtDeadReckonTypes alg)
 Set the dead reckoning algorithm.
virtual DtDeadReckonTypes relativeAlgorithm () const
 The dead reckoning algorithm.
Is Part Of Attributes

These attributes are used to indicate that this entity is attached to another entity (the host entity).

The host entity is identified through a DtGlobalDesignator set in the setHostGlobalId() function. Once this function is set, the relative spatial attributes need to filled in. Entities can be attached to other entities in DIS and in RPR FOM 2 draft 17, but not in RPR FOM 1.0. Please see the RPR FOM GRIM, or IEEE-1278.1a for more information about the mechanics of entity attachment. These attributes are optional fields for DIS and the RPR FOM.

virtual const
DtGlobalObjectDesignator
hostGlobalId () const
 Returns the globalID of the attached host.
virtual void setHostGlobalId (const DtGlobalObjectDesignator &id)
 Sets the globalId of the attached host.
virtual void clearHostGlobalId ()
 Unattaches this entity from its host.
virtual const DtNaturenature () const
 The nature of this entity to the host.
virtual void setNature (const DtNature newVal)
 Sets the nature of this entity to the host.
virtual const DtPositionpartPosition () const
 The Part Position this entity is preforming on the host.
virtual void setPartPosition (const DtPosition newVal)
 Sets the Part Position this entity is preforming on the host.
virtual const DtStationNamestationName () const
 The station name this entity is assigned to on the host.
virtual void setStationName (const DtStationName newVal)
 Sets the station name this entity is assigned to on the host.
virtual const DtU16stationNumber () const
 The station number this entity is assigned to on the host.
virtual void setStationNumber (const DtU16 newVal)
 Sets the station number this entity is assigned to on the host.
virtual const DtVectorrelativePosition () const
 The relative position on the host.
virtual void setRelativePosition (const DtVector &newVal)
 Set the relative position on the host.
virtual const DtFloat32range () const
 The range to the host.
virtual void setRange (const DtFloat32 newVal)
 Set the range to the host.
virtual const DtFloat32bearing () const
 The bearing to host.
virtual void setBearing (const DtFloat32 newVal)
 Set the bearing to host.
- Public Member Functions inherited from DtStateRepository
virtual ~DtStateRepository ()
 destructor
DtStateRepositoryoperator= (const DtStateRepository &orig)
 assignment operator
virtual void setGlobalId (const DtGlobalObjectDesignator &id)
 Get/Set global identifier, or name.
virtual const
DtGlobalObjectDesignator
globalId () const
virtual void setLocalId (const DtObjectId &id)
 Get/Set local identifier, or handle.
virtual const DtObjectIdlocalId () const

Protected Member Functions

DtBaseEntityStateRepositoryself () const
 Cast off const-ness for trivial internal change.
- Protected Member Functions inherited from DtStateRepository
 DtStateRepository ()
 Constructors are protected since this is an abstract base class.
 DtStateRepository (const DtStateRepository &orig)
 copy constructor

Protected Attributes

DtClockmyClock
 Clock to be used for dead reckoning calculations – it is set to the same clock used by the exConn.
DtApproximatormyApproximator
 Holds what's currently being used as our approximator.
DtApproximatormyRelativeApproximator
DtDeadReckonermyDeadReckoner
 Holds what was most recently passed to useDeadReckoner.
DtDeadReckonermyRelativeDeadReckoner
DtSmoothermySmoother
 Holds what was most recently passed to useSmoother.
DtSmoothermyRelativeSmoother
DtDeadReckonermyDfltDeadReckoner
 Created and deleted by this ESR if needed.
DtSmoothermyDfltSmoother
DtDeadReckonermyDfltRelativeDeadReckoner
DtSmoothermyDfltRelativeSmoother
DtVector myLocation
 spatial attributes
DtVector myVelocity
DtVector myAcceleration
DtTaitBryan myOrientation
DtVector myRotationalVelocity
DtDeadReckonTypes myAlgorithm
bool myFrozen
DtVector myRelativeLocation
 relativeSpatial attributes
DtVector myRelativeVelocity
DtVector myRelativeAcceleration
DtTaitBryan myRelativeOrientation
DtVector myRelativeRotationalVelocity
DtDeadReckonTypes myRelativeAlgorithm
bool myRelativeFrozen
DtGlobalObjectDesignator myHostGlobalId
 isPartOf attributes Never set myHostGlobalId outside of the mutator function setHostGlobalId() this will invalidate myHostGlobalIdSetFlag which is used to determine if myHostGlobalId is valid, when it contains a 0:0:0 entityID.
bool myHostGlobalIdSetFlag
DtNature myNature
DtPosition myPartPosition
DtStationName myStationName
DtU16 myStationNumber
DtVector myRelativePosition
DtFloat32 myRange
DtFloat32 myBearing
DtHlaObjectManagermyObjectManager
 others
bool myAmAsSeenByRemote
 This flag is checked by the spatial attribute accessors and if it's false, calls computeSpatialFromRelativeSpatial()
DtVector myLastSetLocation
 place holder variables for spatial data.
DtVector myLastSetVelocity
DtVector myLastSetAcceleration
DtTaitBryan myLastSetOrientation
DtVector myLastSetRotationalVelocity
DtVector myLastSetRelativeLocation
 place holder variables for relative spatial data.
DtVector myLastSetRelativeVelocity
DtVector myLastSetRelativeAcceleration
DtTaitBryan myLastSetRelativeOrientation
DtVector myLastSetRelativeRotationalVelocity
DtDcm myBodyToGeoc
bool myBodyToGeocDirty
DtDcm myRelativeBodyToHost
bool myRelativeBodyToHostDirty
DtTimeStampType myTimeStampType
DtEntityIdentifier myEntityId
DtFederateId myFederateId
 Set by call to federateId.
DtEntityType myEntityType
DtThresholder myThresholder
DtTime myTimeForSets
- Protected Attributes inherited from DtStateRepository
DtGlobalObjectDesignator myGlobalId
DtObjectId myLocalId

Friends

class DtBaseEntityDecoder
 Used by DtBaseEntityDecoder to support absolute DR in HLA.

Detailed Description

Instances of DtBaseEntityStateRepository are used to maintain basic state information needed by all kinds of entities.

Examples

Constructor & Destructor Documentation

DtBaseEntityStateRepository::DtBaseEntityStateRepository ( )

default constructor

virtual DtBaseEntityStateRepository::~DtBaseEntityStateRepository ( )
virtual

destructor

DtBaseEntityStateRepository::DtBaseEntityStateRepository ( const DtBaseEntityStateRepository orig)

copy constructor

Member Function Documentation

virtual const DtVector& DtBaseEntityStateRepository::acceleration ( DtTime  aTime) const
virtual

Return the acceleration at aTime.

virtual const DtVector& DtBaseEntityStateRepository::acceleration ( ) const
virtual

The acceleration at the current simulation time, as set in clock()->simTime().

virtual DtDeadReckonTypes DtBaseEntityStateRepository::algorithm ( ) const
virtual

The dead reckoning algorithm.

virtual DtApproximator* DtBaseEntityStateRepository::approximator ( ) const
virtual
virtual const DtFloat32& DtBaseEntityStateRepository::bearing ( ) const
virtual

The bearing to host.

virtual const DtDcm& DtBaseEntityStateRepository::bodyToGeoc ( DtTime  aTime) const
virtual

Get the body to geocentric coordinate matrix.

virtual const DtDcm& DtBaseEntityStateRepository::bodyToGeoc ( ) const
virtual

Get the body to geocentric coordinate matrix.

virtual void DtBaseEntityStateRepository::clearHostGlobalId ( )
virtual

Unattaches this entity from its host.

This function should be used instead of setHostGlobalId with an empty ID.

virtual DtClock* DtBaseEntityStateRepository::clock ( ) const
virtual

The clock being used for dead reckoning calculations.

This is usually configured and updated via the DtExerciseConn instance.

virtual DtStateRepository* DtBaseEntityStateRepository::clone ( bool  copy = false) const
virtual

Return a copy/empty object of the same type as this.

Implements DtStateRepository.

Reimplemented in DtEntityStateRepository, DtAggregateStateRepository, and MyEntityStateRep.

void DtBaseEntityStateRepository::computeSpatialFromRelativeSpatial ( )

If this unit has a host, update the esr to reflect the current state of the host.

Function is no-op if hostEsr() returns null.

const DtEntityIdentifier & DtBaseEntityStateRepository::entityId ( ) const
inlinevirtual

The entity's identifier.

References myEntityId.

const DtEntityType & DtBaseEntityStateRepository::entityType ( ) const
inlinevirtual

The entity type.

References myEntityType.

const DtFederateId & DtBaseEntityStateRepository::federateId ( ) const
inlinevirtual
virtual bool DtBaseEntityStateRepository::frozen ( ) const
virtual

The frozen state of an entity.

Reimplemented in DtEntityStateRepository.

DtBaseEntityStateRepository* DtBaseEntityStateRepository::hostEsr ( ) const

Returns null if there isn't a host.

This func inspects the hostGlobalId member and returns the esr of that unit.

virtual const DtGlobalObjectDesignator& DtBaseEntityStateRepository::hostGlobalId ( ) const
virtual

Returns the globalID of the attached host.

const DtVector & DtBaseEntityStateRepository::lastSetAcceleration ( ) const
inlinevirtual

The value last passed to setAcceleration, regardless of whether we have an approximator.

References myLastSetAcceleration.

const DtVector & DtBaseEntityStateRepository::lastSetLocation ( ) const
inlinevirtual

Return the value last passed to setLocation, regardless of whether we have an approximator.

References myLastSetLocation.

const DtTaitBryan & DtBaseEntityStateRepository::lastSetOrientation ( ) const
inlinevirtual

The value last passed to setOrientation, regardless of whether we have an approximator.

References myLastSetOrientation.

const DtVector & DtBaseEntityStateRepository::lastSetRelativeAcceleration ( ) const
inlinevirtual

Return the value last passed to setAcceleration, regardless of whether we have an approximator.

References myLastSetRelativeAcceleration.

const DtVector & DtBaseEntityStateRepository::lastSetRelativeLocation ( ) const
inlinevirtual

Return the value last passed to setLocation, regardless of whether we have an approximator.

References myLastSetRelativeLocation.

const DtTaitBryan & DtBaseEntityStateRepository::lastSetRelativeOrientation ( ) const
inlinevirtual

Return the value last passed to setOrientation, regardless of whether we have an approximator.

References myLastSetRelativeOrientation.

const DtVector & DtBaseEntityStateRepository::lastSetRelativeRotationalVelocity ( ) const
inlinevirtual

Return the value last passed value to setRotationalVelocity, regardless of whether we have an approximator.

relative Spatial

References myLastSetRelativeRotationalVelocity.

const DtVector & DtBaseEntityStateRepository::lastSetRelativeVelocity ( ) const
inlinevirtual

Return the value last passed to setVelocity, regardless of whether we have an approximator.

References myLastSetRelativeVelocity.

const DtVector & DtBaseEntityStateRepository::lastSetRotationalVelocity ( ) const
inlinevirtual

Return the value last passed to setRotationalVelocity, regardless of whether we have an approximator.

spatial

References myLastSetRotationalVelocity.

const DtVector & DtBaseEntityStateRepository::lastSetVelocity ( ) const
inlinevirtual

Return the value last passed to setVelocity, regardless of whether we have an approximator.

References myLastSetVelocity.

virtual const DtVector& DtBaseEntityStateRepository::location ( DtTime  aTime) const
virtual

The location in geocentric world coordinates at aTime.

The returned location will be computed using the relative location if hostGlobalId() is set. For more information see the Embark example.

virtual const DtVector& DtBaseEntityStateRepository::location ( ) const
virtual

The location in geocentric world coordinates at the current simulation time, as set in clock()->simTime().

The returned location will be computed using the relative location if hostGlobalId() is set. For more information see the Embark example.

virtual const DtNature& DtBaseEntityStateRepository::nature ( ) const
virtual

The nature of this entity to the host.

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

assignment operator

virtual const DtTaitBryan& DtBaseEntityStateRepository::orientation ( DtTime  aTime) const
virtual

The orientation at the passed time.

virtual const DtTaitBryan& DtBaseEntityStateRepository::orientation ( ) const
virtual

The orientation at the current simulation time, as set in clock()->simTime().

virtual const DtPosition& DtBaseEntityStateRepository::partPosition ( ) const
virtual

The Part Position this entity is preforming on the host.

virtual void DtBaseEntityStateRepository::printData ( ) const
virtual

Print the state data to the DtInfo stream.

Users should prefer to use printDataToStream() instead.

Implements DtStateRepository.

Reimplemented in DtEntityStateRepository, DtAggregateStateRepository, and MyEntityStateRep.

void DtBaseEntityStateRepository::printDataToStream ( std::ostream &  str) const
virtual

Prints the state data to the specified stream.

Reimplemented from DtStateRepository.

Reimplemented in DtEntityStateRepository, and DtAggregateStateRepository.

virtual const DtFloat32& DtBaseEntityStateRepository::range ( ) const
virtual

The range to the host.

virtual const DtVector& DtBaseEntityStateRepository::relativeAcceleration ( DtTime  aTime) const
virtual

The relativeAcceleration of the entity with respect to the host at aTime.

virtual const DtVector& DtBaseEntityStateRepository::relativeAcceleration ( ) const
virtual

The relativeAcceleration of the entity with respect to the host at simTime.

virtual DtDeadReckonTypes DtBaseEntityStateRepository::relativeAlgorithm ( ) const
virtual

The dead reckoning algorithm.

virtual DtApproximator* DtBaseEntityStateRepository::relativeApproximator ( ) const
virtual
virtual const DtDcm& DtBaseEntityStateRepository::relativeBodyToHost ( DtTime  aTime) const
virtual

Get the body to host DCM.

virtual const DtDcm& DtBaseEntityStateRepository::relativeBodyToHost ( ) const
virtual

Get the body to host DCM.

virtual bool DtBaseEntityStateRepository::relativeFrozen ( ) const
virtual

Returns if the entity is frozen.

virtual const DtVector& DtBaseEntityStateRepository::relativeLocation ( DtTime  aTime) const
virtual

The relativeLocation of the entity with respect to the hostGlobalId() or "Host" at the given time.

virtual const DtVector& DtBaseEntityStateRepository::relativeLocation ( ) const
virtual

The relativeLocation of the entity with respect to the hostGlobalId() or "Host" at simTime as set by clock()->simTime().

virtual const DtTaitBryan& DtBaseEntityStateRepository::relativeOrientation ( DtTime  aTime) const
virtual

The relative orientation of the entity with respect to the host.

virtual const DtTaitBryan& DtBaseEntityStateRepository::relativeOrientation ( ) const
virtual

The relative orientation of the entity with respect to the host.

virtual const DtVector& DtBaseEntityStateRepository::relativePosition ( ) const
virtual

The relative position on the host.

virtual const DtVector& DtBaseEntityStateRepository::relativeRotationalVelocity ( DtTime  aTime) const
virtual

The relative rotational velocity.

virtual const DtVector& DtBaseEntityStateRepository::relativeRotationalVelocity ( ) const
virtual

The relative rotational velocity.

virtual const DtVector& DtBaseEntityStateRepository::relativeVelocity ( DtTime  aTime) const
virtual

The relative velocity of the entity with respect to the host at aTime.

virtual const DtVector& DtBaseEntityStateRepository::relativeVelocity ( ) const
virtual

The relative velocity of the entity with respect to the host at simTime.

virtual const DtVector& DtBaseEntityStateRepository::rotationalVelocity ( DtTime  aTime) const
virtual

The rotational velocity of an entity at aTime.

virtual const DtVector& DtBaseEntityStateRepository::rotationalVelocity ( ) const
virtual

The rotational velocity of an entity at the current simulation time, as set in clock()->simTime().

DtBaseEntityStateRepository* DtBaseEntityStateRepository::self ( ) const
protected

Cast off const-ness for trivial internal change.

Non-virtual since can't override on return type.

Reimplemented in DtEntityStateRepository, and DtAggregateStateRepository.

virtual void DtBaseEntityStateRepository::setAcceleration ( const DtVector Acceleration,
DtTime  aTime 
)
virtual

Sets the acceleration at aTime.

virtual void DtBaseEntityStateRepository::setAcceleration ( const DtVector Acceleration)
virtual

Sets the acceleration at the current simulation time, as set in clock()->simTime().

virtual void DtBaseEntityStateRepository::setAlgorithm ( DtDeadReckonTypes  alg)
virtual

Set the dead reckoning algorithm.

void DtBaseEntityStateRepository::setAmAsSeenByRemote ( bool  val)
inlinevirtual

Mark this state repository as an AsSeenByRemote copy.

Publishers maintain two instances of a state repository for every object published. This attribute is set by the publisher to mark this state repository instance as the asSeenByRemote instance. Developers should not set this. The function is used to compute dead reckoned values.

References myAmAsSeenByRemote.

virtual void DtBaseEntityStateRepository::setApproximator ( DtApproximator approx)
virtual

Get and set the approximator used to provide approximated position and orientation information for the entity.

If your approximator is a DtDeadReckoner, use useDeadReckoner instead of setApproximator. If it's a smoother, use useSmoother. Caller of setApproximator has the responsibility to delete approx after the StateRep no longer needs it.

virtual void DtBaseEntityStateRepository::setBearing ( const DtFloat32  newVal)
virtual

Set the bearing to host.

virtual void DtBaseEntityStateRepository::setClock ( DtClock clock)
virtual

Sets the clock being used for dead reckoning calculations.

This is usually configured and updated via the DtExerciseConn instance.

Reimplemented in DtEntityStateRepository.

void DtBaseEntityStateRepository::setEntityId ( const DtEntityIdentifier id)
inlinevirtual

Set the entity's identifier.

Reimplemented in DtEntityStateRepository.

References myEntityId.

void DtBaseEntityStateRepository::setEntityType ( const DtEntityType type)
inlinevirtual

Set the entity type.

References myEntityType.

void DtBaseEntityStateRepository::setFederateId ( const DtFederateId id)
inlinevirtual

Set the federate ID (part of entity ID).

References myEntityId, DtEntityIdentifier::setHost(), and DtEntityIdentifier::setSite().

virtual void DtBaseEntityStateRepository::setFrozen ( bool  on)
virtual

Set entity frozen state. True indicates frozen.

Reimplemented in DtEntityStateRepository.

virtual void DtBaseEntityStateRepository::setHlaObjectManager ( DtHlaObjectManager mgr)
virtual

Set the HLA/DIS object manager.

This gets called in two places. If the ent is local it gets called in the DtEntityPublisher's constructor. If it's remote it gets called in the DtRelflectedEntity's constructor. Entities moving relative to other ents must know the other ents location etc. They can get that info from the other ents stateRep which can be found in the ObjectManager lists.

virtual void DtBaseEntityStateRepository::setHostGlobalId ( const DtGlobalObjectDesignator id)
virtual

Sets the globalId of the attached host.

This function should only be used to attach this entity to another entity, or change which entity it is attached to. If you wish to unattach this entity from its current host, you need to call clearHostGlobalId(). It is possible to attach to a host of ID "0:0:0" in DIS.

virtual void DtBaseEntityStateRepository::setLocation ( const DtVector location,
DtTime  aTime 
)
virtual

Set the location of the center of mass in geocentric world coordinates at aTime.

virtual void DtBaseEntityStateRepository::setLocation ( const DtVector location)
virtual

Set the location of the center of mass in geocentric world coordinates at current simulation time, as set in clock()->simTime().

virtual void DtBaseEntityStateRepository::setNature ( const DtNature  newVal)
virtual

Sets the nature of this entity to the host.

virtual void DtBaseEntityStateRepository::setOrientation ( const DtTaitBryan orient,
DtTime  aTime 
)
virtual

Set the orientation at aTime.

virtual void DtBaseEntityStateRepository::setOrientation ( const DtTaitBryan orient)
virtual

Set the orientation at the current simulation time, as set in clock()->simTime().

virtual void DtBaseEntityStateRepository::setPartPosition ( const DtPosition  newVal)
virtual

Sets the Part Position this entity is preforming on the host.

virtual void DtBaseEntityStateRepository::setRange ( const DtFloat32  newVal)
virtual

Set the range to the host.

virtual void DtBaseEntityStateRepository::setRelativeAcceleration ( const DtVector Acceleration,
DtTime  aTime 
)
virtual

Set the relative acceleration of the entity with respect to the host at aTime.

virtual void DtBaseEntityStateRepository::setRelativeAcceleration ( const DtVector Acceleration)
virtual

Set the relative acceleration of the entity with respect to the host at simTime.

virtual void DtBaseEntityStateRepository::setRelativeAlgorithm ( DtDeadReckonTypes  alg)
virtual

Set the dead reckoning algorithm.

virtual void DtBaseEntityStateRepository::setRelativeApproximator ( DtApproximator approx)
virtual
virtual void DtBaseEntityStateRepository::setRelativeFrozen ( bool  onOff)
virtual

Set relative frozen.

virtual void DtBaseEntityStateRepository::setRelativeLocation ( const DtVector location,
DtTime  aTime 
)
virtual

Set the location of the center of mass in world coordinates at the given time.

virtual void DtBaseEntityStateRepository::setRelativeLocation ( const DtVector location)
virtual

Set the location of the center of mass in world coordinates at the simTime as set by clock()->simTime().

virtual void DtBaseEntityStateRepository::setRelativeOrientation ( const DtTaitBryan orient,
DtTime  aTime 
)
virtual

Set the relative orientation of the entity with respect to the host.

virtual void DtBaseEntityStateRepository::setRelativeOrientation ( const DtTaitBryan orient)
virtual

Set the relative orientation of the entity with respect to the host.

virtual void DtBaseEntityStateRepository::setRelativePosition ( const DtVector newVal)
virtual

Set the relative position on the host.

virtual void DtBaseEntityStateRepository::setRelativeRotationalVelocity ( const DtVector BodyRates,
DtTime  aTime 
)
virtual

Set the relative rotational velocity.

virtual void DtBaseEntityStateRepository::setRelativeRotationalVelocity ( const DtVector BodyRates)
virtual

Set the relative rotational velocity.

virtual void DtBaseEntityStateRepository::setRelativeVelocity ( const DtVector Velocity,
DtTime  aTime 
)
virtual

Set the relative velocity of the entity in meters per second with respect to the host at aTime.

virtual void DtBaseEntityStateRepository::setRelativeVelocity ( const DtVector Velocity)
virtual

Set the relative velocity of the entity in meters per second with respect to the host at simTime.

virtual void DtBaseEntityStateRepository::setRotationalVelocity ( const DtVector BodyRates,
DtTime  aTime 
)
virtual

Set the rotational velocity of an entity at aTime.

virtual void DtBaseEntityStateRepository::setRotationalVelocity ( const DtVector BodyRates)
virtual

Set the rotational velocity of an entity at the current simulation time, as set in clock()->simTime().

virtual void DtBaseEntityStateRepository::setStationName ( const DtStationName  newVal)
virtual

Sets the station name this entity is assigned to on the host.

virtual void DtBaseEntityStateRepository::setStationNumber ( const DtU16  newVal)
virtual

Sets the station number this entity is assigned to on the host.

virtual void DtBaseEntityStateRepository::setTimeForSets ( DtTime  time)
virtual
void DtBaseEntityStateRepository::setTimeStampType ( DtTimeStampType  type)
inline

Set/Get flag indicating whether we're using absolute timestamps for dead reckoning.

This flag will be set to DtAbsolute by the decoders only if incoming state messages indicate that the sender is using absolute time stamps, AND our local exercise connection indicates that we are using absolute timestamping.

References myTimeStampType.

virtual void DtBaseEntityStateRepository::setVelocity ( const DtVector Velocity,
DtTime  aTime 
)
virtual

Set the velocity in meters per second at aTime.

virtual void DtBaseEntityStateRepository::setVelocity ( const DtVector Velocity)
virtual

The velocity in meters per second at the current simulation time, as set in clock()->simTime().

virtual const DtStationName& DtBaseEntityStateRepository::stationName ( ) const
virtual

The station name this entity is assigned to on the host.

virtual const DtU16& DtBaseEntityStateRepository::stationNumber ( ) const
virtual

The station number this entity is assigned to on the host.

DtThresholder * DtBaseEntityStateRepository::thresholder ( )
inlinevirtual

Returns the SR's thresholder, which contains thresholds needed for encoding.

References myThresholder.

const DtThresholder & DtBaseEntityStateRepository::thresholder ( ) const
inlinevirtual

Returns a const reference the SR's thresholder, which contains thresholds needed for encoding.

References myThresholder.

virtual DtTime DtBaseEntityStateRepository::timeForSets ( ) const
virtual
DtTimeStampType DtBaseEntityStateRepository::timeStampType ( ) const
inline

References myTimeStampType.

virtual void DtBaseEntityStateRepository::useDeadReckoner ( DtDeadReckoner dr)
virtual

Tells the DtBaseEntity to use dr as its DtApproximator, and to notify it when DR algorithm changes.

Caller is responsible for deleting dr, but only after the StateRep no longer needs it.

virtual void DtBaseEntityStateRepository::useDeadReckoner ( bool  yesNo = true)
virtual

Create and use a new (private) dead-reckoner as our approximator.

virtual void DtBaseEntityStateRepository::useRelativeDeadReckoner ( DtDeadReckoner dr)
virtual

Tells the DtBaseEntity to use dr as its DtApproximator, and to notify it when DR algorithm changes.

Caller is responsible for deleting dr, but only after the StateRep no longer needs it.

virtual void DtBaseEntityStateRepository::useRelativeDeadReckoner ( bool  yesNo = true)
virtual

Create and use a new (private) dead-reckoner as our approximator.

virtual void DtBaseEntityStateRepository::useRelativeSmoother ( DtSmoother sm)
virtual

Tells the ESR to use sm as its approximator, and to notify it when DR algorithm changes.

Caller is responsible for deleting sm, but only after the StateRep no longer needs it.

virtual void DtBaseEntityStateRepository::useRelativeSmoother ( bool  yesNo = true)
virtual

Create and use a new (private) smoother as our approximator.

virtual void DtBaseEntityStateRepository::useSmoother ( DtSmoother sm)
virtual

Tells the ESR to use sm as its approximator, and to notify it when DR algorithm changes.

Caller is responsible for deleting sm, but only after the StateRep no longer needs it.

virtual void DtBaseEntityStateRepository::useSmoother ( bool  yesNo = true)
virtual

Create and use a new (private) smoother as our approximator.

virtual DtDeadReckoner* DtBaseEntityStateRepository::usingDeadReckoner ( )
virtual

If the ESR is using a dead reckoner, returns it. Else returns NULL.

virtual DtDeadReckoner* DtBaseEntityStateRepository::usingRelativeDeadReckoner ( )
virtual

If the ESR is using a dead reckoner, returns it. Else returns NULL.

virtual DtSmoother* DtBaseEntityStateRepository::usingRelativeSmoother ( )
virtual

If the ESR is using a smoother, returns it. Else returns NULL.

virtual DtSmoother* DtBaseEntityStateRepository::usingSmoother ( )
virtual

If the ESR is using a smoother, returns it. Else returns NULL.

virtual const DtVector& DtBaseEntityStateRepository::velocity ( DtTime  aTime) const
virtual

The velocity in meters per second at aTime.

virtual const DtVector& DtBaseEntityStateRepository::velocity ( ) const
virtual

The velocity at the current simulation time, as set in clock()->simTime().

Friends And Related Function Documentation

friend class DtBaseEntityDecoder
friend

Used by DtBaseEntityDecoder to support absolute DR in HLA.

Member Data Documentation

DtVector DtBaseEntityStateRepository::myAcceleration
protected
DtDeadReckonTypes DtBaseEntityStateRepository::myAlgorithm
protected
bool DtBaseEntityStateRepository::myAmAsSeenByRemote
protected

This flag is checked by the spatial attribute accessors and if it's false, calls computeSpatialFromRelativeSpatial()

Referenced by setAmAsSeenByRemote().

DtApproximator* DtBaseEntityStateRepository::myApproximator
protected

Holds what's currently being used as our approximator.

DtFloat32 DtBaseEntityStateRepository::myBearing
protected
DtDcm DtBaseEntityStateRepository::myBodyToGeoc
protected
bool DtBaseEntityStateRepository::myBodyToGeocDirty
protected
DtClock* DtBaseEntityStateRepository::myClock
protected

Clock to be used for dead reckoning calculations – it is set to the same clock used by the exConn.

DtDeadReckoner* DtBaseEntityStateRepository::myDeadReckoner
protected

Holds what was most recently passed to useDeadReckoner.

DtDeadReckoner* DtBaseEntityStateRepository::myDfltDeadReckoner
protected

Created and deleted by this ESR if needed.

DtDeadReckoner* DtBaseEntityStateRepository::myDfltRelativeDeadReckoner
protected
DtSmoother* DtBaseEntityStateRepository::myDfltRelativeSmoother
protected
DtSmoother* DtBaseEntityStateRepository::myDfltSmoother
protected
DtEntityIdentifier DtBaseEntityStateRepository::myEntityId
protected
DtEntityType DtBaseEntityStateRepository::myEntityType
protected

Referenced by entityType(), and setEntityType().

DtFederateId DtBaseEntityStateRepository::myFederateId
mutableprotected

Set by call to federateId.

Referenced by federateId().

bool DtBaseEntityStateRepository::myFrozen
protected
DtGlobalObjectDesignator DtBaseEntityStateRepository::myHostGlobalId
protected

isPartOf attributes Never set myHostGlobalId outside of the mutator function setHostGlobalId() this will invalidate myHostGlobalIdSetFlag which is used to determine if myHostGlobalId is valid, when it contains a 0:0:0 entityID.

bool DtBaseEntityStateRepository::myHostGlobalIdSetFlag
protected
DtVector DtBaseEntityStateRepository::myLastSetAcceleration
protected

Referenced by lastSetAcceleration().

DtVector DtBaseEntityStateRepository::myLastSetLocation
protected

place holder variables for spatial data.

Needed since the accessors compute world coords for carried units.

Referenced by lastSetLocation().

DtTaitBryan DtBaseEntityStateRepository::myLastSetOrientation
protected

Referenced by lastSetOrientation().

DtVector DtBaseEntityStateRepository::myLastSetRelativeAcceleration
protected
DtVector DtBaseEntityStateRepository::myLastSetRelativeLocation
protected

place holder variables for relative spatial data.

Not sure if needed but for consistency with spatial data, here ya go.

Referenced by lastSetRelativeLocation().

DtTaitBryan DtBaseEntityStateRepository::myLastSetRelativeOrientation
protected
DtVector DtBaseEntityStateRepository::myLastSetRelativeRotationalVelocity
protected
DtVector DtBaseEntityStateRepository::myLastSetRelativeVelocity
protected

Referenced by lastSetRelativeVelocity().

DtVector DtBaseEntityStateRepository::myLastSetRotationalVelocity
protected
DtVector DtBaseEntityStateRepository::myLastSetVelocity
protected

Referenced by lastSetVelocity().

DtVector DtBaseEntityStateRepository::myLocation
protected

spatial attributes

DtNature DtBaseEntityStateRepository::myNature
protected
DtHlaObjectManager* DtBaseEntityStateRepository::myObjectManager
protected

others

created and delete somewhere else;

DtTaitBryan DtBaseEntityStateRepository::myOrientation
protected
DtPosition DtBaseEntityStateRepository::myPartPosition
protected
DtFloat32 DtBaseEntityStateRepository::myRange
protected
DtVector DtBaseEntityStateRepository::myRelativeAcceleration
protected
DtDeadReckonTypes DtBaseEntityStateRepository::myRelativeAlgorithm
protected
DtApproximator* DtBaseEntityStateRepository::myRelativeApproximator
protected
DtDcm DtBaseEntityStateRepository::myRelativeBodyToHost
protected
bool DtBaseEntityStateRepository::myRelativeBodyToHostDirty
protected
DtDeadReckoner* DtBaseEntityStateRepository::myRelativeDeadReckoner
protected
bool DtBaseEntityStateRepository::myRelativeFrozen
protected
DtVector DtBaseEntityStateRepository::myRelativeLocation
protected

relativeSpatial attributes

DtTaitBryan DtBaseEntityStateRepository::myRelativeOrientation
protected
DtVector DtBaseEntityStateRepository::myRelativePosition
protected
DtVector DtBaseEntityStateRepository::myRelativeRotationalVelocity
protected
DtSmoother* DtBaseEntityStateRepository::myRelativeSmoother
protected
DtVector DtBaseEntityStateRepository::myRelativeVelocity
protected
DtVector DtBaseEntityStateRepository::myRotationalVelocity
protected
DtSmoother* DtBaseEntityStateRepository::mySmoother
protected

Holds what was most recently passed to useSmoother.

DtStationName DtBaseEntityStateRepository::myStationName
protected
DtU16 DtBaseEntityStateRepository::myStationNumber
protected
DtThresholder DtBaseEntityStateRepository::myThresholder
protected

Referenced by thresholder().

DtTime DtBaseEntityStateRepository::myTimeForSets
protected
DtTimeStampType DtBaseEntityStateRepository::myTimeStampType
protected

Referenced by setTimeStampType(), and timeStampType().

DtVector DtBaseEntityStateRepository::myVelocity
protected

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

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)