1 /*
2 * Copyright (C) 2019 Alberto Irurueta Carro (alberto@irurueta.com)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package com.irurueta.navigation.inertial.estimators;
17
18 import com.irurueta.algebra.AlgebraException;
19 import com.irurueta.algebra.Matrix;
20 import com.irurueta.algebra.Utils;
21 import com.irurueta.geometry.Point3D;
22 import com.irurueta.navigation.frames.CoordinateTransformation;
23 import com.irurueta.navigation.frames.ECIFrame;
24 import com.irurueta.navigation.inertial.BodyKinematics;
25 import com.irurueta.units.Speed;
26 import com.irurueta.units.SpeedConverter;
27 import com.irurueta.units.SpeedUnit;
28 import com.irurueta.units.Time;
29 import com.irurueta.units.TimeConverter;
30 import com.irurueta.units.TimeUnit;
31
32 /**
33 * Estimates body kinematics (specific force applied to a body and its angular rates) with respect and resolved
34 * along ECI-frame axes.
35 * This implementation is based on the equations defined in "Principles of GNSS, Inertial, and Multisensor
36 * Integrated Navigation Systems, Second Edition" and on the companion software available at:
37 * <a href="https://github.com/ymjdz/MATLAB-Codes/blob/master/Kinematics_ECI.m">
38 * https://github.com/ymjdz/MATLAB-Codes/blob/master/Kinematics_ECI.m
39 * </a>
40 */
41 public class ECIKinematicsEstimator {
42
43 /**
44 * Scaling threshold.
45 */
46 private static final double SCALING_THRESHOLD = 2e-5;
47
48 /**
49 * Alpha threshold.
50 */
51 private static final double ALPHA_THRESHOLD = 1e-8;
52
53 /**
54 * Number of rows.
55 */
56 private static final int ROWS = 3;
57
58 /**
59 * Estimates body kinematics (specific force applied to a body and its angular rates)..
60 *
61 * @param timeInterval time interval between epochs expressed in seconds (s).
62 * @param c body-to-ECI-frame coordinate transformation.
63 * @param oldC previous body-to-ECI-frame coordinate transformation.
64 * @param vx x coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
65 * along ECI-frame axes.
66 * @param vy y coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
67 * along ECI-frame axes.
68 * @param vz z coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
69 * along ECI-frame axes.
70 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
71 * resolved along ECI-frame axes.
72 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
73 * resolved along ECI-frame axes.
74 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
75 * resolved along ECI-frame axes.
76 * @param x cartesian x coordinate of body position expressed in meters (m) and resolved along
77 * ECI-frame axes.
78 * This is the position where gravitation is evaluated; to be consistent with
79 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
80 * the position at the start of the time interval.
81 * @param y cartesian y coordinate of body position expressed in meters (m) and resolved along
82 * ECI-frame axes.
83 * This is the position where gravitation is evaluated; to be consistent with
84 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
85 * the position at the start of the time interval.
86 * @param z cartesian z coordinate of body position expressed in meters (m) and resolved along
87 * ECI-frame axes.
88 * This is the position where gravitation is evaluated; to be consistent with
89 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
90 * the position at the start of the time interval.
91 * @param result instance where estimated body kinematics will be stored.
92 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
93 * are not ECI frame valid.
94 */
95 public void estimate(
96 final double timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
97 final double vx, final double vy, final double vz,
98 final double oldVx, final double oldVy, final double oldVz,
99 final double x, final double y, final double z, final BodyKinematics result) {
100 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, x, y, z, result);
101 }
102
103 /**
104 * Estimates body kinematics (specific force applied to a body and its angular rates)..
105 *
106 * @param timeInterval time interval between epochs.
107 * @param c body-to-ECI-frame coordinate transformation.
108 * @param oldC previous body-to-ECI-frame coordinate transformation.
109 * @param vx x coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
110 * along ECI-frame axes.
111 * @param vy y coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
112 * along ECI-frame axes.
113 * @param vz z coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
114 * along ECI-frame axes.
115 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
116 * resolved along ECI-frame axes.
117 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
118 * resolved along ECI-frame axes.
119 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
120 * resolved along ECI-frame axes.
121 * @param x cartesian x coordinate of body position expressed in meters (m) and resolved along
122 * ECI-frame axes.
123 * This is the position where gravitation is evaluated; to be consistent with
124 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
125 * the position at the start of the time interval.
126 * @param y cartesian y coordinate of body position expressed in meters (m) and resolved along
127 * ECI-frame axes.
128 * This is the position where gravitation is evaluated; to be consistent with
129 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
130 * the position at the start of the time interval.
131 * @param z cartesian z coordinate of body position expressed in meters (m) and resolved along
132 * ECI-frame axes.
133 * This is the position where gravitation is evaluated; to be consistent with
134 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
135 * the position at the start of the time interval.
136 * @param result instance where estimated body kinematics will be stored.
137 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
138 * are not ECI frame valid.
139 */
140 public void estimate(
141 final Time timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
142 final double vx, final double vy, final double vz,
143 final double oldVx, final double oldVy, final double oldVz,
144 final double x, final double y, final double z, final BodyKinematics result) {
145 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, x, y, z, result);
146 }
147
148 /**
149 * Estimates body kinematics (specific force applied to a body and its angular rates).
150 *
151 * @param timeInterval time interval between epochs expressed in seconds (s).
152 * @param frame body ECI frame containing current position, velocity and
153 * body-to-ECI frame coordinate transformation. The position contained in this
154 * frame is the position where gravitation is evaluated; to be consistent with
155 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
156 * the position at the start of the time interval, hence when body position changes
157 * during the time interval, overloads receiving the previous frame or an explicit
158 * position should be used instead.
159 * @param oldC previous body-to-ECI-frame coordinate transformation.
160 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
161 * resolved along ECI-frame axes.
162 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
163 * resolved along ECI-frame axes.
164 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
165 * resolved along ECI-frame axes.
166 * @param result instance where estimated body kinematics will be stored.
167 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
168 * are not ECI frame valid.
169 */
170 public void estimate(
171 final double timeInterval, final ECIFrame frame, final CoordinateTransformation oldC,
172 final double oldVx, final double oldVy, final double oldVz, final BodyKinematics result) {
173 estimateKinematics(timeInterval, frame, oldC, oldVx, oldVy, oldVz, result);
174 }
175
176 /**
177 * Estimates body kinematics (specific force applied to a body and its angular rates).
178 *
179 * @param timeInterval time interval between epochs.
180 * @param frame body ECI frame containing current position, velocity and
181 * body-to-ECI frame coordinate transformation. The position contained in this
182 * frame is the position where gravitation is evaluated; to be consistent with
183 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
184 * the position at the start of the time interval, hence when body position changes
185 * during the time interval, overloads receiving the previous frame or an explicit
186 * position should be used instead.
187 * @param oldC previous body-to-ECI-frame coordinate transformation.
188 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
189 * resolved along ECI-frame axes.
190 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
191 * resolved along ECI-frame axes.
192 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
193 * resolved along ECI-frame axes.
194 * @param result instance where estimated body kinematics will be stored.
195 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
196 * are not ECI frame valid.
197 */
198 public void estimate(
199 final Time timeInterval, final ECIFrame frame, final CoordinateTransformation oldC,
200 final double oldVx, final double oldVy, final double oldVz, final BodyKinematics result) {
201 estimateKinematics(timeInterval, frame, oldC, oldVx, oldVy, oldVz, result);
202 }
203
204 /**
205 * Estimates body kinematics (specific force applied to a body and its angular rates).
206 *
207 * @param timeInterval time interval between epochs expressed in seconds (s).
208 * @param frame body ECI frame containing current position, velocity and
209 * body-to-ECI frame coordinate transformation. Notice that
210 * current position contained in this frame is ignored.
211 * @param oldFrame body ECI frame containing previous position, velocity and
212 * body-to-ECI frame coordinate transformation. The previous position contained
213 * in this frame (the position at the start of the time interval) is the position
214 * where gravitation is evaluated, to be consistent with
215 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers).
216 * @param result instance where body kinematics estimation will be stored.
217 * @throws IllegalArgumentException if provided time interval is negative.
218 */
219 public void estimate(
220 final double timeInterval, final ECIFrame frame, final ECIFrame oldFrame, final BodyKinematics result) {
221 estimateKinematics(timeInterval, frame, oldFrame, result);
222 }
223
224 /**
225 * Estimates body kinematics (specific force applied to a body and its angular rates).
226 *
227 * @param timeInterval time interval between epochs.
228 * @param frame body ECI frame containing current position, velocity and
229 * body-to-ECI frame coordinate transformation. Notice that
230 * current position contained in this frame is ignored.
231 * @param oldFrame body ECI frame containing previous position, velocity and
232 * body-to-ECI frame coordinate transformation. The previous position contained
233 * in this frame (the position at the start of the time interval) is the position
234 * where gravitation is evaluated, to be consistent with
235 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers).
236 * @param result instance where body kinematics estimation will be stored.
237 * @throws IllegalArgumentException if provided time interval is negative.
238 */
239 public void estimate(
240 final Time timeInterval, final ECIFrame frame, final ECIFrame oldFrame, final BodyKinematics result) {
241 estimateKinematics(timeInterval, frame, oldFrame, result);
242 }
243
244 /**
245 * Estimates body kinematics (specific force applied to a body and its angular rates)..
246 *
247 * @param timeInterval time interval between epochs expressed in seconds (s).
248 * @param c body-to-ECI-frame coordinate transformation.
249 * @param oldC previous body-to-ECI-frame coordinate transformation.
250 * @param vx x coordinate of velocity of body frame with respect ECI frame, resolved
251 * along ECI-frame axes.
252 * @param vy y coordinate of velocity of body frame with respect ECI frame, resolved
253 * along ECI-frame axes.
254 * @param vz z coordinate of velocity of body frame with respect ECI frame, resolved
255 * along ECI-frame axes.
256 * @param oldVx x coordinate of previous velocity of body frame with respect ECI frame,
257 * resolved along ECI-frame axes.
258 * @param oldVy y coordinate of previous velocity of body frame with respect ECI frame,
259 * resolved along ECI-frame axes.
260 * @param oldVz z coordinate of previous velocity of body frame with respect ECI frame,
261 * resolved along ECI-frame axes.
262 * @param x cartesian x coordinate of body position expressed in meters (m) and resolved along
263 * ECI-frame axes.
264 * This is the position where gravitation is evaluated; to be consistent with
265 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
266 * the position at the start of the time interval.
267 * @param y cartesian y coordinate of body position expressed in meters (m) and resolved along
268 * ECI-frame axes.
269 * This is the position where gravitation is evaluated; to be consistent with
270 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
271 * the position at the start of the time interval.
272 * @param z cartesian z coordinate of body position expressed in meters (m) and resolved along
273 * ECI-frame axes.
274 * This is the position where gravitation is evaluated; to be consistent with
275 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
276 * the position at the start of the time interval.
277 * @param result instance where estimated body kinematics will be stored.
278 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
279 * are not ECI frame valid.
280 */
281 public void estimate(
282 final double timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
283 final Speed vx, final Speed vy, final Speed vz, final Speed oldVx, final Speed oldVy, final Speed oldVz,
284 final double x, final double y, final double z, final BodyKinematics result) {
285 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, x, y, z, result);
286 }
287
288 /**
289 * Estimates body kinematics (specific force applied to a body and its angular rates)..
290 *
291 * @param timeInterval time interval between epochs.
292 * @param c body-to-ECI-frame coordinate transformation.
293 * @param oldC previous body-to-ECI-frame coordinate transformation.
294 * @param vx x coordinate of velocity of body frame with respect ECI frame, resolved
295 * along ECI-frame axes.
296 * @param vy y coordinate of velocity of body frame with respect ECI frame, resolved
297 * along ECI-frame axes.
298 * @param vz z coordinate of velocity of body frame with respect ECI frame, resolved
299 * along ECI-frame axes.
300 * @param oldVx x coordinate of previous velocity of body frame with respect ECI frame,
301 * resolved along ECI-frame axes.
302 * @param oldVy y coordinate of previous velocity of body frame with respect ECI frame,
303 * resolved along ECI-frame axes.
304 * @param oldVz z coordinate of previous velocity of body frame with respect ECI frame,
305 * resolved along ECI-frame axes.
306 * @param x cartesian x coordinate of body position expressed in meters (m) and resolved along
307 * ECI-frame axes.
308 * This is the position where gravitation is evaluated; to be consistent with
309 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
310 * the position at the start of the time interval.
311 * @param y cartesian y coordinate of body position expressed in meters (m) and resolved along
312 * ECI-frame axes.
313 * This is the position where gravitation is evaluated; to be consistent with
314 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
315 * the position at the start of the time interval.
316 * @param z cartesian z coordinate of body position expressed in meters (m) and resolved along
317 * ECI-frame axes.
318 * This is the position where gravitation is evaluated; to be consistent with
319 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
320 * the position at the start of the time interval.
321 * @param result instance where estimated body kinematics will be stored.
322 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
323 * are not ECI frame valid.
324 */
325 public void estimate(
326 final Time timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
327 final Speed vx, final Speed vy, final Speed vz, final Speed oldVx, final Speed oldVy, final Speed oldVz,
328 final double x, final double y, final double z, final BodyKinematics result) {
329 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, x, y, z, result);
330 }
331
332 /**
333 * Estimates body kinematics (specific force applied to a body and its angular rates).
334 *
335 * @param timeInterval time interval between epochs expressed in seconds (s).
336 * @param frame body ECI frame containing current position, velocity and
337 * body-to-ECI frame coordinate transformation. The position contained in this
338 * frame is the position where gravitation is evaluated; to be consistent with
339 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
340 * the position at the start of the time interval, hence when body position changes
341 * during the time interval, overloads receiving the previous frame or an explicit
342 * position should be used instead.
343 * @param oldC previous body-to-ECI-frame coordinate transformation.
344 * @param oldVx x coordinate of previous velocity of body frame with respect ECI frame,
345 * resolved along ECI-frame axes.
346 * @param oldVy y coordinate of previous velocity of body frame with respect ECI frame,
347 * resolved along ECI-frame axes.
348 * @param oldVz z coordinate of previous velocity of body frame with respect ECI frame,
349 * resolved along ECI-frame axes.
350 * @param result instance where estimated body kinematics will be stored.
351 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
352 * are not ECI frame valid.
353 */
354 public void estimate(
355 final double timeInterval, final ECIFrame frame, final CoordinateTransformation oldC,
356 final Speed oldVx, final Speed oldVy, final Speed oldVz, final BodyKinematics result) {
357 estimateKinematics(timeInterval, frame, oldC, oldVx, oldVy, oldVz, result);
358 }
359
360 /**
361 * Estimates body kinematics (specific force applied to a body and its angular rates).
362 *
363 * @param timeInterval time interval between epochs.
364 * @param frame body ECI frame containing current position, velocity and
365 * body-to-ECI frame coordinate transformation. The position contained in this
366 * frame is the position where gravitation is evaluated; to be consistent with
367 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
368 * the position at the start of the time interval, hence when body position changes
369 * during the time interval, overloads receiving the previous frame or an explicit
370 * position should be used instead.
371 * @param oldC previous body-to-ECI-frame coordinate transformation.
372 * @param oldVx x coordinate of previous velocity of body frame with respect ECI frame,
373 * resolved along ECI-frame axes.
374 * @param oldVy y coordinate of previous velocity of body frame with respect ECI frame,
375 * resolved along ECI-frame axes.
376 * @param oldVz z coordinate of previous velocity of body frame with respect ECI frame,
377 * resolved along ECI-frame axes.
378 * @param result instance where estimated body kinematics will be stored.
379 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
380 * are not ECI frame valid.
381 */
382 public void estimate(
383 final Time timeInterval, final ECIFrame frame, final CoordinateTransformation oldC,
384 final Speed oldVx, final Speed oldVy, final Speed oldVz, final BodyKinematics result) {
385 estimateKinematics(timeInterval, frame, oldC, oldVx, oldVy, oldVz, result);
386 }
387
388 /**
389 * Estimates body kinematics (specific force applied to a body and its angular rates)..
390 *
391 * @param timeInterval time interval between epochs expressed in seconds (s).
392 * @param c body-to-ECI-frame coordinate transformation.
393 * @param oldC previous body-to-ECI-frame coordinate transformation.
394 * @param vx x coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
395 * along ECI-frame axes.
396 * @param vy y coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
397 * along ECI-frame axes.
398 * @param vz z coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
399 * along ECI-frame axes.
400 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
401 * resolved along ECI-frame axes.
402 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
403 * resolved along ECI-frame axes.
404 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
405 * resolved along ECI-frame axes.
406 * @param position body position expressed in meters (m) with respect ECI frame,
407 * resolved along ECI-frame axes.
408 * This is the position where gravitation is evaluated; to be consistent with
409 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
410 * the position at the start of the time interval.
411 * @param result instance where estimated body kinematics will be stored.
412 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
413 * are not ECI frame valid.
414 */
415 public void estimate(
416 final double timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
417 final double vx, final double vy, final double vz,
418 final double oldVx, final double oldVy, final double oldVz,
419 final Point3D position, final BodyKinematics result) {
420 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, position, result);
421 }
422
423 /**
424 * Estimates body kinematics (specific force applied to a body and its angular rates)..
425 *
426 * @param timeInterval time interval between epochs.
427 * @param c body-to-ECI-frame coordinate transformation.
428 * @param oldC previous body-to-ECI-frame coordinate transformation.
429 * @param vx x coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
430 * along ECI-frame axes.
431 * @param vy y coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
432 * along ECI-frame axes.
433 * @param vz z coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
434 * along ECI-frame axes.
435 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
436 * resolved along ECI-frame axes.
437 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
438 * resolved along ECI-frame axes.
439 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
440 * resolved along ECI-frame axes.
441 * @param position body position expressed in meters (m) with respect ECI frame,
442 * resolved along ECI-frame axes.
443 * This is the position where gravitation is evaluated; to be consistent with
444 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
445 * the position at the start of the time interval.
446 * @param result instance where estimated body kinematics will be stored.
447 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
448 * are not ECI frame valid.
449 */
450 public void estimate(
451 final Time timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
452 final double vx, final double vy, final double vz,
453 final double oldVx, final double oldVy, final double oldVz,
454 final Point3D position, final BodyKinematics result) {
455 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, position, result);
456 }
457
458 /**
459 * Estimates body kinematics (specific force applied to a body and its angular rates)..
460 *
461 * @param timeInterval time interval between epochs expressed in seconds (s).
462 * @param c body-to-ECI-frame coordinate transformation.
463 * @param oldC previous body-to-ECI-frame coordinate transformation.
464 * @param vx x coordinate of velocity of body frame with respect ECI frame, resolved
465 * along ECI-frame axes.
466 * @param vy y coordinate of velocity of body frame with respect ECI frame, resolved
467 * along ECI-frame axes.
468 * @param vz z coordinate of velocity of body frame with respect ECI frame, resolved
469 * along ECI-frame axes.
470 * @param oldVx x coordinate of previous velocity of body frame respect ECI frame,
471 * resolved along ECI-frame axes.
472 * @param oldVy y coordinate of previous velocity of body frame respect ECI frame,
473 * resolved along ECI-frame axes.
474 * @param oldVz z coordinate of previous velocity of body frame respect ECI frame,
475 * resolved along ECI-frame axes.
476 * @param position body position expressed in meters (m) with respect ECI frame,
477 * resolved along ECI-frame axes.
478 * This is the position where gravitation is evaluated; to be consistent with
479 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
480 * the position at the start of the time interval.
481 * @param result instance where estimated body kinematics will be stored.
482 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
483 * are not ECI frame valid.
484 */
485 public void estimate(
486 final double timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
487 final Speed vx, final Speed vy, final Speed vz, final Speed oldVx, final Speed oldVy, final Speed oldVz,
488 final Point3D position, final BodyKinematics result) {
489 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, position, result);
490 }
491
492 /**
493 * Estimates body kinematics (specific force applied to a body and its angular rates)..
494 *
495 * @param timeInterval time interval between epochs.
496 * @param c body-to-ECI-frame coordinate transformation.
497 * @param oldC previous body-to-ECI-frame coordinate transformation.
498 * @param vx x coordinate of velocity of body frame with respect ECI frame, resolved
499 * along ECI-frame axes.
500 * @param vy y coordinate of velocity of body frame with respect ECI frame, resolved
501 * along ECI-frame axes.
502 * @param vz z coordinate of velocity of body frame with respect ECI frame, resolved
503 * along ECI-frame axes.
504 * @param oldVx x coordinate of previous velocity of body frame respect ECI frame,
505 * resolved along ECI-frame axes.
506 * @param oldVy y coordinate of previous velocity of body frame respect ECI frame,
507 * resolved along ECI-frame axes.
508 * @param oldVz z coordinate of previous velocity of body frame respect ECI frame,
509 * resolved along ECI-frame axes.
510 * @param position body position expressed in meters (m) with respect ECI frame,
511 * resolved along ECI-frame axes.
512 * This is the position where gravitation is evaluated; to be consistent with
513 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
514 * the position at the start of the time interval.
515 * @param result instance where estimated body kinematics will be stored.
516 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
517 * are not ECI frame valid.
518 */
519 public void estimate(
520 final Time timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
521 final Speed vx, final Speed vy, final Speed vz, final Speed oldVx, final Speed oldVy, final Speed oldVz,
522 final Point3D position, final BodyKinematics result) {
523 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, position, result);
524 }
525
526 /**
527 * Estimates body kinematics (specific force applied to a body and its angular rates)..
528 *
529 * @param timeInterval time interval between epochs expressed in seconds (s).
530 * @param c body-to-ECI-frame coordinate transformation.
531 * @param oldC previous body-to-ECI-frame coordinate transformation.
532 * @param vx x coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
533 * along ECI-frame axes.
534 * @param vy y coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
535 * along ECI-frame axes.
536 * @param vz z coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
537 * along ECI-frame axes.
538 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
539 * resolved along ECI-frame axes.
540 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
541 * resolved along ECI-frame axes.
542 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
543 * resolved along ECI-frame axes.
544 * @param x cartesian x coordinate of body position expressed in meters (m) and resolved along
545 * ECI-frame axes.
546 * This is the position where gravitation is evaluated; to be consistent with
547 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
548 * the position at the start of the time interval.
549 * @param y cartesian y coordinate of body position expressed in meters (m) and resolved along
550 * ECI-frame axes.
551 * This is the position where gravitation is evaluated; to be consistent with
552 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
553 * the position at the start of the time interval.
554 * @param z cartesian z coordinate of body position expressed in meters (m) and resolved along
555 * ECI-frame axes.
556 * This is the position where gravitation is evaluated; to be consistent with
557 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
558 * the position at the start of the time interval.
559 * @return a new body kinematics instance.
560 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
561 * are not ECI frame valid.
562 */
563 public BodyKinematics estimateAndReturnNew(
564 final double timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
565 final double vx, final double vy, final double vz,
566 final double oldVx, final double oldVy, final double oldVz,
567 final double x, final double y, final double z) {
568 return estimateKinematicsAndReturnNew(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, x, y, z);
569 }
570
571 /**
572 * Estimates body kinematics (specific force applied to a body and its angular rates)..
573 *
574 * @param timeInterval time interval between epochs.
575 * @param c body-to-ECI-frame coordinate transformation.
576 * @param oldC previous body-to-ECI-frame coordinate transformation.
577 * @param vx x coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
578 * along ECI-frame axes.
579 * @param vy y coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
580 * along ECI-frame axes.
581 * @param vz z coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
582 * along ECI-frame axes.
583 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
584 * resolved along ECI-frame axes.
585 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
586 * resolved along ECI-frame axes.
587 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
588 * resolved along ECI-frame axes.
589 * @param x cartesian x coordinate of body position expressed in meters (m) and resolved along
590 * ECI-frame axes.
591 * This is the position where gravitation is evaluated; to be consistent with
592 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
593 * the position at the start of the time interval.
594 * @param y cartesian y coordinate of body position expressed in meters (m) and resolved along
595 * ECI-frame axes.
596 * This is the position where gravitation is evaluated; to be consistent with
597 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
598 * the position at the start of the time interval.
599 * @param z cartesian z coordinate of body position expressed in meters (m) and resolved along
600 * ECI-frame axes.
601 * This is the position where gravitation is evaluated; to be consistent with
602 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
603 * the position at the start of the time interval.
604 * @return a new body kinematics instance.
605 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
606 * are not ECI frame valid.
607 */
608 public BodyKinematics estimateAndReturnNew(
609 final Time timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
610 final double vx, final double vy, final double vz,
611 final double oldVx, final double oldVy, final double oldVz,
612 final double x, final double y, final double z) {
613 return estimateKinematicsAndReturnNew(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, x, y, z);
614 }
615
616 /**
617 * Estimates body kinematics (specific force applied to a body and its angular rates).
618 *
619 * @param timeInterval time interval between epochs expressed in seconds (s).
620 * @param frame body ECI frame containing current position, velocity and
621 * body-to-ECI frame coordinate transformation. The position contained in this
622 * frame is the position where gravitation is evaluated; to be consistent with
623 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
624 * the position at the start of the time interval, hence when body position changes
625 * during the time interval, overloads receiving the previous frame or an explicit
626 * position should be used instead.
627 * @param oldC previous body-to-ECI-frame coordinate transformation.
628 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
629 * resolved along ECI-frame axes.
630 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
631 * resolved along ECI-frame axes.
632 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
633 * resolved along ECI-frame axes.
634 * @return a new body kinematics instance.
635 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
636 * are not ECI frame valid.
637 */
638 public BodyKinematics estimateAndReturnNew(
639 final double timeInterval, final ECIFrame frame, final CoordinateTransformation oldC,
640 final double oldVx, final double oldVy, final double oldVz) {
641 return estimateKinematicsAndReturnNew(timeInterval, frame, oldC, oldVx, oldVy, oldVz);
642 }
643
644 /**
645 * Estimates body kinematics (specific force applied to a body and its angular rates).
646 *
647 * @param timeInterval time interval between epochs.
648 * @param frame body ECI frame containing current position, velocity and
649 * body-to-ECI frame coordinate transformation. The position contained in this
650 * frame is the position where gravitation is evaluated; to be consistent with
651 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
652 * the position at the start of the time interval, hence when body position changes
653 * during the time interval, overloads receiving the previous frame or an explicit
654 * position should be used instead.
655 * @param oldC previous body-to-ECI-frame coordinate transformation.
656 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
657 * resolved along ECI-frame axes.
658 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
659 * resolved along ECI-frame axes.
660 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
661 * resolved along ECI-frame axes.
662 * @return a new body kinematics instance.
663 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
664 * are not ECI frame valid.
665 */
666 public BodyKinematics estimateAndReturnNew(
667 final Time timeInterval, final ECIFrame frame, final CoordinateTransformation oldC,
668 final double oldVx, final double oldVy, final double oldVz) {
669 return estimateKinematicsAndReturnNew(timeInterval, frame, oldC, oldVx, oldVy, oldVz);
670 }
671
672 /**
673 * Estimates body kinematics (specific force applied to a body and its angular rates).
674 *
675 * @param timeInterval time interval between epochs expressed in seconds (s).
676 * @param frame body ECI frame containing current position, velocity and
677 * body-to-ECI frame coordinate transformation. Notice that
678 * current position contained in this frame is ignored.
679 * @param oldFrame body ECI frame containing previous position, velocity and
680 * body-to-ECI frame coordinate transformation. The previous position contained
681 * in this frame (the position at the start of the time interval) is the position
682 * where gravitation is evaluated, to be consistent with
683 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers).
684 * @return a new body kinematics instance.
685 * @throws IllegalArgumentException if provided time interval is negative.
686 */
687 public BodyKinematics estimateAndReturnNew(
688 final double timeInterval, final ECIFrame frame, final ECIFrame oldFrame) {
689 return estimateKinematicsAndReturnNew(timeInterval, frame, oldFrame);
690 }
691
692 /**
693 * Estimates body kinematics (specific force applied to a body and its angular rates).
694 *
695 * @param timeInterval time interval between epochs.
696 * @param frame body ECI frame containing current position, velocity and
697 * body-to-ECI frame coordinate transformation. Notice that
698 * current position contained in this frame is ignored.
699 * @param oldFrame body ECI frame containing previous position, velocity and
700 * body-to-ECI frame coordinate transformation. The previous position contained
701 * in this frame (the position at the start of the time interval) is the position
702 * where gravitation is evaluated, to be consistent with
703 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers).
704 * @return a new body kinematics instance.
705 * @throws IllegalArgumentException if provided time interval is negative.
706 */
707 public BodyKinematics estimateAndReturnNew(
708 final Time timeInterval, final ECIFrame frame, final ECIFrame oldFrame) {
709 return estimateKinematicsAndReturnNew(timeInterval, frame, oldFrame);
710 }
711
712 /**
713 * Estimates body kinematics (specific force applied to a body and its angular rates)..
714 *
715 * @param timeInterval time interval between epochs expressed in seconds (s).
716 * @param c body-to-ECI-frame coordinate transformation.
717 * @param oldC previous body-to-ECI-frame coordinate transformation.
718 * @param vx x coordinate of velocity of body frame with respect ECI frame, resolved
719 * along ECI-frame axes.
720 * @param vy y coordinate of velocity of body frame with respect ECI frame, resolved
721 * along ECI-frame axes.
722 * @param vz z coordinate of velocity of body frame with respect ECI frame, resolved
723 * along ECI-frame axes.
724 * @param oldVx x coordinate of previous velocity of body frame with respect ECI frame,
725 * resolved along ECI-frame axes.
726 * @param oldVy y coordinate of previous velocity of body frame with respect ECI frame,
727 * resolved along ECI-frame axes.
728 * @param oldVz z coordinate of previous velocity of body frame with respect ECI frame,
729 * resolved along ECI-frame axes.
730 * @param x cartesian x coordinate of body position expressed in meters (m) and resolved along
731 * ECI-frame axes.
732 * This is the position where gravitation is evaluated; to be consistent with
733 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
734 * the position at the start of the time interval.
735 * @param y cartesian y coordinate of body position expressed in meters (m) and resolved along
736 * ECI-frame axes.
737 * This is the position where gravitation is evaluated; to be consistent with
738 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
739 * the position at the start of the time interval.
740 * @param z cartesian z coordinate of body position expressed in meters (m) and resolved along
741 * ECI-frame axes.
742 * This is the position where gravitation is evaluated; to be consistent with
743 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
744 * the position at the start of the time interval.
745 * @return a new body kinematics instance.
746 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
747 * are not ECI frame valid.
748 */
749 public BodyKinematics estimateAndReturnNew(
750 final double timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
751 final Speed vx, final Speed vy, final Speed vz, final Speed oldVx, final Speed oldVy, final Speed oldVz,
752 final double x, final double y, final double z) {
753 return estimateKinematicsAndReturnNew(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, x, y, z);
754 }
755
756 /**
757 * Estimates body kinematics (specific force applied to a body and its angular rates)..
758 *
759 * @param timeInterval time interval between epochs.
760 * @param c body-to-ECI-frame coordinate transformation.
761 * @param oldC previous body-to-ECI-frame coordinate transformation.
762 * @param vx x coordinate of velocity of body frame with respect ECI frame, resolved
763 * along ECI-frame axes.
764 * @param vy y coordinate of velocity of body frame with respect ECI frame, resolved
765 * along ECI-frame axes.
766 * @param vz z coordinate of velocity of body frame with respect ECI frame, resolved
767 * along ECI-frame axes.
768 * @param oldVx x coordinate of previous velocity of body frame with respect ECI frame,
769 * resolved along ECI-frame axes.
770 * @param oldVy y coordinate of previous velocity of body frame with respect ECI frame,
771 * resolved along ECI-frame axes.
772 * @param oldVz z coordinate of previous velocity of body frame with respect ECI frame,
773 * resolved along ECI-frame axes.
774 * @param x cartesian x coordinate of body position expressed in meters (m) and resolved along
775 * ECI-frame axes.
776 * This is the position where gravitation is evaluated; to be consistent with
777 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
778 * the position at the start of the time interval.
779 * @param y cartesian y coordinate of body position expressed in meters (m) and resolved along
780 * ECI-frame axes.
781 * This is the position where gravitation is evaluated; to be consistent with
782 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
783 * the position at the start of the time interval.
784 * @param z cartesian z coordinate of body position expressed in meters (m) and resolved along
785 * ECI-frame axes.
786 * This is the position where gravitation is evaluated; to be consistent with
787 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
788 * the position at the start of the time interval.
789 * @return a new body kinematics instance.
790 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
791 * are not ECI frame valid.
792 */
793 public BodyKinematics estimateAndReturnNew(
794 final Time timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
795 final Speed vx, final Speed vy, final Speed vz, final Speed oldVx, final Speed oldVy, final Speed oldVz,
796 final double x, final double y, final double z) {
797 return estimateKinematicsAndReturnNew(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, x, y, z);
798 }
799
800 /**
801 * Estimates body kinematics (specific force applied to a body and its angular rates).
802 *
803 * @param timeInterval time interval between epochs expressed in seconds (s).
804 * @param frame body ECI frame containing current position, velocity and
805 * body-to-ECI frame coordinate transformation. The position contained in this
806 * frame is the position where gravitation is evaluated; to be consistent with
807 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
808 * the position at the start of the time interval, hence when body position changes
809 * during the time interval, overloads receiving the previous frame or an explicit
810 * position should be used instead.
811 * @param oldC previous body-to-ECI-frame coordinate transformation.
812 * @param oldVx x coordinate of previous velocity of body frame with respect ECI frame,
813 * resolved along ECI-frame axes.
814 * @param oldVy y coordinate of previous velocity of body frame with respect ECI frame,
815 * resolved along ECI-frame axes.
816 * @param oldVz z coordinate of previous velocity of body frame with respect ECI frame,
817 * resolved along ECI-frame axes.
818 * @return a new body kinematics instance.
819 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
820 * are not ECI frame valid.
821 */
822 public BodyKinematics estimateAndReturnNew(
823 final double timeInterval, final ECIFrame frame, final CoordinateTransformation oldC,
824 final Speed oldVx, final Speed oldVy, final Speed oldVz) {
825 return estimateKinematicsAndReturnNew(timeInterval, frame, oldC, oldVx, oldVy, oldVz);
826 }
827
828 /**
829 * Estimates body kinematics (specific force applied to a body and its angular rates).
830 *
831 * @param timeInterval time interval between epochs.
832 * @param frame body ECI frame containing current position, velocity and
833 * body-to-ECI frame coordinate transformation. The position contained in this
834 * frame is the position where gravitation is evaluated; to be consistent with
835 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
836 * the position at the start of the time interval, hence when body position changes
837 * during the time interval, overloads receiving the previous frame or an explicit
838 * position should be used instead.
839 * @param oldC previous body-to-ECI-frame coordinate transformation.
840 * @param oldVx x coordinate of previous velocity of body frame with respect ECI frame,
841 * resolved along ECI-frame axes.
842 * @param oldVy y coordinate of previous velocity of body frame with respect ECI frame,
843 * resolved along ECI-frame axes.
844 * @param oldVz z coordinate of previous velocity of body frame with respect ECI frame,
845 * resolved along ECI-frame axes.
846 * @return a new body kinematics instance.
847 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
848 * are not ECI frame valid.
849 */
850 public BodyKinematics estimateAndReturnNew(
851 final Time timeInterval, final ECIFrame frame, final CoordinateTransformation oldC,
852 final Speed oldVx, final Speed oldVy, final Speed oldVz) {
853 return estimateKinematicsAndReturnNew(timeInterval, frame, oldC, oldVx, oldVy, oldVz);
854 }
855
856 /**
857 * Estimates body kinematics (specific force applied to a body and its angular rates)..
858 *
859 * @param timeInterval time interval between epochs expressed in seconds (s).
860 * @param c body-to-ECI-frame coordinate transformation.
861 * @param oldC previous body-to-ECI-frame coordinate transformation.
862 * @param vx x coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
863 * along ECI-frame axes.
864 * @param vy y coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
865 * along ECI-frame axes.
866 * @param vz z coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
867 * along ECI-frame axes.
868 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
869 * resolved along ECI-frame axes.
870 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
871 * resolved along ECI-frame axes.
872 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
873 * resolved along ECI-frame axes.
874 * @param position body position expressed in meters (m) with respect ECI frame,
875 * resolved along ECI-frame axes.
876 * This is the position where gravitation is evaluated; to be consistent with
877 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
878 * the position at the start of the time interval.
879 * @return a new body kinematics instance.
880 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
881 * are not ECI frame valid.
882 */
883 public BodyKinematics estimateAndReturnNew(
884 final double timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
885 final double vx, final double vy, final double vz,
886 final double oldVx, final double oldVy, final double oldVz, final Point3D position) {
887 return estimateKinematicsAndReturnNew(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, position);
888 }
889
890 /**
891 * Estimates body kinematics (specific force applied to a body and its angular rates)..
892 *
893 * @param timeInterval time interval between epochs.
894 * @param c body-to-ECI-frame coordinate transformation.
895 * @param oldC previous body-to-ECI-frame coordinate transformation.
896 * @param vx x coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
897 * along ECI-frame axes.
898 * @param vy y coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
899 * along ECI-frame axes.
900 * @param vz z coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
901 * along ECI-frame axes.
902 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
903 * resolved along ECI-frame axes.
904 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
905 * resolved along ECI-frame axes.
906 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
907 * resolved along ECI-frame axes.
908 * @param position body position expressed in meters (m) with respect ECI frame,
909 * resolved along ECI-frame axes.
910 * This is the position where gravitation is evaluated; to be consistent with
911 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
912 * the position at the start of the time interval.
913 * @return a new body kinematics instance.
914 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
915 * are not ECI frame valid.
916 */
917 public BodyKinematics estimateAndReturnNew(
918 final Time timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
919 final double vx, final double vy, final double vz,
920 final double oldVx, final double oldVy, final double oldVz, final Point3D position) {
921 return estimateKinematicsAndReturnNew(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, position);
922 }
923
924 /**
925 * Estimates body kinematics (specific force applied to a body and its angular rates)..
926 *
927 * @param timeInterval time interval between epochs expressed in seconds (s).
928 * @param c body-to-ECI-frame coordinate transformation.
929 * @param oldC previous body-to-ECI-frame coordinate transformation.
930 * @param vx x coordinate of velocity of body frame with respect ECI frame, resolved
931 * along ECI-frame axes.
932 * @param vy y coordinate of velocity of body frame with respect ECI frame, resolved
933 * along ECI-frame axes.
934 * @param vz z coordinate of velocity of body frame with respect ECI frame, resolved
935 * along ECI-frame axes.
936 * @param oldVx x coordinate of previous velocity of body frame respect ECI frame,
937 * resolved along ECI-frame axes.
938 * @param oldVy y coordinate of previous velocity of body frame respect ECI frame,
939 * resolved along ECI-frame axes.
940 * @param oldVz z coordinate of previous velocity of body frame respect ECI frame,
941 * resolved along ECI-frame axes.
942 * @param position body position expressed in meters (m) with respect ECI frame,
943 * resolved along ECI-frame axes.
944 * This is the position where gravitation is evaluated; to be consistent with
945 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
946 * the position at the start of the time interval.
947 * @return a new body kinematics instance.
948 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
949 * are not ECI frame valid.
950 */
951 public BodyKinematics estimateAndReturnNew(
952 final double timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
953 final Speed vx, final Speed vy, final Speed vz, final Speed oldVx, final Speed oldVy, final Speed oldVz,
954 final Point3D position) {
955 return estimateKinematicsAndReturnNew(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, position);
956 }
957
958 /**
959 * Estimates body kinematics (specific force applied to a body and its angular rates)..
960 *
961 * @param timeInterval time interval between epochs.
962 * @param c body-to-ECI-frame coordinate transformation.
963 * @param oldC previous body-to-ECI-frame coordinate transformation.
964 * @param vx x coordinate of velocity of body frame with respect ECI frame, resolved
965 * along ECI-frame axes.
966 * @param vy y coordinate of velocity of body frame with respect ECI frame, resolved
967 * along ECI-frame axes.
968 * @param vz z coordinate of velocity of body frame with respect ECI frame, resolved
969 * along ECI-frame axes.
970 * @param oldVx x coordinate of previous velocity of body frame respect ECI frame,
971 * resolved along ECI-frame axes.
972 * @param oldVy y coordinate of previous velocity of body frame respect ECI frame,
973 * resolved along ECI-frame axes.
974 * @param oldVz z coordinate of previous velocity of body frame respect ECI frame,
975 * resolved along ECI-frame axes.
976 * @param position body position expressed in meters (m) with respect ECI frame,
977 * resolved along ECI-frame axes.
978 * This is the position where gravitation is evaluated; to be consistent with
979 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
980 * the position at the start of the time interval.
981 * @return a new body kinematics instance.
982 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
983 * are not ECI frame valid.
984 */
985 public BodyKinematics estimateAndReturnNew(
986 final Time timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
987 final Speed vx, final Speed vy, final Speed vz, final Speed oldVx, final Speed oldVy, final Speed oldVz,
988 final Point3D position) {
989 return estimateKinematicsAndReturnNew(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, position);
990 }
991
992 /**
993 * Estimates body kinematics (specific force applied to a body and its angular rates).
994 *
995 * @param timeInterval time interval between epochs expressed in seconds (s).
996 * @param c body-to-ECI-frame coordinate transformation.
997 * @param oldC previous body-to-ECI-frame coordinate transformation.
998 * @param vx x coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
999 * along ECI-frame axes.
1000 * @param vy y coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1001 * along ECI-frame axes.
1002 * @param vz z coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1003 * along ECI-frame axes.
1004 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1005 * resolved along ECI-frame axes.
1006 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1007 * resolved along ECI-frame axes.
1008 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1009 * resolved along ECI-frame axes.
1010 * @param x cartesian x coordinate of body position expressed in meters (m) and resolved along
1011 * ECI-frame axes.
1012 * This is the position where gravitation is evaluated; to be consistent with
1013 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1014 * the position at the start of the time interval.
1015 * @param y cartesian y coordinate of body position expressed in meters (m) and resolved along
1016 * ECI-frame axes.
1017 * This is the position where gravitation is evaluated; to be consistent with
1018 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1019 * the position at the start of the time interval.
1020 * @param z cartesian z coordinate of body position expressed in meters (m) and resolved along
1021 * ECI-frame axes.
1022 * This is the position where gravitation is evaluated; to be consistent with
1023 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1024 * the position at the start of the time interval.
1025 * @param result instance where estimated body kinematics will be stored.
1026 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1027 * are not ECI frame valid.
1028 */
1029 public static void estimateKinematics(
1030 final double timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
1031 final double vx, final double vy, final double vz,
1032 final double oldVx, final double oldVy, final double oldVz,
1033 final double x, final double y, final double z, final BodyKinematics result) {
1034 if (timeInterval < 0.0 || !ECIFrame.isValidCoordinateTransformation(c)
1035 || !ECIFrame.isValidCoordinateTransformation(oldC)) {
1036 throw new IllegalArgumentException();
1037 }
1038
1039 if (timeInterval > 0.0) {
1040 try {
1041 // Obtain coordinate transformation matrix from the old attitude to the new
1042 // initially c contains body-to-ECI transformation
1043 final var cib = c.getMatrix();
1044 // we transpose it to obtain the inverse
1045 cib.transpose();
1046
1047 final var oldCbi = oldC.getMatrix();
1048 final var cOldNew = cib.multiplyAndReturnNew(oldCbi);
1049
1050 // Calculate the approximate angular rate
1051 var alphaIbbX = 0.5 * (cOldNew.getElementAt(1, 2)
1052 - cOldNew.getElementAt(2, 1));
1053 var alphaIbbY = 0.5 * (cOldNew.getElementAt(2, 0)
1054 - cOldNew.getElementAt(0, 2));
1055 var alphaIbbZ = 0.5 * (cOldNew.getElementAt(0, 1)
1056 - cOldNew.getElementAt(1, 0));
1057
1058 // Calculate and apply the scaling factor
1059 final var temp = Math.acos(0.5 * (cOldNew.getElementAt(0, 0)
1060 + cOldNew.getElementAt(1, 1)
1061 + cOldNew.getElementAt(2, 2) - 1.0));
1062 if (temp > SCALING_THRESHOLD) {
1063 // Scaling is 1 if temp is less than this
1064 final var scaling = temp / Math.sin(temp);
1065 alphaIbbX *= scaling;
1066 alphaIbbY *= scaling;
1067 alphaIbbZ *= scaling;
1068 }
1069
1070 // Calculate the angular rate
1071 final var angularRateX = alphaIbbX / timeInterval;
1072 final var angularRateY = alphaIbbY / timeInterval;
1073 final var angularRateZ = alphaIbbZ / timeInterval;
1074
1075 // Calculate the specific force resolved about ECI-frame axes
1076 // From (5.18) and (5.20)
1077 final var vIbi = new Matrix(ROWS, 1);
1078 vIbi.setElementAtIndex(0, vx);
1079 vIbi.setElementAtIndex(1, vy);
1080 vIbi.setElementAtIndex(2, vz);
1081
1082 final var oldVibi = new Matrix(ROWS, 1);
1083 oldVibi.setElementAtIndex(0, oldVx);
1084 oldVibi.setElementAtIndex(1, oldVy);
1085 oldVibi.setElementAtIndex(2, oldVz);
1086
1087 final var gravitation = ECIGravitationEstimator.estimateGravitationAndReturnNew(x, y, z);
1088 final var g = gravitation.asMatrix();
1089
1090 // fIbi = ((vIbi - oldVibi) / timeInterval) - g
1091 vIbi.subtract(oldVibi);
1092 vIbi.multiplyByScalar(1.0 / timeInterval);
1093 vIbi.subtract(g);
1094 // vIbi now contains specific force resolved about ECI-frame axes
1095
1096 // Calculate the average body-to-ECI-frame coordinate transformation
1097 // matrix over the update interval using (5.84)
1098 final var alphaNorm = Math.sqrt(alphaIbbX * alphaIbbX + alphaIbbY * alphaIbbY + alphaIbbZ * alphaIbbZ);
1099 final var alphaSkew = Utils.skewMatrix(new double[]{alphaIbbX, alphaIbbY, alphaIbbZ});
1100
1101 if (alphaNorm > ALPHA_THRESHOLD) {
1102 final var alphaNorm2 = alphaNorm * alphaNorm;
1103 final var value1 = (1.0 - Math.cos(alphaNorm)) / alphaNorm2;
1104 final var value2 = (1.0 - Math.sin(alphaNorm) / alphaNorm) / alphaNorm2;
1105 final var tmp1 = alphaSkew.multiplyByScalarAndReturnNew(value1);
1106 final var tmp2 = alphaSkew.multiplyByScalarAndReturnNew(value2);
1107 tmp2.multiply(alphaSkew);
1108
1109 final var tmp3 = Matrix.identity(ROWS, ROWS);
1110 tmp3.add(tmp1);
1111 tmp3.add(tmp2);
1112
1113 oldCbi.multiply(tmp3);
1114 }
1115
1116 // oldCbi now contains the average body-to-ECI-frame coordinate transformation
1117
1118 // Transform specific force to body-frame resolving axes using (5.81)
1119 final var invAveCbi = Utils.inverse(oldCbi);
1120 invAveCbi.multiply(vIbi);
1121
1122 final var specificForceX = invAveCbi.getElementAtIndex(0);
1123 final var specificForceY = invAveCbi.getElementAtIndex(1);
1124 final var specificForceZ = invAveCbi.getElementAtIndex(2);
1125
1126 // save result data
1127 result.setSpecificForceCoordinates(specificForceX, specificForceY, specificForceZ);
1128 result.setAngularRateCoordinates(angularRateX, angularRateY, angularRateZ);
1129
1130 } catch (final AlgebraException ignore) {
1131 // never happens
1132 }
1133 } else {
1134 // If time interval is zero, set angular rate and specific force to zero
1135 result.setSpecificForceCoordinates(0.0, 0.0, 0.0);
1136 result.setAngularRateCoordinates(0.0, 0.0, 0.0);
1137 }
1138 }
1139
1140 /**
1141 * Estimates body kinematics (specific force applied to a body and its angular rates)..
1142 *
1143 * @param timeInterval time interval between epochs.
1144 * @param c body-to-ECI-frame coordinate transformation.
1145 * @param oldC previous body-to-ECI-frame coordinate transformation.
1146 * @param vx x coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1147 * along ECI-frame axes.
1148 * @param vy y coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1149 * along ECI-frame axes.
1150 * @param vz z coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1151 * along ECI-frame axes.
1152 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1153 * resolved along ECI-frame axes.
1154 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1155 * resolved along ECI-frame axes.
1156 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1157 * resolved along ECI-frame axes.
1158 * @param x cartesian x coordinate of body position expressed in meters (m) and resolved along
1159 * ECI-frame axes.
1160 * This is the position where gravitation is evaluated; to be consistent with
1161 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1162 * the position at the start of the time interval.
1163 * @param y cartesian y coordinate of body position expressed in meters (m) and resolved along
1164 * ECI-frame axes.
1165 * This is the position where gravitation is evaluated; to be consistent with
1166 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1167 * the position at the start of the time interval.
1168 * @param z cartesian z coordinate of body position expressed in meters (m) and resolved along
1169 * ECI-frame axes.
1170 * This is the position where gravitation is evaluated; to be consistent with
1171 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1172 * the position at the start of the time interval.
1173 * @param result instance where estimated body kinematics will be stored.
1174 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1175 * are not ECI frame valid.
1176 */
1177 public static void estimateKinematics(
1178 final Time timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
1179 final double vx, final double vy, final double vz,
1180 final double oldVx, final double oldVy, final double oldVz,
1181 final double x, final double y, final double z, final BodyKinematics result) {
1182 estimateKinematics(
1183 TimeConverter.convert(timeInterval.getValue().doubleValue(), timeInterval.getUnit(), TimeUnit.SECOND),
1184 c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, x, y, z, result);
1185 }
1186
1187 /**
1188 * Estimates body kinematics (specific force applied to a body and its angular rates).
1189 *
1190 * @param timeInterval time interval between epochs expressed in seconds (s).
1191 * @param frame body ECI frame containing current position, velocity and
1192 * body-to-ECI frame coordinate transformation. The position contained in this
1193 * frame is the position where gravitation is evaluated; to be consistent with
1194 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1195 * the position at the start of the time interval, hence when body position changes
1196 * during the time interval, overloads receiving the previous frame or an explicit
1197 * position should be used instead.
1198 * @param oldC previous body-to-ECI-frame coordinate transformation.
1199 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1200 * resolved along ECI-frame axes.
1201 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1202 * resolved along ECI-frame axes.
1203 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1204 * resolved along ECI-frame axes.
1205 * @param result instance where estimated body kinematics will be stored.
1206 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1207 * are not ECI frame valid.
1208 */
1209 public static void estimateKinematics(
1210 final double timeInterval, final ECIFrame frame, final CoordinateTransformation oldC,
1211 final double oldVx, final double oldVy, final double oldVz, final BodyKinematics result) {
1212 estimateKinematics(timeInterval, frame.getCoordinateTransformation(), oldC,
1213 frame.getVx(), frame.getVy(), frame.getVz(), oldVx, oldVy, oldVz,
1214 frame.getX(), frame.getY(), frame.getZ(), result);
1215 }
1216
1217 /**
1218 * Estimates body kinematics (specific force applied to a body and its angular rates).
1219 *
1220 * @param timeInterval time interval between epochs.
1221 * @param frame body ECI frame containing current position, velocity and
1222 * body-to-ECI frame coordinate transformation. The position contained in this
1223 * frame is the position where gravitation is evaluated; to be consistent with
1224 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1225 * the position at the start of the time interval, hence when body position changes
1226 * during the time interval, overloads receiving the previous frame or an explicit
1227 * position should be used instead.
1228 * @param oldC previous body-to-ECI-frame coordinate transformation.
1229 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1230 * resolved along ECI-frame axes.
1231 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1232 * resolved along ECI-frame axes.
1233 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1234 * resolved along ECI-frame axes.
1235 * @param result instance where estimated body kinematics will be stored.
1236 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1237 * are not ECI frame valid.
1238 */
1239 public static void estimateKinematics(
1240 final Time timeInterval, final ECIFrame frame, final CoordinateTransformation oldC,
1241 final double oldVx, final double oldVy, final double oldVz, final BodyKinematics result) {
1242 estimateKinematics(
1243 TimeConverter.convert(timeInterval.getValue().doubleValue(), timeInterval.getUnit(), TimeUnit.SECOND),
1244 frame.getCoordinateTransformation(), oldC, frame.getVx(), frame.getVy(), frame.getVz(),
1245 oldVx, oldVy, oldVz, frame.getX(), frame.getY(), frame.getZ(), result);
1246 }
1247
1248 /**
1249 * Estimates body kinematics (specific force applied to a body and its angular rates).
1250 *
1251 * @param timeInterval time interval between epochs expressed in seconds (s).
1252 * @param frame body ECI frame containing current position, velocity and
1253 * body-to-ECI frame coordinate transformation. Notice that
1254 * current position contained in this frame is ignored.
1255 * @param oldFrame body ECI frame containing previous position, velocity and
1256 * body-to-ECI frame coordinate transformation. The previous position contained
1257 * in this frame (the position at the start of the time interval) is the position
1258 * where gravitation is evaluated, to be consistent with
1259 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers).
1260 * @param result instance where body kinematics estimation will be stored.
1261 * @throws IllegalArgumentException if provided time interval is negative.
1262 */
1263 public static void estimateKinematics(
1264 final double timeInterval, final ECIFrame frame, final ECIFrame oldFrame, final BodyKinematics result) {
1265 // gravitation is evaluated at the position at the start of the time interval (old frame position)
1266 estimateKinematics(timeInterval, frame.getCoordinateTransformation(),
1267 oldFrame.getCoordinateTransformation(), frame.getVx(), frame.getVy(), frame.getVz(),
1268 oldFrame.getVx(), oldFrame.getVy(), oldFrame.getVz(),
1269 oldFrame.getX(), oldFrame.getY(), oldFrame.getZ(), result);
1270 }
1271
1272 /**
1273 * Estimates body kinematics (specific force applied to a body and its angular rates).
1274 *
1275 * @param timeInterval time interval between epochs.
1276 * @param frame body ECI frame containing current position, velocity and
1277 * body-to-ECI frame coordinate transformation. Notice that
1278 * current position contained in this frame is ignored.
1279 * @param oldFrame body ECI frame containing previous position, velocity and
1280 * body-to-ECI frame coordinate transformation. The previous position contained
1281 * in this frame (the position at the start of the time interval) is the position
1282 * where gravitation is evaluated, to be consistent with
1283 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers).
1284 * @param result instance where body kinematics estimation will be stored.
1285 * @throws IllegalArgumentException if provided time interval is negative.
1286 */
1287 public static void estimateKinematics(
1288 final Time timeInterval, final ECIFrame frame, final ECIFrame oldFrame, final BodyKinematics result) {
1289 // gravitation is evaluated at the position at the start of the time interval (old frame position)
1290 estimateKinematics(timeInterval, frame.getCoordinateTransformation(),
1291 oldFrame.getCoordinateTransformation(), frame.getVx(), frame.getVy(), frame.getVz(),
1292 oldFrame.getVx(), oldFrame.getVy(), oldFrame.getVz(),
1293 oldFrame.getX(), oldFrame.getY(), oldFrame.getZ(), result);
1294 }
1295
1296 /**
1297 * Estimates body kinematics (specific force applied to a body and its angular rates)..
1298 *
1299 * @param timeInterval time interval between epochs expressed in seconds (s).
1300 * @param c body-to-ECI-frame coordinate transformation.
1301 * @param oldC previous body-to-ECI-frame coordinate transformation.
1302 * @param vx x coordinate of velocity of body frame with respect ECI frame, resolved
1303 * along ECI-frame axes.
1304 * @param vy y coordinate of velocity of body frame with respect ECI frame, resolved
1305 * along ECI-frame axes.
1306 * @param vz z coordinate of velocity of body frame with respect ECI frame, resolved
1307 * along ECI-frame axes.
1308 * @param oldVx x coordinate of previous velocity of body frame with respect ECI frame,
1309 * resolved along ECI-frame axes.
1310 * @param oldVy y coordinate of previous velocity of body frame with respect ECI frame,
1311 * resolved along ECI-frame axes.
1312 * @param oldVz z coordinate of previous velocity of body frame with respect ECI frame,
1313 * resolved along ECI-frame axes.
1314 * @param x cartesian x coordinate of body position expressed in meters (m) and resolved along
1315 * ECI-frame axes.
1316 * This is the position where gravitation is evaluated; to be consistent with
1317 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1318 * the position at the start of the time interval.
1319 * @param y cartesian y coordinate of body position expressed in meters (m) and resolved along
1320 * ECI-frame axes.
1321 * This is the position where gravitation is evaluated; to be consistent with
1322 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1323 * the position at the start of the time interval.
1324 * @param z cartesian z coordinate of body position expressed in meters (m) and resolved along
1325 * ECI-frame axes.
1326 * This is the position where gravitation is evaluated; to be consistent with
1327 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1328 * the position at the start of the time interval.
1329 * @param result instance where estimated body kinematics will be stored.
1330 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1331 * are not ECI frame valid.
1332 */
1333 public static void estimateKinematics(
1334 final double timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
1335 final Speed vx, final Speed vy, final Speed vz, final Speed oldVx, final Speed oldVy, final Speed oldVz,
1336 final double x, final double y, final double z, final BodyKinematics result) {
1337 estimateKinematics(timeInterval, c, oldC,
1338 SpeedConverter.convert(vx.getValue().doubleValue(), vx.getUnit(), SpeedUnit.METERS_PER_SECOND),
1339 SpeedConverter.convert(vy.getValue().doubleValue(), vy.getUnit(), SpeedUnit.METERS_PER_SECOND),
1340 SpeedConverter.convert(vz.getValue().doubleValue(), vz.getUnit(), SpeedUnit.METERS_PER_SECOND),
1341 SpeedConverter.convert(oldVx.getValue().doubleValue(), oldVx.getUnit(), SpeedUnit.METERS_PER_SECOND),
1342 SpeedConverter.convert(oldVy.getValue().doubleValue(), oldVy.getUnit(), SpeedUnit.METERS_PER_SECOND),
1343 SpeedConverter.convert(oldVz.getValue().doubleValue(), oldVz.getUnit(), SpeedUnit.METERS_PER_SECOND),
1344 x, y, z, result);
1345 }
1346
1347 /**
1348 * Estimates body kinematics (specific force applied to a body and its angular rates)..
1349 *
1350 * @param timeInterval time interval between epochs.
1351 * @param c body-to-ECI-frame coordinate transformation.
1352 * @param oldC previous body-to-ECI-frame coordinate transformation.
1353 * @param vx x coordinate of velocity of body frame with respect ECI frame, resolved
1354 * along ECI-frame axes.
1355 * @param vy y coordinate of velocity of body frame with respect ECI frame, resolved
1356 * along ECI-frame axes.
1357 * @param vz z coordinate of velocity of body frame with respect ECI frame, resolved
1358 * along ECI-frame axes.
1359 * @param oldVx x coordinate of previous velocity of body frame with respect ECI frame,
1360 * resolved along ECI-frame axes.
1361 * @param oldVy y coordinate of previous velocity of body frame with respect ECI frame,
1362 * resolved along ECI-frame axes.
1363 * @param oldVz z coordinate of previous velocity of body frame with respect ECI frame,
1364 * resolved along ECI-frame axes.
1365 * @param x cartesian x coordinate of body position expressed in meters (m) and resolved along
1366 * ECI-frame axes.
1367 * This is the position where gravitation is evaluated; to be consistent with
1368 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1369 * the position at the start of the time interval.
1370 * @param y cartesian y coordinate of body position expressed in meters (m) and resolved along
1371 * ECI-frame axes.
1372 * This is the position where gravitation is evaluated; to be consistent with
1373 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1374 * the position at the start of the time interval.
1375 * @param z cartesian z coordinate of body position expressed in meters (m) and resolved along
1376 * ECI-frame axes.
1377 * This is the position where gravitation is evaluated; to be consistent with
1378 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1379 * the position at the start of the time interval.
1380 * @param result instance where estimated body kinematics will be stored.
1381 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1382 * are not ECI frame valid.
1383 */
1384 public static void estimateKinematics(
1385 final Time timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
1386 final Speed vx, final Speed vy, final Speed vz, final Speed oldVx, final Speed oldVy, final Speed oldVz,
1387 final double x, final double y, final double z, final BodyKinematics result) {
1388 estimateKinematics(timeInterval, c, oldC,
1389 SpeedConverter.convert(vx.getValue().doubleValue(), vx.getUnit(), SpeedUnit.METERS_PER_SECOND),
1390 SpeedConverter.convert(vy.getValue().doubleValue(), vy.getUnit(), SpeedUnit.METERS_PER_SECOND),
1391 SpeedConverter.convert(vz.getValue().doubleValue(), vz.getUnit(), SpeedUnit.METERS_PER_SECOND),
1392 SpeedConverter.convert(oldVx.getValue().doubleValue(), oldVx.getUnit(), SpeedUnit.METERS_PER_SECOND),
1393 SpeedConverter.convert(oldVy.getValue().doubleValue(), oldVy.getUnit(), SpeedUnit.METERS_PER_SECOND),
1394 SpeedConverter.convert(oldVz.getValue().doubleValue(), oldVz.getUnit(), SpeedUnit.METERS_PER_SECOND),
1395 x, y, z, result);
1396 }
1397
1398 /**
1399 * Estimates body kinematics (specific force applied to a body and its angular rates).
1400 *
1401 * @param timeInterval time interval between epochs expressed in seconds (s).
1402 * @param frame body ECI frame containing current position, velocity and
1403 * body-to-ECI frame coordinate transformation. The position contained in this
1404 * frame is the position where gravitation is evaluated; to be consistent with
1405 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1406 * the position at the start of the time interval, hence when body position changes
1407 * during the time interval, overloads receiving the previous frame or an explicit
1408 * position should be used instead.
1409 * @param oldC previous body-to-ECI-frame coordinate transformation.
1410 * @param oldVx x coordinate of previous velocity of body frame with respect ECI frame,
1411 * resolved along ECI-frame axes.
1412 * @param oldVy y coordinate of previous velocity of body frame with respect ECI frame,
1413 * resolved along ECI-frame axes.
1414 * @param oldVz z coordinate of previous velocity of body frame with respect ECI frame,
1415 * resolved along ECI-frame axes.
1416 * @param result instance where estimated body kinematics will be stored.
1417 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1418 * are not ECI frame valid.
1419 */
1420 public static void estimateKinematics(
1421 final double timeInterval, final ECIFrame frame, final CoordinateTransformation oldC,
1422 final Speed oldVx, final Speed oldVy, final Speed oldVz, final BodyKinematics result) {
1423 estimateKinematics(timeInterval, frame, oldC,
1424 SpeedConverter.convert(oldVx.getValue().doubleValue(), oldVx.getUnit(), SpeedUnit.METERS_PER_SECOND),
1425 SpeedConverter.convert(oldVy.getValue().doubleValue(), oldVy.getUnit(), SpeedUnit.METERS_PER_SECOND),
1426 SpeedConverter.convert(oldVz.getValue().doubleValue(), oldVz.getUnit(), SpeedUnit.METERS_PER_SECOND),
1427 result);
1428 }
1429
1430 /**
1431 * Estimates body kinematics (specific force applied to a body and its angular rates).
1432 *
1433 * @param timeInterval time interval between epochs.
1434 * @param frame body ECI frame containing current position, velocity and
1435 * body-to-ECI frame coordinate transformation. The position contained in this
1436 * frame is the position where gravitation is evaluated; to be consistent with
1437 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1438 * the position at the start of the time interval, hence when body position changes
1439 * during the time interval, overloads receiving the previous frame or an explicit
1440 * position should be used instead.
1441 * @param oldC previous body-to-ECI-frame coordinate transformation.
1442 * @param oldVx x coordinate of previous velocity of body frame with respect ECI frame,
1443 * resolved along ECI-frame axes.
1444 * @param oldVy y coordinate of previous velocity of body frame with respect ECI frame,
1445 * resolved along ECI-frame axes.
1446 * @param oldVz z coordinate of previous velocity of body frame with respect ECI frame,
1447 * resolved along ECI-frame axes.
1448 * @param result instance where estimated body kinematics will be stored.
1449 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1450 * are not ECI frame valid.
1451 */
1452 public static void estimateKinematics(
1453 final Time timeInterval, final ECIFrame frame, final CoordinateTransformation oldC,
1454 final Speed oldVx, final Speed oldVy, final Speed oldVz, final BodyKinematics result) {
1455 estimateKinematics(timeInterval, frame, oldC,
1456 SpeedConverter.convert(oldVx.getValue().doubleValue(), oldVx.getUnit(), SpeedUnit.METERS_PER_SECOND),
1457 SpeedConverter.convert(oldVy.getValue().doubleValue(), oldVy.getUnit(), SpeedUnit.METERS_PER_SECOND),
1458 SpeedConverter.convert(oldVz.getValue().doubleValue(), oldVz.getUnit(), SpeedUnit.METERS_PER_SECOND),
1459 result);
1460 }
1461
1462 /**
1463 * Estimates body kinematics (specific force applied to a body and its angular rates)..
1464 *
1465 * @param timeInterval time interval between epochs expressed in seconds (s).
1466 * @param c body-to-ECI-frame coordinate transformation.
1467 * @param oldC previous body-to-ECI-frame coordinate transformation.
1468 * @param vx x coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1469 * along ECI-frame axes.
1470 * @param vy y coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1471 * along ECI-frame axes.
1472 * @param vz z coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1473 * along ECI-frame axes.
1474 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1475 * resolved along ECI-frame axes.
1476 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1477 * resolved along ECI-frame axes.
1478 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1479 * resolved along ECI-frame axes.
1480 * @param position body position expressed in meters (m) with respect ECI frame,
1481 * resolved along ECI-frame axes.
1482 * This is the position where gravitation is evaluated; to be consistent with
1483 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1484 * the position at the start of the time interval.
1485 * @param result instance where estimated body kinematics will be stored.
1486 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1487 * are not ECI frame valid.
1488 */
1489 public static void estimateKinematics(
1490 final double timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
1491 final double vx, final double vy, final double vz,
1492 final double oldVx, final double oldVy, final double oldVz, final Point3D position,
1493 final BodyKinematics result) {
1494 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz,
1495 position.getInhomX(), position.getInhomY(), position.getInhomZ(), result);
1496 }
1497
1498 /**
1499 * Estimates body kinematics (specific force applied to a body and its angular rates)..
1500 *
1501 * @param timeInterval time interval between epochs.
1502 * @param c body-to-ECI-frame coordinate transformation.
1503 * @param oldC previous body-to-ECI-frame coordinate transformation.
1504 * @param vx x coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1505 * along ECI-frame axes.
1506 * @param vy y coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1507 * along ECI-frame axes.
1508 * @param vz z coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1509 * along ECI-frame axes.
1510 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1511 * resolved along ECI-frame axes.
1512 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1513 * resolved along ECI-frame axes.
1514 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1515 * resolved along ECI-frame axes.
1516 * @param position body position expressed in meters (m) with respect ECI frame,
1517 * resolved along ECI-frame axes.
1518 * This is the position where gravitation is evaluated; to be consistent with
1519 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1520 * the position at the start of the time interval.
1521 * @param result instance where estimated body kinematics will be stored.
1522 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1523 * are not ECI frame valid.
1524 */
1525 public static void estimateKinematics(
1526 final Time timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
1527 final double vx, final double vy, final double vz,
1528 final double oldVx, final double oldVy, final double oldVz, final Point3D position,
1529 final BodyKinematics result) {
1530 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz,
1531 position.getInhomX(), position.getInhomY(), position.getInhomZ(), result);
1532 }
1533
1534 /**
1535 * Estimates body kinematics (specific force applied to a body and its angular rates)..
1536 *
1537 * @param timeInterval time interval between epochs expressed in seconds (s).
1538 * @param c body-to-ECI-frame coordinate transformation.
1539 * @param oldC previous body-to-ECI-frame coordinate transformation.
1540 * @param vx x coordinate of velocity of body frame with respect ECI frame, resolved
1541 * along ECI-frame axes.
1542 * @param vy y coordinate of velocity of body frame with respect ECI frame, resolved
1543 * along ECI-frame axes.
1544 * @param vz z coordinate of velocity of body frame with respect ECI frame, resolved
1545 * along ECI-frame axes.
1546 * @param oldVx x coordinate of previous velocity of body frame respect ECI frame,
1547 * resolved along ECI-frame axes.
1548 * @param oldVy y coordinate of previous velocity of body frame respect ECI frame,
1549 * resolved along ECI-frame axes.
1550 * @param oldVz z coordinate of previous velocity of body frame respect ECI frame,
1551 * resolved along ECI-frame axes.
1552 * @param position body position expressed in meters (m) with respect ECI frame,
1553 * resolved along ECI-frame axes.
1554 * This is the position where gravitation is evaluated; to be consistent with
1555 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1556 * the position at the start of the time interval.
1557 * @param result instance where estimated body kinematics will be stored.
1558 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1559 * are not ECI frame valid.
1560 */
1561 public static void estimateKinematics(
1562 final double timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
1563 final Speed vx, final Speed vy, final Speed vz, final Speed oldVx, final Speed oldVy, final Speed oldVz,
1564 final Point3D position, final BodyKinematics result) {
1565 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz,
1566 position.getInhomX(), position.getInhomY(), position.getInhomZ(), result);
1567 }
1568
1569 /**
1570 * Estimates body kinematics (specific force applied to a body and its angular rates)..
1571 *
1572 * @param timeInterval time interval between epochs.
1573 * @param c body-to-ECI-frame coordinate transformation.
1574 * @param oldC previous body-to-ECI-frame coordinate transformation.
1575 * @param vx x coordinate of velocity of body frame with respect ECI frame, resolved
1576 * along ECI-frame axes.
1577 * @param vy y coordinate of velocity of body frame with respect ECI frame, resolved
1578 * along ECI-frame axes.
1579 * @param vz z coordinate of velocity of body frame with respect ECI frame, resolved
1580 * along ECI-frame axes.
1581 * @param oldVx x coordinate of previous velocity of body frame respect ECI frame,
1582 * resolved along ECI-frame axes.
1583 * @param oldVy y coordinate of previous velocity of body frame respect ECI frame,
1584 * resolved along ECI-frame axes.
1585 * @param oldVz z coordinate of previous velocity of body frame respect ECI frame,
1586 * resolved along ECI-frame axes.
1587 * @param position body position expressed in meters (m) with respect ECI frame,
1588 * resolved along ECI-frame axes.
1589 * This is the position where gravitation is evaluated; to be consistent with
1590 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1591 * the position at the start of the time interval.
1592 * @param result instance where estimated body kinematics will be stored.
1593 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1594 * are not ECI frame valid.
1595 */
1596 public static void estimateKinematics(
1597 final Time timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
1598 final Speed vx, final Speed vy, final Speed vz, final Speed oldVx, final Speed oldVy, final Speed oldVz,
1599 final Point3D position, final BodyKinematics result) {
1600 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz,
1601 position.getInhomX(), position.getInhomY(), position.getInhomZ(), result);
1602 }
1603
1604 /**
1605 * Estimates body kinematics (specific force applied to a body and its angular rates)..
1606 *
1607 * @param timeInterval time interval between epochs expressed in seconds (s).
1608 * @param c body-to-ECI-frame coordinate transformation.
1609 * @param oldC previous body-to-ECI-frame coordinate transformation.
1610 * @param vx x coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1611 * along ECI-frame axes.
1612 * @param vy y coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1613 * along ECI-frame axes.
1614 * @param vz z coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1615 * along ECI-frame axes.
1616 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1617 * resolved along ECI-frame axes.
1618 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1619 * resolved along ECI-frame axes.
1620 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1621 * resolved along ECI-frame axes.
1622 * @param x cartesian x coordinate of body position expressed in meters (m) and resolved along
1623 * ECI-frame axes.
1624 * This is the position where gravitation is evaluated; to be consistent with
1625 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1626 * the position at the start of the time interval.
1627 * @param y cartesian y coordinate of body position expressed in meters (m) and resolved along
1628 * ECI-frame axes.
1629 * This is the position where gravitation is evaluated; to be consistent with
1630 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1631 * the position at the start of the time interval.
1632 * @param z cartesian z coordinate of body position expressed in meters (m) and resolved along
1633 * ECI-frame axes.
1634 * This is the position where gravitation is evaluated; to be consistent with
1635 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1636 * the position at the start of the time interval.
1637 * @return a new body kinematics instance.
1638 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1639 * are not ECI frame valid.
1640 */
1641 public static BodyKinematics estimateKinematicsAndReturnNew(
1642 final double timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
1643 final double vx, final double vy, final double vz,
1644 final double oldVx, final double oldVy, final double oldVz,
1645 final double x, final double y, final double z) {
1646 final var result = new BodyKinematics();
1647 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, x, y, z, result);
1648 return result;
1649 }
1650
1651 /**
1652 * Estimates body kinematics (specific force applied to a body and its angular rates)..
1653 *
1654 * @param timeInterval time interval between epochs.
1655 * @param c body-to-ECI-frame coordinate transformation.
1656 * @param oldC previous body-to-ECI-frame coordinate transformation.
1657 * @param vx x coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1658 * along ECI-frame axes.
1659 * @param vy y coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1660 * along ECI-frame axes.
1661 * @param vz z coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1662 * along ECI-frame axes.
1663 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1664 * resolved along ECI-frame axes.
1665 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1666 * resolved along ECI-frame axes.
1667 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1668 * resolved along ECI-frame axes.
1669 * @param x cartesian x coordinate of body position expressed in meters (m) and resolved along
1670 * ECI-frame axes.
1671 * This is the position where gravitation is evaluated; to be consistent with
1672 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1673 * the position at the start of the time interval.
1674 * @param y cartesian y coordinate of body position expressed in meters (m) and resolved along
1675 * ECI-frame axes.
1676 * This is the position where gravitation is evaluated; to be consistent with
1677 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1678 * the position at the start of the time interval.
1679 * @param z cartesian z coordinate of body position expressed in meters (m) and resolved along
1680 * ECI-frame axes.
1681 * This is the position where gravitation is evaluated; to be consistent with
1682 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1683 * the position at the start of the time interval.
1684 * @return a new body kinematics instance.
1685 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1686 * are not ECI frame valid.
1687 */
1688 public static BodyKinematics estimateKinematicsAndReturnNew(
1689 final Time timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
1690 final double vx, final double vy, final double vz,
1691 final double oldVx, final double oldVy, final double oldVz,
1692 final double x, final double y, final double z) {
1693 final var result = new BodyKinematics();
1694 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, x, y, z, result);
1695 return result;
1696 }
1697
1698 /**
1699 * Estimates body kinematics (specific force applied to a body and its angular rates).
1700 *
1701 * @param timeInterval time interval between epochs expressed in seconds (s).
1702 * @param frame body ECI frame containing current position, velocity and
1703 * body-to-ECI frame coordinate transformation. The position contained in this
1704 * frame is the position where gravitation is evaluated; to be consistent with
1705 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1706 * the position at the start of the time interval, hence when body position changes
1707 * during the time interval, overloads receiving the previous frame or an explicit
1708 * position should be used instead.
1709 * @param oldC previous body-to-ECI-frame coordinate transformation.
1710 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1711 * resolved along ECI-frame axes.
1712 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1713 * resolved along ECI-frame axes.
1714 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1715 * resolved along ECI-frame axes.
1716 * @return a new body kinematics instance.
1717 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1718 * are not ECI frame valid.
1719 */
1720 public static BodyKinematics estimateKinematicsAndReturnNew(
1721 final double timeInterval, final ECIFrame frame, final CoordinateTransformation oldC,
1722 final double oldVx, final double oldVy, final double oldVz) {
1723 final var result = new BodyKinematics();
1724 estimateKinematics(timeInterval, frame, oldC, oldVx, oldVy, oldVz, result);
1725 return result;
1726 }
1727
1728 /**
1729 * Estimates body kinematics (specific force applied to a body and its angular rates).
1730 *
1731 * @param timeInterval time interval between epochs.
1732 * @param frame body ECI frame containing current position, velocity and
1733 * body-to-ECI frame coordinate transformation. The position contained in this
1734 * frame is the position where gravitation is evaluated; to be consistent with
1735 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1736 * the position at the start of the time interval, hence when body position changes
1737 * during the time interval, overloads receiving the previous frame or an explicit
1738 * position should be used instead.
1739 * @param oldC previous body-to-ECI-frame coordinate transformation.
1740 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1741 * resolved along ECI-frame axes.
1742 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1743 * resolved along ECI-frame axes.
1744 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1745 * resolved along ECI-frame axes.
1746 * @return a new body kinematics instance.
1747 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1748 * are not ECI frame valid.
1749 */
1750 public static BodyKinematics estimateKinematicsAndReturnNew(
1751 final Time timeInterval, final ECIFrame frame, final CoordinateTransformation oldC,
1752 final double oldVx, final double oldVy, final double oldVz) {
1753 final var result = new BodyKinematics();
1754 estimateKinematics(timeInterval, frame, oldC, oldVx, oldVy, oldVz, result);
1755 return result;
1756 }
1757
1758 /**
1759 * Estimates body kinematics (specific force applied to a body and its angular rates).
1760 *
1761 * @param timeInterval time interval between epochs expressed in seconds (s).
1762 * @param frame body ECI frame containing current position, velocity and
1763 * body-to-ECI frame coordinate transformation. Notice that
1764 * current position contained in this frame is ignored.
1765 * @param oldFrame body ECI frame containing previous position, velocity and
1766 * body-to-ECI frame coordinate transformation. The previous position contained
1767 * in this frame (the position at the start of the time interval) is the position
1768 * where gravitation is evaluated, to be consistent with
1769 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers).
1770 * @return a new body kinematics instance.
1771 * @throws IllegalArgumentException if provided time interval is negative.
1772 */
1773 public static BodyKinematics estimateKinematicsAndReturnNew(
1774 final double timeInterval, final ECIFrame frame, final ECIFrame oldFrame) {
1775 final var result = new BodyKinematics();
1776 estimateKinematics(timeInterval, frame, oldFrame, result);
1777 return result;
1778 }
1779
1780 /**
1781 * Estimates body kinematics (specific force applied to a body and its angular rates).
1782 *
1783 * @param timeInterval time interval between epochs.
1784 * @param frame body ECI frame containing current position, velocity and
1785 * body-to-ECI frame coordinate transformation. Notice that
1786 * current position contained in this frame is ignored.
1787 * @param oldFrame body ECI frame containing previous position, velocity and
1788 * body-to-ECI frame coordinate transformation. The previous position contained
1789 * in this frame (the position at the start of the time interval) is the position
1790 * where gravitation is evaluated, to be consistent with
1791 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers).
1792 * @return a new body kinematics instance.
1793 * @throws IllegalArgumentException if provided time interval is negative.
1794 */
1795 public static BodyKinematics estimateKinematicsAndReturnNew(
1796 final Time timeInterval, final ECIFrame frame, final ECIFrame oldFrame) {
1797 final var result = new BodyKinematics();
1798 estimateKinematics(timeInterval, frame, oldFrame, result);
1799 return result;
1800 }
1801
1802 /**
1803 * Estimates body kinematics (specific force applied to a body and its angular rates)..
1804 *
1805 * @param timeInterval time interval between epochs expressed in seconds (s).
1806 * @param c body-to-ECI-frame coordinate transformation.
1807 * @param oldC previous body-to-ECI-frame coordinate transformation.
1808 * @param vx x coordinate of velocity of body frame with respect ECI frame, resolved
1809 * along ECI-frame axes.
1810 * @param vy y coordinate of velocity of body frame with respect ECI frame, resolved
1811 * along ECI-frame axes.
1812 * @param vz z coordinate of velocity of body frame with respect ECI frame, resolved
1813 * along ECI-frame axes.
1814 * @param oldVx x coordinate of previous velocity of body frame with respect ECI frame,
1815 * resolved along ECI-frame axes.
1816 * @param oldVy y coordinate of previous velocity of body frame with respect ECI frame,
1817 * resolved along ECI-frame axes.
1818 * @param oldVz z coordinate of previous velocity of body frame with respect ECI frame,
1819 * resolved along ECI-frame axes.
1820 * @param x cartesian x coordinate of body position expressed in meters (m) and resolved along
1821 * ECI-frame axes.
1822 * This is the position where gravitation is evaluated; to be consistent with
1823 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1824 * the position at the start of the time interval.
1825 * @param y cartesian y coordinate of body position expressed in meters (m) and resolved along
1826 * ECI-frame axes.
1827 * This is the position where gravitation is evaluated; to be consistent with
1828 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1829 * the position at the start of the time interval.
1830 * @param z cartesian z coordinate of body position expressed in meters (m) and resolved along
1831 * ECI-frame axes.
1832 * This is the position where gravitation is evaluated; to be consistent with
1833 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1834 * the position at the start of the time interval.
1835 * @return a new body kinematics instance.
1836 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1837 * are not ECI frame valid.
1838 */
1839 public static BodyKinematics estimateKinematicsAndReturnNew(
1840 final double timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
1841 final Speed vx, final Speed vy, final Speed vz, final Speed oldVx, final Speed oldVy, final Speed oldVz,
1842 final double x, final double y, final double z) {
1843 final var result = new BodyKinematics();
1844 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, x, y, z, result);
1845 return result;
1846 }
1847
1848 /**
1849 * Estimates body kinematics (specific force applied to a body and its angular rates)..
1850 *
1851 * @param timeInterval time interval between epochs.
1852 * @param c body-to-ECI-frame coordinate transformation.
1853 * @param oldC previous body-to-ECI-frame coordinate transformation.
1854 * @param vx x coordinate of velocity of body frame with respect ECI frame, resolved
1855 * along ECI-frame axes.
1856 * @param vy y coordinate of velocity of body frame with respect ECI frame, resolved
1857 * along ECI-frame axes.
1858 * @param vz z coordinate of velocity of body frame with respect ECI frame, resolved
1859 * along ECI-frame axes.
1860 * @param oldVx x coordinate of previous velocity of body frame with respect ECI frame,
1861 * resolved along ECI-frame axes.
1862 * @param oldVy y coordinate of previous velocity of body frame with respect ECI frame,
1863 * resolved along ECI-frame axes.
1864 * @param oldVz z coordinate of previous velocity of body frame with respect ECI frame,
1865 * resolved along ECI-frame axes.
1866 * @param x cartesian x coordinate of body position expressed in meters (m) and resolved along
1867 * ECI-frame axes.
1868 * This is the position where gravitation is evaluated; to be consistent with
1869 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1870 * the position at the start of the time interval.
1871 * @param y cartesian y coordinate of body position expressed in meters (m) and resolved along
1872 * ECI-frame axes.
1873 * This is the position where gravitation is evaluated; to be consistent with
1874 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1875 * the position at the start of the time interval.
1876 * @param z cartesian z coordinate of body position expressed in meters (m) and resolved along
1877 * ECI-frame axes.
1878 * This is the position where gravitation is evaluated; to be consistent with
1879 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1880 * the position at the start of the time interval.
1881 * @return a new body kinematics instance.
1882 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1883 * are not ECI frame valid.
1884 */
1885 public static BodyKinematics estimateKinematicsAndReturnNew(
1886 final Time timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
1887 final Speed vx, final Speed vy, final Speed vz, final Speed oldVx, final Speed oldVy, final Speed oldVz,
1888 final double x, final double y, final double z) {
1889 final var result = new BodyKinematics();
1890 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, x, y, z, result);
1891 return result;
1892 }
1893
1894 /**
1895 * Estimates body kinematics (specific force applied to a body and its angular rates).
1896 *
1897 * @param timeInterval time interval between epochs expressed in seconds (s).
1898 * @param frame body ECI frame containing current position, velocity and
1899 * body-to-ECI frame coordinate transformation. The position contained in this
1900 * frame is the position where gravitation is evaluated; to be consistent with
1901 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1902 * the position at the start of the time interval, hence when body position changes
1903 * during the time interval, overloads receiving the previous frame or an explicit
1904 * position should be used instead.
1905 * @param oldC previous body-to-ECI-frame coordinate transformation.
1906 * @param oldVx x coordinate of previous velocity of body frame with respect ECI frame,
1907 * resolved along ECI-frame axes.
1908 * @param oldVy y coordinate of previous velocity of body frame with respect ECI frame,
1909 * resolved along ECI-frame axes.
1910 * @param oldVz z coordinate of previous velocity of body frame with respect ECI frame,
1911 * resolved along ECI-frame axes.
1912 * @return a new body kinematics instance.
1913 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1914 * are not ECI frame valid.
1915 */
1916 public static BodyKinematics estimateKinematicsAndReturnNew(
1917 final double timeInterval, final ECIFrame frame,
1918 final CoordinateTransformation oldC, final Speed oldVx, final Speed oldVy, final Speed oldVz) {
1919 final var result = new BodyKinematics();
1920 estimateKinematics(timeInterval, frame, oldC, oldVx, oldVy, oldVz, result);
1921 return result;
1922 }
1923
1924 /**
1925 * Estimates body kinematics (specific force applied to a body and its angular rates).
1926 *
1927 * @param timeInterval time interval between epochs.
1928 * @param frame body ECI frame containing current position, velocity and
1929 * body-to-ECI frame coordinate transformation. The position contained in this
1930 * frame is the position where gravitation is evaluated; to be consistent with
1931 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1932 * the position at the start of the time interval, hence when body position changes
1933 * during the time interval, overloads receiving the previous frame or an explicit
1934 * position should be used instead.
1935 * @param oldC previous body-to-ECI-frame coordinate transformation.
1936 * @param oldVx x coordinate of previous velocity of body frame with respect ECI frame,
1937 * resolved along ECI-frame axes.
1938 * @param oldVy y coordinate of previous velocity of body frame with respect ECI frame,
1939 * resolved along ECI-frame axes.
1940 * @param oldVz z coordinate of previous velocity of body frame with respect ECI frame,
1941 * resolved along ECI-frame axes.
1942 * @return a new body kinematics instance.
1943 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1944 * are not ECI frame valid.
1945 */
1946 public static BodyKinematics estimateKinematicsAndReturnNew(
1947 final Time timeInterval, final ECIFrame frame, final CoordinateTransformation oldC,
1948 final Speed oldVx, final Speed oldVy, final Speed oldVz) {
1949 final var result = new BodyKinematics();
1950 estimateKinematics(timeInterval, frame, oldC, oldVx, oldVy, oldVz, result);
1951 return result;
1952 }
1953
1954 /**
1955 * Estimates body kinematics (specific force applied to a body and its angular rates)..
1956 *
1957 * @param timeInterval time interval between epochs expressed in seconds (s).
1958 * @param c body-to-ECI-frame coordinate transformation.
1959 * @param oldC previous body-to-ECI-frame coordinate transformation.
1960 * @param vx x coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1961 * along ECI-frame axes.
1962 * @param vy y coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1963 * along ECI-frame axes.
1964 * @param vz z coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1965 * along ECI-frame axes.
1966 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1967 * resolved along ECI-frame axes.
1968 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1969 * resolved along ECI-frame axes.
1970 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
1971 * resolved along ECI-frame axes.
1972 * @param position body position expressed in meters (m) with respect ECI frame,
1973 * resolved along ECI-frame axes.
1974 * This is the position where gravitation is evaluated; to be consistent with
1975 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
1976 * the position at the start of the time interval.
1977 * @return a new body kinematics instance.
1978 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
1979 * are not ECI frame valid.
1980 */
1981 public static BodyKinematics estimateKinematicsAndReturnNew(
1982 final double timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
1983 final double vx, final double vy, final double vz,
1984 final double oldVx, final double oldVy, final double oldVz, final Point3D position) {
1985 final var result = new BodyKinematics();
1986 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, position, result);
1987 return result;
1988 }
1989
1990 /**
1991 * Estimates body kinematics (specific force applied to a body and its angular rates)..
1992 *
1993 * @param timeInterval time interval between epochs.
1994 * @param c body-to-ECI-frame coordinate transformation.
1995 * @param oldC previous body-to-ECI-frame coordinate transformation.
1996 * @param vx x coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1997 * along ECI-frame axes.
1998 * @param vy y coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
1999 * along ECI-frame axes.
2000 * @param vz z coordinate of velocity of body frame expressed in meters per second (m/s) and resolved
2001 * along ECI-frame axes.
2002 * @param oldVx x coordinate of previous velocity of body frame expressed in meters per second (m/s) and
2003 * resolved along ECI-frame axes.
2004 * @param oldVy y coordinate of previous velocity of body frame expressed in meters per second (m/s) and
2005 * resolved along ECI-frame axes.
2006 * @param oldVz z coordinate of previous velocity of body frame expressed in meters per second (m/s) and
2007 * resolved along ECI-frame axes.
2008 * @param position body position expressed in meters (m) with respect ECI frame,
2009 * resolved along ECI-frame axes.
2010 * This is the position where gravitation is evaluated; to be consistent with
2011 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
2012 * the position at the start of the time interval.
2013 * @return a new body kinematics instance.
2014 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
2015 * are not ECI frame valid.
2016 */
2017 public static BodyKinematics estimateKinematicsAndReturnNew(
2018 final Time timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
2019 final double vx, final double vy, final double vz,
2020 final double oldVx, final double oldVy, final double oldVz, final Point3D position) {
2021 final var result = new BodyKinematics();
2022 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, position, result);
2023 return result;
2024 }
2025
2026 /**
2027 * Estimates body kinematics (specific force applied to a body and its angular rates)..
2028 *
2029 * @param timeInterval time interval between epochs expressed in seconds (s).
2030 * @param c body-to-ECI-frame coordinate transformation.
2031 * @param oldC previous body-to-ECI-frame coordinate transformation.
2032 * @param vx x coordinate of velocity of body frame with respect ECI frame, resolved
2033 * along ECI-frame axes.
2034 * @param vy y coordinate of velocity of body frame with respect ECI frame, resolved
2035 * along ECI-frame axes.
2036 * @param vz z coordinate of velocity of body frame with respect ECI frame, resolved
2037 * along ECI-frame axes.
2038 * @param oldVx x coordinate of previous velocity of body frame respect ECI frame,
2039 * resolved along ECI-frame axes.
2040 * @param oldVy y coordinate of previous velocity of body frame respect ECI frame,
2041 * resolved along ECI-frame axes.
2042 * @param oldVz z coordinate of previous velocity of body frame respect ECI frame,
2043 * resolved along ECI-frame axes.
2044 * @param position body position expressed in meters (m) with respect ECI frame,
2045 * resolved along ECI-frame axes.
2046 * This is the position where gravitation is evaluated; to be consistent with
2047 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
2048 * the position at the start of the time interval.
2049 * @return a new body kinematics instance.
2050 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
2051 * are not ECI frame valid.
2052 */
2053 public static BodyKinematics estimateKinematicsAndReturnNew(
2054 final double timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
2055 final Speed vx, final Speed vy, final Speed vz, final Speed oldVx, final Speed oldVy, final Speed oldVz,
2056 final Point3D position) {
2057 final var result = new BodyKinematics();
2058 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, position, result);
2059 return result;
2060 }
2061
2062 /**
2063 * Estimates body kinematics (specific force applied to a body and its angular rates)..
2064 *
2065 * @param timeInterval time interval between epochs.
2066 * @param c body-to-ECI-frame coordinate transformation.
2067 * @param oldC previous body-to-ECI-frame coordinate transformation.
2068 * @param vx x coordinate of velocity of body frame with respect ECI frame, resolved
2069 * along ECI-frame axes.
2070 * @param vy y coordinate of velocity of body frame with respect ECI frame, resolved
2071 * along ECI-frame axes.
2072 * @param vz z coordinate of velocity of body frame with respect ECI frame, resolved
2073 * along ECI-frame axes.
2074 * @param oldVx x coordinate of previous velocity of body frame respect ECI frame,
2075 * resolved along ECI-frame axes.
2076 * @param oldVy y coordinate of previous velocity of body frame respect ECI frame,
2077 * resolved along ECI-frame axes.
2078 * @param oldVz z coordinate of previous velocity of body frame respect ECI frame,
2079 * resolved along ECI-frame axes.
2080 * @param position body position expressed in meters (m) with respect ECI frame,
2081 * resolved along ECI-frame axes.
2082 * This is the position where gravitation is evaluated; to be consistent with
2083 * {@code ECIInertialNavigator} (and {@code Kinematics_ECI.m} callers) this must be
2084 * the position at the start of the time interval.
2085 * @return a new body kinematics instance.
2086 * @throws IllegalArgumentException if provided time interval is negative or coordinates transformation matrices
2087 * are not ECI frame valid.
2088 */
2089 public static BodyKinematics estimateKinematicsAndReturnNew(
2090 final Time timeInterval, final CoordinateTransformation c, final CoordinateTransformation oldC,
2091 final Speed vx, final Speed vy, final Speed vz, final Speed oldVx, final Speed oldVy, final Speed oldVz,
2092 final Point3D position) {
2093 final var result = new BodyKinematics();
2094 estimateKinematics(timeInterval, c, oldC, vx, vy, vz, oldVx, oldVy, oldVz, position, result);
2095 return result;
2096 }
2097 }