VR-Link API Documentation for DIS
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
trigonometricSmoother.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
*******************************************************************************/
5
8
9
#pragma once
10
11
#include "
deadReckoner.h
"
12
25
class
DT_DLL_VLPROTIND
DtTrigonometricSmoother
:
public
DtDeadReckoner
26
{
27
public
:
29
DtTrigonometricSmoother
();
31
virtual
~
DtTrigonometricSmoother
();
33
DtTrigonometricSmoother
(
const
DtTrigonometricSmoother
& src );
35
DtTrigonometricSmoother
&
operator=
(
const
DtTrigonometricSmoother
& src );
36
38
bool
operator ==
(
const
DtTrigonometricSmoother
& orig )
const
;
39
42
virtual
DtApproximator
*
clone
()
const
;
43
44
protected
:
45
virtual
void
resetPosSmoother(
DtTime
t );
46
virtual
void
resetOriSmoother(
DtTime
t );
47
48
public
:
50
virtual
void
setLocation
(
const
DtVector
& loc,
DtTime
t );
52
virtual
const
DtVector
&
approxLocation
(
DtTime
t )
const
;
53
55
virtual
void
setVelocity
(
const
DtVector32
& vel,
DtTime
t );
57
virtual
const
DtVector32
&
approxVelocity
(
DtTime
t )
const
;
58
61
const
DtVector32
& approxUnsmoothedVelocity(
DtTime
curTime )
const
;
62
64
virtual
void
setOrientation
(
const
DtTaitBryan
& ori,
DtTime
t );
66
virtual
const
DtTaitBryan
&
approxEuler
(
DtTime
t )
const
;
67
69
virtual
void
setAcceleration
(
const
DtVector32
& acc,
DtTime
t );
70
virtual
const
DtVector32
&
acceleration
(
DtTime
t )
const
;
71
73
virtual
void
setRotationalVelocity
(
const
DtVector32
& vel,
DtTime
t );
74
virtual
const
DtVector32
&
rotationalVelocity
(
DtTime
t )
const
;
75
77
virtual
const
DtDcm
&
approxBodyToGeoc
(
DtTime
t )
const
;
78
82
virtual
void
setSmoothPeriod(
DtTime
t );
83
virtual
DtTime
smoothPeriod()
const
;
84
88
virtual
void
setOriSmoothPeriod(
DtTime
t );
89
virtual
DtTime
oriSmoothPeriod()
const
;
90
91
virtual
void
setSmoothEnable(
bool
onOff);
92
virtual
bool
smoothEnable()
const
;
93
94
protected
:
95
virtual
const
DtVector
& smoothPosition(
DtTime
t );
96
virtual
const
DtVector32
& smoothVelocity(
DtTime
t );
97
virtual
const
DtDcm
& smoothBodyToGeoc(
DtTime
t );
98
virtual
void
initSmootherParams();
99
virtual
void
initSmoothOriParams();
100
108
inline
DtTrigonometricSmoother
*
self
()
const
;
109
110
public
:
112
static
void
setDfltSmoothPeriod(
DtTime
smoothPeriod);
113
static
DtTime
dfltSmoothPeriod();
114
117
static
void
setMasterSmoothEnable(
bool
onOff);
118
static
bool
masterSmoothEnable();
119
120
121
static
void
rotAngleAndAxisFromRotMatrix(
122
DtVector
& n,
double
& phi,
const
DtDcm
& m );
123
static
void
rotMatrixFromRotRatesAndTime(
124
DtDcm
& m,
DtDcm
& o,
DtVector
& n,
double
& w,
const
DtVector32
& r,
double
t );
125
126
protected
:
127
static
double
theTimeTolerance
;
128
static
bool
theMasterSmoothEnable
;
129
static
DtTime
theDfltSmoothPeriod
;
130
131
protected
:
132
DtVector
myLastDrPos
;
133
DtVector32
myLastDrVel
;
134
DtVector
mySmoothPos
;
135
DtVector32
mySmoothVel
;
136
DtVector
myX1
;
137
DtVector
myV1
;
138
DtVector
myA1
;
139
DtVector
myA2
;
140
DtTime
myTau
;
141
DtTime
myTau2
;
142
DtTime
myTau2Inv
;
143
DtTime
myTauSq4
;
144
DtTime
myTauSq4Inv
;
145
DtTime
myLastSetTime
;
146
DtTime
myPostSmoothTime
;
147
DtTime
myHalfSmoothTime
;
148
DtTime
myOriTau
;
149
DtTime
myLastSetOriTime
;
150
DtTime
myPostSmoothOriTime
;
151
DtTime
myLastSmoothOriTime
;
152
DtTime
myLastSmoothTbTime
;
153
double
mySmoothRotRate
;
154
DtDcm
myLastDrOri
;
155
DtDcm
mySmoothOri
;
156
DtDcm
mySmoothOmegaMx
;
157
DtVector
mySmoothRotAxis
;
158
DtTaitBryan
mySmoothTb
;
159
bool
myIsDirty
;
160
bool
myOriIsDirty
;
161
bool
myTbIsDirty
;
162
bool
mySmoothEnable
;
163
};
164
165
166
inline
DtTrigonometricSmoother
*
DtTrigonometricSmoother::self
()
const
167
{
168
return
(
DtTrigonometricSmoother
*)
this
;
169
}
170
171
173
typedef
DtTrigonometricSmoother
DtSmoother
;
174
Document ID: Generated on Thu Feb 22 04:26:36 EST 2018 from SVN revision 186468
Copyright © 2005-2016 VT MÄK. All Rights Reserved (
www.mak.com
)