VR-Link API Documentation for HLA Evolved
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
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
66
virtual
void
reset();
67
68
public
:
69
71
static
void
setDfltSmoothPeriod(
DtTime
t);
72
static
DtTime
dfltSmoothPeriod();
73
75
static
void
setMasterSmoothEnable(
bool
onOff);
76
static
bool
masterSmoothEnable();
77
78
protected
:
79
80
81
virtual
void
dfltAction(
DtTime
simTime,
void
*usr,
82
DtVector
& vs,
DtVector
& ps) = 0;
83
void
init(
void
*u,
DtTime
t);
84
void
setT1data();
85
86
protected
:
87
88
int
myFrozen
;
89
90
DtTime
myT0
;
91
DtTime
myT1
;
92
DtTime
myT2
;
93
DtTime
myLastT
;
94
95
DtTime
myLocalTau
;
96
DtTime
myLocalHtau
;
97
DtTime
myLocalTauInv
;
98
DtTime
*
myTau
;
99
DtTime
*
myHtau
;
100
DtTime
*
myTauInv
;
101
102
DtVector
ps,
vs
, p0, v0, dp, dv, p1, v1, a1, a2, ap;
103
int
myEnable
;
104
int
myNeedT1Data
;
105
int
myNeedT2Data
;
106
void
*
myUsr
;
107
108
protected
:
109
110
static
DtTime
theDfltTau
;
111
static
DtTime
theDfltHtau
;
112
static
DtTime
theDfltTauInv
;
113
static
bool
theMasterSmoothEnable
;
114
};
115
116
119
class
DT_DLL_VLPROTIND
DtSmoothOrient
120
{
121
public
:
122
125
DtSmoothOrient
(
void
*usr,
DtTime
smoothT,
126
const
DtDcm
& orient,
const
DtDirectedRotRate
&drr);
128
DtSmoothOrient
(
void
*usr,
DtTime
smoothT);
129
130
virtual
~DtSmoothOrient
() {}
131
132
void
input(
const
DtDcm
& orient,
const
DtDirectedRotRate
&drr,
133
DtTime
simTime,
int
freeze=0);
134
void
tick
(
DtTime
simTime);
135
136
const
DtDcm
&
orientation
()
const
{
return
myOs; }
137
142
virtual
void
setSmoothEnable(
int
on);
143
virtual
int
smoothEnable()
const
;
144
147
virtual
void
setSmoothPeriod(
DtTime
t);
148
virtual
DtTime
smoothPeriod()
const
;
149
152
virtual
void
reset();
153
154
public
:
155
157
static
void
setDfltSmoothPeriod(
DtTime
t);
158
static
DtTime
dfltSmoothPeriod();
159
161
static
void
setMasterSmoothEnable(
bool
onOff);
162
static
bool
masterSmoothEnable();
163
164
protected
:
165
166
virtual
void
dfltAction(
DtTime
simTime,
void
*usr,
DtDcm
& os) = 0;
167
void
init(
void
*u,
DtTime
t);
168
void
setT1data();
169
170
protected
:
171
172
int
myFrozen
;
173
DtTime
myT0,
myT2
, myLastT;
174
DtTime
*
myTau
;
175
DtTime
myLocalTau
;
176
DtDcm
myOs
, myO0;
177
DtVector
myWs
;
178
int
myEnable
;
179
void
*
myUsr
;
180
181
protected
:
182
183
static
DtTime
theDfltTau
;
184
static
bool
theMasterSmoothEnable
;
185
};
186
187
188
inline
DtTime
DtSmoothPos::smoothPeriod
()
const
189
{
190
return
*
myTau
;
191
}
192
193
inline
DtTime
DtSmoothOrient::smoothPeriod
()
const
194
{
195
return
*
myTau
;
196
}
197
198
#endif
/* _SMOOTHUTIL_H_ */
199
Document ID: Generated on Wed Jan 7 13:31:29 EST 2015 from SVN revision 149162
Copyright © 2005-2014 VT MÄK. All Rights Reserved (
www.mak.com
)