17 #include <tbb/spin_mutex.h>
45 namespace makVrfEvents
47 class DtDetonationEvent;
79 virtual void initPendingDetonations();
83 virtual const char*
type()
const;
93 const DtVector geocentricMuzzlePosition,
const DtVector geocentricMuzzleVelocity);
121 const DtVector& localTargetPoint,
const DtVector& localMuzzlePosition, DtDcm& localMuzzlePositionToTopoDcm,
122 const DtVector& geocentricMuzzlePosition,
const DtVector& geocentricMuzzleVelocity,
const double angleOfFire);
129 virtual double determineMuzzleSpeed(
double range);
135 virtual void addDispersion(
DtVector& detLocation,
136 bool addHeightDispersion);
140 virtual double calculateRangeFactorOnError(
const double rangeToTarget,
const DtVector errorCoefficients);
143 virtual double skillLevelModifier();
146 static void detonationCallback(
DtTimer * timer);
182 static void requestLaunchedMunitionsCallback(
const DtVrfObjectMessage* msg,
void* usr);
186 virtual void sendAllMunitions(
const DtUUID&);
188 virtual void sendNextLaunchTime(
const DtUUID&);
212 virtual void generateKnownTargetPoint(
const DtVector& worldLocation,
DtString knownPointName);
213 virtual DtString generateKnownTargetPointName();
219 virtual bool determineMunitionPositionsParameters(
DtVector& localTargetPoint,
DtVector& localMuzzlePosition, DtDcm& localMuzzlePositionToTopoDcm,
220 DtVector& geocentricMuzzlePosition,
DtVector& geocentricMuzzleVelocity,
double& angleOfFire);
230 static bool unloadAmmunition(
void* actuator,
DtReaderWriter* dummy);
232 virtual bool processUnloadAmmunition();
242 virtual void retrieveMunitionAccuracyParameters(
bool & useErrorVariesByRange,
244 double & errorInRange,
245 double & errorInDisplacement,
246 double & errorInBurstHeight);
UUID is a unique ID wrapper class.
Definition: uuid.h:59
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual bool createPSR()
Creates #myProcessState data member, and adds it to our process state repository manager. Passes in the name and type specified in the component descriptor (if they exist) to the DtVrfProcessStateRepository::createRepository factory method. If name and/or type is not specified, uses the appropriate default strings defined in procSRTypes.h.
DtVrfIndirectFirePSR * myIndirectFireProcessState
We've overrode createPSR() to create derived kind of DtVrfWeaponPSR. This member variable provided fo...
Definition: indirectFireActuator.h:311
DtVectorOutputPort * myMuzzleOffsetPort
Output Port Name: muzzle-offset-port Output Port Description: The entity's muzzle offset location...
Definition: indirectFireActuator.h:301
Instances of DtTimer are used to maintain the information needed to represent some kind of scheduled ...
Definition: timer.h:38
Handle returned from Create Object Service calls.
Definition: createObjectHandle.h:12
virtual bool taskVisualizationsActive() const
Returns true if task visualizations are currently active for this component. Default behavior is to r...
DtBooleanInputPort * myAlignedDirectlyPort
Input Port Name: aligned-directly-port Input Port Description: Whether this gun can align directly wi...
Definition: indirectFireActuator.h:294
bool myNeedsLoadSend
Definition: indirectFireActuator.h:316
DtAnalogInputPort * myAngleOfFirePort
Input Port Name: angle-of-fire-port Input Port Description: Elevation angle of fire in radians...
Definition: indirectFireActuator.h:286
Definition: fireEvent.h:16
double myLastLoadTimeReported
Definition: indirectFireActuator.h:315
const DtWeaponActuator & operator=(const DtWeaponActuator &orig)
assignment operator; not implemented
double myLastTimeReported
Definition: indirectFireActuator.h:314
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
Definition: readerWriter.h:85
DtReal myMuzzleSpeed
Definition: indirectFireActuator.h:305
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
boost::signals2::scoped_connection mySimObjectAddedConnection
Definition: indirectFireActuator.h:313
Definition: readerWriterRegistry.h:39
virtual void tick()
Fire if requested.
Definition: detonationEvent.h:20
virtual void updateTaskVisualizations()
Called to update task visualizations after every tick. Implemented by subclasses. ...
Definition: simComponent.h:437
std::map< DtUUID, boost::signals2::connection * > myMunitionRemovalConnections
Definition: indirectFireActuator.h:318
Instances of DtVectorOutputPort are output ports through which data producers can send a DtVector...
Definition: vectorIOPort.h:52
class DtDetonationDescriptor:
Definition: detonationDescriptor.h:33
DtWeaponActuator is a simple model of a ballistic gun.
Definition: weaponActuator.h:54
virtual bool postAddComponentsInit()
Overridden to initialize the value on myArtPartTypePort.
virtual void fireTheWeapon()
Calls createFireInteraction() and sends the resulting makVrfEvents::DtFireEvent through the exercise ...
Definition: indirectFireActuator.h:50
virtual bool createPorts()
Creates the input ports and adds them to the component.
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
Definition: rwLaunchedMunition.h:16
DtIndirectFireActuatorDescriptor * myIndirectFireActuatorDescriptor
Definition: indirectFireActuator.h:307
DtList myTimerList
Definition: indirectFireActuator.h:306
virtual makVrfEvents::DtFireEvent * createFireInteraction()
Creates and fills out a makVrfEvents::DtFireEvent. Returns a makVrfEvents::DtFireEvent.
DtVectorInputPort * myTargetPointPort
Input Port Name: target-point-port Input Port Description: Local position to fire at...
Definition: indirectFireActuator.h:272
tbb::spin_mutex myRemovalMutex
Definition: indirectFireActuator.h:319
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:95
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:88
virtual const char * type() const
Returns a string identifies the class type of component. Type values are defined in compTypes...
DtAnalogInputPort * myMuzzleSpeedPort
Input Port Name: muzzle-speed-port Input Port Description: Muzzle speed in meters/second. Input Port Range: Input Port Default Value: Input Group Parent:
Definition: indirectFireActuator.h:279
virtual void registerAttributeFunctions()
Called to register functions that provide system attribute values. Called by init(). Empty in this class. Overridden in different components to add attribute provider functions.
Definition: simComponent.h:133
File: indirectFirePSR.h.
Definition: vrfIndirectFirePSR.h:30
DtIndirectFireActuatorDescriptor; descriptor for the DtIndirectFireActuator component.
Definition: indirectFireActuatorDescriptor.h:20
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
This structure contains the information related to an individual munition currently in launch...
Definition: launchedMunitionsResponseAdmin.h:15