VR-Link API Documentation for HLA 1516
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
vlpi
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
19
22
class
DT_DLL_VLPROTIND
DtSmoothPos
23
{
24
public
:
25
28
DtSmoothPos
(
void
*usr,
DtTime
smoothT,
29
const
DtVector
& pos,
const
DtVector
& vel,
const
DtVector
& acc);
31
DtSmoothPos
(
void
*usr,
DtTime
smoothT);
32
33
virtual
~DtSmoothPos
() {}
34
35
private
:
36
38
DtSmoothPos
(
const
DtSmoothPos
&);
39
41
DtSmoothPos
& operator=(
const
DtSmoothPos
&);
42
43
public
:
44
45
void
input(
const
DtVector
& pos,
const
DtVector
& vel,
const
DtVector
& acc,
46
DtTime
simTime,
int
freeze=0);
47
void
tick(
DtTime
simTime);
48
49
const
DtVector
&
position
()
const
{
return
ps; }
50
const
DtVector
&
velocity
()
const
{
return
vs; }
51
56
virtual
void
setSmoothEnable(
int
on);
57
virtual
int
smoothEnable()
const
;
58
61
virtual
void
setSmoothPeriod(
DtTime
t);
62
virtual
DtTime
smoothPeriod()
const
;
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
DtVector
& vs,
DtVector
& ps) = 0;
79
void
init(
void
*u,
DtTime
t);
80
void
setT1data();
81
82
protected
:
83
84
int
myFrozen
;
85
86
DtTime
myT0
;
87
DtTime
myT1
;
88
DtTime
myT2
;
89
DtTime
myLastT
;
90
91
DtTime
myLocalTau
;
92
DtTime
myLocalHtau
;
93
DtTime
myLocalTauInv
;
94
DtTime
*
myTau
;
95
DtTime
*
myHtau
;
96
DtTime
*
myTauInv
;
97
98
DtVector
ps,
vs
, p0, v0, dp, dv, p1, v1, a1, a2, ap;
99
int
myEnable
;
100
int
myNeedT1Data
;
101
int
myNeedT2Data
;
102
void
*
myUsr
;
103
104
protected
:
105
106
static
DtTime
theDfltTau
;
107
static
DtTime
theDfltHtau
;
108
static
DtTime
theDfltTauInv
;
109
static
bool
theMasterSmoothEnable
;
110
};
111
112
115
class
DT_DLL_VLPROTIND
DtSmoothOrient
116
{
117
public
:
118
121
DtSmoothOrient
(
void
*usr,
DtTime
smoothT,
122
const
DtDcm
& orient,
const
DtDirectedRotRate
&drr);
124
DtSmoothOrient
(
void
*usr,
DtTime
smoothT);
125
126
virtual
~DtSmoothOrient
() {}
127
128
void
input(
const
DtDcm
& orient,
const
DtDirectedRotRate
&drr,
129
DtTime
simTime,
int
freeze=0);
130
void
tick(
DtTime
simTime);
131
132
const
DtDcm
&
orientation
()
const
{
return
myOs; }
133
138
virtual
void
setSmoothEnable(
int
on);
139
virtual
int
smoothEnable()
const
;
140
143
virtual
void
setSmoothPeriod(
DtTime
t);
144
virtual
DtTime
smoothPeriod()
const
;
145
146
public
:
147
149
static
void
setDfltSmoothPeriod(
DtTime
t);
150
static
DtTime
dfltSmoothPeriod();
151
153
static
void
setMasterSmoothEnable(
bool
onOff);
154
static
bool
masterSmoothEnable();
155
156
protected
:
157
158
virtual
void
dfltAction(
DtTime
simTime,
void
*usr,
DtDcm
& os) = 0;
159
void
init(
void
*u,
DtTime
t);
160
void
setT1data();
161
162
protected
:
163
164
int
myFrozen
;
165
DtTime
myT0,
myT2
, myLastT;
166
DtTime
*
myTau
;
167
DtTime
myLocalTau
;
168
DtDcm
myOs
, myO0;
169
DtVector
myWs
;
170
int
myEnable
;
171
void
*
myUsr
;
172
173
protected
:
174
175
static
DtTime
theDfltTau
;
176
static
bool
theMasterSmoothEnable
;
177
};
178
179
180
inline
DtTime
DtSmoothPos::smoothPeriod
()
const
181
{
182
return
*
myTau
;
183
}
184
185
inline
DtTime
DtSmoothOrient::smoothPeriod
()
const
186
{
187
return
*
myTau
;
188
}
189
190
#endif
/* _SMOOTHUTIL_H_ */
191
Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)