MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lgrDisEntity.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #ifndef lgrDisEntity_H_
11 #define lgrDisEntity_H_
12 
13 #if DtDIS
14 
15 #include "lgrPublisherInterface.h"
16 #include <lgrSim/lgrSim.h>
17 #include <vl/entityStatePdu.h>
18 
19 #include <lgrUtil/absoluteTime.h>
21 
22 class DtClock;
23 class DtDIGuyCustomPdu;
25 class DtDeadReckoner;
26 
27 namespace MAKLogger
28 {
29 
30  class DtLgrDisSimulationManager;
31  class DtLgrArtPartList;
32 
35  class DT_DLL_LGRSIM DtLgrDisEntityPublisher : public DtLgrPublisherInterface
36  {
37  public:
39  DT_VIRTUAL_CTR(DtLgrDisEntityPublisher,(const DtEntityStatePdu& pdu,
40  DtLgrDisSimulationManager* simManager))
41 
42 
43  virtual ~DtLgrDisEntityPublisher();
44  protected:
46  DtLgrDisEntityPublisher( const DtLgrDisEntityPublisher& src );
48  DtLgrDisEntityPublisher& operator=( const DtLgrDisEntityPublisher& src );
49 
50  public:
53  virtual void update( const DtPdu& pdu,double scaling, bool isStatic, bool sendFlag );
54 
58  virtual void sendUpdateAtScaleChangePoint(double oldScale, double newScale,
59  bool wasStatic, bool isStatic);
60 
62  virtual bool timeoutNow();
63 
66  virtual void tick(double scale, bool isStatic);
67 
69  virtual const DtEntityIdentifier& id();
70 
71  virtual void processDIGuyPdu(const DtDIGuyCustomPdu& pdu);
72 
73  protected:
74 
75  virtual void doDDR(DtAbsoluteTime tm,double timescale);
76 
81  virtual bool sendNow();
82 
85  virtual void sendScaled( double timescale, bool isStatic, bool doSend );
86 
88  virtual void sendCurrent( double timescale, bool isStatic);
89 
91  virtual void sendPdu();
92 
96  virtual bool getArtPartParamsFromPdu();
97 
101  virtual bool setArtPartParamsToPdu();
102 
105  virtual bool scaleArtPartRateParams( double ts );
106 
109  virtual bool drArtPartParamsToScaleChangePoint( DtTime dt );
110 
113  virtual void scaleVecs( double ts );
114 
116  virtual void scaleVelocity( double ts );
117 
118  protected:
119  DtEntityStatePdu lastRead;
120  DtEntityStatePdu toSend;
121 
122  DtAbsoluteTime myLastScaledTime;
123  DtAbsoluteTime myLastRealTime;
124 
125  DtLgrDisSimulationManager* mySimManager;
126  DtClock* myClock;
127 
128  DtTaitBryan myExtrapEuler;
129  DtVector myExtrapPos;
130  DtVector32 myExtrapVel;
131  DtVector32 myScaledVel;
132  DtVector32 myScaledAcc;
133  DtVector32 myScaledRotVel;
134 
135  DtLgrArtPartList* myArtPartRecvList;
136  DtLgrArtPartList* myArtPartSendList;
137  int myNumAttParts;
138  char* myPartBuffer;
139  int myPartBufferSize;
140  double myLastTimeScale;
141 
142  // Frozen state saved when scale goes to 0 (i.e. paused)
143  // and is restored when unpaused.
144  bool myFrozenBeforePause;
145 
146  DtDeadReckoner* myOldDeadReckoner;
147  DtDeadReckonTypes myOldDRType;
148  bool myDRTypeChanged;
149 
151  };
152 }
153 
154 #endif
155 #endif

Document ID: Generated on Thu Apr 7 20:50:59 EDT 2016 from SVN revision 163818
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)