MAK Data Logger API Documentation for DIS
 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-2016 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #if DtDIS
13 
14 #include "lgrPublisherInterface.h"
15 #include <lgrSim/lgrSim.h>
16 #include <vl/entityStatePdu.h>
17 
18 #include <lgrUtil/absoluteTime.h>
20 
21 class DtClock;
22 class DtDIGuyCustomPdu;
23 class DtEntityStateRepository;
24 class DtDeadReckoner;
25 
26 namespace MAKLogger
27 {
28 
29  class DtLgrDisSimulationManager;
30  class DtLgrArtPartList;
31 
35  {
36  public:
38  DT_VIRTUAL_CTR(DtLgrDisEntityPublisher,(const DtEntityStatePdu& pdu,
39  DtLgrDisSimulationManager& simManager))
40 
41 
42  virtual ~DtLgrDisEntityPublisher();
43  protected:
47  DtLgrDisEntityPublisher& operator=( const DtLgrDisEntityPublisher& src );
48 
49  public:
52  virtual void update( const DtPdu& pdu, const DtAbsoluteTime& updateTime, bool isTimeFromPast,
53  bool isStateUpdate, 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:
75  virtual const DtStateMsg& lastState() const;
76 
77  virtual void doDDR(DtTime tm, double timescale);
78 
83  virtual bool sendNow();
84 
87  virtual void sendScaled( double timescale, bool isStatic, bool doSend );
88 
90  virtual void sendCurrent( double timescale, bool isStatic);
91 
93  virtual void sendPdu();
94 
98  virtual bool getArtPartParamsFromPdu();
99 
103  virtual bool setArtPartParamsToPdu();
104 
107  virtual bool scaleArtPartRateParams( double ts );
108 
111  virtual bool drArtPartParamsToScaleChangePoint( DtTime dt );
112 
115  virtual void scaleVecs( double ts );
116 
118  virtual void scaleVelocity( double ts );
119 
120  protected:
121  DtEntityStatePdu lastRead;
122  DtEntityStatePdu toSend;
123 
125 
126  DtClock* myClock;
127 
128  DtTaitBryan myExtrapEuler;
129  DtVector myExtrapPos;
130  DtVector32 myExtrapVel;
131  DtVector32 myScaledVel;
132  DtVector32 myScaledAcc;
133  DtVector32 myScaledRotVel;
134 
141 
142  // Frozen state saved when scale goes to 0 (i.e. paused)
143  // and is restored when unpaused.
145 
146  DtDeadReckoner* myOldDeadReckoner;
147  DtDeadReckonTypes myOldDRType;
149 
150  DtEntityStateRepository* myEsr;
151  };
152 }
153 
154 #endif

Document ID: Generated on Thu Jul 23 15:05:27 EDT 2020 from SVN revision 215371
Copyright © 2020 MAK Technologies. All Rights Reserved (www.mak.com)