|
28 | 28 | * the get function, which returns an array of 6 doubles 3 x location and |
29 | 29 | * 3 x orientation. With these 6 parameters the entity can redraw itself in an |
30 | 30 | * updated location and orientation based on its projected path. |
31 | | - * <p> |
32 | | - * <hr> |
33 | | - * <p> |
34 | | - * <center><h2>Key notes form the IEEE DIS standard about DR</h2></center> |
35 | | - * <p> |
36 | | - * <center><img src="..\..\RefsImgs\formulas.jpg"/></center> |
37 | | - * <P> |
38 | | - * DRM notation shall consist of three elements. |
39 | | - * |
40 | | - * The First element shall indicate whether the model specifies |
41 | | - * rotation as either fixed (F) or rotating (R). |
42 | | - * The second element shall specify dead reckoning rates to be held |
43 | | - * constant as either rate of position (P) or rate of velocity (V). |
44 | | - * The third element shall specify the coordinate system to be used with |
45 | | - * the dead reckoning algorithm as either world coordinates (W) or body axis |
46 | | - * coordinates (B). |
47 | | - * |
48 | | - * <P> |
49 | | - * <hr> |
50 | | - * <p> |
51 | | - * <b>5.2.1 Angle representation</b><br> |
52 | | - * Angles shall be specified as 32-bit floating point numbers expressed |
53 | | - * in radians.(page 55) |
54 | | - * <p> |
55 | | - * <b>5.2.2 Angular Velocity Vector record</b><br> |
56 | | - * The angular velocity of simulated entities shall be represented by the Angular |
57 | | - * Velocity Vector record. This record shall specify the rate at which an |
58 | | - * entity's orientation is changing. The angular velocity shall be measured |
59 | | - * in <u>radians per second</u> measured about each of the entity's own |
60 | | - * coordinate axes. The record shall consist of three fields. The first field |
61 | | - * shall represent velocity about the x-axis, the second about the y-axis, and |
62 | | - * the third about the z-axis [see 5.2.33 item a)]. The positive direction of |
63 | | - * the angular velocity is defined by the right-hand rule. The format of the |
64 | | - * Angular Velocity Vector record shall be shown as in table 5. (Page 55) |
65 | | - * <br> |
66 | | - * <center><img src="..\..\RefsImgs\angVel.jpg"/></center> |
67 | | - * <p> |
68 | | - * <b>5.2.17 Euler Angles record</b><br> |
69 | | - * Orientation of a simulated entity shall be specified by the Euler Angles |
70 | | - * record. This record shall specify three angles as described in figure 3 and |
71 | | - * 3.1.13. These angles shall be specified with respect to the entity's |
72 | | - * coordinate system. The three angles shall each be specified by a 32-bit |
73 | | - * floating point number <u>representing radians</u>. The format of the Euler |
74 | | - * Angles record shall be as shown in table 19. (page 65) |
75 | | - * <br> |
76 | | - * <center><img src="..\..\RefsImgs\Eangle.jpg"></center> |
77 | | - * <P> |
78 | | - * <b>5.2.33 Vector record</b><br> |
79 | | - * Vector values for entity coordinates, linear acceleration, and linear |
80 | | - * velocity, shall be represented using a Vector record. This record shall |
81 | | - * consist of three fields, each a 32-bit floating point number. The unit of |
82 | | - * measure represented by these fields shall depend on the information |
83 | | - * represented. The values utilizing the Vector record are as follows: |
84 | | - * <p> |
85 | | - * a) Entity Coordinate Vector. Location with respect to a particular entity |
86 | | - * shall be specified with respect to three orthogonal axes whose origin shall |
87 | | - * be the geometric center of the bounding volume of the entity excluding its |
88 | | - * articulated and attached parts (see figure 2). The x-axis extends in the |
89 | | - * positive direction out the front of the entity. The y-axis extends in the |
90 | | - * positive direction out the right side of the entity as viewed from above, |
91 | | - * facing in the direction of the positive x-axis. The z-axis extends in the |
92 | | - * positive direction out the bottom of the entity. Each vector component |
93 | | - * shall represent meters from the origin (see figure 2). |
94 | | - * <p> |
95 | | - * b) Linear Acceleration Vector. Linear acceleration shall be represented as a |
96 | | - * vector with components in either world coordinate system or entity's |
97 | | - * coordinate system depending on the value in the Dead Reckoning Algorithm |
98 | | - * field. Each vector component shall represent acceleration in <u>meters per |
99 | | - * second squared</u>. |
100 | | - * <P> |
101 | | - * c) Linear Velocity Vector. Linear velocity shall be represented as a vector |
102 | | - * with three components in either world coordinate system or entity's |
103 | | - * coordinate system depending on the value in the Dead Reckoning Algorithm |
104 | | - * field. Each vector component shall represent velocity in <u>meters per |
105 | | - * second</u>. The format of the Vector record shall be as shown in |
106 | | - * table 30. (page 73) |
107 | | - * <br> |
108 | | - * <center><img src="..\..\RefsImgs\vecRec.jpg"></center> |
109 | | - * <p> |
110 | | - * <b>5.2.34 World Coordinates record</b><br> |
111 | | - * Location of the origin of the entity's coordinate system shall be specified |
112 | | - * by a set of three coordinates: X, Y, and Z. The shape of the earth shall be |
113 | | - * specified using DMA TR 8350.2, 1987. The origin of the world coordinate |
114 | | - * system shall be the centroid of the earth, with the X-axis passing through |
115 | | - * the prime meridian at the equator, the Y-axis passing through 90° east |
116 | | - * longitude at the equator, and the Z-axis passing through the north pole |
117 | | - * (see figure 1). These coordinates shall represent meters from the centroid |
118 | | - * of the earth. A 64-bit double precision floating point number shall represent |
119 | | - * the location for each coordinate. |
120 | | - * <p>The format of the World Coordinates record shall be as shown in table |
121 | | - * 31. (page 73) |
122 | | - * <br> |
123 | | - * <center><img src="..\..\RefsImgs\worldCord.jpg"></center> |
124 | | - * <P> |
125 | | - * <B>The Dead Reckoning parameters captured from each PDU</B> |
126 | | - * <center> |
127 | | - * <img src="..\..\RefsImgs\drPDUinfo.jpg"> |
128 | | - * </center> |
129 | | - * |
130 | | - * |
131 | | - * |
132 | | - * |
133 | | - * |
134 | | - * <p> |
135 | | - * <hr> |
136 | | - * <p> |
137 | | - * <center><h2>The IEEE specified algorithms to compute the DR for Primary |
138 | | - * Methods Group (1-5)</h2></center> |
139 | | - * <p> |
140 | | - * <hr> |
141 | | - * <p> |
142 | | - * <center><b><u>REVISED POSITION</U></B></CENTER> |
143 | | - * <P> |
144 | | - * <hr> |
145 | | - * <p> |
146 | | - * |
147 | | - * The Position portion of the algorithms</b><br> |
148 | 31 |
|
149 | | - * <hr> |
150 | | - * <p> |
151 | | - * <center><b><u>ORIENTATION SOLVER</U></B></CENTER> |
152 | | - * <p> |
153 | | - * Ultimately, the PSI (rotation about the y-axis), THETA (rotation about the |
154 | | - * z-axis), PHI (rotation about the x-axis) need to be in the range |
155 | | - * of 0 - 2PI since the fields are in radians. |
156 | | - * <P> |
157 | | - * <hr> |
158 | | - * <p> |
159 | | - * |
160 | | - * <b><a href="..\..\RefsImgs\2_orientation.jpg"> |
161 | | - * The Orientation portion of the algorithms</A></b><br> |
162 | | - * <center><img src="..\..\RefsImgs\2_orientation.jpg"/></center> |
163 | | - * <br> |
164 | | - * |
165 | | - * <p> |
166 | | - * <hr> |
167 | | - * <p> |
168 | | - * <center><b><u>DR MATRIX SOLVER</U></B></CENTER> |
169 | | - * <P> |
170 | | - * <hr> |
171 | | - * <p> |
172 | | - * <b><a href="..\..\RefsImgs\22_drMatrix.jpg"> |
173 | | - * The generic DR matrix</A></b><br> |
174 | | - * <center><img src="..\..\RefsImgs\22_drMatrix.jpg"/></center> |
175 | | - * <br> |
176 | | - * <center> |
177 | | - * Graphics rotate (x,y,z) matrices |
178 | | - * <br> |
179 | | - * <img src="..\..\RefsImgs\rX.jpg" alt="Rotate X"> |
180 | | - * <img src="..\..\RefsImgs\rY.jpg" alt="Rotate Y"> |
181 | | - * <img src="..\..\RefsImgs\rZ.jpg" alt="Rotate Z"> = [DR] |
182 | | - * <br> |
183 | | - * ultimately what this is DR equation is doing but with a change of basis |
184 | | - * from world to entity coordinates. |
185 | | - * </center> |
186 | | - * <p> |
187 | | - * <b><a href="..\..\RefsImgs\23_angVelocity.jpg"> |
188 | | - * The angular velocity Magnitude</a></b><br> |
189 | | - * <center><img src="..\..\RefsImgs\23_angVelocity.jpg"/></center> |
190 | | - * <br> |
191 | | - * <p> |
192 | | - * |
193 | | - * <b><a href="..\..\RefsImgs\24_omegaSKEW.jpg"> |
194 | | - * The SKEW matrix</a></b><br> |
195 | | - * <center><img src="..\..\RefsImgs\24_omegaSKEW.jpg"/></center> |
196 | | - * <br> |
197 | | - * |
198 | | - * <b><a href="..\..\RefsImgs\25_angVelMult.jpg"> |
199 | | - * The angular velocity Matrix</A></b><br> |
200 | | - * <center><img src="..\..\RefsImgs\25_angVelMult.jpg"/></center> |
201 | | - * <br> |
202 | | - * <p> |
203 | | - * NOTE - It was mentioned above that the angular velocities are contained in |
204 | | - * the Entity State PDU as body axis velocities. However, if the angular |
205 | | - * velocities are in terms of the Euler angles, then a transformation to body |
206 | | - * axis angular velocities is needed. Thus the following transformation |
207 | | - * formulas are given: |
208 | | - * <p> |
209 | | - * <b><a href="..\..\RefsImgs\body_world.jpg"> |
210 | | - * Body to Wrold Transformation</A></b><br> |
211 | | - * <center><img src="..\..\RefsImgs\body_world.jpg"/></center> |
212 | | - * <br> |
213 | | - * <b><a href="..\..\RefsImgs\world_body.jpg"> |
214 | | - * World to Body Transformation</A></b><br> |
215 | | - * <center><img src="..\..\RefsImgs\world_body.jpg"/></center> |
216 | | - * <br> |
217 | | - * <P> |
218 | | - * <hr> |
219 | | - * <p> |
220 | | - * <center><b><u>R MATRIX SOLVER</U></B></CENTER> |
221 | | - * <P> |
222 | | - * <hr> |
223 | | - * <p> |
224 | | - * <b><a href="..\..\RefsImgs\initOrientMatrix.jpg"> |
225 | | - * Initial Orientation Matrix</A></b><br> |
226 | | - * <center><img src="..\..\RefsImgs\initOrientMatrix.jpg"/></center> |
227 | | - * <P> |
228 | | - * <hr> |
229 | | - * <p> |
230 | | - * <center><b><u>REVISED ORIENTATION</U></B></CENTER> |
231 | | - * <P> |
232 | | - * <hr> |
233 | | - * <p> |
234 | | - * <b><a href="..\..\RefsImgs\getRevOrientation.jpg"> |
235 | | - * Get the Revised Orientation</A></b><br> |
236 | | - * <center><img src="..\..\RefsImgs\getRevOrientation.jpg"/></center> |
237 | | - * |
238 | | - * |
239 | | - * <p> |
240 | | - * <hr> |
241 | | - * <p> |
242 | | - * <center><h2>The IEEE specified algorithms to compute the DR for Secondary |
243 | | - * Methods Group (6-9)</h2></center> |
244 | | - * <p> |
245 | | - * <hr> |
246 | | - * <p> |
247 | | - * <i>Note: the <a href="..\..\RefsImgs\2_orientation.jpg">Rotaion formula</a> |
248 | | - * where applicable is the same as that used in the Primary Methods Group (1-5), |
249 | | - * as well is the equation for getting the |
250 | | - * <a href="..\..\RefsImgs\getRevOrientation.jpg">revised orientations</a>.</i> |
251 | | - * <p> |
252 | | - * <b><a href="..\..\RefsImgs\pos8.jpg"> |
253 | | - * General position formula</A></b><br> |
254 | | - * <center><img src="..\..\RefsImgs\pos8.jpg"/></center> |
255 | | - *<p> |
256 | | - * <b><a href="..\..\RefsImgs\r1.jpg"> |
257 | | - * R1 vector (though I am not sure what its really calculating)</A></b><br> |
258 | | - * <center><img src="..\..\RefsImgs\r1.jpg"/></center> |
259 | | - * |
260 | | - *<p> |
261 | | - * <b><a href="..\..\RefsImgs\r2.jpg"> |
262 | | - * R2 vector (though I am not sure what its really calculating)</A></b><br> |
263 | | - * <center><img src="..\..\RefsImgs\r2.jpg"/></center> |
264 | | - * <p> |
265 | | - * |
266 | | - * |
267 | | - * <p> |
268 | | - * <hr> |
269 | | - * <p> |
270 | 32 | * <u>An Example:</u><br> |
271 | 33 | * <pre> |
272 | 34 | import DIS.DeadReckoning.*; |
@@ -422,12 +184,11 @@ public abstract class DIS_DeadReckoning implements Runnable |
422 | 184 | * How long to wait between updates |
423 | 185 | * <P> |
424 | 186 | * the delta between calls...how fast an entity will be updated |
425 | | - * <ol> |
426 | | - * Assumed a desired rate of 30 fps |
427 | | - * Given from the standard that all parameters are in meters/s |
428 | | - * To move 1 meter/second with 30 increments = 1/30 Delta between updates |
429 | | - * delay in milliseconds is 1/30 * 1000 || 1000 / 30 |
430 | | - * </ol> |
| 187 | + * |
| 188 | + * - Assumed a desired rate of 30 fps |
| 189 | + * - Given from the standard that all parameters are in meters/s |
| 190 | + * - To move 1 meter/second with 30 increments = 1/30 Delta between updates |
| 191 | + * - delay in milliseconds is 1/30 * 1000 || 1000 / 30 |
431 | 192 | * <p> |
432 | 193 | * Note from Java Doc for JDK: <br> |
433 | 194 | * Causes the currently executing thread to sleep (temporarily cease |
@@ -508,27 +269,24 @@ public DIS_DeadReckoning() |
508 | 269 | * some fields have been updated to the current time sample while other |
509 | 270 | * fields still pertain to the previous time sample. |
510 | 271 | * |
511 | | - * <ol> |
512 | 272 | * Assume a desired rate of 30 fps |
513 | 273 | * All parameters are in meters/s |
514 | 274 | * to move 1 meter/second with 30 increments = 1/30 Delta between updates |
515 | 275 | * |
516 | | - * <p> |
517 | 276 | * Only returns an array of location and orientation because that |
518 | 277 | * is all that is needed to update the location of the entity. All other |
519 | 278 | * DR inputs are parameters for solving the location and orientation and so |
520 | 279 | * are not returned, only set. |
521 | | - * <p> |
| 280 | + * |
522 | 281 | * Order of the returned array elements |
523 | | - * <ol> |
524 | | - * entityLocation_X |
525 | | - * entityLocation_Y |
526 | | - * entityLocation_Z |
527 | | - * entityOrientation_psi |
528 | | - * entityOrientation_theta |
529 | | - * entityOrientation_phi |
530 | 282 | * |
531 | | - * <p> |
| 283 | + * - entityLocation_X |
| 284 | + * - entityLocation_Y |
| 285 | + * - entityLocation_Z |
| 286 | + * - entityOrientation_psi |
| 287 | + * - entityOrientation_theta |
| 288 | + * - entityOrientation_phi |
| 289 | + * |
532 | 290 | * @return - 6 doubles of location and orientation |
533 | 291 | */ |
534 | 292 | public double[] getUpdatedPositionOrientation() |
@@ -576,12 +334,12 @@ public void setFPS(int frames) |
576 | 334 | * This can be the first and initialization call or update. |
577 | 335 | * <P> |
578 | 336 | * The following (triples) are set with each call: |
579 | | - * <OL> |
580 | | - * <LI>Entity Location 64bit |
581 | | - * <LI>Entity Orientation 32bit |
582 | | - * Entity Linear Velocity 32bit |
583 | | - * Entity Linear Acceleration 32bit |
584 | | - * Entity Angular Velocity 32bit |
| 337 | + * |
| 338 | + * - Entity Location 64bit |
| 339 | + * - Entity Orientation 32bit |
| 340 | + * - Entity Linear Velocity 32bit |
| 341 | + * - Entity Linear Acceleration 32bit |
| 342 | + * - Entity Angular Velocity 32bit |
585 | 343 |
|
586 | 344 | * <P> |
587 | 345 | * entityLocation_X = allDis[0];<br> |
|
0 commit comments