VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
smoothUtil.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 
9 
10 #ifndef DtSmoothPos_H_
11 #define DtSmoothPos_H_
12 
13 #include <matrix/vlMath.h>
14 #include <matrix/vlDcm.h>
15 #include <matrix/vlVector.h>
16 #include <vlutil/vlTime.h>
17 #include <vlutil/vlPrint.h>
18 
21 {
22 public:
23 
26  DtSmoothPos(void *usr, DtTime smoothT,
27  const DtVector& pos, const DtVector32& vel, const DtVector32& acc);
29  DtSmoothPos(void *usr, DtTime smoothT);
30 
31  virtual ~DtSmoothPos() {}
32 
34  DtSmoothPos(const DtSmoothPos&);
35 
37  DtSmoothPos& operator=(const DtSmoothPos&);
38 
39 public:
40 
41  void input(const DtVector& pos, const DtVector32& vel, const DtVector32& acc,
42  DtTime simTime, int freeze=0);
43  void tick(DtTime simTime);
44 
45  const DtVector& position() const { return ps; }
46  const DtVector32& velocity() const { return vs; }
47 
52  virtual void setSmoothEnable(int on);
53  virtual int smoothEnable() const;
54 
57  virtual void setSmoothPeriod(DtTime t);
58  virtual DtTime smoothPeriod() const;
59 
62  virtual void reset();
63 
64 public:
65 
67  static void setDfltSmoothPeriod(DtTime t);
68  static DtTime dfltSmoothPeriod();
69 
71  static void setMasterSmoothEnable(bool onOff);
72  static bool masterSmoothEnable();
73 
74 protected:
75 
76 
77  virtual void dfltAction(DtTime simTime, void *usr,
78  DtVector32& vs, DtVector& ps) = 0;
79  void init(void *u, DtTime t);
80  void setT1data();
81 
82 protected:
83 
84  int myFrozen;
85 
90 
97 
98  DtVector ps, p0, dp, p1;
99  DtVector32 vs, v0, v1, dv;
100  DtVector32 a1, a2, ap;
101  int myEnable;
104  void *myUsr;
105 
106 protected:
107 
112 };
113 
114 
118 {
119 public:
120 
123  DtSmoothOrient(void *usr, DtTime smoothT,
124  const DtDcm & orient, const DtDirectedRotRate &drr);
126  DtSmoothOrient(void *usr, DtTime smoothT);
127 
128  virtual ~DtSmoothOrient() {}
129 
132 
134  DtSmoothOrient& operator=(const DtSmoothOrient&);
135 
136  void input(const DtDcm & orient, const DtDirectedRotRate &drr,
137  DtTime simTime, int freeze=0);
138  void tick(DtTime simTime);
139 
140  const DtDcm & orientation() const { return myOs; }
141 
146  virtual void setSmoothEnable(int on);
147  virtual int smoothEnable() const;
148 
151  virtual void setSmoothPeriod(DtTime t);
152  virtual DtTime smoothPeriod() const;
153 
156  virtual void reset();
157 
158 public:
159 
161  static void setDfltSmoothPeriod(DtTime t);
162  static DtTime dfltSmoothPeriod();
163 
165  static void setMasterSmoothEnable(bool onOff);
166  static bool masterSmoothEnable();
167 
169  static void setDfltSmoothPrecision(double t);
170  static double dfltSmoothPrecision();
171 
172 protected:
173 
174  virtual void dfltAction(DtTime simTime, void *usr, DtDcm& os) = 0;
175  void init(void *u, DtTime t);
176  void setT1data();
177 
178 protected:
179 
180  int myFrozen;
181  DtTime myT0, myT2, myLastT;
184  DtDcm myOs, myO0;
186  int myEnable;
187  void *myUsr;
188  double myPrecision;
189 
190 protected:
191 
194  static double theDfltPrecision;
195 };
196 
197 
199 {
200  return *myTau;
201 }
202 
204 {
205  return *myTau;
206 }
207 
208 #endif /* _SMOOTHUTIL_H_ */
209 
DtTime myT1
Definition: smoothUtil.h:87
const DtDcm & orientation() const
Definition: smoothUtil.h:140
void * myUsr
Definition: smoothUtil.h:104
virtual ~DtSmoothPos()
Definition: smoothUtil.h:31
int myNeedT2Data
Definition: smoothUtil.h:103
int myEnable
Definition: smoothUtil.h:101
static bool theMasterSmoothEnable
Definition: smoothUtil.h:111
DtTime * myTauInv
Definition: smoothUtil.h:96
const DtVector & position() const
Definition: smoothUtil.h:45
This file contains the declaration of DtClock and DtTime.
DtTime myT2
Definition: smoothUtil.h:88
void * myUsr
Definition: smoothUtil.h:187
static DtTime theDfltTauInv
Definition: smoothUtil.h:110
DtVector ps
Definition: smoothUtil.h:98
int myFrozen
Definition: smoothUtil.h:180
DtTime * myHtau
Definition: smoothUtil.h:95
This file declares DtDcm and several helper classes and functions.
Functions in vlPrint.h provide an error and print facility for vrlink.
static bool theMasterSmoothEnable
Definition: smoothUtil.h:193
DtDcm myOs
Definition: smoothUtil.h:184
DtTime * myTau
Definition: smoothUtil.h:182
Rotation rate given by single rate and axis of rotation.
Definition: directedRotRate.h:23
int myEnable
Definition: smoothUtil.h:186
This file declares DtVector and DtVector32.
This file defines math constants and methods which may be useful in simulations.
DtTime myT0
Definition: smoothUtil.h:86
Definition: smoothUtil.h:117
DtTime myT2
Definition: smoothUtil.h:181
Definition: vlVector.h:224
Definition: smoothUtil.h:20
DtTime myLastT
Definition: smoothUtil.h:89
double myPrecision
Definition: smoothUtil.h:188
DtVector myWs
Definition: smoothUtil.h:185
static DtTime theDfltTau
Definition: smoothUtil.h:108
virtual ~DtSmoothOrient()
Definition: smoothUtil.h:128
Definition: vlVector.h:162
DtVector32 vs
Definition: smoothUtil.h:99
DtTime myLocalTau
Definition: smoothUtil.h:91
DtTime myLocalTauInv
Definition: smoothUtil.h:93
int myNeedT1Data
Definition: smoothUtil.h:102
#define DT_DLL_VLPROTIND
Definition: vlMachineTypes.h:110
virtual DtTime smoothPeriod() const
Definition: smoothUtil.h:203
DtTime * myTau
Definition: smoothUtil.h:94
DtDcms are used to represent orientation for an object.
Definition: vlDcm.h:39
DtTime myLocalTau
Definition: smoothUtil.h:183
virtual DtTime smoothPeriod() const
Definition: smoothUtil.h:198
static DtTime theDfltHtau
Definition: smoothUtil.h:109
int myFrozen
Definition: smoothUtil.h:84
const DtVector32 & velocity() const
Definition: smoothUtil.h:46
MANAGEDINTERFACE_DLL void tick(double maxTime)
Tick ManagedInterface.
DtVector32 ap
Definition: smoothUtil.h:100
static DtTime theDfltTau
Definition: smoothUtil.h:192
static double theDfltPrecision
Definition: smoothUtil.h:194
DtTime myLocalHtau
Definition: smoothUtil.h:92

Document ID: Generated on Tue Feb 2 21:02:17 EST 2021 from SVN revision 223668
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)