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.navigation.frames.NEDFrame;
19 import com.irurueta.navigation.frames.NEDPosition;
20 import com.irurueta.navigation.frames.NEDVelocity;
21 import com.irurueta.units.*;
22
23 /**
24 * Estimates velocity by differentiating latitude, longitude and height over
25 * a time interval.
26 * This implementation is based on the equations defined in "Principles of GNSS, Inertial, and Multisensor
27 * Integrated Navigation Systems, Second Edition" and on the companion software available at:
28 * <a href="https://github.com/ymjdz/MATLAB-Codes/blob/master/Velocity_from_curvilinear.m">
29 * https://github.com/ymjdz/MATLAB-Codes/blob/master/Velocity_from_curvilinear.m
30 * </a>
31 */
32 public class NEDVelocityEstimator {
33
34 /**
35 * Estimates velocity from curvilinear position changes and taking into account previous
36 * velocity respect NED frame.
37 *
38 * @param timeInterval time interval between epochs expressed in seconds (s).
39 * @param oldLatitude previous latitude expressed in radians (rad).
40 * @param oldLongitude previous longitude expressed in radians (rad).
41 * @param oldHeight previous height expressed in meters (m).
42 * @param oldVn previous velocity of body with respect the Earth, resolved about
43 * north-axis and expressed in meters per second (m/s).
44 * @param oldVe previous velocity of body with respect the Earth, resolved about
45 * east-axis and expressed in meters per second (m/s).
46 * @param oldVd previous velocity of body with respect the Earth, resolved about
47 * down-axis and expressed in meters per second (m/s).
48 * @param latitude current latitude expressed in radians (rad).
49 * @param longitude current longitude expressed in radians (rad).
50 * @param height current height expressed in meters (m).
51 * @param result instance where updated velocity with respect the Earth, resolved
52 * about north, east and down and expressed in meters per second (m/s) will
53 * be stored.
54 * @throws IllegalArgumentException if provided time interval is negative or zero.
55 */
56 public void estimate(
57 final double timeInterval, final double oldLatitude, final double oldLongitude, final double oldHeight,
58 final double oldVn, final double oldVe, final double oldVd, final double latitude, final double longitude,
59 final double height, final NEDVelocity result) {
60 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
61 latitude, longitude, height, result);
62 }
63
64 /**
65 * Estimates velocity from curvilinear position changes and taking into account previous
66 * velocity respect NED frame.
67 *
68 * @param timeInterval time interval between epochs.
69 * @param oldLatitude previous latitude expressed in radians (rad).
70 * @param oldLongitude previous longitude expressed in radians (rad).
71 * @param oldHeight previous height expressed in meters (m).
72 * @param oldVn previous velocity of body with respect the Earth, resolved about
73 * north-axis and expressed in meters per second (m/s).
74 * @param oldVe previous velocity of body with respect the Earth, resolved about
75 * east-axis and expressed in meters per second (m/s).
76 * @param oldVd previous velocity of body with respect the Earth, resolved about
77 * down-axis and expressed in meters per second (m/s).
78 * @param latitude current latitude expressed in radians (rad).
79 * @param longitude current longitude expressed in radians (rad).
80 * @param height current height expressed in meters (m).
81 * @param result instance where updated velocity with respect the Earth, resolved
82 * about north, east and down and expressed in meters per second (m/s) will
83 * be stored.
84 * @throws IllegalArgumentException if provided time interval is negative or zero.
85 */
86 public void estimate(
87 final Time timeInterval, final double oldLatitude, final double oldLongitude, final double oldHeight,
88 final double oldVn, final double oldVe, final double oldVd,
89 final double latitude, final double longitude, final double height, final NEDVelocity result) {
90 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
91 latitude, longitude, height, result);
92 }
93
94 /**
95 * Estimates velocity from curvilinear position changes and taking into account previous
96 * velocity respect NED frame.
97 *
98 * @param timeInterval time interval between epochs expressed in seconds (s).
99 * @param oldLatitude previous latitude.
100 * @param oldLongitude previous longitude.
101 * @param oldHeight previous height.
102 * @param oldVn previous velocity of body with respect the Earth, resolved about
103 * north-axis.
104 * @param oldVe previous velocity of body with respect the Earth, resolved about
105 * east-axis.
106 * @param oldVd previous velocity of body with respect the Earth, resolved about
107 * down-axis.
108 * @param latitude current latitude.
109 * @param longitude current longitude.
110 * @param height current height.
111 * @param result instance where updated velocity with respect the Earth, resolved
112 * about north, east and down and expressed in meters per second (m/s) will
113 * be stored.
114 * @throws IllegalArgumentException if provided time interval is negative or zero.
115 */
116 public void estimate(
117 final double timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
118 final Speed oldVn, final Speed oldVe, final Speed oldVd,
119 final Angle latitude, final Angle longitude, final Distance height, final NEDVelocity result) {
120 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
121 latitude, longitude, height, result);
122 }
123
124 /**
125 * Estimates velocity from curvilinear position changes and taking into account previous
126 * velocity respect NED frame.
127 *
128 * @param timeInterval time interval between epochs.
129 * @param oldLatitude previous latitude.
130 * @param oldLongitude previous longitude.
131 * @param oldHeight previous height.
132 * @param oldVn previous velocity of body with respect the Earth, resolved about
133 * north-axis.
134 * @param oldVe previous velocity of body with respect the Earth, resolved about
135 * east-axis.
136 * @param oldVd previous velocity of body with respect the Earth, resolved about
137 * down-axis.
138 * @param latitude current latitude.
139 * @param longitude current longitude.
140 * @param height current height.
141 * @param result instance where updated velocity with respect the Earth, resolved
142 * about north, east and down and expressed in meters per second (m/s) will
143 * be stored.
144 * @throws IllegalArgumentException if provided time interval is negative or zero.
145 */
146 public void estimate(
147 final Time timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
148 final Speed oldVn, final Speed oldVe, final Speed oldVd,
149 final Angle latitude, final Angle longitude, final Distance height, final NEDVelocity result) {
150 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
151 latitude, longitude, height, result);
152 }
153
154 /**
155 * Estimates velocity from curvilinear position changes and taking into account previous
156 * velocity respect NED frame.
157 *
158 * @param timeInterval time interval between epochs expressed in seconds (s).
159 * @param oldLatitude previous latitude.
160 * @param oldLongitude previous longitude.
161 * @param oldHeight previous height.
162 * @param oldVn previous velocity of body with respect the Earth, resolved about
163 * north-axis and expressed in meters per second (m/s).
164 * @param oldVe previous velocity of body with respect the Earth, resolved about
165 * east-axis and expressed in meters per second (m/s).
166 * @param oldVd previous velocity of body with respect the Earth, resolved about
167 * down-axis and expressed in meters per second (m/s).
168 * @param latitude current latitude.
169 * @param longitude current longitude.
170 * @param height current height.
171 * @param result instance where updated velocity with respect the Earth, resolved
172 * about north, east and down and expressed in meters per second (m/s) will
173 * be stored.
174 * @throws IllegalArgumentException if provided time interval is negative or zero.
175 */
176 public void estimate(
177 final double timeInterval, final Angle oldLatitude,
178 final Angle oldLongitude, final Distance oldHeight,
179 final double oldVn, final double oldVe, final double oldVd,
180 final Angle latitude, final Angle longitude, final Distance height, final NEDVelocity result) {
181 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
182 latitude, longitude, height, result);
183 }
184
185 /**
186 * Estimates velocity from curvilinear position changes and taking into account previous
187 * velocity respect NED frame.
188 *
189 * @param timeInterval time interval between epochs.
190 * @param oldLatitude previous latitude.
191 * @param oldLongitude previous longitude.
192 * @param oldHeight previous height.
193 * @param oldVn previous velocity of body with respect the Earth, resolved about
194 * north-axis and expressed in meters per second (m/s).
195 * @param oldVe previous velocity of body with respect the Earth, resolved about
196 * east-axis and expressed in meters per second (m/s).
197 * @param oldVd previous velocity of body with respect the Earth, resolved about
198 * down-axis and expressed in meters per second (m/s).
199 * @param latitude current latitude.
200 * @param longitude current longitude.
201 * @param height current height.
202 * @param result instance where updated velocity with respect the Earth, resolved
203 * about north, east and down and expressed in meters per second (m/s) will
204 * be stored.
205 * @throws IllegalArgumentException if provided time interval is negative or zero.
206 */
207 public void estimate(
208 final Time timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
209 final double oldVn, final double oldVe, final double oldVd,
210 final Angle latitude, final Angle longitude, final Distance height, final NEDVelocity result) {
211 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
212 latitude, longitude, height, result);
213 }
214
215 /**
216 * Estimates velocity from curvilinear position changes and taking into account previous
217 * velocity respect NED frame.
218 *
219 * @param timeInterval time interval between epochs expressed in seconds (s).
220 * @param oldLatitude previous latitude expressed in radians (rad).
221 * @param oldLongitude previous longitude expressed in radians (rad).
222 * @param oldHeight previous height expressed in meters (m).
223 * @param oldVelocity previous velocity of body with respect the Earth, resolved
224 * about north, east and down axes and expressed in meters per
225 * second (m/s).
226 * @param latitude current latitude expressed in radians (rad).
227 * @param longitude current longitude expressed in radians (rad).
228 * @param height current height expressed in meters (m).
229 * @param result instance where updated velocity with respect the Earth, resolved
230 * about north, east and down and expressed in meters per second (m/s) will
231 * be stored.
232 * @throws IllegalArgumentException if provided time interval is negative or zero.
233 */
234 public void estimate(
235 final double timeInterval, final double oldLatitude, final double oldLongitude, final double oldHeight,
236 final NEDVelocity oldVelocity, final double latitude, final double longitude, final double height,
237 final NEDVelocity result) {
238 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVelocity, latitude, longitude, height,
239 result);
240 }
241
242 /**
243 * Estimates velocity from curvilinear position changes and taking into account previous
244 * velocity respect NED frame.
245 *
246 * @param timeInterval time interval between epochs.
247 * @param oldLatitude previous latitude expressed in radians (rad).
248 * @param oldLongitude previous longitude expressed in radians (rad).
249 * @param oldHeight previous height expressed in meters (m).
250 * @param oldVelocity previous velocity of body with respect the Earth, resolved
251 * about north, east and down axes and expressed in meters per
252 * second (m/s).
253 * @param latitude current latitude expressed in radians (rad).
254 * @param longitude current longitude expressed in radians (rad).
255 * @param height current height expressed in meters (m).
256 * @param result instance where updated velocity with respect the Earth, resolved
257 * about north, east and down and expressed in meters per second (m/s) will
258 * be stored.
259 * @throws IllegalArgumentException if provided time interval is negative or zero.
260 */
261 public void estimate(
262 final Time timeInterval, final double oldLatitude, final double oldLongitude, final double oldHeight,
263 final NEDVelocity oldVelocity, final double latitude, final double longitude, final double height,
264 final NEDVelocity result) {
265 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVelocity, latitude, longitude, height,
266 result);
267 }
268
269 /**
270 * Estimates velocity from curvilinear position changes and taking into account previous
271 * velocity respect NED frame.
272 *
273 * @param timeInterval time interval between epochs expressed in seconds (s).
274 * @param oldLatitude previous latitude.
275 * @param oldLongitude previous longitude.
276 * @param oldHeight previous height.
277 * @param oldVelocity previous velocity of body with respect the Earth, resolved
278 * about north, east and down axes and expressed in meters per
279 * second (m/s).
280 * @param latitude current latitude.
281 * @param longitude current longitude.
282 * @param height current height.
283 * @param result instance where updated velocity with respect the Earth, resolved
284 * about north, east and down and expressed in meters per second (m/s) will
285 * be stored.
286 * @throws IllegalArgumentException if provided time interval is negative or zero.
287 */
288 public void estimate(
289 final double timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
290 final NEDVelocity oldVelocity, final Angle latitude, final Angle longitude, final Distance height,
291 final NEDVelocity result) {
292 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVelocity, latitude, longitude, height,
293 result);
294 }
295
296 /**
297 * Estimates velocity from curvilinear position changes and taking into account previous
298 * velocity respect NED frame.
299 *
300 * @param timeInterval time interval between epochs.
301 * @param oldLatitude previous latitude.
302 * @param oldLongitude previous longitude.
303 * @param oldHeight previous height.
304 * @param oldVelocity previous velocity of body with respect the Earth, resolved
305 * about north, east and down axes and expressed in meters per
306 * second (m/s).
307 * @param latitude current latitude.
308 * @param longitude current longitude.
309 * @param height current height.
310 * @param result instance where updated velocity with respect the Earth, resolved
311 * about north, east and down and expressed in meters per second (m/s) will
312 * be stored.
313 * @throws IllegalArgumentException if provided time interval is negative or zero.
314 */
315 public void estimate(
316 final Time timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
317 final NEDVelocity oldVelocity, final Angle latitude, final Angle longitude, final Distance height,
318 final NEDVelocity result) {
319 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVelocity, latitude, longitude, height,
320 result);
321 }
322
323 /**
324 * Estimates velocity from curvilinear position changes and taking into account previous
325 * velocity respect NED frame.
326 *
327 * @param timeInterval time interval between epochs expressed in seconds (s).
328 * @param oldFrame previous frame containing position and velocity of body with
329 * respect Earth and resolved about north, east and down axes.
330 * @param latitude current latitude expressed in radians (rad).
331 * @param longitude current longitude expressed in radians (rad).
332 * @param height current height expressed in meters (m).
333 * @param result instance where updated velocity with respect the Earth, resolved
334 * about north, east and down and expressed in meters per second (m/s) will
335 * be stored.
336 * @throws IllegalArgumentException if provided time interval is negative or zero.
337 */
338 public void estimate(
339 final double timeInterval, final NEDFrame oldFrame, final double latitude, final double longitude,
340 final double height, final NEDVelocity result) {
341 estimateVelocity(timeInterval, oldFrame, latitude, longitude, height, result);
342 }
343
344 /**
345 * Estimates velocity from curvilinear position changes and taking into account previous
346 * velocity respect NED frame.
347 *
348 * @param timeInterval time interval between epochs.
349 * @param oldFrame previous frame containing position and velocity of body with
350 * respect Earth and resolved about north, east and down axes.
351 * @param latitude current latitude expressed in radians (rad).
352 * @param longitude current longitude expressed in radians (rad).
353 * @param height current height expressed in meters (m).
354 * @param result instance where updated velocity with respect the Earth, resolved
355 * about north, east and down and expressed in meters per second (m/s) will
356 * be stored.
357 * @throws IllegalArgumentException if provided time interval is negative or zero.
358 */
359 public void estimate(
360 final Time timeInterval, final NEDFrame oldFrame,
361 final double latitude, final double longitude, final double height, final NEDVelocity result) {
362 estimateVelocity(timeInterval, oldFrame, latitude, longitude, height, result);
363 }
364
365 /**
366 * Estimates velocity from curvilinear position changes and taking into account previous
367 * velocity respect NED frame.
368 *
369 * @param timeInterval time interval between epochs expressed in seconds (s).
370 * @param oldFrame previous frame containing position and velocity of body with
371 * respect Earth and resolved about north, east and down axes.
372 * @param latitude current latitude.
373 * @param longitude current longitude.
374 * @param height current height.
375 * @param result instance where updated velocity with respect the Earth, resolved
376 * about north, east and down and expressed in meters per second (m/s) will
377 * be stored.
378 * @throws IllegalArgumentException if provided time interval is negative or zero.
379 */
380 public void estimate(
381 final double timeInterval, final NEDFrame oldFrame,
382 final Angle latitude, final Angle longitude, final Distance height, final NEDVelocity result) {
383 estimateVelocity(timeInterval, oldFrame, latitude, longitude, height, result);
384 }
385
386 /**
387 * Estimates velocity from curvilinear position changes and taking into account previous
388 * velocity respect NED frame.
389 *
390 * @param timeInterval time interval between epochs.
391 * @param oldFrame previous frame containing position and velocity of body with
392 * respect Earth and resolved about north, east and down axes.
393 * @param latitude current latitude.
394 * @param longitude current longitude.
395 * @param height current height.
396 * @param result instance where updated velocity with respect the Earth, resolved
397 * about north, east and down and expressed in meters per second (m/s) will
398 * be stored.
399 * @throws IllegalArgumentException if provided time interval is negative or zero.
400 */
401 public void estimate(
402 final Time timeInterval, final NEDFrame oldFrame,
403 final Angle latitude, final Angle longitude, final Distance height, final NEDVelocity result) {
404 estimateVelocity(timeInterval, oldFrame, latitude, longitude, height, result);
405 }
406
407 /**
408 * Estimates velocity from curvilinear position changes and taking into account previous
409 * velocity respect NED frame.
410 *
411 * @param timeInterval time interval between epochs expressed in seconds (s).
412 * @param oldPosition previous body position with respect the Earth, resolved about
413 * north, east and down axes.
414 * @param oldVn previous velocity of body with respect the Earth, resolved about
415 * north-axis and expressed in meters per second (m/s).
416 * @param oldVe previous velocity of body with respect the Earth, resolved about
417 * east-axis and expressed in meters per second (m/s).
418 * @param oldVd previous velocity of body with respect the Earth, resolved about
419 * down-axis and expressed in meters per second (m/s).
420 * @param position current body position with respect the Earth, resolved about
421 * north, east and down axes.
422 * @param result instance where updated velocity with respect the Earth, resolved
423 * about north, east and down and expressed in meters per second (m/s) will
424 * be stored.
425 * @throws IllegalArgumentException if provided time interval is negative or zero.
426 */
427 public void estimate(
428 final double timeInterval, final NEDPosition oldPosition,
429 final double oldVn, final double oldVe, final double oldVd, final NEDPosition position,
430 final NEDVelocity result) {
431 estimateVelocity(timeInterval, oldPosition, oldVn, oldVe, oldVd, position, result);
432 }
433
434 /**
435 * Estimates velocity from curvilinear position changes and taking into account previous
436 * velocity respect NED frame.
437 *
438 * @param timeInterval time interval between epochs.
439 * @param oldPosition previous body position with respect the Earth, resolved about
440 * north, east and down axes.
441 * @param oldVn previous velocity of body with respect the Earth, resolved about
442 * north-axis and expressed in meters per second (m/s).
443 * @param oldVe previous velocity of body with respect the Earth, resolved about
444 * east-axis and expressed in meters per second (m/s).
445 * @param oldVd previous velocity of body with respect the Earth, resolved about
446 * down-axis and expressed in meters per second (m/s).
447 * @param position current body position with respect the Earth, resolved about
448 * north, east and down axes.
449 * @param result instance where updated velocity with respect the Earth, resolved
450 * about north, east and down and expressed in meters per second (m/s) will
451 * be stored.
452 * @throws IllegalArgumentException if provided time interval is negative or zero.
453 */
454 public void estimate(
455 final Time timeInterval, final NEDPosition oldPosition,
456 final double oldVn, final double oldVe, final double oldVd, final NEDPosition position,
457 final NEDVelocity result) {
458 estimateVelocity(timeInterval, oldPosition, oldVn, oldVe, oldVd, position, result);
459 }
460
461 /**
462 * Estimates velocity from curvilinear position changes and taking into account previous
463 * velocity respect NED frame.
464 *
465 * @param timeInterval time interval between epochs expressed in seconds (s).
466 * @param oldPosition previous body position with respect the Earth, resolved about
467 * north, east and down axes.
468 * @param oldVn previous velocity of body with respect the Earth, resolved about
469 * north-axis.
470 * @param oldVe previous velocity of body with respect the Earth, resolved about
471 * east-axis.
472 * @param oldVd previous velocity of body with respect the Earth, resolved about
473 * down-axis.
474 * @param position current body position with respect the Earth, resolved about
475 * north, east and down axes.
476 * @param result instance where updated velocity with respect the Earth, resolved
477 * about north, east and down and expressed in meters per second (m/s) will
478 * be stored.
479 * @throws IllegalArgumentException if provided time interval is negative or zero.
480 */
481 public void estimate(
482 final double timeInterval, final NEDPosition oldPosition,
483 final Speed oldVn, final Speed oldVe, final Speed oldVd, final NEDPosition position,
484 final NEDVelocity result) {
485 estimateVelocity(timeInterval, oldPosition, oldVn, oldVe, oldVd, position, result);
486 }
487
488 /**
489 * Estimates velocity from curvilinear position changes and taking into account previous
490 * velocity respect NED frame.
491 *
492 * @param timeInterval time interval between epochs.
493 * @param oldPosition previous body position with respect the Earth, resolved about
494 * north, east and down axes.
495 * @param oldVn previous velocity of body with respect the Earth, resolved about
496 * north-axis.
497 * @param oldVe previous velocity of body with respect the Earth, resolved about
498 * east-axis.
499 * @param oldVd previous velocity of body with respect the Earth, resolved about
500 * down-axis.
501 * @param position current body position with respect the Earth, resolved about
502 * north, east and down axes.
503 * @param result instance where updated velocity with respect the Earth, resolved
504 * about north, east and down and expressed in meters per second (m/s) will
505 * be stored.
506 * @throws IllegalArgumentException if provided time interval is negative or zero.
507 */
508 public void estimate(
509 final Time timeInterval, final NEDPosition oldPosition,
510 final Speed oldVn, final Speed oldVe, final Speed oldVd, final NEDPosition position,
511 final NEDVelocity result) {
512 estimateVelocity(timeInterval, oldPosition, oldVn, oldVe, oldVd, position, result);
513 }
514
515 /**
516 * Estimates velocity from curvilinear position changes and taking into account previous
517 * velocity respect NED frame.
518 *
519 * @param timeInterval time interval between epochs expressed in seconds (s).
520 * @param oldPosition previous body position with respect the Earth, resolved about
521 * north, east and down axes.
522 * @param oldVelocity previous velocity of body with respect the Earth, resolved
523 * about north, east and down axes and expressed in meters per
524 * second (m/s).
525 * @param position current body position with respect the Earth, resolved about
526 * north, east and down axes.
527 * @param result instance where updated velocity with respect the Earth, resolved
528 * about north, east and down and expressed in meters per second (m/s) will
529 * be stored.
530 * @throws IllegalArgumentException if provided time interval is negative or zero.
531 */
532 public void estimate(
533 final double timeInterval, final NEDPosition oldPosition, final NEDVelocity oldVelocity,
534 final NEDPosition position, final NEDVelocity result) {
535 estimateVelocity(timeInterval, oldPosition, oldVelocity, position, result);
536 }
537
538 /**
539 * Estimates velocity from curvilinear position changes and taking into account previous
540 * velocity respect NED frame.
541 *
542 * @param timeInterval time interval between epochs.
543 * @param oldPosition previous body position with respect the Earth, resolved about
544 * north, east and down axes.
545 * @param oldVelocity previous velocity of body with respect the Earth, resolved
546 * about north, east and down axes and expressed in meters per
547 * second (m/s).
548 * @param position current body position with respect the Earth, resolved about
549 * north, east and down axes.
550 * @param result instance where updated velocity with respect the Earth, resolved
551 * about north, east and down and expressed in meters per second (m/s) will
552 * be stored.
553 * @throws IllegalArgumentException if provided time interval is negative or zero.
554 */
555 public void estimate(
556 final Time timeInterval, final NEDPosition oldPosition, final NEDVelocity oldVelocity,
557 final NEDPosition position, final NEDVelocity result) {
558 estimateVelocity(timeInterval, oldPosition, oldVelocity, position, result);
559 }
560
561 /**
562 * Estimates velocity from curvilinear position changes and taking into account previous
563 * velocity respect NED frame.
564 *
565 * @param timeInterval time interval between epochs expressed in seconds (s).
566 * @param oldFrame previous frame containing position and velocity of body with
567 * respect Earth and resolved about north, east and down axes.
568 * @param position current body position with respect the Earth, resolved about
569 * north, east and down axes.
570 * @param result instance where updated velocity with respect the Earth, resolved
571 * about north, east and down and expressed in meters per second (m/s) will
572 * be stored.
573 * @throws IllegalArgumentException if provided time interval is negative or zero.
574 */
575 public void estimate(
576 final double timeInterval, final NEDFrame oldFrame, final NEDPosition position, final NEDVelocity result) {
577 estimateVelocity(timeInterval, oldFrame, position, result);
578 }
579
580 /**
581 * Estimates velocity from curvilinear position changes and taking into account previous
582 * velocity respect NED frame.
583 *
584 * @param timeInterval time interval between epochs.
585 * @param oldFrame previous frame containing position and velocity of body with
586 * respect Earth and resolved about north, east and down axes.
587 * @param position current body position with respect the Earth, resolved about
588 * north, east and down axes.
589 * @param result instance where updated velocity with respect the Earth, resolved
590 * about north, east and down and expressed in meters per second (m/s) will
591 * be stored.
592 * @throws IllegalArgumentException if provided time interval is negative or zero.
593 */
594 public void estimate(
595 final Time timeInterval, final NEDFrame oldFrame, final NEDPosition position, final NEDVelocity result) {
596 estimateVelocity(timeInterval, oldFrame, position, result);
597 }
598
599 /**
600 * Estimates velocity from curvilinear position changes and taking into account previous
601 * velocity respect NED frame.
602 *
603 * @param timeInterval time interval between epochs expressed in seconds (s).
604 * @param oldLatitude previous latitude expressed in radians (rad).
605 * @param oldLongitude previous longitude expressed in radians (rad).
606 * @param oldHeight previous height expressed in meters (m).
607 * @param oldVn previous velocity of body with respect the Earth, resolved about
608 * north-axis and expressed in meters per second (m/s).
609 * @param oldVe previous velocity of body with respect the Earth, resolved about
610 * east-axis and expressed in meters per second (m/s).
611 * @param oldVd previous velocity of body with respect the Earth, resolved about
612 * down-axis and expressed in meters per second (m/s).
613 * @param latitude current latitude expressed in radians (rad).
614 * @param longitude current longitude expressed in radians (rad).
615 * @param height current height expressed in meters (m).
616 * @return estimated updated velocity with respect the Earth, resolved about north,
617 * east and down and expressed in meters per second (m/s).
618 * @throws IllegalArgumentException if provided time interval is negative or zero.
619 */
620 public NEDVelocity estimateAndReturnNew(
621 final double timeInterval, final double oldLatitude, final double oldLongitude, final double oldHeight,
622 final double oldVn, final double oldVe, final double oldVd,
623 final double latitude, final double longitude, final double height) {
624 return estimateVelocityAndReturnNew(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
625 latitude, longitude, height);
626 }
627
628 /**
629 * Estimates velocity from curvilinear position changes and taking into account previous
630 * velocity respect NED frame.
631 *
632 * @param timeInterval time interval between epochs.
633 * @param oldLatitude previous latitude expressed in radians (rad).
634 * @param oldLongitude previous longitude expressed in radians (rad).
635 * @param oldHeight previous height expressed in meters (m).
636 * @param oldVn previous velocity of body with respect the Earth, resolved about
637 * north-axis and expressed in meters per second (m/s).
638 * @param oldVe previous velocity of body with respect the Earth, resolved about
639 * east-axis and expressed in meters per second (m/s).
640 * @param oldVd previous velocity of body with respect the Earth, resolved about
641 * down-axis and expressed in meters per second (m/s).
642 * @param latitude current latitude expressed in radians (rad).
643 * @param longitude current longitude expressed in radians (rad).
644 * @param height current height expressed in meters (m).
645 * @return estimated updated velocity with respect the Earth, resolved about north,
646 * east and down and expressed in meters per second (m/s).
647 * @throws IllegalArgumentException if provided time interval is negative or zero.
648 */
649 public NEDVelocity estimateAndReturnNew(
650 final Time timeInterval, final double oldLatitude, final double oldLongitude, final double oldHeight,
651 final double oldVn, final double oldVe, final double oldVd,
652 final double latitude, final double longitude, final double height) {
653 return estimateVelocityAndReturnNew(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
654 latitude, longitude, height);
655 }
656
657 /**
658 * Estimates velocity from curvilinear position changes and taking into account previous
659 * velocity respect NED frame.
660 *
661 * @param timeInterval time interval between epochs expressed in seconds (s).
662 * @param oldLatitude previous latitude.
663 * @param oldLongitude previous longitude.
664 * @param oldHeight previous height.
665 * @param oldVn previous velocity of body with respect the Earth, resolved about
666 * north-axis.
667 * @param oldVe previous velocity of body with respect the Earth, resolved about
668 * east-axis.
669 * @param oldVd previous velocity of body with respect the Earth, resolved about
670 * down-axis.
671 * @param latitude current latitude.
672 * @param longitude current longitude.
673 * @param height current height.
674 * @return estimated updated velocity with respect the Earth, resolved about north,
675 * east and down and expressed in meters per second (m/s).
676 * @throws IllegalArgumentException if provided time interval is negative or zero.
677 */
678 public NEDVelocity estimateAndReturnNew(
679 final double timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
680 final Speed oldVn, final Speed oldVe, final Speed oldVd,
681 final Angle latitude, final Angle longitude, final Distance height) {
682 return estimateVelocityAndReturnNew(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
683 latitude, longitude, height);
684 }
685
686 /**
687 * Estimates velocity from curvilinear position changes and taking into account previous
688 * velocity respect NED frame.
689 *
690 * @param timeInterval time interval between epochs.
691 * @param oldLatitude previous latitude.
692 * @param oldLongitude previous longitude.
693 * @param oldHeight previous height.
694 * @param oldVn previous velocity of body with respect the Earth, resolved about
695 * north-axis.
696 * @param oldVe previous velocity of body with respect the Earth, resolved about
697 * east-axis.
698 * @param oldVd previous velocity of body with respect the Earth, resolved about
699 * down-axis.
700 * @param latitude current latitude.
701 * @param longitude current longitude.
702 * @param height current height.
703 * @return estimated updated velocity with respect the Earth, resolved about north,
704 * east and down and expressed in meters per second (m/s).
705 * @throws IllegalArgumentException if provided time interval is negative or zero.
706 */
707 public NEDVelocity estimateAndReturnNew(
708 final Time timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
709 final Speed oldVn, final Speed oldVe, final Speed oldVd,
710 final Angle latitude, final Angle longitude, final Distance height) {
711 return estimateVelocityAndReturnNew(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
712 latitude, longitude, height);
713 }
714
715 /**
716 * Estimates velocity from curvilinear position changes and taking into account previous
717 * velocity respect NED frame.
718 *
719 * @param timeInterval time interval between epochs expressed in seconds (s).
720 * @param oldLatitude previous latitude.
721 * @param oldLongitude previous longitude.
722 * @param oldHeight previous height.
723 * @param oldVn previous velocity of body with respect the Earth, resolved about
724 * north-axis and expressed in meters per second (m/s).
725 * @param oldVe previous velocity of body with respect the Earth, resolved about
726 * east-axis and expressed in meters per second (m/s).
727 * @param oldVd previous velocity of body with respect the Earth, resolved about
728 * down-axis and expressed in meters per second (m/s).
729 * @param latitude current latitude.
730 * @param longitude current longitude.
731 * @param height current height.
732 * @return estimated updated velocity with respect the Earth, resolved about north,
733 * east and down and expressed in meters per second (m/s).
734 * @throws IllegalArgumentException if provided time interval is negative or zero.
735 */
736 public NEDVelocity estimateAndReturnNew(
737 final double timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
738 final double oldVn, final double oldVe, final double oldVd,
739 final Angle latitude, final Angle longitude, final Distance height) {
740 return estimateVelocityAndReturnNew(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
741 latitude, longitude, height);
742 }
743
744 /**
745 * Estimates velocity from curvilinear position changes and taking into account previous
746 * velocity respect NED frame.
747 *
748 * @param timeInterval time interval between epochs.
749 * @param oldLatitude previous latitude.
750 * @param oldLongitude previous longitude.
751 * @param oldHeight previous height.
752 * @param oldVn previous velocity of body with respect the Earth, resolved about
753 * north-axis and expressed in meters per second (m/s).
754 * @param oldVe previous velocity of body with respect the Earth, resolved about
755 * east-axis and expressed in meters per second (m/s).
756 * @param oldVd previous velocity of body with respect the Earth, resolved about
757 * down-axis and expressed in meters per second (m/s).
758 * @param latitude current latitude.
759 * @param longitude current longitude.
760 * @param height current height.
761 * @return estimated updated velocity with respect the Earth, resolved about north,
762 * east and down and expressed in meters per second (m/s).
763 * @throws IllegalArgumentException if provided time interval is negative or zero.
764 */
765 public NEDVelocity estimateAndReturnNew(
766 final Time timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
767 final double oldVn, final double oldVe, final double oldVd,
768 final Angle latitude, final Angle longitude, final Distance height) {
769 return estimateVelocityAndReturnNew(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
770 latitude, longitude, height);
771 }
772
773 /**
774 * Estimates velocity from curvilinear position changes and taking into account previous
775 * velocity respect NED frame.
776 *
777 * @param timeInterval time interval between epochs expressed in seconds (s).
778 * @param oldLatitude previous latitude expressed in radians (rad).
779 * @param oldLongitude previous longitude expressed in radians (rad).
780 * @param oldHeight previous height expressed in meters (m).
781 * @param oldVelocity previous velocity of body with respect the Earth, resolved
782 * about north, east and down axes and expressed in meters per
783 * second (m/s).
784 * @param latitude current latitude expressed in radians (rad).
785 * @param longitude current longitude expressed in radians (rad).
786 * @param height current height expressed in meters (m).
787 * @return estimated updated velocity with respect the Earth, resolved about north,
788 * east and down and expressed in meters per second (m/s).
789 * @throws IllegalArgumentException if provided time interval is negative or zero.
790 */
791 public NEDVelocity estimateAndReturnNew(
792 final double timeInterval, final double oldLatitude, final double oldLongitude, final double oldHeight,
793 final NEDVelocity oldVelocity, final double latitude, final double longitude, final double height) {
794 return estimateVelocityAndReturnNew(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVelocity,
795 latitude, longitude, height);
796 }
797
798 /**
799 * Estimates velocity from curvilinear position changes and taking into account previous
800 * velocity respect NED frame.
801 *
802 * @param timeInterval time interval between epochs.
803 * @param oldLatitude previous latitude expressed in radians (rad).
804 * @param oldLongitude previous longitude expressed in radians (rad).
805 * @param oldHeight previous height expressed in meters (m).
806 * @param oldVelocity previous velocity of body with respect the Earth, resolved
807 * about north, east and down axes and expressed in meters per
808 * second (m/s).
809 * @param latitude current latitude expressed in radians (rad).
810 * @param longitude current longitude expressed in radians (rad).
811 * @param height current height expressed in meters (m).
812 * @return estimated updated velocity with respect the Earth, resolved about north,
813 * east and down and expressed in meters per second (m/s).
814 * @throws IllegalArgumentException if provided time interval is negative or zero.
815 */
816 public NEDVelocity estimateAndReturnNew(
817 final Time timeInterval, final double oldLatitude, final double oldLongitude, final double oldHeight,
818 final NEDVelocity oldVelocity, final double latitude, final double longitude, final double height) {
819 return estimateVelocityAndReturnNew(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVelocity,
820 latitude, longitude, height);
821 }
822
823 /**
824 * Estimates velocity from curvilinear position changes and taking into account previous
825 * velocity respect NED frame.
826 *
827 * @param timeInterval time interval between epochs expressed in seconds (s).
828 * @param oldLatitude previous latitude.
829 * @param oldLongitude previous longitude.
830 * @param oldHeight previous height.
831 * @param oldVelocity previous velocity of body with respect the Earth, resolved
832 * about north, east and down axes and expressed in meters per
833 * second (m/s).
834 * @param latitude current latitude.
835 * @param longitude current longitude.
836 * @param height current height.
837 * @return estimated updated velocity with respect the Earth, resolved about north,
838 * east and down and expressed in meters per second (m/s).
839 * @throws IllegalArgumentException if provided time interval is negative or zero.
840 */
841 public NEDVelocity estimateAndReturnNew(
842 final double timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
843 final NEDVelocity oldVelocity, final Angle latitude, final Angle longitude, final Distance height) {
844 return estimateVelocityAndReturnNew(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVelocity,
845 latitude, longitude, height);
846 }
847
848 /**
849 * Estimates velocity from curvilinear position changes and taking into account previous
850 * velocity respect NED frame.
851 *
852 * @param timeInterval time interval between epochs.
853 * @param oldLatitude previous latitude.
854 * @param oldLongitude previous longitude.
855 * @param oldHeight previous height.
856 * @param oldVelocity previous velocity of body with respect the Earth, resolved
857 * about north, east and down axes and expressed in meters per
858 * second (m/s).
859 * @param latitude current latitude.
860 * @param longitude current longitude.
861 * @param height current height.
862 * @return estimated updated velocity with respect the Earth, resolved about north,
863 * east and down and expressed in meters per second (m/s).
864 * @throws IllegalArgumentException if provided time interval is negative or zero.
865 */
866 public NEDVelocity estimateAndReturnNew(
867 final Time timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
868 final NEDVelocity oldVelocity, final Angle latitude, final Angle longitude, final Distance height) {
869 return estimateVelocityAndReturnNew(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVelocity,
870 latitude, longitude, height);
871 }
872
873 /**
874 * Estimates velocity from curvilinear position changes and taking into account previous
875 * velocity respect NED frame.
876 *
877 * @param timeInterval time interval between epochs expressed in seconds (s).
878 * @param oldFrame previous frame containing position and velocity of body with
879 * respect Earth and resolved about north, east and down axes.
880 * @param latitude current latitude expressed in radians (rad).
881 * @param longitude current longitude expressed in radians (rad).
882 * @param height current height expressed in meters (m).
883 * @return estimated updated velocity with respect the Earth, resolved about north,
884 * east and down and expressed in meters per second (m/s).
885 * @throws IllegalArgumentException if provided time interval is negative or zero.
886 */
887 public NEDVelocity estimateAndReturnNew(
888 final double timeInterval, final NEDFrame oldFrame, final double latitude, final double longitude,
889 final double height) {
890 return estimateVelocityAndReturnNew(timeInterval, oldFrame, latitude, longitude, height);
891 }
892
893 /**
894 * Estimates velocity from curvilinear position changes and taking into account previous
895 * velocity respect NED frame.
896 *
897 * @param timeInterval time interval between epochs.
898 * @param oldFrame previous frame containing position and velocity of body with
899 * respect Earth and resolved about north, east and down axes.
900 * @param latitude current latitude expressed in radians (rad).
901 * @param longitude current longitude expressed in radians (rad).
902 * @param height current height expressed in meters (m).
903 * @return estimated updated velocity with respect the Earth, resolved about north,
904 * east and down and expressed in meters per second (m/s).
905 * @throws IllegalArgumentException if provided time interval is negative or zero.
906 */
907 public NEDVelocity estimateAndReturnNew(
908 final Time timeInterval, final NEDFrame oldFrame,
909 final double latitude, final double longitude, final double height) {
910 return estimateVelocityAndReturnNew(timeInterval, oldFrame, latitude, longitude, height);
911 }
912
913 /**
914 * Estimates velocity from curvilinear position changes and taking into account previous
915 * velocity respect NED frame.
916 *
917 * @param timeInterval time interval between epochs expressed in seconds (s).
918 * @param oldFrame previous frame containing position and velocity of body with
919 * respect Earth and resolved about north, east and down axes.
920 * @param latitude current latitude.
921 * @param longitude current longitude.
922 * @param height current height.
923 * @return estimated updated velocity with respect the Earth, resolved about north,
924 * east and down and expressed in meters per second (m/s).
925 * @throws IllegalArgumentException if provided time interval is negative or zero.
926 */
927 public NEDVelocity estimateAndReturnNew(
928 final double timeInterval, final NEDFrame oldFrame,
929 final Angle latitude, final Angle longitude, final Distance height) {
930 return estimateVelocityAndReturnNew(timeInterval, oldFrame, latitude, longitude, height);
931 }
932
933 /**
934 * Estimates velocity from curvilinear position changes and taking into account previous
935 * velocity respect NED frame.
936 *
937 * @param timeInterval time interval between epochs.
938 * @param oldFrame previous frame containing position and velocity of body with
939 * respect Earth and resolved about north, east and down axes.
940 * @param latitude current latitude.
941 * @param longitude current longitude.
942 * @param height current height.
943 * @return estimated updated velocity with respect the Earth, resolved about north,
944 * east and down and expressed in meters per second (m/s).
945 * @throws IllegalArgumentException if provided time interval is negative or zero.
946 */
947 public NEDVelocity estimateAndReturnNew(
948 final Time timeInterval, final NEDFrame oldFrame,
949 final Angle latitude, final Angle longitude, final Distance height) {
950 return estimateVelocityAndReturnNew(timeInterval, oldFrame, latitude, longitude, height);
951 }
952
953 /**
954 * Estimates velocity from curvilinear position changes and taking into account previous
955 * velocity respect NED frame.
956 *
957 * @param timeInterval time interval between epochs expressed in seconds (s).
958 * @param oldPosition previous body position with respect the Earth, resolved about
959 * north, east and down axes.
960 * @param oldVn previous velocity of body with respect the Earth, resolved about
961 * north-axis and expressed in meters per second (m/s).
962 * @param oldVe previous velocity of body with respect the Earth, resolved about
963 * east-axis and expressed in meters per second (m/s).
964 * @param oldVd previous velocity of body with respect the Earth, resolved about
965 * down-axis and expressed in meters per second (m/s).
966 * @param position current body position with respect the Earth, resolved about
967 * north, east and down axes.
968 * @return estimated updated velocity with respect the Earth, resolved about north,
969 * east and down and expressed in meters per second (m/s).
970 * @throws IllegalArgumentException if provided time interval is negative or zero.
971 */
972 public NEDVelocity estimateAndReturnNew(
973 final double timeInterval, final NEDPosition oldPosition,
974 final double oldVn, final double oldVe, final double oldVd, final NEDPosition position) {
975 return estimateVelocityAndReturnNew(timeInterval, oldPosition, oldVn, oldVe, oldVd, position);
976 }
977
978 /**
979 * Estimates velocity from curvilinear position changes and taking into account previous
980 * velocity respect NED frame.
981 *
982 * @param timeInterval time interval between epochs.
983 * @param oldPosition previous body position with respect the Earth, resolved about
984 * north, east and down axes.
985 * @param oldVn previous velocity of body with respect the Earth, resolved about
986 * north-axis and expressed in meters per second (m/s).
987 * @param oldVe previous velocity of body with respect the Earth, resolved about
988 * east-axis and expressed in meters per second (m/s).
989 * @param oldVd previous velocity of body with respect the Earth, resolved about
990 * down-axis and expressed in meters per second (m/s).
991 * @param position current body position with respect the Earth, resolved about
992 * north, east and down axes.
993 * @return estimated updated velocity with respect the Earth, resolved about north,
994 * east and down and expressed in meters per second (m/s).
995 * @throws IllegalArgumentException if provided time interval is negative or zero.
996 */
997 public NEDVelocity estimateAndReturnNew(
998 final Time timeInterval, final NEDPosition oldPosition,
999 final double oldVn, final double oldVe, final double oldVd, final NEDPosition position) {
1000 return estimateVelocityAndReturnNew(timeInterval, oldPosition, oldVn, oldVe, oldVd, position);
1001 }
1002
1003 /**
1004 * Estimates velocity from curvilinear position changes and taking into account previous
1005 * velocity respect NED frame.
1006 *
1007 * @param timeInterval time interval between epochs expressed in seconds (s).
1008 * @param oldPosition previous body position with respect the Earth, resolved about
1009 * north, east and down axes.
1010 * @param oldVn previous velocity of body with respect the Earth, resolved about
1011 * north-axis.
1012 * @param oldVe previous velocity of body with respect the Earth, resolved about
1013 * east-axis.
1014 * @param oldVd previous velocity of body with respect the Earth, resolved about
1015 * down-axis.
1016 * @param position current body position with respect the Earth, resolved about
1017 * north, east and down axes.
1018 * @return estimated updated velocity with respect the Earth, resolved about north,
1019 * east and down and expressed in meters per second (m/s).
1020 * @throws IllegalArgumentException if provided time interval is negative or zero.
1021 */
1022 public NEDVelocity estimateAndReturnNew(
1023 final double timeInterval, final NEDPosition oldPosition,
1024 final Speed oldVn, final Speed oldVe, final Speed oldVd, final NEDPosition position) {
1025 return estimateVelocityAndReturnNew(timeInterval, oldPosition, oldVn, oldVe, oldVd, position);
1026 }
1027
1028 /**
1029 * Estimates velocity from curvilinear position changes and taking into account previous
1030 * velocity respect NED frame.
1031 *
1032 * @param timeInterval time interval between epochs.
1033 * @param oldPosition previous body position with respect the Earth, resolved about
1034 * north, east and down axes.
1035 * @param oldVn previous velocity of body with respect the Earth, resolved about
1036 * north-axis.
1037 * @param oldVe previous velocity of body with respect the Earth, resolved about
1038 * east-axis.
1039 * @param oldVd previous velocity of body with respect the Earth, resolved about
1040 * down-axis.
1041 * @param position current body position with respect the Earth, resolved about
1042 * north, east and down axes.
1043 * @return estimated updated velocity with respect the Earth, resolved about north,
1044 * east and down and expressed in meters per second (m/s).
1045 * @throws IllegalArgumentException if provided time interval is negative or zero.
1046 */
1047 public NEDVelocity estimateAndReturnNew(
1048 final Time timeInterval, final NEDPosition oldPosition,
1049 final Speed oldVn, final Speed oldVe, final Speed oldVd, final NEDPosition position) {
1050 return estimateVelocityAndReturnNew(timeInterval, oldPosition, oldVn, oldVe, oldVd, position);
1051 }
1052
1053 /**
1054 * Estimates velocity from curvilinear position changes and taking into account previous
1055 * velocity respect NED frame.
1056 *
1057 * @param timeInterval time interval between epochs expressed in seconds (s).
1058 * @param oldPosition previous body position with respect the Earth, resolved about
1059 * north, east and down axes.
1060 * @param oldVelocity previous velocity of body with respect the Earth, resolved
1061 * about north, east and down axes and expressed in meters per
1062 * second (m/s).
1063 * @param position current body position with respect the Earth, resolved about
1064 * north, east and down axes.
1065 * @return estimated updated velocity with respect the Earth, resolved about north,
1066 * east and down and expressed in meters per second (m/s).
1067 * @throws IllegalArgumentException if provided time interval is negative or zero.
1068 */
1069 public NEDVelocity estimateAndReturnNew(
1070 final double timeInterval, final NEDPosition oldPosition, final NEDVelocity oldVelocity,
1071 final NEDPosition position) {
1072 return estimateVelocityAndReturnNew(timeInterval, oldPosition, oldVelocity, position);
1073 }
1074
1075 /**
1076 * Estimates velocity from curvilinear position changes and taking into account previous
1077 * velocity respect NED frame.
1078 *
1079 * @param timeInterval time interval between epochs.
1080 * @param oldPosition previous body position with respect the Earth, resolved about
1081 * north, east and down axes.
1082 * @param oldVelocity previous velocity of body with respect the Earth, resolved
1083 * about north, east and down axes and expressed in meters per
1084 * second (m/s).
1085 * @param position current body position with respect the Earth, resolved about
1086 * north, east and down axes.
1087 * @return estimated updated velocity with respect the Earth, resolved about north,
1088 * east and down and expressed in meters per second (m/s).
1089 * @throws IllegalArgumentException if provided time interval is negative or zero.
1090 */
1091 public NEDVelocity estimateAndReturnNew(
1092 final Time timeInterval, final NEDPosition oldPosition, final NEDVelocity oldVelocity,
1093 final NEDPosition position) {
1094 return estimateVelocityAndReturnNew(timeInterval, oldPosition, oldVelocity, position);
1095 }
1096
1097 /**
1098 * Estimates velocity from curvilinear position changes and taking into account previous
1099 * velocity respect NED frame.
1100 *
1101 * @param timeInterval time interval between epochs expressed in seconds (s).
1102 * @param oldFrame previous frame containing position and velocity of body with
1103 * respect Earth and resolved about north, east and down axes.
1104 * @param position current body position with respect the Earth, resolved about
1105 * north, east and down axes.
1106 * @return estimated updated velocity with respect the Earth, resolved about north,
1107 * east and down and expressed in meters per second (m/s).
1108 * @throws IllegalArgumentException if provided time interval is negative or zero.
1109 */
1110 public NEDVelocity estimateAndReturnNew(
1111 final double timeInterval, final NEDFrame oldFrame, final NEDPosition position) {
1112 return estimateVelocityAndReturnNew(timeInterval, oldFrame, position);
1113 }
1114
1115 /**
1116 * Estimates velocity from curvilinear position changes and taking into account previous
1117 * velocity respect NED frame.
1118 *
1119 * @param timeInterval time interval between epochs.
1120 * @param oldFrame previous frame containing position and velocity of body with
1121 * respect Earth and resolved about north, east and down axes.
1122 * @param position current body position with respect the Earth, resolved about
1123 * north, east and down axes.
1124 * @return estimated updated velocity with respect the Earth, resolved about north,
1125 * east and down and expressed in meters per second (m/s).
1126 * @throws IllegalArgumentException if provided time interval is negative or zero.
1127 */
1128 public NEDVelocity estimateAndReturnNew(
1129 final Time timeInterval, final NEDFrame oldFrame, final NEDPosition position) {
1130 return estimateVelocityAndReturnNew(timeInterval, oldFrame, position);
1131 }
1132
1133 /**
1134 * Estimates velocity from curvilinear position changes and taking into account previous
1135 * velocity respect NED frame.
1136 *
1137 * @param timeInterval time interval between epochs expressed in seconds (s).
1138 * @param oldLatitude previous latitude expressed in radians (rad).
1139 * @param oldLongitude previous longitude expressed in radians (rad).
1140 * @param oldHeight previous height expressed in meters (m).
1141 * @param oldVn previous velocity of body with respect the Earth, resolved about
1142 * north-axis and expressed in meters per second (m/s).
1143 * @param oldVe previous velocity of body with respect the Earth, resolved about
1144 * east-axis and expressed in meters per second (m/s).
1145 * @param oldVd previous velocity of body with respect the Earth, resolved about
1146 * down-axis and expressed in meters per second (m/s).
1147 * @param latitude current latitude expressed in radians (rad).
1148 * @param longitude current longitude expressed in radians (rad).
1149 * @param height current height expressed in meters (m).
1150 * @param result instance where updated velocity with respect the Earth, resolved
1151 * about north, east and down and expressed in meters per second (m/s) will
1152 * be stored.
1153 * @throws IllegalArgumentException if provided time interval is negative or zero.
1154 */
1155 public static void estimateVelocity(
1156 final double timeInterval, final double oldLatitude, final double oldLongitude, final double oldHeight,
1157 final double oldVn, final double oldVe, final double oldVd,
1158 final double latitude, final double longitude, final double height, final NEDVelocity result) {
1159
1160 if (timeInterval <= 0.0) {
1161 throw new IllegalArgumentException();
1162 }
1163
1164 // Calculate meridian and transverse radii of curvature
1165 final var oldRadii = RadiiOfCurvatureEstimator.estimateRadiiOfCurvatureAndReturnNew(oldLatitude);
1166 final var oldRn = oldRadii.getRn();
1167 final var oldRe = oldRadii.getRe();
1168
1169 final var radii = RadiiOfCurvatureEstimator.estimateRadiiOfCurvatureAndReturnNew(latitude);
1170 final var re = radii.getRe();
1171
1172 // Differentiate latitude, longitude, and height
1173 final var latRate = (latitude - oldLatitude) / timeInterval;
1174 final var longRate = (longitude - oldLongitude) / timeInterval;
1175 final var heightRate = (height - oldHeight) / timeInterval;
1176
1177 // Derive the current velocity using (5.56)
1178 final var vn = (oldRn + height) * (2.0 * latRate - oldVn / (oldRn + oldHeight));
1179 final var ve = ((re + height) * Math.cos(latitude))
1180 * (2.0 * longRate - oldVe / ((oldRe + oldHeight) * Math.cos(oldLatitude)));
1181 final var vd = -2.0 * heightRate - oldVd;
1182
1183 result.setCoordinates(vn, ve, vd);
1184 }
1185
1186 /**
1187 * Estimates velocity from curvilinear position changes and taking into account previous
1188 * velocity respect NED frame.
1189 *
1190 * @param timeInterval time interval between epochs.
1191 * @param oldLatitude previous latitude expressed in radians (rad).
1192 * @param oldLongitude previous longitude expressed in radians (rad).
1193 * @param oldHeight previous height expressed in meters (m).
1194 * @param oldVn previous velocity of body with respect the Earth, resolved about
1195 * north-axis and expressed in meters per second (m/s).
1196 * @param oldVe previous velocity of body with respect the Earth, resolved about
1197 * east-axis and expressed in meters per second (m/s).
1198 * @param oldVd previous velocity of body with respect the Earth, resolved about
1199 * down-axis and expressed in meters per second (m/s).
1200 * @param latitude current latitude expressed in radians (rad).
1201 * @param longitude current longitude expressed in radians (rad).
1202 * @param height current height expressed in meters (m).
1203 * @param result instance where updated velocity with respect the Earth, resolved
1204 * about north, east and down and expressed in meters per second (m/s) will
1205 * be stored.
1206 * @throws IllegalArgumentException if provided time interval is negative or zero.
1207 */
1208 public static void estimateVelocity(
1209 final Time timeInterval, final double oldLatitude, final double oldLongitude, final double oldHeight,
1210 final double oldVn, final double oldVe, final double oldVd,
1211 final double latitude, final double longitude, final double height, final NEDVelocity result) {
1212 estimateVelocity(convertTimeToDouble(timeInterval), oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
1213 latitude, longitude, height, result);
1214 }
1215
1216 /**
1217 * Estimates velocity from curvilinear position changes and taking into account previous
1218 * velocity respect NED frame.
1219 *
1220 * @param timeInterval time interval between epochs expressed in seconds (s).
1221 * @param oldLatitude previous latitude.
1222 * @param oldLongitude previous longitude.
1223 * @param oldHeight previous height.
1224 * @param oldVn previous velocity of body with respect the Earth, resolved about
1225 * north-axis.
1226 * @param oldVe previous velocity of body with respect the Earth, resolved about
1227 * east-axis.
1228 * @param oldVd previous velocity of body with respect the Earth, resolved about
1229 * down-axis.
1230 * @param latitude current latitude.
1231 * @param longitude current longitude.
1232 * @param height current height.
1233 * @param result instance where updated velocity with respect the Earth, resolved
1234 * about north, east and down and expressed in meters per second (m/s) will
1235 * be stored.
1236 * @throws IllegalArgumentException if provided time interval is negative or zero.
1237 */
1238 public static void estimateVelocity(
1239 final double timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
1240 final Speed oldVn, final Speed oldVe, final Speed oldVd,
1241 final Angle latitude, final Angle longitude, final Distance height, final NEDVelocity result) {
1242 estimateVelocity(timeInterval, convertAngleToDouble(oldLatitude),
1243 convertAngleToDouble(oldLongitude), convertDistanceToDouble(oldHeight),
1244 convertSpeedToDouble(oldVn), convertSpeedToDouble(oldVe), convertSpeedToDouble(oldVd),
1245 convertAngleToDouble(latitude), convertAngleToDouble(longitude), convertDistanceToDouble(height),
1246 result);
1247 }
1248
1249 /**
1250 * Estimates velocity from curvilinear position changes and taking into account previous
1251 * velocity respect NED frame.
1252 *
1253 * @param timeInterval time interval between epochs.
1254 * @param oldLatitude previous latitude.
1255 * @param oldLongitude previous longitude.
1256 * @param oldHeight previous height.
1257 * @param oldVn previous velocity of body with respect the Earth, resolved about
1258 * north-axis.
1259 * @param oldVe previous velocity of body with respect the Earth, resolved about
1260 * east-axis.
1261 * @param oldVd previous velocity of body with respect the Earth, resolved about
1262 * down-axis.
1263 * @param latitude current latitude.
1264 * @param longitude current longitude.
1265 * @param height current height.
1266 * @param result instance where updated velocity with respect the Earth, resolved
1267 * about north, east and down and expressed in meters per second (m/s) will
1268 * be stored.
1269 * @throws IllegalArgumentException if provided time interval is negative or zero.
1270 */
1271 public static void estimateVelocity(
1272 final Time timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
1273 final Speed oldVn, final Speed oldVe, final Speed oldVd,
1274 final Angle latitude, final Angle longitude, final Distance height, final NEDVelocity result) {
1275 estimateVelocity(convertTimeToDouble(timeInterval), oldLatitude, oldLongitude, oldHeight,
1276 oldVn, oldVe, oldVd, latitude, longitude, height, result);
1277 }
1278
1279 /**
1280 * Estimates velocity from curvilinear position changes and taking into account previous
1281 * velocity respect NED frame.
1282 *
1283 * @param timeInterval time interval between epochs expressed in seconds (s).
1284 * @param oldLatitude previous latitude.
1285 * @param oldLongitude previous longitude.
1286 * @param oldHeight previous height.
1287 * @param oldVn previous velocity of body with respect the Earth, resolved about
1288 * north-axis and expressed in meters per second (m/s).
1289 * @param oldVe previous velocity of body with respect the Earth, resolved about
1290 * east-axis and expressed in meters per second (m/s).
1291 * @param oldVd previous velocity of body with respect the Earth, resolved about
1292 * down-axis and expressed in meters per second (m/s).
1293 * @param latitude current latitude.
1294 * @param longitude current longitude.
1295 * @param height current height.
1296 * @param result instance where updated velocity with respect the Earth, resolved
1297 * about north, east and down and expressed in meters per second (m/s) will
1298 * be stored.
1299 * @throws IllegalArgumentException if provided time interval is negative or zero.
1300 */
1301 public static void estimateVelocity(
1302 final double timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
1303 final double oldVn, final double oldVe, final double oldVd,
1304 final Angle latitude, final Angle longitude, final Distance height, final NEDVelocity result) {
1305 estimateVelocity(timeInterval, convertAngleToDouble(oldLatitude), convertAngleToDouble(oldLongitude),
1306 convertDistanceToDouble(oldHeight), oldVn, oldVe, oldVd,
1307 convertAngleToDouble(latitude), convertAngleToDouble(longitude), convertDistanceToDouble(height),
1308 result);
1309 }
1310
1311 /**
1312 * Estimates velocity from curvilinear position changes and taking into account previous
1313 * velocity respect NED frame.
1314 *
1315 * @param timeInterval time interval between epochs.
1316 * @param oldLatitude previous latitude.
1317 * @param oldLongitude previous longitude.
1318 * @param oldHeight previous height.
1319 * @param oldVn previous velocity of body with respect the Earth, resolved about
1320 * north-axis and expressed in meters per second (m/s).
1321 * @param oldVe previous velocity of body with respect the Earth, resolved about
1322 * east-axis and expressed in meters per second (m/s).
1323 * @param oldVd previous velocity of body with respect the Earth, resolved about
1324 * down-axis and expressed in meters per second (m/s).
1325 * @param latitude current latitude.
1326 * @param longitude current longitude.
1327 * @param height current height.
1328 * @param result instance where updated velocity with respect the Earth, resolved
1329 * about north, east and down and expressed in meters per second (m/s) will
1330 * be stored.
1331 * @throws IllegalArgumentException if provided time interval is negative or zero.
1332 */
1333 public static void estimateVelocity(
1334 final Time timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
1335 final double oldVn, final double oldVe, final double oldVd,
1336 final Angle latitude, final Angle longitude, final Distance height, final NEDVelocity result) {
1337 estimateVelocity(convertTimeToDouble(timeInterval), oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
1338 latitude, longitude, height, result);
1339 }
1340
1341 /**
1342 * Estimates velocity from curvilinear position changes and taking into account previous
1343 * velocity respect NED frame.
1344 *
1345 * @param timeInterval time interval between epochs expressed in seconds (s).
1346 * @param oldLatitude previous latitude expressed in radians (rad).
1347 * @param oldLongitude previous longitude expressed in radians (rad).
1348 * @param oldHeight previous height expressed in meters (m).
1349 * @param oldVelocity previous velocity of body with respect the Earth, resolved
1350 * about north, east and down axes and expressed in meters per
1351 * second (m/s).
1352 * @param latitude current latitude expressed in radians (rad).
1353 * @param longitude current longitude expressed in radians (rad).
1354 * @param height current height expressed in meters (m).
1355 * @param result instance where updated velocity with respect the Earth, resolved
1356 * about north, east and down and expressed in meters per second (m/s) will
1357 * be stored.
1358 * @throws IllegalArgumentException if provided time interval is negative or zero.
1359 */
1360 public static void estimateVelocity(
1361 final double timeInterval, final double oldLatitude, final double oldLongitude, final double oldHeight,
1362 final NEDVelocity oldVelocity, final double latitude, final double longitude, final double height,
1363 final NEDVelocity result) {
1364 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight,
1365 oldVelocity.getVn(), oldVelocity.getVe(), oldVelocity.getVd(), latitude, longitude, height, result);
1366 }
1367
1368 /**
1369 * Estimates velocity from curvilinear position changes and taking into account previous
1370 * velocity respect NED frame.
1371 *
1372 * @param timeInterval time interval between epochs.
1373 * @param oldLatitude previous latitude expressed in radians (rad).
1374 * @param oldLongitude previous longitude expressed in radians (rad).
1375 * @param oldHeight previous height expressed in meters (m).
1376 * @param oldVelocity previous velocity of body with respect the Earth, resolved
1377 * about north, east and down axes and expressed in meters per
1378 * second (m/s).
1379 * @param latitude current latitude expressed in radians (rad).
1380 * @param longitude current longitude expressed in radians (rad).
1381 * @param height current height expressed in meters (m).
1382 * @param result instance where updated velocity with respect the Earth, resolved
1383 * about north, east and down and expressed in meters per second (m/s) will
1384 * be stored.
1385 * @throws IllegalArgumentException if provided time interval is negative or zero.
1386 */
1387 public static void estimateVelocity(
1388 final Time timeInterval, final double oldLatitude, final double oldLongitude, final double oldHeight,
1389 final NEDVelocity oldVelocity, final double latitude, final double longitude, final double height,
1390 final NEDVelocity result) {
1391 estimateVelocity(convertTimeToDouble(timeInterval), oldLatitude, oldLongitude, oldHeight, oldVelocity,
1392 latitude, longitude, height, result);
1393 }
1394
1395 /**
1396 * Estimates velocity from curvilinear position changes and taking into account previous
1397 * velocity respect NED frame.
1398 *
1399 * @param timeInterval time interval between epochs expressed in seconds (s).
1400 * @param oldLatitude previous latitude.
1401 * @param oldLongitude previous longitude.
1402 * @param oldHeight previous height.
1403 * @param oldVelocity previous velocity of body with respect the Earth, resolved
1404 * about north, east and down axes and expressed in meters per
1405 * second (m/s).
1406 * @param latitude current latitude.
1407 * @param longitude current longitude.
1408 * @param height current height.
1409 * @param result instance where updated velocity with respect the Earth, resolved
1410 * about north, east and down and expressed in meters per second (m/s) will
1411 * be stored.
1412 * @throws IllegalArgumentException if provided time interval is negative or zero.
1413 */
1414 public static void estimateVelocity(
1415 final double timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
1416 final NEDVelocity oldVelocity, final Angle latitude, final Angle longitude, final Distance height,
1417 final NEDVelocity result) {
1418 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight,
1419 oldVelocity.getVn(), oldVelocity.getVe(), oldVelocity.getVd(), latitude, longitude, height, result);
1420 }
1421
1422 /**
1423 * Estimates velocity from curvilinear position changes and taking into account previous
1424 * velocity respect NED frame.
1425 *
1426 * @param timeInterval time interval between epochs.
1427 * @param oldLatitude previous latitude.
1428 * @param oldLongitude previous longitude.
1429 * @param oldHeight previous height.
1430 * @param oldVelocity previous velocity of body with respect the Earth, resolved
1431 * about north, east and down axes and expressed in meters per
1432 * second (m/s).
1433 * @param latitude current latitude.
1434 * @param longitude current longitude.
1435 * @param height current height.
1436 * @param result instance where updated velocity with respect the Earth, resolved
1437 * about north, east and down and expressed in meters per second (m/s) will
1438 * be stored.
1439 * @throws IllegalArgumentException if provided time interval is negative or zero.
1440 */
1441 public static void estimateVelocity(
1442 final Time timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
1443 final NEDVelocity oldVelocity, final Angle latitude, final Angle longitude, final Distance height,
1444 final NEDVelocity result) {
1445 estimateVelocity(convertTimeToDouble(timeInterval), oldLatitude, oldLongitude, oldHeight, oldVelocity,
1446 latitude, longitude, height, result);
1447 }
1448
1449 /**
1450 * Estimates velocity from curvilinear position changes and taking into account previous
1451 * velocity respect NED frame.
1452 *
1453 * @param timeInterval time interval between epochs expressed in seconds (s).
1454 * @param oldFrame previous frame containing position and velocity of body with
1455 * respect Earth and resolved about north, east and down axes.
1456 * @param latitude current latitude expressed in radians (rad).
1457 * @param longitude current longitude expressed in radians (rad).
1458 * @param height current height expressed in meters (m).
1459 * @param result instance where updated velocity with respect the Earth, resolved
1460 * about north, east and down and expressed in meters per second (m/s) will
1461 * be stored.
1462 * @throws IllegalArgumentException if provided time interval is negative or zero.
1463 */
1464 public static void estimateVelocity(
1465 final double timeInterval, final NEDFrame oldFrame,
1466 final double latitude, final double longitude, final double height, final NEDVelocity result) {
1467 estimateVelocity(timeInterval, oldFrame.getLatitude(), oldFrame.getLongitude(), oldFrame.getHeight(),
1468 oldFrame.getVn(), oldFrame.getVe(), oldFrame.getVd(), latitude, longitude, height, result);
1469 }
1470
1471 /**
1472 * Estimates velocity from curvilinear position changes and taking into account previous
1473 * velocity respect NED frame.
1474 *
1475 * @param timeInterval time interval between epochs.
1476 * @param oldFrame previous frame containing position and velocity of body with
1477 * respect Earth and resolved about north, east and down axes.
1478 * @param latitude current latitude expressed in radians (rad).
1479 * @param longitude current longitude expressed in radians (rad).
1480 * @param height current height expressed in meters (m).
1481 * @param result instance where updated velocity with respect the Earth, resolved
1482 * about north, east and down and expressed in meters per second (m/s) will
1483 * be stored.
1484 * @throws IllegalArgumentException if provided time interval is negative or zero.
1485 */
1486 public static void estimateVelocity(
1487 final Time timeInterval, final NEDFrame oldFrame,
1488 final double latitude, final double longitude, final double height, final NEDVelocity result) {
1489 estimateVelocity(convertTimeToDouble(timeInterval), oldFrame, latitude, longitude, height, result);
1490 }
1491
1492 /**
1493 * Estimates velocity from curvilinear position changes and taking into account previous
1494 * velocity respect NED frame.
1495 *
1496 * @param timeInterval time interval between epochs expressed in seconds (s).
1497 * @param oldFrame previous frame containing position and velocity of body with
1498 * respect Earth and resolved about north, east and down axes.
1499 * @param latitude current latitude.
1500 * @param longitude current longitude.
1501 * @param height current height.
1502 * @param result instance where updated velocity with respect the Earth, resolved
1503 * about north, east and down and expressed in meters per second (m/s) will
1504 * be stored.
1505 * @throws IllegalArgumentException if provided time interval is negative or zero.
1506 */
1507 public static void estimateVelocity(
1508 final double timeInterval, final NEDFrame oldFrame,
1509 final Angle latitude, final Angle longitude, final Distance height, final NEDVelocity result) {
1510 estimateVelocity(timeInterval, oldFrame,
1511 convertAngleToDouble(latitude), convertAngleToDouble(longitude), convertDistanceToDouble(height),
1512 result);
1513 }
1514
1515 /**
1516 * Estimates velocity from curvilinear position changes and taking into account previous
1517 * velocity respect NED frame.
1518 *
1519 * @param timeInterval time interval between epochs.
1520 * @param oldFrame previous frame containing position and velocity of body with
1521 * respect Earth and resolved about north, east and down axes.
1522 * @param latitude current latitude.
1523 * @param longitude current longitude.
1524 * @param height current height.
1525 * @param result instance where updated velocity with respect the Earth, resolved
1526 * about north, east and down and expressed in meters per second (m/s) will
1527 * be stored.
1528 * @throws IllegalArgumentException if provided time interval is negative or zero.
1529 */
1530 public static void estimateVelocity(
1531 final Time timeInterval, final NEDFrame oldFrame,
1532 final Angle latitude, final Angle longitude, final Distance height, final NEDVelocity result) {
1533 estimateVelocity(convertTimeToDouble(timeInterval), oldFrame, latitude, longitude, height, result);
1534 }
1535
1536 /**
1537 * Estimates velocity from curvilinear position changes and taking into account previous
1538 * velocity respect NED frame.
1539 *
1540 * @param timeInterval time interval between epochs expressed in seconds (s).
1541 * @param oldPosition previous body position with respect the Earth, resolved about
1542 * north, east and down axes.
1543 * @param oldVn previous velocity of body with respect the Earth, resolved about
1544 * north-axis and expressed in meters per second (m/s).
1545 * @param oldVe previous velocity of body with respect the Earth, resolved about
1546 * east-axis and expressed in meters per second (m/s).
1547 * @param oldVd previous velocity of body with respect the Earth, resolved about
1548 * down-axis and expressed in meters per second (m/s).
1549 * @param position current body position with respect the Earth, resolved about
1550 * north, east and down axes.
1551 * @param result instance where updated velocity with respect the Earth, resolved
1552 * about north, east and down and expressed in meters per second (m/s) will
1553 * be stored.
1554 * @throws IllegalArgumentException if provided time interval is negative or zero.
1555 */
1556 public static void estimateVelocity(
1557 final double timeInterval, final NEDPosition oldPosition,
1558 final double oldVn, final double oldVe, final double oldVd, final NEDPosition position,
1559 final NEDVelocity result) {
1560 estimateVelocity(timeInterval, oldPosition.getLatitude(), oldPosition.getLongitude(), oldPosition.getHeight(),
1561 oldVn, oldVe, oldVd, position.getLatitude(), position.getLongitude(), position.getHeight(), result);
1562 }
1563
1564 /**
1565 * Estimates velocity from curvilinear position changes and taking into account previous
1566 * velocity respect NED frame.
1567 *
1568 * @param timeInterval time interval between epochs.
1569 * @param oldPosition previous body position with respect the Earth, resolved about
1570 * north, east and down axes.
1571 * @param oldVn previous velocity of body with respect the Earth, resolved about
1572 * north-axis and expressed in meters per second (m/s).
1573 * @param oldVe previous velocity of body with respect the Earth, resolved about
1574 * east-axis and expressed in meters per second (m/s).
1575 * @param oldVd previous velocity of body with respect the Earth, resolved about
1576 * down-axis and expressed in meters per second (m/s).
1577 * @param position current body position with respect the Earth, resolved about
1578 * north, east and down axes.
1579 * @param result instance where updated velocity with respect the Earth, resolved
1580 * about north, east and down and expressed in meters per second (m/s) will
1581 * be stored.
1582 * @throws IllegalArgumentException if provided time interval is negative or zero.
1583 */
1584 public static void estimateVelocity(
1585 final Time timeInterval, final NEDPosition oldPosition,
1586 final double oldVn, final double oldVe, final double oldVd, final NEDPosition position,
1587 final NEDVelocity result) {
1588 estimateVelocity(convertTimeToDouble(timeInterval), oldPosition, oldVn, oldVe, oldVd, position, result);
1589 }
1590
1591 /**
1592 * Estimates velocity from curvilinear position changes and taking into account previous
1593 * velocity respect NED frame.
1594 *
1595 * @param timeInterval time interval between epochs expressed in seconds (s).
1596 * @param oldPosition previous body position with respect the Earth, resolved about
1597 * north, east and down axes.
1598 * @param oldVn previous velocity of body with respect the Earth, resolved about
1599 * north-axis.
1600 * @param oldVe previous velocity of body with respect the Earth, resolved about
1601 * east-axis.
1602 * @param oldVd previous velocity of body with respect the Earth, resolved about
1603 * down-axis.
1604 * @param position current body position with respect the Earth, resolved about
1605 * north, east and down axes.
1606 * @param result instance where updated velocity with respect the Earth, resolved
1607 * about north, east and down and expressed in meters per second (m/s) will
1608 * be stored.
1609 * @throws IllegalArgumentException if provided time interval is negative or zero.
1610 */
1611 public static void estimateVelocity(
1612 final double timeInterval, final NEDPosition oldPosition,
1613 final Speed oldVn, final Speed oldVe, final Speed oldVd, final NEDPosition position,
1614 final NEDVelocity result) {
1615 estimateVelocity(timeInterval, oldPosition, convertSpeedToDouble(oldVn),
1616 convertSpeedToDouble(oldVe), convertSpeedToDouble(oldVd), position, result);
1617 }
1618
1619 /**
1620 * Estimates velocity from curvilinear position changes and taking into account previous
1621 * velocity respect NED frame.
1622 *
1623 * @param timeInterval time interval between epochs.
1624 * @param oldPosition previous body position with respect the Earth, resolved about
1625 * north, east and down axes.
1626 * @param oldVn previous velocity of body with respect the Earth, resolved about
1627 * north-axis.
1628 * @param oldVe previous velocity of body with respect the Earth, resolved about
1629 * east-axis.
1630 * @param oldVd previous velocity of body with respect the Earth, resolved about
1631 * down-axis.
1632 * @param position current body position with respect the Earth, resolved about
1633 * north, east and down axes.
1634 * @param result instance where updated velocity with respect the Earth, resolved
1635 * about north, east and down and expressed in meters per second (m/s) will
1636 * be stored.
1637 * @throws IllegalArgumentException if provided time interval is negative or zero.
1638 */
1639 public static void estimateVelocity(
1640 final Time timeInterval, final NEDPosition oldPosition,
1641 final Speed oldVn, final Speed oldVe, final Speed oldVd, final NEDPosition position,
1642 final NEDVelocity result) {
1643 estimateVelocity(convertTimeToDouble(timeInterval), oldPosition, oldVn, oldVe, oldVd, position, result);
1644 }
1645
1646 /**
1647 * Estimates velocity from curvilinear position changes and taking into account previous
1648 * velocity respect NED frame.
1649 *
1650 * @param timeInterval time interval between epochs expressed in seconds (s).
1651 * @param oldPosition previous body position with respect the Earth, resolved about
1652 * north, east and down axes.
1653 * @param oldVelocity previous velocity of body with respect the Earth, resolved
1654 * about north, east and down axes and expressed in meters per
1655 * second (m/s).
1656 * @param position current body position with respect the Earth, resolved about
1657 * north, east and down axes.
1658 * @param result instance where updated velocity with respect the Earth, resolved
1659 * about north, east and down and expressed in meters per second (m/s) will
1660 * be stored.
1661 * @throws IllegalArgumentException if provided time interval is negative or zero.
1662 */
1663 public static void estimateVelocity(
1664 final double timeInterval, final NEDPosition oldPosition, final NEDVelocity oldVelocity,
1665 final NEDPosition position, final NEDVelocity result) {
1666 estimateVelocity(timeInterval, oldPosition, oldVelocity.getVn(), oldVelocity.getVe(), oldVelocity.getVd(),
1667 position, result);
1668 }
1669
1670 /**
1671 * Estimates velocity from curvilinear position changes and taking into account previous
1672 * velocity respect NED frame.
1673 *
1674 * @param timeInterval time interval between epochs.
1675 * @param oldPosition previous body position with respect the Earth, resolved about
1676 * north, east and down axes.
1677 * @param oldVelocity previous velocity of body with respect the Earth, resolved
1678 * about north, east and down axes and expressed in meters per
1679 * second (m/s).
1680 * @param position current body position with respect the Earth, resolved about
1681 * north, east and down axes.
1682 * @param result instance where updated velocity with respect the Earth, resolved
1683 * about north, east and down and expressed in meters per second (m/s) will
1684 * be stored.
1685 * @throws IllegalArgumentException if provided time interval is negative or zero.
1686 */
1687 public static void estimateVelocity(
1688 final Time timeInterval, final NEDPosition oldPosition, final NEDVelocity oldVelocity,
1689 final NEDPosition position, final NEDVelocity result) {
1690 estimateVelocity(convertTimeToDouble(timeInterval), oldPosition, oldVelocity, position, result);
1691 }
1692
1693 /**
1694 * Estimates velocity from curvilinear position changes and taking into account previous
1695 * velocity respect NED frame.
1696 *
1697 * @param timeInterval time interval between epochs expressed in seconds (s).
1698 * @param oldFrame previous frame containing position and velocity of body with
1699 * respect Earth and resolved about north, east and down axes.
1700 * @param position current body position with respect the Earth, resolved about
1701 * north, east and down axes.
1702 * @param result instance where updated velocity with respect the Earth, resolved
1703 * about north, east and down and expressed in meters per second (m/s) will
1704 * be stored.
1705 * @throws IllegalArgumentException if provided time interval is negative or zero.
1706 */
1707 public static void estimateVelocity(
1708 final double timeInterval, final NEDFrame oldFrame, final NEDPosition position, final NEDVelocity result) {
1709 estimateVelocity(timeInterval, oldFrame, position.getLatitude(), position.getLongitude(), position.getHeight(),
1710 result);
1711 }
1712
1713 /**
1714 * Estimates velocity from curvilinear position changes and taking into account previous
1715 * velocity respect NED frame.
1716 *
1717 * @param timeInterval time interval between epochs.
1718 * @param oldFrame previous frame containing position and velocity of body with
1719 * respect Earth and resolved about north, east and down axes.
1720 * @param position current body position with respect the Earth, resolved about
1721 * north, east and down axes.
1722 * @param result instance where updated velocity with respect the Earth, resolved
1723 * about north, east and down and expressed in meters per second (m/s) will
1724 * be stored.
1725 * @throws IllegalArgumentException if provided time interval is negative or zero.
1726 */
1727 public static void estimateVelocity(
1728 final Time timeInterval, final NEDFrame oldFrame, final NEDPosition position, final NEDVelocity result) {
1729 estimateVelocity(convertTimeToDouble(timeInterval), oldFrame, position, result);
1730 }
1731
1732 /**
1733 * Estimates velocity from curvilinear position changes and taking into account previous
1734 * velocity respect NED frame.
1735 *
1736 * @param timeInterval time interval between epochs expressed in seconds (s).
1737 * @param oldLatitude previous latitude expressed in radians (rad).
1738 * @param oldLongitude previous longitude expressed in radians (rad).
1739 * @param oldHeight previous height expressed in meters (m).
1740 * @param oldVn previous velocity of body with respect the Earth, resolved about
1741 * north-axis and expressed in meters per second (m/s).
1742 * @param oldVe previous velocity of body with respect the Earth, resolved about
1743 * east-axis and expressed in meters per second (m/s).
1744 * @param oldVd previous velocity of body with respect the Earth, resolved about
1745 * down-axis and expressed in meters per second (m/s).
1746 * @param latitude current latitude expressed in radians (rad).
1747 * @param longitude current longitude expressed in radians (rad).
1748 * @param height current height expressed in meters (m).
1749 * @return estimated updated velocity with respect the Earth, resolved about north,
1750 * east and down and expressed in meters per second (m/s).
1751 * @throws IllegalArgumentException if provided time interval is negative or zero.
1752 */
1753 public static NEDVelocity estimateVelocityAndReturnNew(
1754 final double timeInterval, final double oldLatitude, final double oldLongitude, final double oldHeight,
1755 final double oldVn, final double oldVe, final double oldVd,
1756 final double latitude, final double longitude, final double height) {
1757 final var result = new NEDVelocity();
1758 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
1759 latitude, longitude, height, result);
1760 return result;
1761 }
1762
1763 /**
1764 * Estimates velocity from curvilinear position changes and taking into account previous
1765 * velocity respect NED frame.
1766 *
1767 * @param timeInterval time interval between epochs.
1768 * @param oldLatitude previous latitude expressed in radians (rad).
1769 * @param oldLongitude previous longitude expressed in radians (rad).
1770 * @param oldHeight previous height expressed in meters (m).
1771 * @param oldVn previous velocity of body with respect the Earth, resolved about
1772 * north-axis and expressed in meters per second (m/s).
1773 * @param oldVe previous velocity of body with respect the Earth, resolved about
1774 * east-axis and expressed in meters per second (m/s).
1775 * @param oldVd previous velocity of body with respect the Earth, resolved about
1776 * down-axis and expressed in meters per second (m/s).
1777 * @param latitude current latitude expressed in radians (rad).
1778 * @param longitude current longitude expressed in radians (rad).
1779 * @param height current height expressed in meters (m).
1780 * @return estimated updated velocity with respect the Earth, resolved about north,
1781 * east and down and expressed in meters per second (m/s).
1782 * @throws IllegalArgumentException if provided time interval is negative or zero.
1783 */
1784 public static NEDVelocity estimateVelocityAndReturnNew(
1785 final Time timeInterval, final double oldLatitude, final double oldLongitude, final double oldHeight,
1786 final double oldVn, final double oldVe, final double oldVd,
1787 final double latitude, final double longitude, final double height) {
1788 final var result = new NEDVelocity();
1789 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd, latitude, longitude,
1790 height, result);
1791 return result;
1792 }
1793
1794 /**
1795 * Estimates velocity from curvilinear position changes and taking into account previous
1796 * velocity respect NED frame.
1797 *
1798 * @param timeInterval time interval between epochs expressed in seconds (s).
1799 * @param oldLatitude previous latitude.
1800 * @param oldLongitude previous longitude.
1801 * @param oldHeight previous height.
1802 * @param oldVn previous velocity of body with respect the Earth, resolved about
1803 * north-axis.
1804 * @param oldVe previous velocity of body with respect the Earth, resolved about
1805 * east-axis.
1806 * @param oldVd previous velocity of body with respect the Earth, resolved about
1807 * down-axis.
1808 * @param latitude current latitude.
1809 * @param longitude current longitude.
1810 * @param height current height.
1811 * @return estimated updated velocity with respect the Earth, resolved about north,
1812 * east and down and expressed in meters per second (m/s).
1813 * @throws IllegalArgumentException if provided time interval is negative or zero.
1814 */
1815 public static NEDVelocity estimateVelocityAndReturnNew(
1816 final double timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
1817 final Speed oldVn, final Speed oldVe, final Speed oldVd,
1818 final Angle latitude, final Angle longitude, final Distance height) {
1819 final var result = new NEDVelocity();
1820 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
1821 latitude, longitude, height, result);
1822 return result;
1823 }
1824
1825 /**
1826 * Estimates velocity from curvilinear position changes and taking into account previous
1827 * velocity respect NED frame.
1828 *
1829 * @param timeInterval time interval between epochs.
1830 * @param oldLatitude previous latitude.
1831 * @param oldLongitude previous longitude.
1832 * @param oldHeight previous height.
1833 * @param oldVn previous velocity of body with respect the Earth, resolved about
1834 * north-axis.
1835 * @param oldVe previous velocity of body with respect the Earth, resolved about
1836 * east-axis.
1837 * @param oldVd previous velocity of body with respect the Earth, resolved about
1838 * down-axis.
1839 * @param latitude current latitude.
1840 * @param longitude current longitude.
1841 * @param height current height.
1842 * @return estimated updated velocity with respect the Earth, resolved about north,
1843 * east and down and expressed in meters per second (m/s).
1844 * @throws IllegalArgumentException if provided time interval is negative or zero.
1845 */
1846 public static NEDVelocity estimateVelocityAndReturnNew(
1847 final Time timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
1848 final Speed oldVn, final Speed oldVe, final Speed oldVd,
1849 final Angle latitude, final Angle longitude, final Distance height) {
1850 final var result = new NEDVelocity();
1851 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
1852 latitude, longitude, height, result);
1853 return result;
1854 }
1855
1856 /**
1857 * Estimates velocity from curvilinear position changes and taking into account previous
1858 * velocity respect NED frame.
1859 *
1860 * @param timeInterval time interval between epochs expressed in seconds (s).
1861 * @param oldLatitude previous latitude.
1862 * @param oldLongitude previous longitude.
1863 * @param oldHeight previous height.
1864 * @param oldVn previous velocity of body with respect the Earth, resolved about
1865 * north-axis and expressed in meters per second (m/s).
1866 * @param oldVe previous velocity of body with respect the Earth, resolved about
1867 * east-axis and expressed in meters per second (m/s).
1868 * @param oldVd previous velocity of body with respect the Earth, resolved about
1869 * down-axis and expressed in meters per second (m/s).
1870 * @param latitude current latitude.
1871 * @param longitude current longitude.
1872 * @param height current height.
1873 * @return estimated updated velocity with respect the Earth, resolved about north,
1874 * east and down and expressed in meters per second (m/s).
1875 * @throws IllegalArgumentException if provided time interval is negative or zero.
1876 */
1877 public static NEDVelocity estimateVelocityAndReturnNew(
1878 final double timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
1879 final double oldVn, final double oldVe, final double oldVd,
1880 final Angle latitude, final Angle longitude, final Distance height) {
1881 final var result = new NEDVelocity();
1882 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
1883 latitude, longitude, height, result);
1884 return result;
1885 }
1886
1887 /**
1888 * Estimates velocity from curvilinear position changes and taking into account previous
1889 * velocity respect NED frame.
1890 *
1891 * @param timeInterval time interval between epochs.
1892 * @param oldLatitude previous latitude.
1893 * @param oldLongitude previous longitude.
1894 * @param oldHeight previous height.
1895 * @param oldVn previous velocity of body with respect the Earth, resolved about
1896 * north-axis and expressed in meters per second (m/s).
1897 * @param oldVe previous velocity of body with respect the Earth, resolved about
1898 * east-axis and expressed in meters per second (m/s).
1899 * @param oldVd previous velocity of body with respect the Earth, resolved about
1900 * down-axis and expressed in meters per second (m/s).
1901 * @param latitude current latitude.
1902 * @param longitude current longitude.
1903 * @param height current height.
1904 * @return estimated updated velocity with respect the Earth, resolved about north,
1905 * east and down and expressed in meters per second (m/s).
1906 * @throws IllegalArgumentException if provided time interval is negative or zero.
1907 */
1908 public static NEDVelocity estimateVelocityAndReturnNew(
1909 final Time timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
1910 final double oldVn, final double oldVe, final double oldVd,
1911 final Angle latitude, final Angle longitude, final Distance height) {
1912 final var result = new NEDVelocity();
1913 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVn, oldVe, oldVd,
1914 latitude, longitude, height, result);
1915 return result;
1916 }
1917
1918 /**
1919 * Estimates velocity from curvilinear position changes and taking into account previous
1920 * velocity respect NED frame.
1921 *
1922 * @param timeInterval time interval between epochs expressed in seconds (s).
1923 * @param oldLatitude previous latitude expressed in radians (rad).
1924 * @param oldLongitude previous longitude expressed in radians (rad).
1925 * @param oldHeight previous height expressed in meters (m).
1926 * @param oldVelocity previous velocity of body with respect the Earth, resolved
1927 * about north, east and down axes and expressed in meters per
1928 * second (m/s).
1929 * @param latitude current latitude expressed in radians (rad).
1930 * @param longitude current longitude expressed in radians (rad).
1931 * @param height current height expressed in meters (m).
1932 * @return estimated updated velocity with respect the Earth, resolved about north,
1933 * east and down and expressed in meters per second (m/s).
1934 * @throws IllegalArgumentException if provided time interval is negative or zero.
1935 */
1936 public static NEDVelocity estimateVelocityAndReturnNew(
1937 final double timeInterval, final double oldLatitude, final double oldLongitude, final double oldHeight,
1938 final NEDVelocity oldVelocity, final double latitude, final double longitude, final double height) {
1939 final var result = new NEDVelocity();
1940 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVelocity, latitude, longitude, height,
1941 result);
1942 return result;
1943 }
1944
1945 /**
1946 * Estimates velocity from curvilinear position changes and taking into account previous
1947 * velocity respect NED frame.
1948 *
1949 * @param timeInterval time interval between epochs.
1950 * @param oldLatitude previous latitude expressed in radians (rad).
1951 * @param oldLongitude previous longitude expressed in radians (rad).
1952 * @param oldHeight previous height expressed in meters (m).
1953 * @param oldVelocity previous velocity of body with respect the Earth, resolved
1954 * about north, east and down axes and expressed in meters per
1955 * second (m/s).
1956 * @param latitude current latitude expressed in radians (rad).
1957 * @param longitude current longitude expressed in radians (rad).
1958 * @param height current height expressed in meters (m).
1959 * @return estimated updated velocity with respect the Earth, resolved about north,
1960 * east and down and expressed in meters per second (m/s).
1961 * @throws IllegalArgumentException if provided time interval is negative or zero.
1962 */
1963 public static NEDVelocity estimateVelocityAndReturnNew(
1964 final Time timeInterval, final double oldLatitude, final double oldLongitude, final double oldHeight,
1965 final NEDVelocity oldVelocity, final double latitude, final double longitude, final double height) {
1966 final var result = new NEDVelocity();
1967 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVelocity, latitude, longitude, height,
1968 result);
1969 return result;
1970 }
1971
1972 /**
1973 * Estimates velocity from curvilinear position changes and taking into account previous
1974 * velocity respect NED frame.
1975 *
1976 * @param timeInterval time interval between epochs expressed in seconds (s).
1977 * @param oldLatitude previous latitude.
1978 * @param oldLongitude previous longitude.
1979 * @param oldHeight previous height.
1980 * @param oldVelocity previous velocity of body with respect the Earth, resolved
1981 * about north, east and down axes and expressed in meters per
1982 * second (m/s).
1983 * @param latitude current latitude.
1984 * @param longitude current longitude.
1985 * @param height current height.
1986 * @return estimated updated velocity with respect the Earth, resolved about north,
1987 * east and down and expressed in meters per second (m/s).
1988 * @throws IllegalArgumentException if provided time interval is negative or zero.
1989 */
1990 public static NEDVelocity estimateVelocityAndReturnNew(
1991 final double timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
1992 final NEDVelocity oldVelocity, final Angle latitude, final Angle longitude, final Distance height) {
1993 final var result = new NEDVelocity();
1994 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVelocity, latitude, longitude, height,
1995 result);
1996 return result;
1997 }
1998
1999 /**
2000 * Estimates velocity from curvilinear position changes and taking into account previous
2001 * velocity respect NED frame.
2002 *
2003 * @param timeInterval time interval between epochs.
2004 * @param oldLatitude previous latitude.
2005 * @param oldLongitude previous longitude.
2006 * @param oldHeight previous height.
2007 * @param oldVelocity previous velocity of body with respect the Earth, resolved
2008 * about north, east and down axes and expressed in meters per
2009 * second (m/s).
2010 * @param latitude current latitude.
2011 * @param longitude current longitude.
2012 * @param height current height.
2013 * @return estimated updated velocity with respect the Earth, resolved about north,
2014 * east and down and expressed in meters per second (m/s).
2015 * @throws IllegalArgumentException if provided time interval is negative or zero.
2016 */
2017 public static NEDVelocity estimateVelocityAndReturnNew(
2018 final Time timeInterval, final Angle oldLatitude, final Angle oldLongitude, final Distance oldHeight,
2019 final NEDVelocity oldVelocity, final Angle latitude, final Angle longitude, final Distance height) {
2020 final var result = new NEDVelocity();
2021 estimateVelocity(timeInterval, oldLatitude, oldLongitude, oldHeight, oldVelocity, latitude, longitude, height,
2022 result);
2023 return result;
2024 }
2025
2026 /**
2027 * Estimates velocity from curvilinear position changes and taking into account previous
2028 * velocity respect NED frame.
2029 *
2030 * @param timeInterval time interval between epochs expressed in seconds (s).
2031 * @param oldFrame previous frame containing position and velocity of body with
2032 * respect Earth and resolved about north, east and down axes.
2033 * @param latitude current latitude expressed in radians (rad).
2034 * @param longitude current longitude expressed in radians (rad).
2035 * @param height current height expressed in meters (m).
2036 * @return estimated updated velocity with respect the Earth, resolved about north,
2037 * east and down and expressed in meters per second (m/s).
2038 * @throws IllegalArgumentException if provided time interval is negative or zero.
2039 */
2040 public static NEDVelocity estimateVelocityAndReturnNew(
2041 final double timeInterval, final NEDFrame oldFrame,
2042 final double latitude, final double longitude, final double height) {
2043 final var result = new NEDVelocity();
2044 estimateVelocity(timeInterval, oldFrame, latitude, longitude, height, result);
2045 return result;
2046 }
2047
2048 /**
2049 * Estimates velocity from curvilinear position changes and taking into account previous
2050 * velocity respect NED frame.
2051 *
2052 * @param timeInterval time interval between epochs.
2053 * @param oldFrame previous frame containing position and velocity of body with
2054 * respect Earth and resolved about north, east and down axes.
2055 * @param latitude current latitude expressed in radians (rad).
2056 * @param longitude current longitude expressed in radians (rad).
2057 * @param height current height expressed in meters (m).
2058 * @return estimated updated velocity with respect the Earth, resolved about north,
2059 * east and down and expressed in meters per second (m/s).
2060 * @throws IllegalArgumentException if provided time interval is negative or zero.
2061 */
2062 public static NEDVelocity estimateVelocityAndReturnNew(
2063 final Time timeInterval, final NEDFrame oldFrame,
2064 final double latitude, final double longitude, final double height) {
2065 final var result = new NEDVelocity();
2066 estimateVelocity(timeInterval, oldFrame, latitude, longitude, height, result);
2067 return result;
2068 }
2069
2070 /**
2071 * Estimates velocity from curvilinear position changes and taking into account previous
2072 * velocity respect NED frame.
2073 *
2074 * @param timeInterval time interval between epochs expressed in seconds (s).
2075 * @param oldFrame previous frame containing position and velocity of body with
2076 * respect Earth and resolved about north, east and down axes.
2077 * @param latitude current latitude.
2078 * @param longitude current longitude.
2079 * @param height current height.
2080 * @return estimated updated velocity with respect the Earth, resolved about north,
2081 * east and down and expressed in meters per second (m/s).
2082 * @throws IllegalArgumentException if provided time interval is negative or zero.
2083 */
2084 public static NEDVelocity estimateVelocityAndReturnNew(
2085 final double timeInterval, final NEDFrame oldFrame,
2086 final Angle latitude, final Angle longitude, final Distance height) {
2087 final var result = new NEDVelocity();
2088 estimateVelocity(timeInterval, oldFrame, latitude, longitude, height, result);
2089 return result;
2090 }
2091
2092 /**
2093 * Estimates velocity from curvilinear position changes and taking into account previous
2094 * velocity respect NED frame.
2095 *
2096 * @param timeInterval time interval between epochs.
2097 * @param oldFrame previous frame containing position and velocity of body with
2098 * respect Earth and resolved about north, east and down axes.
2099 * @param latitude current latitude.
2100 * @param longitude current longitude.
2101 * @param height current height.
2102 * @return estimated updated velocity with respect the Earth, resolved about north,
2103 * east and down and expressed in meters per second (m/s).
2104 * @throws IllegalArgumentException if provided time interval is negative or zero.
2105 */
2106 public static NEDVelocity estimateVelocityAndReturnNew(
2107 final Time timeInterval, final NEDFrame oldFrame,
2108 final Angle latitude, final Angle longitude, final Distance height) {
2109 final var result = new NEDVelocity();
2110 estimateVelocity(timeInterval, oldFrame, latitude, longitude, height, result);
2111 return result;
2112 }
2113
2114 /**
2115 * Estimates velocity from curvilinear position changes and taking into account previous
2116 * velocity respect NED frame.
2117 *
2118 * @param timeInterval time interval between epochs expressed in seconds (s).
2119 * @param oldPosition previous body position with respect the Earth, resolved about
2120 * north, east and down axes.
2121 * @param oldVn previous velocity of body with respect the Earth, resolved about
2122 * north-axis and expressed in meters per second (m/s).
2123 * @param oldVe previous velocity of body with respect the Earth, resolved about
2124 * east-axis and expressed in meters per second (m/s).
2125 * @param oldVd previous velocity of body with respect the Earth, resolved about
2126 * down-axis and expressed in meters per second (m/s).
2127 * @param position current body position with respect the Earth, resolved about
2128 * north, east and down axes.
2129 * @return estimated updated velocity with respect the Earth, resolved about north,
2130 * east and down and expressed in meters per second (m/s).
2131 * @throws IllegalArgumentException if provided time interval is negative or zero.
2132 */
2133 public static NEDVelocity estimateVelocityAndReturnNew(
2134 final double timeInterval, final NEDPosition oldPosition,
2135 final double oldVn, final double oldVe, final double oldVd, final NEDPosition position) {
2136 final var result = new NEDVelocity();
2137 estimateVelocity(timeInterval, oldPosition, oldVn, oldVe, oldVd, position, result);
2138 return result;
2139 }
2140
2141 /**
2142 * Estimates velocity from curvilinear position changes and taking into account previous
2143 * velocity respect NED frame.
2144 *
2145 * @param timeInterval time interval between epochs.
2146 * @param oldPosition previous body position with respect the Earth, resolved about
2147 * north, east and down axes.
2148 * @param oldVn previous velocity of body with respect the Earth, resolved about
2149 * north-axis and expressed in meters per second (m/s).
2150 * @param oldVe previous velocity of body with respect the Earth, resolved about
2151 * east-axis and expressed in meters per second (m/s).
2152 * @param oldVd previous velocity of body with respect the Earth, resolved about
2153 * down-axis and expressed in meters per second (m/s).
2154 * @param position current body position with respect the Earth, resolved about
2155 * north, east and down axes.
2156 * @return estimated updated velocity with respect the Earth, resolved about north,
2157 * east and down and expressed in meters per second (m/s).
2158 * @throws IllegalArgumentException if provided time interval is negative or zero.
2159 */
2160 public static NEDVelocity estimateVelocityAndReturnNew(
2161 final Time timeInterval, final NEDPosition oldPosition,
2162 final double oldVn, final double oldVe, final double oldVd, final NEDPosition position) {
2163 final var result = new NEDVelocity();
2164 estimateVelocity(timeInterval, oldPosition, oldVn, oldVe, oldVd, position, result);
2165 return result;
2166 }
2167
2168 /**
2169 * Estimates velocity from curvilinear position changes and taking into account previous
2170 * velocity respect NED frame.
2171 *
2172 * @param timeInterval time interval between epochs expressed in seconds (s).
2173 * @param oldPosition previous body position with respect the Earth, resolved about
2174 * north, east and down axes.
2175 * @param oldVn previous velocity of body with respect the Earth, resolved about
2176 * north-axis.
2177 * @param oldVe previous velocity of body with respect the Earth, resolved about
2178 * east-axis.
2179 * @param oldVd previous velocity of body with respect the Earth, resolved about
2180 * down-axis.
2181 * @param position current body position with respect the Earth, resolved about
2182 * north, east and down axes.
2183 * @return estimated updated velocity with respect the Earth, resolved about north,
2184 * east and down and expressed in meters per second (m/s).
2185 * @throws IllegalArgumentException if provided time interval is negative or zero.
2186 */
2187 public static NEDVelocity estimateVelocityAndReturnNew(
2188 final double timeInterval, final NEDPosition oldPosition,
2189 final Speed oldVn, final Speed oldVe, final Speed oldVd, final NEDPosition position) {
2190 final var result = new NEDVelocity();
2191 estimateVelocity(timeInterval, oldPosition, oldVn, oldVe, oldVd, position, result);
2192 return result;
2193 }
2194
2195 /**
2196 * Estimates velocity from curvilinear position changes and taking into account previous
2197 * velocity respect NED frame.
2198 *
2199 * @param timeInterval time interval between epochs.
2200 * @param oldPosition previous body position with respect the Earth, resolved about
2201 * north, east and down axes.
2202 * @param oldVn previous velocity of body with respect the Earth, resolved about
2203 * north-axis.
2204 * @param oldVe previous velocity of body with respect the Earth, resolved about
2205 * east-axis.
2206 * @param oldVd previous velocity of body with respect the Earth, resolved about
2207 * down-axis.
2208 * @param position current body position with respect the Earth, resolved about
2209 * north, east and down axes.
2210 * @return estimated updated velocity with respect the Earth, resolved about north,
2211 * east and down and expressed in meters per second (m/s).
2212 * @throws IllegalArgumentException if provided time interval is negative or zero.
2213 */
2214 public static NEDVelocity estimateVelocityAndReturnNew(
2215 final Time timeInterval, final NEDPosition oldPosition,
2216 final Speed oldVn, final Speed oldVe, final Speed oldVd, final NEDPosition position) {
2217 final var result = new NEDVelocity();
2218 estimateVelocity(timeInterval, oldPosition, oldVn, oldVe, oldVd, position, result);
2219 return result;
2220 }
2221
2222 /**
2223 * Estimates velocity from curvilinear position changes and taking into account previous
2224 * velocity respect NED frame.
2225 *
2226 * @param timeInterval time interval between epochs expressed in seconds (s).
2227 * @param oldPosition previous body position with respect the Earth, resolved about
2228 * north, east and down axes.
2229 * @param oldVelocity previous velocity of body with respect the Earth, resolved
2230 * about north, east and down axes and expressed in meters per
2231 * second (m/s).
2232 * @param position current body position with respect the Earth, resolved about
2233 * north, east and down axes.
2234 * @return estimated updated velocity with respect the Earth, resolved about north,
2235 * east and down and expressed in meters per second (m/s).
2236 * @throws IllegalArgumentException if provided time interval is negative or zero.
2237 */
2238 public static NEDVelocity estimateVelocityAndReturnNew(
2239 final double timeInterval, final NEDPosition oldPosition, final NEDVelocity oldVelocity,
2240 final NEDPosition position) {
2241 final var result = new NEDVelocity();
2242 estimateVelocity(timeInterval, oldPosition, oldVelocity, position, result);
2243 return result;
2244 }
2245
2246 /**
2247 * Estimates velocity from curvilinear position changes and taking into account previous
2248 * velocity respect NED frame.
2249 *
2250 * @param timeInterval time interval between epochs.
2251 * @param oldPosition previous body position with respect the Earth, resolved about
2252 * north, east and down axes.
2253 * @param oldVelocity previous velocity of body with respect the Earth, resolved
2254 * about north, east and down axes and expressed in meters per
2255 * second (m/s).
2256 * @param position current body position with respect the Earth, resolved about
2257 * north, east and down axes.
2258 * @return estimated updated velocity with respect the Earth, resolved about north,
2259 * east and down and expressed in meters per second (m/s).
2260 * @throws IllegalArgumentException if provided time interval is negative or zero.
2261 */
2262 public static NEDVelocity estimateVelocityAndReturnNew(
2263 final Time timeInterval, final NEDPosition oldPosition, final NEDVelocity oldVelocity,
2264 final NEDPosition position) {
2265 final var result = new NEDVelocity();
2266 estimateVelocity(timeInterval, oldPosition, oldVelocity, position, result);
2267 return result;
2268 }
2269
2270 /**
2271 * Estimates velocity from curvilinear position changes and taking into account previous
2272 * velocity respect NED frame.
2273 *
2274 * @param timeInterval time interval between epochs expressed in seconds (s).
2275 * @param oldFrame previous frame containing position and velocity of body with
2276 * respect Earth and resolved about north, east and down axes.
2277 * @param position current body position with respect the Earth, resolved about
2278 * north, east and down axes.
2279 * @return estimated updated velocity with respect the Earth, resolved about north,
2280 * east and down and expressed in meters per second (m/s).
2281 * @throws IllegalArgumentException if provided time interval is negative or zero.
2282 */
2283 public static NEDVelocity estimateVelocityAndReturnNew(
2284 final double timeInterval, final NEDFrame oldFrame, final NEDPosition position) {
2285 final var result = new NEDVelocity();
2286 estimateVelocity(timeInterval, oldFrame, position, result);
2287 return result;
2288 }
2289
2290 /**
2291 * Estimates velocity from curvilinear position changes and taking into account previous
2292 * velocity respect NED frame.
2293 *
2294 * @param timeInterval time interval between epochs.
2295 * @param oldFrame previous frame containing position and velocity of body with
2296 * respect Earth and resolved about north, east and down axes.
2297 * @param position current body position with respect the Earth, resolved about
2298 * north, east and down axes.
2299 * @return estimated updated velocity with respect the Earth, resolved about north,
2300 * east and down and expressed in meters per second (m/s).
2301 * @throws IllegalArgumentException if provided time interval is negative or zero.
2302 */
2303 public static NEDVelocity estimateVelocityAndReturnNew(
2304 final Time timeInterval, final NEDFrame oldFrame, final NEDPosition position) {
2305 final var result = new NEDVelocity();
2306 estimateVelocity(timeInterval, oldFrame, position, result);
2307 return result;
2308 }
2309
2310 /**
2311 * Converts provided time instance to seconds (s).
2312 *
2313 * @param time time instance to be converted.
2314 * @return provided time value expressed in seconds.
2315 */
2316 private static double convertTimeToDouble(final Time time) {
2317 return TimeConverter.convert(time.getValue().doubleValue(), time.getUnit(), TimeUnit.SECOND);
2318 }
2319
2320 /**
2321 * Converts provided angle instance to radians (rad).
2322 *
2323 * @param angle angle instance to be converted.
2324 * @return provided angle value expressed in radians.
2325 */
2326 private static double convertAngleToDouble(final Angle angle) {
2327 return AngleConverter.convert(angle.getValue().doubleValue(), angle.getUnit(), AngleUnit.RADIANS);
2328 }
2329
2330 /**
2331 * Converts provided distance instance to meters (m).
2332 *
2333 * @param distance distance instance to be converted.
2334 * @return provided distance value expressed in meters.
2335 */
2336 private static double convertDistanceToDouble(final Distance distance) {
2337 return DistanceConverter.convert(distance.getValue().doubleValue(), distance.getUnit(), DistanceUnit.METER);
2338 }
2339
2340 /**
2341 * Converts provided speed instance to meters per second (m/s).
2342 *
2343 * @param speed speed instance to be converted.
2344 * @return provided speed value expressed in meters per second.
2345 */
2346 private static double convertSpeedToDouble(final Speed speed) {
2347 return SpeedConverter.convert(speed.getValue().doubleValue(), speed.getUnit(), SpeedUnit.METERS_PER_SECOND);
2348 }
2349 }