VR-Link API Documentation for HLA 1.3
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
vlpi
deadReckoner.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 DtDeadReckoner_H_
11
#define DtDeadReckoner_H_
12
13
#include "
approximator.h
"
14
#include <
matrix/vlTaitBryan.h
>
15
#include <
matrix/vlDcm.h
>
16
#include <
matrix/vlVector.h
>
17
#include "
disEnums.h
"
18
30
class
DT_DLL_VLPROTIND
DtDeadReckoner
:
public
DtApproximator
31
{
32
public
:
33
35
DtDeadReckoner
();
36
38
virtual
~
DtDeadReckoner
();
39
41
DtDeadReckoner
(
const
DtDeadReckoner
& orig);
42
44
DtDeadReckoner
&
operator=
(
const
DtDeadReckoner
& orig);
45
48
virtual
DtApproximator
*
clone
()
const
;
49
51
virtual
void
setLocation
(
const
DtVector
& loc,
DtTime
curTime);
52
55
virtual
const
DtVector
&
approxLocation
(
DtTime
curTime)
const
;
56
58
virtual
const
DtVector
& deadReckonedLocation(
DtTime
curTime)
const
;
59
61
virtual
void
setVelocity
(
const
DtVector
& vel,
DtTime
curTime);
62
65
virtual
const
DtVector
&
approxVelocity
(
DtTime
curTime)
const
;
66
68
virtual
const
DtVector
& deadReckonedVelocity(
DtTime
curTime)
const
;
69
71
virtual
void
setOrientation
(
const
DtTaitBryan
& ori,
DtTime
curTime);
72
75
virtual
const
DtTaitBryan
&
approxEuler
(
DtTime
curTime)
const
;
76
78
virtual
const
DtTaitBryan
& deadReckonedEuler(
DtTime
curTime)
const
;
79
81
virtual
void
setAcceleration
(
const
DtVector
& acc,
DtTime
curTime);
82
virtual
const
DtVector
&
acceleration
(
DtTime
curTime)
const
;
83
85
virtual
void
setRotationalVelocity
(
const
DtVector
& vel,
DtTime
curTime);
86
virtual
const
DtVector
&
rotationalVelocity
(
DtTime
curTime)
const
;
87
90
virtual
const
DtDcm
&
approxBodyToGeoc
(
DtTime
curTime)
const
;
91
93
virtual
const
DtDcm
& deadReckonedBodyToGeoc(
DtTime
curTime)
const
;
94
97
virtual
void
setAlgorithm(
DtDeadReckonTypes
alg);
98
virtual
DtDeadReckonTypes
algorithm()
const
;
99
104
virtual
void
deadReckonPosition(
DtTime
dt,
105
const
DtVector
& oldPos,
const
DtVector
& oldVel,
106
const
DtVector
& oldAccel,
107
DtVector
& newVel,
DtVector
& newPos);
108
113
virtual
void
deadReckonOrientation(
DtTime
dt,
114
const
DtDcm
& old_b2w,
115
const
DtDirectedRotRate
& drr,
116
DtDcm
& new_b2w);
117
118
public
:
119
121
static
void
deadReckonPosition(
122
DtTime
dt,
DtDeadReckonTypes
algorithm,
123
const
DtVector
& oldPos,
const
DtVector
& oldVel,
124
const
DtVector
& oldAccel,
125
DtVector
& newVel,
DtVector
& newPos);
126
128
static
void
deadReckonOrientation(
129
DtTime
dt,
DtDeadReckonTypes
algorithm,
130
const
DtDcm
& old_b2w,
131
const
DtDirectedRotRate
& drr,
132
DtDcm
& new_b2w);
133
134
protected
:
135
139
virtual
void
deadReckonLoc(
DtTime
curTime)
const
;
140
144
virtual
void
deadReckonBodyToGeoc(
DtTime
curTime)
const
;
145
149
virtual
void
deadReckonEuler(
DtTime
curTime)
const
;
150
153
virtual
int
isRotational();
154
162
DtDeadReckoner
*
self
()
const
;
163
164
protected
:
165
168
static
int
isRotational(
DtDeadReckonTypes
algorithm);
169
170
protected
:
171
172
DtVector
myLocAtTimeOfValidity
;
173
DtVector
myVelAtTimeOfValidity
;
174
DtTime
mySimTimePosDataValid
;
175
DtDcm
myBodyToGeocAtTimeOfValidity
;
176
DtTime
mySimTimeOrientDataValid
;
177
178
DtVector
myDRLoc
;
179
DtVector
myDRVel
;
180
DtTime
myDRPosTime
;
181
DtDcm
myDRBodyToGeoc
;
182
DtTime
myDRBodyToGeocTime
;
183
DtTaitBryan
myDREuler
;
184
DtTime
myDREulerTime
;
185
DtDirectedRotRate
myDirectedRotRate
;
186
DtDeadReckonTypes
myAlgorithm
;
187
DtVector
myAccel
;
188
DtBodyRates
myRotVel
;
189
};
190
191
inline
DtDeadReckoner
*
DtDeadReckoner::self
()
const
192
{
193
return
(
DtDeadReckoner
*)
this
;
194
}
195
196
inline
const
DtVector
&
DtDeadReckoner::deadReckonedLocation
(
DtTime
curTime)
const
197
{
198
deadReckonLoc
(curTime);
199
return
myDRLoc
;
200
}
201
202
inline
const
DtVector
&
DtDeadReckoner::approxLocation
(
DtTime
curTime)
const
203
{
204
return
deadReckonedLocation
(curTime);
205
}
206
207
inline
const
DtVector
&
DtDeadReckoner::deadReckonedVelocity
(
DtTime
curTime)
const
208
{
209
deadReckonLoc
(curTime);
210
return
myDRVel
;
211
}
212
213
inline
const
DtVector
&
DtDeadReckoner::approxVelocity
(
DtTime
curTime)
const
214
{
215
return
deadReckonedVelocity
(curTime);
216
}
217
218
inline
const
DtDcm
&
DtDeadReckoner::deadReckonedBodyToGeoc
(
DtTime
curTime)
const
219
{
220
deadReckonBodyToGeoc
(curTime);
221
return
myDRBodyToGeoc
;
222
}
223
224
inline
const
DtDcm
&
DtDeadReckoner::approxBodyToGeoc
(
DtTime
curTime)
const
225
{
226
return
deadReckonedBodyToGeoc
(curTime);
227
}
228
229
inline
const
DtTaitBryan
&
DtDeadReckoner::deadReckonedEuler
(
230
DtTime
curTime)
const
231
{
232
deadReckonEuler
(curTime);
233
return
myDREuler
;
234
}
235
236
inline
const
DtTaitBryan
&
DtDeadReckoner::approxEuler
(
DtTime
curTime)
const
237
{
238
return
deadReckonedEuler
(curTime);
239
}
240
241
inline
void
DtDeadReckoner::setAlgorithm
(
DtDeadReckonTypes
alg)
242
{
243
myAlgorithm
= alg;
244
}
245
246
inline
DtDeadReckonTypes
DtDeadReckoner::algorithm
()
const
247
{
248
return
myAlgorithm
;
249
}
250
251
inline
const
DtVector
&
DtDeadReckoner::acceleration
(
DtTime
curTime)
const
252
{
253
return
myAccel
;
254
}
255
256
inline
const
DtVector
&
DtDeadReckoner::rotationalVelocity
(
DtTime
curTime)
const
257
{
258
return
myRotVel
;
259
}
260
261
#endif
262
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
)