VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
f18/vehicleSim.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2014 MAK Technologies, Inc
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vl/exerciseConn.h>
13 #include <vl/reflectedEntityList.h>
15 #include <vl/entityPublisher.h>
17 #include <vl/topoView.h>
19 #include <vl/fireInteraction.h>
20 #include <vl/iffPublisher.h>
21 #include <vl/reflectedIffList.h>
22 #if DtHLA
24 #include <vl/replyInteractionHLA.h>
25 #endif
26 
28 
32 {
33 public:
34 
37  DtVehicleSim( double refLat, double refLon,
39  const DtEntityIdentifier& id, const DtEntityType& type,
40  const char* name, const char* markings,
41  const DtDeadReckonTypes alg, bool haveArtParts );
42 
44  virtual ~DtVehicleSim();
45 
47  virtual void init( DtConstVector initPos, double initSpeed,
48  double initHeading, double initTRadius,
49  double initPitch, bool autoRoll, double initRoll );
50 
52  virtual void simTick( DtTime simTime );
53 
54  virtual void setTurnRadius(double radius);
55  virtual double turnRadius() const;
56 
58  virtual void fireMunition( const DtGlobalObjectDesignator& tg );
59  virtual void fireMunition();
60  virtual void detonateMunition();
61  virtual void munitionTick();
62 
64  virtual void processDetonation( DtDetonationInteraction* inter );
65  virtual int checkDetonation( DtDetonationInteraction* inter );
66  virtual void reactToDamage();
67  virtual bool isDestroyed();
68  virtual DtTime timeDestroyed();
69 
71  virtual void toggleEmissions();
72  virtual void enableEmissions();
73  virtual void disableEmissions();
74  virtual void emissionsTick( double dt );
75  virtual void switchScanData();
76 
78  virtual void toggleIffSystem();
79  virtual void enableIffSystem();
80  virtual void disableIffSystem();
81  virtual void iffSystemTick(double dt);
82 
83 //#if DtHLA
85  virtual void toggleLethalIffInterrogation();
86  virtual void enableLethalIffInterrogation();
87  virtual void disableLethalIffInterrogation();
88  virtual void lethalIffInterrogationTick(double dt);
89 
90  virtual void sendLethalInterrogation(const DtGlobalObjectDesignator& tg);
91  virtual void sendLethalInterrogation();
93  virtual void processReplyInteraction(DtReplyInteraction* inter);
94 
95  // mode specific interrogation
96  virtual void sendMode5Interrogation();
97  virtual void sendMode5Interrogation(const DtGlobalObjectDesignator& tg);
98 //#endif
99 
100 public:
101 
102  static void setLethalDetonationRange( double range );
103  static void setMunitionFlightTime( DtTime time );
104 
105 protected:
106 
107  virtual void moveArtParts( DtTime dt );
108 
109  static void emitterSystemUpdateCallback(DtReflectedEmitterSystem* obj, void* usr );
110  static void emitterSystemAdditionCallback(DtReflectedEmitterSystem* obj, void* usr );
111  static void emitterSystemRemovalCallback(DtReflectedEmitterSystem* obj, void* usr );
112  static bool emitterSystemDiscoveryCondition(DtReflectedObject* refObj, void* usr);
113 
118 
119 protected:
120 
121  static void theDetonationCb( DtDetonationInteraction*, void* );
122 
124  static void theIffReplyCb(DtReplyInteraction* inter, void* vehicle);
125  static void iffAddedCb(DtReflectedIff* obj, void* userData);
126  static void iffRemovedCb(DtReflectedIff* obj, void* userData);
127 
128  static void printIff(DtReflectedIff* obj, void* userData);
129 
130 protected:
131 
140 
145 
147  float mySpeed;
149  float myTurnRate;
151  float myRoll;
153 
159 
160  float myTurretAz;
162  float myGunElev;
164 
169 
174 
175 //#if DtHLA
178 //#endif
179 
180 protected:
181 
184 
185 };
DtVector32 myAccel
in topographic (N, E, down) coordinates
Definition: f18/vehicleSim.h:157
DtEntityStateRepository * myESRInterrogator
Definition: f18/vehicleSim.h:136
static void emitterSystemAdditionCallback(DtReflectedEmitterSystem *obj, void *usr)
virtual void emissionsTick(double dt)
static void theLethalInterrogationCb(DtInterrogationInteraction *, void *)
Instances of DtIffPublisher are used to take care of the details associated with publishing the state...
Definition: iffPublisherDIS.h:41
Instances of DtReflectedIff represent Iff object simulated by remote applications.
Definition: reflectedIffDIS.h:34
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnDIS.h:62
virtual void processDetonation(DtDetonationInteraction *inter)
Reaction to detonations.
float myTurretAzRate
Definition: f18/vehicleSim.h:161
virtual void processLethalInterrogation(DtInterrogationInteraction *inter)
DtTime myDetonateTime
Definition: f18/vehicleSim.h:166
bool myIffSystemEnabled
Definition: f18/vehicleSim.h:172
DtEmitterSystemPublisher * mySysPub
Definition: f18/vehicleSim.h:134
DtEntityStateRepository * myESR
Definition: f18/vehicleSim.h:135
virtual void simTick(DtTime simTime)
Call once per frame to simulate, and make necessary VR-Link calls.
Part of the F18 example.
Definition: f18/vehicleSim.h:31
DtDetonationPdu is used to represent the impact or detonation of a munition.
Definition: detonationPdu.h:42
DtVector myPos
topographic Euler angles
Definition: f18/vehicleSim.h:155
Instances of DtTopoView are used to create a Topographic coordinate view of the geocentric coordinate...
Definition: topoView.h:20
bool myLethalIffInterrogationEnabled
Definition: f18/vehicleSim.h:173
static bool emitterSystemDiscoveryCondition(DtReflectedObject *refObj, void *usr)
This file provides protocol independence for Remote Entity Lists.
static void emitterSystemUpdateCallback(DtReflectedEmitterSystem *obj, void *usr)
float mySpeed
Definition: f18/vehicleSim.h:147
bool myAutoRoll
Definition: f18/vehicleSim.h:152
Contains the DtInterrogationInteraction class declaration.
static void printIff(DtReflectedIff *obj, void *userData)
virtual void sendLethalInterrogation()
virtual void moveArtParts()
bool myHaveArtParts
Definition: f18/vehicleSim.h:170
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:137
DtReplyInteraction * myReplyInteraction
Definition: f18/vehicleSim.h:177
DtEmitterBeamRepository * myBeam
Definition: f18/vehicleSim.h:142
Contains the DtReplyInteraction class declaration.
static void iffAddedCb(DtReflectedIff *obj, void *userData)
virtual void toggleLethalIffInterrogation()
IFF Lethal Interrogation (IFFEmission.Interrogation)
Instances of DtIffAtcNavaidsPdu are used to send information about simulated radio transponders and i...
Definition: iffAtcNavaidsPdu.h:74
DtTaitBryan myEuler
Definition: f18/vehicleSim.h:154
virtual void setTurnRadius(double radius)
static void theIffReplyCb(DtReplyInteraction *inter, void *vehicle)
virtual bool isDestroyed()
bool myEmissionsEnabled
Definition: f18/vehicleSim.h:171
static void emitterSystemRemovalCallback(DtReflectedEmitterSystem *obj, void *usr)
float myTurnRate
Definition: f18/vehicleSim.h:149
Instances of this class provide a protocol independent interface to a list of reflected emitters in a...
Definition: reflectedEmitterSystemListDIS.h:28
virtual void disableEmissions()
float myTurretAz
in body coordinates
Definition: f18/vehicleSim.h:160
Instances of DtEntityPublisher are used for local or source simulations of entities, (i.e.
Definition: entityPublisherDIS.h:33
virtual void toggleEmissions()
Emissions (radar)
Instances of DtEntityStateRepository are used to maintain attributes and state of entity objects in a...
Definition: entityStateRepository.h:41
DtIffPublisher * myIffPubInterrogator
Definition: f18/vehicleSim.h:139
Definition: vlVector.h:224
static void iffRemovedCb(DtReflectedIff *obj, void *userData)
virtual void enableEmissions()
This file provides protocol independence for Fire Interactions.
Instances of DtReflectedObject are used to represent a simulation entity reflected across a network (...
Definition: reflectedObjectDIS.h:34
DtFireInteraction * myFire
Definition: f18/vehicleSim.h:165
virtual void toggleIffSystem()
IFF Embedded System.
bool myIsDestroyed
Definition: f18/vehicleSim.h:168
virtual void reactToDamage()
static void theDetonationCb(DtDetonationInteraction *, void *)
DtReflectedEntityList * myRel
Definition: f18/vehicleSim.h:141
Definition: vlVector.h:162
DtReflectedIffList * myRefIffList
Definition: f18/vehicleSim.h:144
class DtEmitterBeamRepository:
Definition: emitterBeamRepository.h:42
virtual void iffSystemTick(double dt)
DtVector32 myRotRate
in topographic (N, E, down) coordinates
Definition: f18/vehicleSim.h:158
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 this class provide a protocol independent interface to a list of reflected entities in a...
Definition: reflectedEntityListDIS.h:31
virtual void lethalIffInterrogationTick(double dt)
static double theLethalDetonationRange
Definition: f18/vehicleSim.h:182
virtual void sendMode5Interrogation()
float myTurnRadius
Definition: f18/vehicleSim.h:148
DtInterrogationInteraction * myInterrogationInteraction
Definition: f18/vehicleSim.h:176
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
This file provides protocol to independence DtExerciseConn.
DtExerciseConn * myExConn
Definition: f18/vehicleSim.h:132
This class contains the declaration of DtTopoView.
DtTime myLastTickTime
Definition: f18/vehicleSim.h:146
This file provides protocol independence for DtIffPublisher.
Instances of DtFireInteraction are used to represent the firing of a weapon.
Definition: firePdu.h:34
DtReflectedEmitterSystemList * myRefEmitList
Definition: f18/vehicleSim.h:143
DtVector32 myVel
in topographic (N, E, down) coordinates
Definition: f18/vehicleSim.h:156
virtual void processReplyInteraction(DtReplyInteraction *inter)
float myGunElev
Definition: f18/vehicleSim.h:162
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.
This file provides protocol independence to DtReflectedIffList.
Instances of this class provide a protocol independent interface to a list of reflected emitters in a...
Definition: reflectedIffListDIS.h:28
Instances of DtEmitterSystemPublisher are used to take care of the details associated with publishing...
Definition: emitterSystemPublisherDIS.h:26
virtual void switchScanData()
static void setMunitionFlightTime(DtTime time)
virtual double turnRadius() const
virtual void munitionTick()
virtual int checkDetonation()
virtual void detonateMunition()
DtIffPublisher * myIffPub
Definition: f18/vehicleSim.h:138
float myRoll
Definition: f18/vehicleSim.h:151
virtual void disableIffSystem()
float myGunElevRate
Definition: f18/vehicleSim.h:163
static DtTime theMunitionFlightTime
Definition: f18/vehicleSim.h:183
float myScalarAccel
Definition: f18/vehicleSim.h:150
DtDeadReckonTypes
Definition: disEnums.h:997
virtual void fireMunition()
virtual void enableIffSystem()
virtual void disableLethalIffInterrogation()
This file provides protocol independence for Detonation Interactions.
DtTime myTimeDestroyed
Definition: f18/vehicleSim.h:167
static void setLethalDetonationRange(double range)
DtEntityPublisher * myEntityPub
Definition: f18/vehicleSim.h:133
virtual void enableLethalIffInterrogation()
This file provides protocol independence for DtEntityPublisher.
DtEntityType is used to represent the type an entity object.
Definition: entityType.h:26
Instances of DtReflectedEmitterSystem represent EmitterSystem object simulated by remote applications...
Definition: reflectedEmitterSystemDIS.h:33
This file provides protocol independence for reflected emitter system lists.

Document ID: Generated on Wed Mar 27 02:04:30 EDT 2024 from SVN revision 264570
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)