VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
parallel/vehicleSim.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1992-2012 VT MAK
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include <vl/exerciseConn.h>
12 #include <vl/reflectedEntityList.h>
13 #include <vl/entityPublisher.h>
15 #include <vl/topoView.h>
17 #include <vl/fireInteraction.h>
18 #include <vl/publisherContainer.h>
19 
21 
24 class DtVehicleSim
25 {
26 public:
27 
30  DtVehicleSim( double refLat, double refLon,
32  const DtEntityIdentifier& id, const DtEntityType& type,
33  const char* name, const char* markings,
34  const DtDeadReckonTypes alg, bool haveArtParts,
35  DtObjectPublisherContainer &pubContainer,
36  DtTime timeSpacing);
37 
39  virtual ~DtVehicleSim();
40 
42  virtual void init( DtConstVector initPos, double initSpeed,
43  double initHeading, double initTRadius,
44  double initPitch, bool autoRoll, double initRoll, int num );
45 
47  virtual void simulate();
48 
50  virtual void fireMunition( const DtGlobalObjectDesignator& tg );
51  virtual void fireMunition();
52  virtual void detonateMunition();
53  virtual void munitionUpdate();
54 
56  virtual void reactToDetonation();
57  virtual int checkDetonation();
58  virtual void reactToDamage();
59  virtual bool isDestroyed();
60  virtual DtTime timeDestroyed();
61 
63  virtual void toggleEmissions();
64  virtual void enableEmissions();
65  virtual void disableEmissions();
66  virtual void emissionsUpdate();
67 
68 public:
69 
70  // Set the current detonation for reaction.
72 
73  static void setLethalDetonationRange( double range );
74  static void setMunitionFlightTime( DtTime time );
75 
76  // set the delta time for next simTick update
77  static void setSimDeltaTime(DtTime theDt) { myDt = theDt; }
78 
79 protected:
80 
81  // delta time for next simTick update
82  static DtTime myDt;
83 
84  // Current detonation, if any.
86 
87 protected:
88 
89  virtual void moveArtParts();
90 
91 protected:
92 
101 
102  float mySpeed;
103  float myTurnRadius;
104  float myTurnRate;
105  float myScalarAccel;
106  double myBeamTime;
107 
109  DtVector myPos;
110  DtVector32 myVel;
113 
114  float myTurretAz;
115  float myTurretAzRate;
116  float myGunElev;
117  float myGunElevRate;
118 
122  bool myIsDestroyed;
123 
124  bool myHaveArtParts;
125  bool myEmissionsEnabled;
126 
128 
129 protected:
130  static double theLethalDetonationRange;
132 };
133 
134 
DtVector32 myAccel
in topographic (N, E, down) coordinates
Definition: f18/vehicleSim.h:109
Instances of DtDetonationInteraction are used to communicate information associated with the impact o...
Definition: detonationInteractionHLA.h:37
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnHLA.h:58
virtual void simulate()
Call once per frame to simulate.
virtual void munitionUpdate()
float myTurretAzRate
Definition: f18/vehicleSim.h:113
DtTime myDetonateTime
Definition: f18/vehicleSim.h:118
DtEmitterSystemPublisher * mySysPub
Definition: f18/vehicleSim.h:94
virtual void emissionsUpdate()
DtEntityStateRepository * myESR
Definition: f18/vehicleSim.h:95
double myBeamTime
Definition: parallel/vehicleSim.h:106
Part of the F18 example.
Definition: f18/vehicleSim.h:25
DtVector myPos
topographic Euler angles
Definition: f18/vehicleSim.h:107
DtTime myTimeSpacing
Definition: parallel/vehicleSim.h:127
Instances of DtTopoView are used to create a Topographic coordinate view of the geocentric coordinate...
Definition: topoView.h:20
This file provides protocol independence for Remote Entity Lists.
float mySpeed
Definition: f18/vehicleSim.h:101
virtual void moveArtParts()
bool myHaveArtParts
Definition: f18/vehicleSim.h:122
virtual ~DtVehicleSim()
Destructor.
DtTaitBryans are used to represent orientation of an object, using a set of three Euler angles...
Definition: vlTaitBryan.h:43
This file provides protocol independence for local emitters.
DtTopoView * myTopoView
Definition: f18/vehicleSim.h:96
DtEmitterBeamRepository * myBeam
Definition: f18/vehicleSim.h:98
DtTaitBryan myEuler
Definition: f18/vehicleSim.h:106
virtual bool isDestroyed()
bool myEmissionsEnabled
Definition: f18/vehicleSim.h:123
float myTurnRate
Definition: f18/vehicleSim.h:103
virtual void disableEmissions()
float myTurretAz
in body coordinates
Definition: f18/vehicleSim.h:112
static DtTime myDt
Definition: parallel/vehicleSim.h:82
Instances of DtEntityPublisher are used for local or source simulations of entities (i...
Definition: entityPublisherHLA.h:28
virtual void toggleEmissions()
Emissions (radar)
Instances of DtEntityStateRepository are used to maintain attributes and state of entity objects in a...
Definition: entityStateRepository.h:36
Definition: vlVector.h:224
static void setSimDeltaTime(DtTime theDt)
Definition: parallel/vehicleSim.h:77
virtual void enableEmissions()
This file provides protocol independence for Fire Interactions.
DtFireInteraction * myFire
Definition: f18/vehicleSim.h:117
Instances of DtFireInteraction are used to represent the firing of a weapon.
Definition: fireInteractionHLA.h:35
bool myIsDestroyed
Definition: f18/vehicleSim.h:120
virtual void reactToDamage()
virtual void reactToDetonation()
Reaction to detonations.
DtReflectedEntityList * myRel
Definition: f18/vehicleSim.h:97
Definition: vlVector.h:162
class DtEmitterBeamRepository:
Definition: emitterBeamRepository.h:40
DtObjectPublisherContainer is an ObjectPublisher container which will execute a method on all contain...
Definition: publisherContainer.h:43
DtVector32 myRotRate
in topographic (N, E, down) coordinates
Definition: f18/vehicleSim.h:110
virtual void init(DtConstVector initPos, double initSpeed, double initHeading, double initTRadius, double initPitch, bool autoRoll, double initRoll)
Set initial values for simulation parameters.
Instances of DtReflectedEntityList are used to manage remote entities from the network.
Definition: reflectedEntityListHLA.h:38
static double theLethalDetonationRange
Definition: f18/vehicleSim.h:127
float myTurnRadius
Definition: f18/vehicleSim.h:102
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
This file provides protocol to independence DtExerciseConn.
DtObjectPublisherContainer & myPublishedObjects
Definition: parallel/vehicleSim.h:100
DtExerciseConn * myExConn
Definition: f18/vehicleSim.h:92
This class contains the declaration of DtTopoView.
DtVector32 myVel
in topographic (N, E, down) coordinates
Definition: f18/vehicleSim.h:108
float myGunElev
Definition: f18/vehicleSim.h:114
virtual DtTime timeDestroyed()
DtVehicleSim(double refLat, double refLon, DtExerciseConn *conn, DtReflectedEntityList *rel, const DtEntityIdentifier &id, const DtEntityType &type, const char *name, const char *markings, const DtDeadReckonTypes alg, bool haveArtParts)
Constructor.
Instances of DtEmitterSystemPublisher are used for local or source simulations of emitter systems...
Definition: emitterSystemPublisherHLA.h:22
static void setDetonation(const DtDetonationInteraction *theDetonation)
static void setMunitionFlightTime(DtTime time)
static const DtDetonationInteraction * theDetonation
Definition: parallel/vehicleSim.h:85
virtual int checkDetonation()
virtual void detonateMunition()
float myGunElevRate
Definition: f18/vehicleSim.h:115
static DtTime theMunitionFlightTime
Definition: f18/vehicleSim.h:128
float myScalarAccel
Definition: f18/vehicleSim.h:104
DtDeadReckonTypes
Definition: disEnums.h:987
virtual void fireMunition()
Instances of DtString are used to represent strings.
Definition: vlString.h:29
This file provides protocol independence for Detonation Interactions.
DtTime myTimeDestroyed
Definition: f18/vehicleSim.h:119
static void setLethalDetonationRange(double range)
DtEntityPublisher * myEntityPub
Definition: f18/vehicleSim.h:93
This file provides protocol independence for DtEntityPublisher.
DtEntityType is used to represent the type an entity object.
Definition: entityType.h:26

Document ID: Generated on Tue Aug 10 00:12:31 EDT 2021 from SVN revision 232765
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)