1 /*
2 * Copyright (C) 2020 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.calibration.gyroscope;
17
18 import com.irurueta.algebra.Matrix;
19 import com.irurueta.navigation.LockedException;
20 import com.irurueta.navigation.NotReadyException;
21 import com.irurueta.navigation.frames.ECEFPosition;
22 import com.irurueta.navigation.frames.NEDPosition;
23 import com.irurueta.navigation.inertial.calibration.CalibrationException;
24 import com.irurueta.navigation.inertial.calibration.StandardDeviationBodyKinematics;
25 import com.irurueta.numerical.robust.PROSACRobustEstimator;
26 import com.irurueta.numerical.robust.PROSACRobustEstimatorListener;
27 import com.irurueta.numerical.robust.RobustEstimator;
28 import com.irurueta.numerical.robust.RobustEstimatorException;
29 import com.irurueta.numerical.robust.RobustEstimatorMethod;
30
31 import java.util.List;
32
33 /**
34 * Robustly estimates gyroscope biases, cross couplings and scaling factors
35 * along with G-dependent cross biases introduced on the gyroscope by the
36 * specific forces sensed by the accelerometer using PROSAC robust estimator.
37 * <p>
38 * This calibrator assumes that the IMU is placed flat on a turntable spinning
39 * at constant speed, but absolute orientation or position of IMU is unknown.
40 * Turntable must rotate fast enough so that Earth rotation effects can be
41 * neglected, bus slow enough so that gyroscope readings can be properly made.
42 * <p>
43 * To use this calibrator at least 10 measurements are needed when common
44 * z-axis is assumed and G-dependent cross biases are ignored, otherwise
45 * at least 13 measurements are required when common z-axis is not assumed.
46 * If G-dependent cross biases are being estimated, then at least 19
47 * measurements are needed when common z-axis is assumed, otherwise at
48 * least 22 measurements are required when common z-axis is not assumed.
49 * <p>
50 * Measured gyroscope angular rates is assumed to follow the model shown below:
51 * <pre>
52 * Ωmeas = bg + (I + Mg) * Ωtrue + Gg * ftrue + w
53 * </pre>
54 * Where:
55 * - Ωmeas is the measured gyroscope angular rates. This is a 3x1 vector.
56 * - bg is the gyroscope bias. Ideally, on a perfect gyroscope, this should be a
57 * 3x1 zero vector.
58 * - I is the 3x3 identity matrix.
59 * - Mg is the 3x3 matrix containing cross-couplings and scaling factors. Ideally, on
60 * a perfect gyroscope, this should be a 3x3 zero matrix.
61 * - Ωtrue is ground-truth gyroscope angular rates.
62 * - Gg is the G-dependent cross biases introduced by the specific forces sensed
63 * by the accelerometer. Ideally, on a perfect gyroscope, this should be a 3x3
64 * zero matrix.
65 * - ftrue is ground-truth specific force. This is a 3x1 vector.
66 * - w is measurement noise. This is a 3x1 vector.
67 */
68 public class PROSACRobustTurntableGyroscopeCalibrator extends RobustTurntableGyroscopeCalibrator {
69
70 /**
71 * Constant defining default threshold to determine whether samples are inliers or not.
72 */
73 public static final double DEFAULT_THRESHOLD = 5e-1;
74
75 /**
76 * Minimum value that can be set as threshold.
77 * Threshold must be strictly greater than 0.0.
78 */
79 public static final double MIN_THRESHOLD = 0.0;
80
81 /**
82 * Indicates that by default inliers will only be computed but not kept.
83 */
84 public static final boolean DEFAULT_COMPUTE_AND_KEEP_INLIERS = false;
85
86 /**
87 * Indicates that by default residuals will only be computed but not kept.
88 */
89 public static final boolean DEFAULT_COMPUTE_AND_KEEP_RESIDUALS = false;
90
91 /**
92 * Threshold to determine whether samples are inliers or not when testing possible solutions.
93 * The threshold refers to the amount of error on residuals between
94 * angular rate norms.
95 */
96 private double threshold = DEFAULT_THRESHOLD;
97
98 /**
99 * Indicates whether inliers must be computed and kept.
100 */
101 private boolean computeAndKeepInliers = DEFAULT_COMPUTE_AND_KEEP_INLIERS;
102
103 /**
104 * Indicates whether residuals must be computed and kept.
105 */
106 private boolean computeAndKeepResiduals = DEFAULT_COMPUTE_AND_KEEP_RESIDUALS;
107
108 /**
109 * Quality scores corresponding to each provided sample.
110 * The larger the score value the better the quality of the sample.
111 */
112 private double[] qualityScores;
113
114 /**
115 * Constructor.
116 */
117 public PROSACRobustTurntableGyroscopeCalibrator() {
118 super();
119 }
120
121 /**
122 * Constructor.
123 *
124 * @param position position where body kinematics measures
125 * have been taken.
126 * @param turntableRotationRate constant rotation rate at which the
127 * turntable is spinning. Must be
128 * expressed in radians per second (rad/s).
129 * @param timeInterval time interval between measurements being
130 * captured expressed in seconds (s).
131 * @param measurements collection of body kinematics
132 * measurements with standard deviations
133 * taken at the same position with zero
134 * velocity and unknown different
135 * orientations.
136 * @param initialBias initial gyroscope bias to be used to
137 * find a solution. This must be 3x1 and
138 * is expressed in radians per second
139 * (rad/s).
140 * @param initialMg initial gyroscope scale factors and
141 * cross coupling errors matrix. Must
142 * be 3x3.
143 * @param initialGg initial gyroscope G-dependent cross
144 * biases introduced on the gyroscope by
145 * the specific forces sensed by the
146 * accelerometer. Must be 3x3.
147 * @throws IllegalArgumentException if any of the provided values does
148 * not have proper size or if either
149 * turntable rotation rate or
150 * time interval is zero or negative.
151 */
152 public PROSACRobustTurntableGyroscopeCalibrator(
153 final ECEFPosition position, final double turntableRotationRate, final double timeInterval,
154 final List<StandardDeviationBodyKinematics> measurements, final Matrix initialBias, final Matrix initialMg,
155 final Matrix initialGg) {
156 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg);
157 }
158
159 /**
160 * Constructor.
161 *
162 * @param position position where body kinematics measures
163 * have been taken.
164 * @param turntableRotationRate constant rotation rate at which the
165 * turntable is spinning. Must be
166 * expressed in radians per second (rad/s).
167 * @param timeInterval time interval between measurements being
168 * captured expressed in seconds (s).
169 * @param measurements collection of body kinematics
170 * measurements with standard deviations
171 * taken at the same position with zero
172 * velocity and unknown different
173 * orientations.
174 * @param initialBias initial gyroscope bias to be used to
175 * find a solution. This must be 3x1 and
176 * is expressed in radians per second
177 * (rad/s).
178 * @param initialMg initial gyroscope scale factors and
179 * cross coupling errors matrix. Must
180 * be 3x3.
181 * @param initialGg initial gyroscope G-dependent cross
182 * biases introduced on the gyroscope by
183 * the specific forces sensed by the
184 * accelerometer. Must be 3x3.
185 * @param listener listener to handle events raised by this
186 * calibrator.
187 * @throws IllegalArgumentException if any of the provided values does
188 * not have proper size or if either
189 * turntable rotation rate or
190 * time interval is zero or negative.
191 */
192 public PROSACRobustTurntableGyroscopeCalibrator(
193 final ECEFPosition position, final double turntableRotationRate, final double timeInterval,
194 final List<StandardDeviationBodyKinematics> measurements, final Matrix initialBias, final Matrix initialMg,
195 final Matrix initialGg, final RobustTurntableGyroscopeCalibratorListener listener) {
196 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg, listener);
197 }
198
199 /**
200 * Constructor.
201 *
202 * @param position position where body kinematics measures
203 * have been taken.
204 * @param turntableRotationRate constant rotation rate at which the
205 * turntable is spinning. Must be
206 * expressed in radians per second (rad/s).
207 * @param timeInterval time interval between measurements being
208 * captured expressed in seconds (s).
209 * @param measurements collection of body kinematics
210 * measurements with standard deviations
211 * taken at the same position with zero
212 * velocity and unknown different
213 * orientations.
214 * @param initialBias initial gyroscope bias to be used to
215 * find a solution. This must have
216 * length 3 and is expressed in radians
217 * per second (rad/s).
218 * @param initialMg initial gyroscope scale factors and
219 * cross coupling errors matrix. Must
220 * be 3x3.
221 * @param initialGg initial gyroscope G-dependent cross
222 * biases introduced on the gyroscope by
223 * the specific forces sensed by the
224 * accelerometer. Must be 3x3.
225 * @throws IllegalArgumentException if any of the provided values does
226 * not have proper size or if either
227 * turntable rotation rate or
228 * time interval is zero or negative.
229 */
230 public PROSACRobustTurntableGyroscopeCalibrator(
231 final ECEFPosition position, final double turntableRotationRate, final double timeInterval,
232 final List<StandardDeviationBodyKinematics> measurements, final double[] initialBias,
233 final Matrix initialMg, final Matrix initialGg) {
234 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg);
235 }
236
237 /**
238 * Constructor.
239 *
240 * @param position position where body kinematics measures
241 * have been taken.
242 * @param turntableRotationRate constant rotation rate at which the
243 * turntable is spinning. Must be
244 * expressed in radians per second (rad/s).
245 * @param timeInterval time interval between measurements being
246 * captured expressed in seconds (s).
247 * @param measurements collection of body kinematics
248 * measurements with standard deviations
249 * taken at the same position with zero
250 * velocity and unknown different
251 * orientations.
252 * @param initialBias initial gyroscope bias to be used to
253 * find a solution. This must have length
254 * 3 and is expressed in radians
255 * per second (rad/s).
256 * @param initialMg initial gyroscope scale factors and
257 * cross coupling errors matrix. Must
258 * be 3x3.
259 * @param initialGg initial gyroscope G-dependent cross
260 * biases introduced on the gyroscope by
261 * the specific forces sensed by the
262 * accelerometer. Must be 3x3.
263 * @param listener listener to handle events raised by
264 * this calibrator.
265 * @throws IllegalArgumentException if any of the provided values does
266 * not have proper size or if either
267 * turntable rotation rate or
268 * time interval is zero or negative.
269 */
270 public PROSACRobustTurntableGyroscopeCalibrator(
271 final ECEFPosition position, final double turntableRotationRate, final double timeInterval,
272 final List<StandardDeviationBodyKinematics> measurements, final double[] initialBias,
273 final Matrix initialMg, final Matrix initialGg, final RobustTurntableGyroscopeCalibratorListener listener) {
274 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg, listener);
275 }
276
277 /**
278 * Constructor.
279 *
280 * @param position position where body kinematics measures
281 * have been taken.
282 * @param turntableRotationRate constant rotation rate at which the
283 * turntable is spinning. Must be
284 * expressed in radians per second (rad/s).
285 * @param timeInterval time interval between measurements being
286 * captured expressed in seconds (s).
287 * @param measurements collection of body kinematics
288 * measurements with standard deviations
289 * taken at the same position with zero
290 * velocity and unknown different
291 * orientations.
292 * @param initialBias initial gyroscope bias to be used to
293 * find a solution. This must have length
294 * 3 and is expressed in radians per
295 * second (rad/s).
296 * @param initialMg initial gyroscope scale factors and
297 * cross coupling errors matrix. Must
298 * be 3x3.
299 * @param initialGg initial gyroscope G-dependent cross
300 * biases introduced on the gyroscope by
301 * the specific forces sensed by the
302 * accelerometer. Must be 3x3.
303 * @param accelerometerBias known accelerometer bias. This must
304 * have length 3 and is expressed in
305 * meters per squared second
306 * (m/s^2).
307 * @param accelerometerMa known accelerometer scale factors and
308 * cross coupling matrix. Must be 3x3.
309 * @throws IllegalArgumentException if any of the provided values does
310 * not have proper size or if either
311 * turntable rotation rate or
312 * time interval is zero or negative.
313 */
314 public PROSACRobustTurntableGyroscopeCalibrator(
315 final ECEFPosition position, final double turntableRotationRate, final double timeInterval,
316 final List<StandardDeviationBodyKinematics> measurements, final double[] initialBias,
317 final Matrix initialMg, final Matrix initialGg, final double[] accelerometerBias,
318 final Matrix accelerometerMa) {
319 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg,
320 accelerometerBias, accelerometerMa);
321 }
322
323 /**
324 * Constructor.
325 *
326 * @param position position where body kinematics measures
327 * have been taken.
328 * @param turntableRotationRate constant rotation rate at which the
329 * turntable is spinning. Must be
330 * expressed in radians per second (rad/s).
331 * @param timeInterval time interval between measurements being
332 * captured expressed in seconds (s).
333 * @param measurements collection of body kinematics
334 * measurements with standard deviations
335 * taken at the same position with zero
336 * velocity and unknown different
337 * orientations.
338 * @param initialBias initial gyroscope bias to be used to
339 * find a solution. This must have length
340 * 3 and is expressed in radians per
341 * second (rad/s).
342 * @param initialMg initial gyroscope scale factors and
343 * cross coupling errors matrix. Must
344 * be 3x3.
345 * @param initialGg initial gyroscope G-dependent cross
346 * biases introduced on the gyroscope by
347 * the specific forces sensed by the
348 * accelerometer. Must be 3x3.
349 * @param accelerometerBias known accelerometer bias. This must
350 * have length 3 and is expressed in
351 * meters per squared second (m/s^2).
352 * @param accelerometerMa known accelerometer scale factors and
353 * cross coupling matrix. Must be 3x3.
354 * @param listener listener to handle events raised by
355 * this calibrator.
356 * @throws IllegalArgumentException if any of the provided values does
357 * not have proper size or if either
358 * turntable rotation rate or
359 * time interval is zero or negative.
360 */
361 public PROSACRobustTurntableGyroscopeCalibrator(
362 final ECEFPosition position, final double turntableRotationRate, final double timeInterval,
363 final List<StandardDeviationBodyKinematics> measurements, final double[] initialBias,
364 final Matrix initialMg, final Matrix initialGg, final double[] accelerometerBias,
365 final Matrix accelerometerMa, final RobustTurntableGyroscopeCalibratorListener listener) {
366 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg,
367 accelerometerBias, accelerometerMa, listener);
368 }
369
370 /**
371 * Constructor.
372 *
373 * @param position position where body kinematics measures
374 * have been taken.
375 * @param turntableRotationRate constant rotation rate at which the
376 * turntable is spinning. Must be
377 * expressed in radians per second (rad/s).
378 * @param timeInterval time interval between measurements being
379 * captured expressed in seconds (s).
380 * @param measurements collection of body kinematics
381 * measurements with standard deviations
382 * taken at the same position with zero
383 * velocity and unknown different
384 * orientations.
385 * @param initialBias initial gyroscope bias to be used to
386 * find a solution. This must be 3x1 and
387 * is expressed in radians per second
388 * (rad/s).
389 * @param initialMg initial gyroscope scale factors and
390 * cross coupling errors matrix. Must
391 * be 3x3.
392 * @param initialGg initial gyroscope G-dependent cross
393 * biases introduced on the gyroscope by
394 * the specific forces sensed by the
395 * accelerometer. Must be 3x3.
396 * @param accelerometerBias known accelerometer bias. This must
397 * have length 3 and is expressed in
398 * meters per squared second
399 * (m/s^2).
400 * @param accelerometerMa known accelerometer scale factors and
401 * cross coupling matrix. Must be 3x3.
402 * @throws IllegalArgumentException if any of the provided values does
403 * not have proper size or if either
404 * turntable rotation rate or
405 * time interval is zero or negative.
406 */
407 public PROSACRobustTurntableGyroscopeCalibrator(
408 final ECEFPosition position, final double turntableRotationRate, final double timeInterval,
409 final List<StandardDeviationBodyKinematics> measurements, final Matrix initialBias, final Matrix initialMg,
410 final Matrix initialGg, final Matrix accelerometerBias, final Matrix accelerometerMa) {
411 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg,
412 accelerometerBias, accelerometerMa);
413 }
414
415 /**
416 * Constructor.
417 *
418 * @param position position where body kinematics measures
419 * have been taken.
420 * @param turntableRotationRate constant rotation rate at which the
421 * turntable is spinning. Must be
422 * expressed in radians per second (rad/s).
423 * @param timeInterval time interval between measurements being
424 * captured expressed in seconds (s).
425 * @param measurements collection of body kinematics
426 * measurements with standard deviations
427 * taken at the same position with zero
428 * velocity and unknown different
429 * orientations.
430 * @param initialBias initial gyroscope bias to be used to
431 * find a solution. This must be 3x1 and
432 * is expressed in radians per second
433 * (rad/s).
434 * @param initialMg initial gyroscope scale factors and
435 * cross coupling errors matrix. Must
436 * be 3x3.
437 * @param initialGg initial gyroscope G-dependent cross
438 * biases introduced on the gyroscope by
439 * the specific forces sensed by the
440 * accelerometer. Must be 3x3.
441 * @param accelerometerBias known accelerometer bias. This must
442 * have length 3 and is expressed in
443 * meters per squared second (m/s^2).
444 * @param accelerometerMa known accelerometer scale factors and
445 * cross coupling matrix. Must be 3x3.
446 * @param listener listener to handle events raised by
447 * this calibrator.
448 * @throws IllegalArgumentException if any of the provided values does
449 * not have proper size or if either
450 * turntable rotation rate or
451 * time interval is zero or negative.
452 */
453 public PROSACRobustTurntableGyroscopeCalibrator(
454 final ECEFPosition position, final double turntableRotationRate, final double timeInterval,
455 final List<StandardDeviationBodyKinematics> measurements, final Matrix initialBias, final Matrix initialMg,
456 final Matrix initialGg, final Matrix accelerometerBias, final Matrix accelerometerMa,
457 final RobustTurntableGyroscopeCalibratorListener listener) {
458 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg,
459 accelerometerBias, accelerometerMa, listener);
460 }
461
462 /**
463 * Constructor.
464 *
465 * @param position position where body kinematics
466 * measures have been taken.
467 * @param turntableRotationRate constant rotation rate at which
468 * the turntable is spinning. Must
469 * be expressed in radians per
470 * second (rad/s).
471 * @param timeInterval time interval between measurements
472 * being captured expressed in
473 * seconds (s).
474 * @param measurements collection of body kinematics
475 * measurements with standard
476 * deviations taken at the same
477 * position with zero velocity
478 * and unknown different
479 * orientations.
480 * @param commonAxisUsed indicates whether z-axis is
481 * assumed to be common for
482 * accelerometer and gyroscope.
483 * @param estimateGDependentCrossBiases true if G-dependent cross biases
484 * will be estimated, false
485 * otherwise.
486 * @param initialBias initial gyroscope bias to be
487 * used to find a solution. This
488 * must be 3x1 and is expressed in
489 * radians per second (rad/s).
490 * @param initialMg initial gyroscope scale factors
491 * and cross coupling errors matrix.
492 * Must be 3x3.
493 * @param initialGg initial gyroscope G-dependent
494 * cross biases introduced on the
495 * gyroscope by the specific
496 * forces sensed by the
497 * accelerometer. Must be 3x3.
498 * @throws IllegalArgumentException if any of the provided values does
499 * not have proper size or if either
500 * turntable rotation rate or
501 * time interval is zero or negative.
502 */
503 public PROSACRobustTurntableGyroscopeCalibrator(
504 final ECEFPosition position, final double turntableRotationRate, final double timeInterval,
505 final List<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
506 final boolean estimateGDependentCrossBiases, final Matrix initialBias, final Matrix initialMg,
507 final Matrix initialGg) {
508 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
509 estimateGDependentCrossBiases, initialBias, initialMg, initialGg);
510 }
511
512 /**
513 * Constructor.
514 *
515 * @param position position where body kinematics
516 * measures have been taken.
517 * @param turntableRotationRate constant rotation rate at which
518 * the turntable is spinning. Must
519 * be expressed in radians per
520 * second (rad/s).
521 * @param timeInterval time interval between measurements
522 * being captured expressed in
523 * seconds (s).
524 * @param measurements collection of body kinematics
525 * measurements with standard
526 * deviations taken at the same
527 * position with zero velocity and
528 * unknown different orientations.
529 * @param commonAxisUsed indicates whether z-axis is
530 * assumed to be common for
531 * accelerometer and gyroscope.
532 * @param estimateGDependentCrossBiases true if G-dependent cross
533 * biases will be estimated, false
534 * otherwise.
535 * @param initialBias initial gyroscope bias to be
536 * used to find a solution. This
537 * must be 3x1 and is expressed in
538 * radians per second (rad/s).
539 * @param initialMg initial gyroscope scale factors
540 * and cross coupling errors
541 * matrix. Must be 3x3.
542 * @param initialGg initial gyroscope G-dependent
543 * cross biases introduced on the
544 * gyroscope by the specific
545 * forces sensed by the
546 * accelerometer. Must be 3x3.
547 * @param listener listener to handle events
548 * raised by this calibrator.
549 * @throws IllegalArgumentException if any of the provided values does
550 * not have proper size or if either
551 * turntable rotation rate or
552 * time interval is zero or negative.
553 */
554 public PROSACRobustTurntableGyroscopeCalibrator(
555 final ECEFPosition position, final double turntableRotationRate, final double timeInterval,
556 final List<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
557 final boolean estimateGDependentCrossBiases, final Matrix initialBias, final Matrix initialMg,
558 final Matrix initialGg, final RobustTurntableGyroscopeCalibratorListener listener) {
559 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
560 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, listener);
561 }
562
563 /**
564 * Constructor.
565 *
566 * @param position position where body kinematics
567 * measures have been taken.
568 * @param turntableRotationRate constant rotation rate at which
569 * the turntable is spinning. Must
570 * be expressed in radians per
571 * second (rad/s).
572 * @param timeInterval time interval between measurements
573 * being captured expressed in
574 * seconds (s).
575 * @param measurements collection of body kinematics
576 * measurements with standard
577 * deviations taken at the same
578 * position with zero velocity
579 * and unknown different
580 * orientations.
581 * @param commonAxisUsed indicates whether z-axis is
582 * assumed to be common for
583 * accelerometer and gyroscope.
584 * @param estimateGDependentCrossBiases true if G-dependent cross biases
585 * will be estimated, false
586 * otherwise.
587 * @param initialBias initial gyroscope bias to be
588 * used to find a solution. This
589 * must have length 3 and is
590 * expressed in radians per second
591 * (rad/s).
592 * @param initialMg initial gyroscope scale factors
593 * and cross coupling errors matrix.
594 * Must be 3x3.
595 * @param initialGg initial gyroscope G-dependent
596 * cross biases introduced on the
597 * gyroscope by the specific forces
598 * sensed by the accelerometer.
599 * Must be 3x3.
600 * @throws IllegalArgumentException if any of the provided values does
601 * not have proper size or if either
602 * turntable rotation rate or
603 * time interval is zero or negative.
604 */
605 public PROSACRobustTurntableGyroscopeCalibrator(
606 final ECEFPosition position, final double turntableRotationRate, final double timeInterval,
607 final List<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
608 final boolean estimateGDependentCrossBiases, final double[] initialBias, final Matrix initialMg,
609 final Matrix initialGg) {
610 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
611 estimateGDependentCrossBiases, initialBias, initialMg, initialGg);
612 }
613
614 /**
615 * Constructor.
616 *
617 * @param position position where body kinematics
618 * measures have been taken.
619 * @param turntableRotationRate constant rotation rate at which
620 * the turntable is spinning. Must
621 * be expressed in radians per
622 * second (rad/s).
623 * @param timeInterval time interval between measurements
624 * being captured expressed in
625 * seconds (s).
626 * @param measurements collection of body kinematics
627 * measurements with standard
628 * deviations taken at the same
629 * position with zero velocity
630 * and unknown different
631 * orientations.
632 * @param commonAxisUsed indicates whether z-axis is
633 * assumed to be common for
634 * accelerometer and gyroscope.
635 * @param estimateGDependentCrossBiases true if G-dependent cross biases
636 * will be estimated, false
637 * otherwise.
638 * @param initialBias initial gyroscope bias to be
639 * used to find a solution. This
640 * must have length 3 and is
641 * expressed in radians per second
642 * (rad/s).
643 * @param initialMg initial gyroscope scale factors
644 * and cross coupling errors
645 * matrix. Must be 3x3.
646 * @param initialGg initial gyroscope G-dependent
647 * cross biases introduced on the
648 * gyroscope by the specific forces
649 * sensed by the accelerometer.
650 * Must be 3x3.
651 * @param listener listener to handle events raised
652 * by this calibrator.
653 * @throws IllegalArgumentException if any of the provided values does
654 * not have proper size or if either
655 * turntable rotation rate or
656 * time interval is zero or negative.
657 */
658 public PROSACRobustTurntableGyroscopeCalibrator(
659 final ECEFPosition position, final double turntableRotationRate, final double timeInterval,
660 final List<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
661 final boolean estimateGDependentCrossBiases, final double[] initialBias, final Matrix initialMg,
662 final Matrix initialGg, final RobustTurntableGyroscopeCalibratorListener listener) {
663 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
664 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, listener);
665 }
666
667 /**
668 * Constructor.
669 *
670 * @param position position where body kinematics
671 * measures have been taken.
672 * @param turntableRotationRate constant rotation rate at which
673 * the turntable is spinning. Must
674 * be expressed in radians per
675 * second (rad/s).
676 * @param timeInterval time interval between measurements
677 * being captured expressed in
678 * seconds (s).
679 * @param measurements collection of body kinematics
680 * measurements with standard
681 * deviations taken at the same
682 * position with zero velocity
683 * and unknown different
684 * orientations.
685 * @param commonAxisUsed indicates whether z-axis is
686 * assumed to be common for
687 * accelerometer and gyroscope.
688 * @param estimateGDependentCrossBiases true if G-dependent cross
689 * biases will be estimated,
690 * false otherwise.
691 * @param initialBias initial gyroscope bias to be
692 * used to find a solution. This
693 * must have length 3 and is
694 * expressed in radians per second
695 * (rad/s).
696 * @param initialMg initial gyroscope scale factors
697 * and cross coupling errors
698 * matrix. Must be 3x3.
699 * @param initialGg initial gyroscope G-dependent
700 * cross biases introduced on the
701 * gyroscope by the specific forces
702 * sensed by the accelerometer.
703 * Must be 3x3.
704 * @param accelerometerBias known accelerometer bias. This
705 * must have length 3 and is
706 * expressed in meters per squared
707 * second (m/s^2).
708 * @param accelerometerMa known accelerometer scale factors
709 * and cross coupling matrix. Must
710 * be 3x3.
711 * @throws IllegalArgumentException if any of the provided values does
712 * not have proper size or if either
713 * turntable rotation rate or
714 * time interval is zero or negative.
715 */
716 public PROSACRobustTurntableGyroscopeCalibrator(
717 final ECEFPosition position, final double turntableRotationRate,
718 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
719 final boolean commonAxisUsed, final boolean estimateGDependentCrossBiases, final double[] initialBias,
720 final Matrix initialMg, final Matrix initialGg, final double[] accelerometerBias,
721 final Matrix accelerometerMa) {
722 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
723 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, accelerometerBias, accelerometerMa);
724 }
725
726 /**
727 * Constructor.
728 *
729 * @param position position where body kinematics
730 * measures have been taken.
731 * @param turntableRotationRate constant rotation rate at which
732 * the turntable is spinning. Must
733 * be expressed in radians per
734 * second (rad/s).
735 * @param timeInterval time interval between measurements
736 * being captured expressed in
737 * seconds (s).
738 * @param measurements collection of body kinematics
739 * measurements with standard
740 * deviations taken at the same
741 * position with zero velocity
742 * and unknown different
743 * orientations.
744 * @param commonAxisUsed indicates whether z-axis is
745 * assumed to be common for
746 * accelerometer and gyroscope.
747 * @param estimateGDependentCrossBiases true if G-dependent cross biases
748 * will be estimated, false
749 * otherwise.
750 * @param initialBias initial gyroscope bias to be used
751 * to find a solution. This must
752 * have length 3 and is expressed
753 * in radians per second (rad/s).
754 * @param initialMg initial gyroscope scale factors
755 * and cross coupling errors matrix.
756 * Must be 3x3.
757 * @param initialGg initial gyroscope G-dependent
758 * cross biases introduced on the
759 * gyroscope by the specific forces
760 * sensed by the accelerometer. Must
761 * be 3x3.
762 * @param accelerometerBias known accelerometer bias. This
763 * must have length 3 and is
764 * expressed in meters per squared
765 * second (m/s^2).
766 * @param accelerometerMa known accelerometer scale factors
767 * and cross coupling matrix. Must
768 * be 3x3.
769 * @param listener listener to handle events raised
770 * by this calibrator.
771 * @throws IllegalArgumentException if any of the provided values does
772 * not have proper size or if either
773 * turntable rotation rate or
774 * time interval is zero or negative.
775 */
776 public PROSACRobustTurntableGyroscopeCalibrator(
777 final ECEFPosition position, final double turntableRotationRate, final double timeInterval,
778 final List<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
779 final boolean estimateGDependentCrossBiases, final double[] initialBias, final Matrix initialMg,
780 final Matrix initialGg, final double[] accelerometerBias, final Matrix accelerometerMa,
781 final RobustTurntableGyroscopeCalibratorListener listener) {
782 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
783 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, accelerometerBias, accelerometerMa,
784 listener);
785 }
786
787 /**
788 * Constructor.
789 *
790 * @param position position where body kinematics
791 * measures have been taken.
792 * @param turntableRotationRate constant rotation rate at which
793 * the turntable is spinning. Must
794 * be expressed in radians per
795 * second (rad/s).
796 * @param timeInterval time interval between measurements
797 * being captured expressed in
798 * seconds (s).
799 * @param measurements collection of body kinematics
800 * measurements with standard
801 * deviations taken at the same
802 * position with zero velocity and
803 * unknown different orientations.
804 * @param commonAxisUsed indicates whether z-axis is
805 * assumed to be common for
806 * accelerometer and gyroscope.
807 * @param estimateGDependentCrossBiases true if G-dependent cross biases
808 * will be estimated, false
809 * otherwise.
810 * @param initialBias initial gyroscope bias to be
811 * used to find a solution. This
812 * must be 3x1 and is expressed in
813 * radians per second (rad/s).
814 * @param initialMg initial gyroscope scale factors
815 * and cross coupling errors matrix.
816 * Must be 3x3.
817 * @param initialGg initial gyroscope G-dependent
818 * cross biases introduced on the
819 * gyroscope by the specific forces
820 * sensed by the accelerometer. Must
821 * be 3x3.
822 * @param accelerometerBias known accelerometer bias. This
823 * must have length 3 and is
824 * expressed in meters per squared
825 * second (m/s^2).
826 * @param accelerometerMa known accelerometer scale factors
827 * and cross coupling matrix. Must
828 * be 3x3.
829 * @throws IllegalArgumentException if any of the provided values does
830 * not have proper size or if either
831 * turntable rotation rate or
832 * time interval is zero or negative.
833 */
834 public PROSACRobustTurntableGyroscopeCalibrator(
835 final ECEFPosition position, final double turntableRotationRate, final double timeInterval,
836 final List<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
837 final boolean estimateGDependentCrossBiases, final Matrix initialBias, final Matrix initialMg,
838 final Matrix initialGg, final Matrix accelerometerBias, final Matrix accelerometerMa) {
839 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
840 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, accelerometerBias, accelerometerMa);
841 }
842
843 /**
844 * Constructor.
845 *
846 * @param position position where body kinematics
847 * measures have been taken.
848 * @param turntableRotationRate constant rotation rate at which
849 * the turntable is spinning. Must
850 * be expressed in radians per
851 * second (rad/s).
852 * @param timeInterval time interval between measurements
853 * being captured expressed in
854 * seconds (s).
855 * @param measurements collection of body kinematics
856 * measurements with standard
857 * deviations taken at the same
858 * position with zero velocity and
859 * unknown different orientations.
860 * @param commonAxisUsed indicates whether z-axis is
861 * assumed to be common for
862 * accelerometer and gyroscope.
863 * @param estimateGDependentCrossBiases true if G-dependent cross biases
864 * will be estimated, false
865 * otherwise.
866 * @param initialBias initial gyroscope bias to be used
867 * to find a solution. This must be
868 * 3x1 and is expressed in radians
869 * per second (rad/s).
870 * @param initialMg initial gyroscope scale factors
871 * and cross coupling errors matrix.
872 * Must be 3x3.
873 * @param initialGg initial gyroscope G-dependent
874 * cross biases introduced on the
875 * gyroscope by the specific forces
876 * sensed by the accelerometer. Must
877 * be 3x3.
878 * @param accelerometerBias known accelerometer bias. This
879 * must have length 3 and is
880 * expressed in meters per squared
881 * second (m/s^2).
882 * @param accelerometerMa known accelerometer scale factors
883 * and cross coupling matrix. Must
884 * be 3x3.
885 * @param listener listener to handle events raised
886 * by this calibrator.
887 * @throws IllegalArgumentException if any of the provided values does
888 * not have proper size or if either
889 * turntable rotation rate or
890 * time interval is zero or negative.
891 */
892 public PROSACRobustTurntableGyroscopeCalibrator(
893 final ECEFPosition position, final double turntableRotationRate, final double timeInterval,
894 final List<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
895 final boolean estimateGDependentCrossBiases, final Matrix initialBias, final Matrix initialMg,
896 final Matrix initialGg, final Matrix accelerometerBias, final Matrix accelerometerMa,
897 final RobustTurntableGyroscopeCalibratorListener listener) {
898 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
899 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, accelerometerBias, accelerometerMa,
900 listener);
901 }
902
903 /**
904 * Constructor.
905 *
906 * @param position position where body kinematics measures
907 * have been taken.
908 * @param turntableRotationRate constant rotation rate at which the
909 * turntable is spinning. Must be
910 * expressed in radians per second (rad/s).
911 * @param timeInterval time interval between measurements being
912 * captured expressed in seconds (s).
913 * @param measurements collection of body kinematics
914 * measurements with standard deviations
915 * taken at the same position with zero
916 * velocity and unknown different
917 * orientations.
918 * @param initialBias initial gyroscope bias to be used to
919 * find a solution. This must be 3x1 and
920 * is expressed in radians per second
921 * (rad/s).
922 * @param initialMg initial gyroscope scale factors and
923 * cross coupling errors matrix. Must
924 * be 3x3.
925 * @param initialGg initial gyroscope G-dependent cross
926 * biases introduced on the gyroscope by
927 * the specific forces sensed by the
928 * accelerometer. Must be 3x3.
929 * @throws IllegalArgumentException if any of the provided values does
930 * not have proper size or if either
931 * turntable rotation rate or
932 * time interval is zero or negative.
933 */
934 public PROSACRobustTurntableGyroscopeCalibrator(
935 final NEDPosition position, final double turntableRotationRate, final double timeInterval,
936 final List<StandardDeviationBodyKinematics> measurements, final Matrix initialBias, final Matrix initialMg,
937 final Matrix initialGg) {
938 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg);
939 }
940
941 /**
942 * Constructor.
943 *
944 * @param position position where body kinematics measures
945 * have been taken.
946 * @param turntableRotationRate constant rotation rate at which the
947 * turntable is spinning. Must be
948 * expressed in radians per second (rad/s).
949 * @param timeInterval time interval between measurements being
950 * captured expressed in seconds (s).
951 * @param measurements collection of body kinematics
952 * measurements with standard deviations
953 * taken at the same position with zero
954 * velocity and unknown different
955 * orientations.
956 * @param initialBias initial gyroscope bias to be used to
957 * find a solution. This must be 3x1 and
958 * is expressed in radians per second
959 * (rad/s).
960 * @param initialMg initial gyroscope scale factors and
961 * cross coupling errors matrix. Must
962 * be 3x3.
963 * @param initialGg initial gyroscope G-dependent cross
964 * biases introduced on the gyroscope by
965 * the specific forces sensed by the
966 * accelerometer. Must be 3x3.
967 * @param listener listener to handle events raised by this
968 * calibrator.
969 * @throws IllegalArgumentException if any of the provided values does
970 * not have proper size or if either
971 * turntable rotation rate or
972 * time interval is zero or negative.
973 */
974 public PROSACRobustTurntableGyroscopeCalibrator(
975 final NEDPosition position, final double turntableRotationRate, final double timeInterval,
976 final List<StandardDeviationBodyKinematics> measurements, final Matrix initialBias, final Matrix initialMg,
977 final Matrix initialGg, final RobustTurntableGyroscopeCalibratorListener listener) {
978 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg, listener);
979 }
980
981 /**
982 * Constructor.
983 *
984 * @param position position where body kinematics measures
985 * have been taken.
986 * @param turntableRotationRate constant rotation rate at which the
987 * turntable is spinning. Must be
988 * expressed in radians per second (rad/s).
989 * @param timeInterval time interval between measurements being
990 * captured expressed in seconds (s).
991 * @param measurements collection of body kinematics
992 * measurements with standard deviations
993 * taken at the same position with zero
994 * velocity and unknown different
995 * orientations.
996 * @param initialBias initial gyroscope bias to be used to
997 * find a solution. This must have
998 * length 3 and is expressed in radians
999 * per second (rad/s).
1000 * @param initialMg initial gyroscope scale factors and
1001 * cross coupling errors matrix. Must
1002 * be 3x3.
1003 * @param initialGg initial gyroscope G-dependent cross
1004 * biases introduced on the gyroscope by
1005 * the specific forces sensed by the
1006 * accelerometer. Must be 3x3.
1007 * @throws IllegalArgumentException if any of the provided values does
1008 * not have proper size or if either
1009 * turntable rotation rate or
1010 * time interval is zero or negative.
1011 */
1012 public PROSACRobustTurntableGyroscopeCalibrator(
1013 final NEDPosition position, final double turntableRotationRate, final double timeInterval,
1014 final List<StandardDeviationBodyKinematics> measurements, final double[] initialBias,
1015 final Matrix initialMg, final Matrix initialGg) {
1016 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg);
1017 }
1018
1019 /**
1020 * Constructor.
1021 *
1022 * @param position position where body kinematics measures
1023 * have been taken.
1024 * @param turntableRotationRate constant rotation rate at which the
1025 * turntable is spinning. Must be
1026 * expressed in radians per second (rad/s).
1027 * @param timeInterval time interval between measurements being
1028 * captured expressed in seconds (s).
1029 * @param measurements collection of body kinematics
1030 * measurements with standard deviations
1031 * taken at the same position with zero
1032 * velocity and unknown different
1033 * orientations.
1034 * @param initialBias initial gyroscope bias to be used to
1035 * find a solution. This must have length
1036 * 3 and is expressed in radians
1037 * per second (rad/s).
1038 * @param initialMg initial gyroscope scale factors and
1039 * cross coupling errors matrix. Must
1040 * be 3x3.
1041 * @param initialGg initial gyroscope G-dependent cross
1042 * biases introduced on the gyroscope by
1043 * the specific forces sensed by the
1044 * accelerometer. Must be 3x3.
1045 * @param listener listener to handle events raised by
1046 * this calibrator.
1047 * @throws IllegalArgumentException if any of the provided values does
1048 * not have proper size or if either
1049 * turntable rotation rate or
1050 * time interval is zero or negative.
1051 */
1052 public PROSACRobustTurntableGyroscopeCalibrator(
1053 final NEDPosition position, final double turntableRotationRate, final double timeInterval,
1054 final List<StandardDeviationBodyKinematics> measurements, final double[] initialBias,
1055 final Matrix initialMg, final Matrix initialGg, final RobustTurntableGyroscopeCalibratorListener listener) {
1056 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg, listener);
1057 }
1058
1059 /**
1060 * Constructor.
1061 *
1062 * @param position position where body kinematics measures
1063 * have been taken.
1064 * @param turntableRotationRate constant rotation rate at which the
1065 * turntable is spinning. Must be
1066 * expressed in radians per second (rad/s).
1067 * @param timeInterval time interval between measurements being
1068 * captured expressed in seconds (s).
1069 * @param measurements collection of body kinematics
1070 * measurements with standard deviations
1071 * taken at the same position with zero
1072 * velocity and unknown different
1073 * orientations.
1074 * @param initialBias initial gyroscope bias to be used to
1075 * find a solution. This must have length
1076 * 3 and is expressed in radians per
1077 * second (rad/s).
1078 * @param initialMg initial gyroscope scale factors and
1079 * cross coupling errors matrix. Must
1080 * be 3x3.
1081 * @param initialGg initial gyroscope G-dependent cross
1082 * biases introduced on the gyroscope by
1083 * the specific forces sensed by the
1084 * accelerometer. Must be 3x3.
1085 * @param accelerometerBias known accelerometer bias. This must
1086 * have length 3 and is expressed in
1087 * meters per squared second
1088 * (m/s^2).
1089 * @param accelerometerMa known accelerometer scale factors and
1090 * cross coupling matrix. Must be 3x3.
1091 * @throws IllegalArgumentException if any of the provided values does
1092 * not have proper size or if either
1093 * turntable rotation rate or
1094 * time interval is zero or negative.
1095 */
1096 public PROSACRobustTurntableGyroscopeCalibrator(
1097 final NEDPosition position, final double turntableRotationRate, final double timeInterval,
1098 final List<StandardDeviationBodyKinematics> measurements, final double[] initialBias,
1099 final Matrix initialMg, final Matrix initialGg, final double[] accelerometerBias,
1100 final Matrix accelerometerMa) {
1101 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg,
1102 accelerometerBias, accelerometerMa);
1103 }
1104
1105 /**
1106 * Constructor.
1107 *
1108 * @param position position where body kinematics measures
1109 * have been taken.
1110 * @param turntableRotationRate constant rotation rate at which the
1111 * turntable is spinning. Must be
1112 * expressed in radians per second (rad/s).
1113 * @param timeInterval time interval between measurements being
1114 * captured expressed in seconds (s).
1115 * @param measurements collection of body kinematics
1116 * measurements with standard deviations
1117 * taken at the same position with zero
1118 * velocity and unknown different
1119 * orientations.
1120 * @param initialBias initial gyroscope bias to be used to
1121 * find a solution. This must have length
1122 * 3 and is expressed in radians per
1123 * second (rad/s).
1124 * @param initialMg initial gyroscope scale factors and
1125 * cross coupling errors matrix. Must
1126 * be 3x3.
1127 * @param initialGg initial gyroscope G-dependent cross
1128 * biases introduced on the gyroscope by
1129 * the specific forces sensed by the
1130 * accelerometer. Must be 3x3.
1131 * @param accelerometerBias known accelerometer bias. This must
1132 * have length 3 and is expressed in
1133 * meters per squared second (m/s^2).
1134 * @param accelerometerMa known accelerometer scale factors and
1135 * cross coupling matrix. Must be 3x3.
1136 * @param listener listener to handle events raised by
1137 * this calibrator.
1138 * @throws IllegalArgumentException if any of the provided values does
1139 * not have proper size or if either
1140 * turntable rotation rate or
1141 * time interval is zero or negative.
1142 */
1143 public PROSACRobustTurntableGyroscopeCalibrator(
1144 final NEDPosition position, final double turntableRotationRate, final double timeInterval,
1145 final List<StandardDeviationBodyKinematics> measurements, final double[] initialBias,
1146 final Matrix initialMg, final Matrix initialGg, final double[] accelerometerBias,
1147 final Matrix accelerometerMa, final RobustTurntableGyroscopeCalibratorListener listener) {
1148 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg,
1149 accelerometerBias, accelerometerMa, listener);
1150 }
1151
1152 /**
1153 * Constructor.
1154 *
1155 * @param position position where body kinematics measures
1156 * have been taken.
1157 * @param turntableRotationRate constant rotation rate at which the
1158 * turntable is spinning. Must be
1159 * expressed in radians per second (rad/s).
1160 * @param timeInterval time interval between measurements being
1161 * captured expressed in seconds (s).
1162 * @param measurements collection of body kinematics
1163 * measurements with standard deviations
1164 * taken at the same position with zero
1165 * velocity and unknown different
1166 * orientations.
1167 * @param initialBias initial gyroscope bias to be used to
1168 * find a solution. This must be 3x1 and
1169 * is expressed in radians per second
1170 * (rad/s).
1171 * @param initialMg initial gyroscope scale factors and
1172 * cross coupling errors matrix. Must
1173 * be 3x3.
1174 * @param initialGg initial gyroscope G-dependent cross
1175 * biases introduced on the gyroscope by
1176 * the specific forces sensed by the
1177 * accelerometer. Must be 3x3.
1178 * @param accelerometerBias known accelerometer bias. This must
1179 * have length 3 and is expressed in
1180 * meters per squared second
1181 * (m/s^2).
1182 * @param accelerometerMa known accelerometer scale factors and
1183 * cross coupling matrix. Must be 3x3.
1184 * @throws IllegalArgumentException if any of the provided values does
1185 * not have proper size or if either
1186 * turntable rotation rate or
1187 * time interval is zero or negative.
1188 */
1189 public PROSACRobustTurntableGyroscopeCalibrator(
1190 final NEDPosition position, final double turntableRotationRate, final double timeInterval,
1191 final List<StandardDeviationBodyKinematics> measurements, final Matrix initialBias, final Matrix initialMg,
1192 final Matrix initialGg, final Matrix accelerometerBias, final Matrix accelerometerMa) {
1193 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg,
1194 accelerometerBias, accelerometerMa);
1195 }
1196
1197 /**
1198 * Constructor.
1199 *
1200 * @param position position where body kinematics measures
1201 * have been taken.
1202 * @param turntableRotationRate constant rotation rate at which the
1203 * turntable is spinning. Must be
1204 * expressed in radians per second (rad/s).
1205 * @param timeInterval time interval between measurements being
1206 * captured expressed in seconds (s).
1207 * @param measurements collection of body kinematics
1208 * measurements with standard deviations
1209 * taken at the same position with zero
1210 * velocity and unknown different
1211 * orientations.
1212 * @param initialBias initial gyroscope bias to be used to
1213 * find a solution. This must be 3x1 and
1214 * is expressed in radians per second
1215 * (rad/s).
1216 * @param initialMg initial gyroscope scale factors and
1217 * cross coupling errors matrix. Must
1218 * be 3x3.
1219 * @param initialGg initial gyroscope G-dependent cross
1220 * biases introduced on the gyroscope by
1221 * the specific forces sensed by the
1222 * accelerometer. Must be 3x3.
1223 * @param accelerometerBias known accelerometer bias. This must
1224 * have length 3 and is expressed in
1225 * meters per squared second (m/s^2).
1226 * @param accelerometerMa known accelerometer scale factors and
1227 * cross coupling matrix. Must be 3x3.
1228 * @param listener listener to handle events raised by
1229 * this calibrator.
1230 * @throws IllegalArgumentException if any of the provided values does
1231 * not have proper size or if either
1232 * turntable rotation rate or
1233 * time interval is zero or negative.
1234 */
1235 public PROSACRobustTurntableGyroscopeCalibrator(
1236 final NEDPosition position, final double turntableRotationRate, final double timeInterval,
1237 final List<StandardDeviationBodyKinematics> measurements, final Matrix initialBias, final Matrix initialMg,
1238 final Matrix initialGg, final Matrix accelerometerBias, final Matrix accelerometerMa,
1239 final RobustTurntableGyroscopeCalibratorListener listener) {
1240 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg,
1241 accelerometerBias, accelerometerMa, listener);
1242 }
1243
1244 /**
1245 * Constructor.
1246 *
1247 * @param position position where body kinematics
1248 * measures have been taken.
1249 * @param turntableRotationRate constant rotation rate at which
1250 * the turntable is spinning. Must
1251 * be expressed in radians per
1252 * second (rad/s).
1253 * @param timeInterval time interval between measurements
1254 * being captured expressed in
1255 * seconds (s).
1256 * @param measurements collection of body kinematics
1257 * measurements with standard
1258 * deviations taken at the same
1259 * position with zero velocity
1260 * and unknown different
1261 * orientations.
1262 * @param commonAxisUsed indicates whether z-axis is
1263 * assumed to be common for
1264 * accelerometer and gyroscope.
1265 * @param estimateGDependentCrossBiases true if G-dependent cross biases
1266 * will be estimated, false
1267 * otherwise.
1268 * @param initialBias initial gyroscope bias to be
1269 * used to find a solution. This
1270 * must be 3x1 and is expressed in
1271 * radians per second (rad/s).
1272 * @param initialMg initial gyroscope scale factors
1273 * and cross coupling errors matrix.
1274 * Must be 3x3.
1275 * @param initialGg initial gyroscope G-dependent
1276 * cross biases introduced on the
1277 * gyroscope by the specific
1278 * forces sensed by the
1279 * accelerometer. Must be 3x3.
1280 * @throws IllegalArgumentException if any of the provided values does
1281 * not have proper size or if either
1282 * turntable rotation rate or
1283 * time interval is zero or negative.
1284 */
1285 public PROSACRobustTurntableGyroscopeCalibrator(
1286 final NEDPosition position, final double turntableRotationRate, final double timeInterval,
1287 final List<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
1288 final boolean estimateGDependentCrossBiases, final Matrix initialBias, final Matrix initialMg,
1289 final Matrix initialGg) {
1290 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
1291 estimateGDependentCrossBiases, initialBias, initialMg, initialGg);
1292 }
1293
1294 /**
1295 * Constructor.
1296 *
1297 * @param position position where body kinematics
1298 * measures have been taken.
1299 * @param turntableRotationRate constant rotation rate at which
1300 * the turntable is spinning. Must
1301 * be expressed in radians per
1302 * second (rad/s).
1303 * @param timeInterval time interval between measurements
1304 * being captured expressed in
1305 * seconds (s).
1306 * @param measurements collection of body kinematics
1307 * measurements with standard
1308 * deviations taken at the same
1309 * position with zero velocity and
1310 * unknown different orientations.
1311 * @param commonAxisUsed indicates whether z-axis is
1312 * assumed to be common for
1313 * accelerometer and gyroscope.
1314 * @param estimateGDependentCrossBiases true if G-dependent cross
1315 * biases will be estimated, false
1316 * otherwise.
1317 * @param initialBias initial gyroscope bias to be
1318 * used to find a solution. This
1319 * must be 3x1 and is expressed in
1320 * radians per second (rad/s).
1321 * @param initialMg initial gyroscope scale factors
1322 * and cross coupling errors
1323 * matrix. Must be 3x3.
1324 * @param initialGg initial gyroscope G-dependent
1325 * cross biases introduced on the
1326 * gyroscope by the specific
1327 * forces sensed by the
1328 * accelerometer. Must be 3x3.
1329 * @param listener listener to handle events
1330 * raised by this calibrator.
1331 * @throws IllegalArgumentException if any of the provided values does
1332 * not have proper size or if either
1333 * turntable rotation rate or
1334 * time interval is zero or negative.
1335 */
1336 public PROSACRobustTurntableGyroscopeCalibrator(
1337 final NEDPosition position, final double turntableRotationRate, final double timeInterval,
1338 final List<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
1339 final boolean estimateGDependentCrossBiases, final Matrix initialBias, final Matrix initialMg,
1340 final Matrix initialGg, final RobustTurntableGyroscopeCalibratorListener listener) {
1341 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
1342 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, listener);
1343 }
1344
1345 /**
1346 * Constructor.
1347 *
1348 * @param position position where body kinematics
1349 * measures have been taken.
1350 * @param turntableRotationRate constant rotation rate at which
1351 * the turntable is spinning. Must
1352 * be expressed in radians per
1353 * second (rad/s).
1354 * @param timeInterval time interval between measurements
1355 * being captured expressed in
1356 * seconds (s).
1357 * @param measurements collection of body kinematics
1358 * measurements with standard
1359 * deviations taken at the same
1360 * position with zero velocity
1361 * and unknown different
1362 * orientations.
1363 * @param commonAxisUsed indicates whether z-axis is
1364 * assumed to be common for
1365 * accelerometer and gyroscope.
1366 * @param estimateGDependentCrossBiases true if G-dependent cross biases
1367 * will be estimated, false
1368 * otherwise.
1369 * @param initialBias initial gyroscope bias to be
1370 * used to find a solution. This
1371 * must have length 3 and is
1372 * expressed in radians per second
1373 * (rad/s).
1374 * @param initialMg initial gyroscope scale factors
1375 * and cross coupling errors matrix.
1376 * Must be 3x3.
1377 * @param initialGg initial gyroscope G-dependent
1378 * cross biases introduced on the
1379 * gyroscope by the specific forces
1380 * sensed by the accelerometer.
1381 * Must be 3x3.
1382 * @throws IllegalArgumentException if any of the provided values does
1383 * not have proper size or if either
1384 * turntable rotation rate or
1385 * time interval is zero or negative.
1386 */
1387 public PROSACRobustTurntableGyroscopeCalibrator(
1388 final NEDPosition position, final double turntableRotationRate, final double timeInterval,
1389 final List<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
1390 final boolean estimateGDependentCrossBiases, final double[] initialBias, final Matrix initialMg,
1391 final Matrix initialGg) {
1392 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
1393 estimateGDependentCrossBiases, initialBias, initialMg, initialGg);
1394 }
1395
1396 /**
1397 * Constructor.
1398 *
1399 * @param position position where body kinematics
1400 * measures have been taken.
1401 * @param turntableRotationRate constant rotation rate at which
1402 * the turntable is spinning. Must
1403 * be expressed in radians per
1404 * second (rad/s).
1405 * @param timeInterval time interval between measurements
1406 * being captured expressed in
1407 * seconds (s).
1408 * @param measurements collection of body kinematics
1409 * measurements with standard
1410 * deviations taken at the same
1411 * position with zero velocity
1412 * and unknown different
1413 * orientations.
1414 * @param commonAxisUsed indicates whether z-axis is
1415 * assumed to be common for
1416 * accelerometer and gyroscope.
1417 * @param estimateGDependentCrossBiases true if G-dependent cross biases
1418 * will be estimated, false
1419 * otherwise.
1420 * @param initialBias initial gyroscope bias to be
1421 * used to find a solution. This
1422 * must have length 3 and is
1423 * expressed in radians per second
1424 * (rad/s).
1425 * @param initialMg initial gyroscope scale factors
1426 * and cross coupling errors
1427 * matrix. Must be 3x3.
1428 * @param initialGg initial gyroscope G-dependent
1429 * cross biases introduced on the
1430 * gyroscope by the specific forces
1431 * sensed by the accelerometer.
1432 * Must be 3x3.
1433 * @param listener listener to handle events raised
1434 * by this calibrator.
1435 * @throws IllegalArgumentException if any of the provided values does
1436 * not have proper size or if either
1437 * turntable rotation rate or
1438 * time interval is zero or negative.
1439 */
1440 public PROSACRobustTurntableGyroscopeCalibrator(
1441 final NEDPosition position, final double turntableRotationRate, final double timeInterval,
1442 final List<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
1443 final boolean estimateGDependentCrossBiases, final double[] initialBias, final Matrix initialMg,
1444 final Matrix initialGg, final RobustTurntableGyroscopeCalibratorListener listener) {
1445 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
1446 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, listener);
1447 }
1448
1449 /**
1450 * Constructor.
1451 *
1452 * @param position position where body kinematics
1453 * measures have been taken.
1454 * @param turntableRotationRate constant rotation rate at which
1455 * the turntable is spinning. Must
1456 * be expressed in radians per
1457 * second (rad/s).
1458 * @param timeInterval time interval between measurements
1459 * being captured expressed in
1460 * seconds (s).
1461 * @param measurements collection of body kinematics
1462 * measurements with standard
1463 * deviations taken at the same
1464 * position with zero velocity
1465 * and unknown different
1466 * orientations.
1467 * @param commonAxisUsed indicates whether z-axis is
1468 * assumed to be common for
1469 * accelerometer and gyroscope.
1470 * @param estimateGDependentCrossBiases true if G-dependent cross
1471 * biases will be estimated,
1472 * false otherwise.
1473 * @param initialBias initial gyroscope bias to be
1474 * used to find a solution. This
1475 * must have length 3 and is
1476 * expressed in radians per second
1477 * (rad/s).
1478 * @param initialMg initial gyroscope scale factors
1479 * and cross coupling errors
1480 * matrix. Must be 3x3.
1481 * @param initialGg initial gyroscope G-dependent
1482 * cross biases introduced on the
1483 * gyroscope by the specific forces
1484 * sensed by the accelerometer.
1485 * Must be 3x3.
1486 * @param accelerometerBias known accelerometer bias. This
1487 * must have length 3 and is
1488 * expressed in meters per squared
1489 * second (m/s^2).
1490 * @param accelerometerMa known accelerometer scale factors
1491 * and cross coupling matrix. Must
1492 * be 3x3.
1493 * @throws IllegalArgumentException if any of the provided values does
1494 * not have proper size or if either
1495 * turntable rotation rate or
1496 * time interval is zero or negative.
1497 */
1498 public PROSACRobustTurntableGyroscopeCalibrator(
1499 final NEDPosition position, final double turntableRotationRate, final double timeInterval,
1500 final List<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
1501 final boolean estimateGDependentCrossBiases, final double[] initialBias, final Matrix initialMg,
1502 final Matrix initialGg, final double[] accelerometerBias, final Matrix accelerometerMa) {
1503 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
1504 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, accelerometerBias, accelerometerMa);
1505 }
1506
1507 /**
1508 * Constructor.
1509 *
1510 * @param position position where body kinematics
1511 * measures have been taken.
1512 * @param turntableRotationRate constant rotation rate at which
1513 * the turntable is spinning. Must
1514 * be expressed in radians per
1515 * second (rad/s).
1516 * @param timeInterval time interval between measurements
1517 * being captured expressed in
1518 * seconds (s).
1519 * @param measurements collection of body kinematics
1520 * measurements with standard
1521 * deviations taken at the same
1522 * position with zero velocity
1523 * and unknown different
1524 * orientations.
1525 * @param commonAxisUsed indicates whether z-axis is
1526 * assumed to be common for
1527 * accelerometer and gyroscope.
1528 * @param estimateGDependentCrossBiases true if G-dependent cross biases
1529 * will be estimated, false
1530 * otherwise.
1531 * @param initialBias initial gyroscope bias to be used
1532 * to find a solution. This must
1533 * have length 3 and is expressed
1534 * in radians per second (rad/s).
1535 * @param initialMg initial gyroscope scale factors
1536 * and cross coupling errors matrix.
1537 * Must be 3x3.
1538 * @param initialGg initial gyroscope G-dependent
1539 * cross biases introduced on the
1540 * gyroscope by the specific forces
1541 * sensed by the accelerometer. Must
1542 * be 3x3.
1543 * @param accelerometerBias known accelerometer bias. This
1544 * must have length 3 and is
1545 * expressed in meters per squared
1546 * second (m/s^2).
1547 * @param accelerometerMa known accelerometer scale factors
1548 * and cross coupling matrix. Must
1549 * be 3x3.
1550 * @param listener listener to handle events raised
1551 * by this calibrator.
1552 * @throws IllegalArgumentException if any of the provided values does
1553 * not have proper size or if either
1554 * turntable rotation rate or
1555 * time interval is zero or negative.
1556 */
1557 public PROSACRobustTurntableGyroscopeCalibrator(
1558 final NEDPosition position, final double turntableRotationRate, final double timeInterval,
1559 final List<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
1560 final boolean estimateGDependentCrossBiases, final double[] initialBias, final Matrix initialMg,
1561 final Matrix initialGg, final double[] accelerometerBias, final Matrix accelerometerMa,
1562 final RobustTurntableGyroscopeCalibratorListener listener) {
1563 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
1564 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, accelerometerBias, accelerometerMa,
1565 listener);
1566 }
1567
1568 /**
1569 * Constructor.
1570 *
1571 * @param position position where body kinematics
1572 * measures have been taken.
1573 * @param turntableRotationRate constant rotation rate at which
1574 * the turntable is spinning. Must
1575 * be expressed in radians per
1576 * second (rad/s).
1577 * @param timeInterval time interval between measurements
1578 * being captured expressed in
1579 * seconds (s).
1580 * @param measurements collection of body kinematics
1581 * measurements with standard
1582 * deviations taken at the same
1583 * position with zero velocity and
1584 * unknown different orientations.
1585 * @param commonAxisUsed indicates whether z-axis is
1586 * assumed to be common for
1587 * accelerometer and gyroscope.
1588 * @param estimateGDependentCrossBiases true if G-dependent cross biases
1589 * will be estimated, false
1590 * otherwise.
1591 * @param initialBias initial gyroscope bias to be
1592 * used to find a solution. This
1593 * must be 3x1 and is expressed in
1594 * radians per second (rad/s).
1595 * @param initialMg initial gyroscope scale factors
1596 * and cross coupling errors matrix.
1597 * Must be 3x3.
1598 * @param initialGg initial gyroscope G-dependent
1599 * cross biases introduced on the
1600 * gyroscope by the specific forces
1601 * sensed by the accelerometer. Must
1602 * be 3x3.
1603 * @param accelerometerBias known accelerometer bias. This
1604 * must have length 3 and is
1605 * expressed in meters per squared
1606 * second (m/s^2).
1607 * @param accelerometerMa known accelerometer scale factors
1608 * and cross coupling matrix. Must
1609 * be 3x3.
1610 * @throws IllegalArgumentException if any of the provided values does
1611 * not have proper size or if either
1612 * turntable rotation rate or
1613 * time interval is zero or negative.
1614 */
1615 public PROSACRobustTurntableGyroscopeCalibrator(
1616 final NEDPosition position, final double turntableRotationRate, final double timeInterval,
1617 final List<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
1618 final boolean estimateGDependentCrossBiases, final Matrix initialBias, final Matrix initialMg,
1619 final Matrix initialGg, final Matrix accelerometerBias, final Matrix accelerometerMa) {
1620 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
1621 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, accelerometerBias, accelerometerMa);
1622 }
1623
1624 /**
1625 * Constructor.
1626 *
1627 * @param position position where body kinematics
1628 * measures have been taken.
1629 * @param turntableRotationRate constant rotation rate at which
1630 * the turntable is spinning. Must
1631 * be expressed in radians per
1632 * second (rad/s).
1633 * @param timeInterval time interval between measurements
1634 * being captured expressed in
1635 * seconds (s).
1636 * @param measurements collection of body kinematics
1637 * measurements with standard
1638 * deviations taken at the same
1639 * position with zero velocity and
1640 * unknown different orientations.
1641 * @param commonAxisUsed indicates whether z-axis is
1642 * assumed to be common for
1643 * accelerometer and gyroscope.
1644 * @param estimateGDependentCrossBiases true if G-dependent cross biases
1645 * will be estimated, false
1646 * otherwise.
1647 * @param initialBias initial gyroscope bias to be used
1648 * to find a solution. This must be
1649 * 3x1 and is expressed in radians
1650 * per second (rad/s).
1651 * @param initialMg initial gyroscope scale factors
1652 * and cross coupling errors matrix.
1653 * Must be 3x3.
1654 * @param initialGg initial gyroscope G-dependent
1655 * cross biases introduced on the
1656 * gyroscope by the specific forces
1657 * sensed by the accelerometer. Must
1658 * be 3x3.
1659 * @param accelerometerBias known accelerometer bias. This
1660 * must have length 3 and is
1661 * expressed in meters per squared
1662 * second (m/s^2).
1663 * @param accelerometerMa known accelerometer scale factors
1664 * and cross coupling matrix. Must
1665 * be 3x3.
1666 * @param listener listener to handle events raised
1667 * by this calibrator.
1668 * @throws IllegalArgumentException if any of the provided values does
1669 * not have proper size or if either
1670 * turntable rotation rate or
1671 * time interval is zero or negative.
1672 */
1673 public PROSACRobustTurntableGyroscopeCalibrator(
1674 final NEDPosition position, final double turntableRotationRate, final double timeInterval,
1675 final List<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
1676 final boolean estimateGDependentCrossBiases, final Matrix initialBias, final Matrix initialMg,
1677 final Matrix initialGg, final Matrix accelerometerBias, final Matrix accelerometerMa,
1678 final RobustTurntableGyroscopeCalibratorListener listener) {
1679 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
1680 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, accelerometerBias, accelerometerMa,
1681 listener);
1682 }
1683
1684 /**
1685 * Constructor.
1686 *
1687 * @param qualityScores quality scores corresponding to each provided
1688 * measurement. The larger the score value the better
1689 * the quality of the sample.
1690 * @throws IllegalArgumentException if provided quality scores length
1691 * is smaller than 10 samples.
1692 */
1693 public PROSACRobustTurntableGyroscopeCalibrator(final double[] qualityScores) {
1694 super();
1695 internalSetQualityScores(qualityScores);
1696 }
1697
1698 /**
1699 * Constructor.
1700 *
1701 * @param qualityScores quality scores corresponding to each provided
1702 * measurement. The larger the score value the better
1703 * the quality of the sample.
1704 * @param position position where body kinematics measures
1705 * have been taken.
1706 * @param turntableRotationRate constant rotation rate at which the
1707 * turntable is spinning. Must be
1708 * expressed in radians per second (rad/s).
1709 * @param timeInterval time interval between measurements being
1710 * captured expressed in seconds (s).
1711 * @param measurements collection of body kinematics
1712 * measurements with standard deviations
1713 * taken at the same position with zero
1714 * velocity and unknown different
1715 * orientations.
1716 * @param initialBias initial gyroscope bias to be used to
1717 * find a solution. This must be 3x1 and
1718 * is expressed in radians per second
1719 * (rad/s).
1720 * @param initialMg initial gyroscope scale factors and
1721 * cross coupling errors matrix. Must
1722 * be 3x3.
1723 * @param initialGg initial gyroscope G-dependent cross
1724 * biases introduced on the gyroscope by
1725 * the specific forces sensed by the
1726 * accelerometer. Must be 3x3.
1727 * @throws IllegalArgumentException if any of the provided values does
1728 * not have proper size, if either
1729 * turntable rotation rate or
1730 * time interval is zero or negative or
1731 * if provided quality scores length is
1732 * smaller than 10 samples.
1733 */
1734 public PROSACRobustTurntableGyroscopeCalibrator(
1735 final double[] qualityScores, final ECEFPosition position, final double turntableRotationRate,
1736 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
1737 final Matrix initialBias, final Matrix initialMg, final Matrix initialGg) {
1738 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg);
1739 internalSetQualityScores(qualityScores);
1740 }
1741
1742 /**
1743 * Constructor.
1744 *
1745 * @param qualityScores quality scores corresponding to each provided
1746 * measurement. The larger the score value the better
1747 * the quality of the sample.
1748 * @param position position where body kinematics measures
1749 * have been taken.
1750 * @param turntableRotationRate constant rotation rate at which the
1751 * turntable is spinning. Must be
1752 * expressed in radians per second (rad/s).
1753 * @param timeInterval time interval between measurements being
1754 * captured expressed in seconds (s).
1755 * @param measurements collection of body kinematics
1756 * measurements with standard deviations
1757 * taken at the same position with zero
1758 * velocity and unknown different
1759 * orientations.
1760 * @param initialBias initial gyroscope bias to be used to
1761 * find a solution. This must be 3x1 and
1762 * is expressed in radians per second
1763 * (rad/s).
1764 * @param initialMg initial gyroscope scale factors and
1765 * cross coupling errors matrix. Must
1766 * be 3x3.
1767 * @param initialGg initial gyroscope G-dependent cross
1768 * biases introduced on the gyroscope by
1769 * the specific forces sensed by the
1770 * accelerometer. Must be 3x3.
1771 * @param listener listener to handle events raised by this
1772 * calibrator.
1773 * @throws IllegalArgumentException if any of the provided values does
1774 * not have proper size, if either
1775 * turntable rotation rate or
1776 * time interval is zero or negative or
1777 * if provided quality scores length is
1778 * smaller than 10 samples.
1779 */
1780 public PROSACRobustTurntableGyroscopeCalibrator(
1781 final double[] qualityScores, final ECEFPosition position, final double turntableRotationRate,
1782 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
1783 final Matrix initialBias, final Matrix initialMg, final Matrix initialGg,
1784 final RobustTurntableGyroscopeCalibratorListener listener) {
1785 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg, listener);
1786 internalSetQualityScores(qualityScores);
1787 }
1788
1789 /**
1790 * Constructor.
1791 *
1792 * @param qualityScores quality scores corresponding to each provided
1793 * measurement. The larger the score value the better
1794 * the quality of the sample.
1795 * @param position position where body kinematics measures
1796 * have been taken.
1797 * @param turntableRotationRate constant rotation rate at which the
1798 * turntable is spinning. Must be
1799 * expressed in radians per second (rad/s).
1800 * @param timeInterval time interval between measurements being
1801 * captured expressed in seconds (s).
1802 * @param measurements collection of body kinematics
1803 * measurements with standard deviations
1804 * taken at the same position with zero
1805 * velocity and unknown different
1806 * orientations.
1807 * @param initialBias initial gyroscope bias to be used to
1808 * find a solution. This must have
1809 * length 3 and is expressed in radians
1810 * per second (rad/s).
1811 * @param initialMg initial gyroscope scale factors and
1812 * cross coupling errors matrix. Must
1813 * be 3x3.
1814 * @param initialGg initial gyroscope G-dependent cross
1815 * biases introduced on the gyroscope by
1816 * the specific forces sensed by the
1817 * accelerometer. Must be 3x3.
1818 * @throws IllegalArgumentException if any of the provided values does
1819 * not have proper size, if either
1820 * turntable rotation rate or
1821 * time interval is zero or negative or
1822 * if provided quality scores length is
1823 * smaller than 10 samples.
1824 */
1825 public PROSACRobustTurntableGyroscopeCalibrator(
1826 final double[] qualityScores, final ECEFPosition position, final double turntableRotationRate,
1827 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
1828 final double[] initialBias, final Matrix initialMg, final Matrix initialGg) {
1829 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg);
1830 internalSetQualityScores(qualityScores);
1831 }
1832
1833 /**
1834 * Constructor.
1835 *
1836 * @param qualityScores quality scores corresponding to each provided
1837 * measurement. The larger the score value the better
1838 * the quality of the sample.
1839 * @param position position where body kinematics measures
1840 * have been taken.
1841 * @param turntableRotationRate constant rotation rate at which the
1842 * turntable is spinning. Must be
1843 * expressed in radians per second (rad/s).
1844 * @param timeInterval time interval between measurements being
1845 * captured expressed in seconds (s).
1846 * @param measurements collection of body kinematics
1847 * measurements with standard deviations
1848 * taken at the same position with zero
1849 * velocity and unknown different
1850 * orientations.
1851 * @param initialBias initial gyroscope bias to be used to
1852 * find a solution. This must have length
1853 * 3 and is expressed in radians
1854 * per second (rad/s).
1855 * @param initialMg initial gyroscope scale factors and
1856 * cross coupling errors matrix. Must
1857 * be 3x3.
1858 * @param initialGg initial gyroscope G-dependent cross
1859 * biases introduced on the gyroscope by
1860 * the specific forces sensed by the
1861 * accelerometer. Must be 3x3.
1862 * @param listener listener to handle events raised by
1863 * this calibrator.
1864 * @throws IllegalArgumentException if any of the provided values does
1865 * not have proper size, if either
1866 * turntable rotation rate or
1867 * time interval is zero or negative or
1868 * if provided quality scores length is
1869 * smaller than 10 samples.
1870 */
1871 public PROSACRobustTurntableGyroscopeCalibrator(
1872 final double[] qualityScores, final ECEFPosition position, final double turntableRotationRate,
1873 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
1874 final double[] initialBias, final Matrix initialMg, final Matrix initialGg,
1875 final RobustTurntableGyroscopeCalibratorListener listener) {
1876 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg, listener);
1877 internalSetQualityScores(qualityScores);
1878 }
1879
1880 /**
1881 * Constructor.
1882 *
1883 * @param qualityScores quality scores corresponding to each provided
1884 * measurement. The larger the score value the better
1885 * the quality of the sample.
1886 * @param position position where body kinematics measures
1887 * have been taken.
1888 * @param turntableRotationRate constant rotation rate at which the
1889 * turntable is spinning. Must be
1890 * expressed in radians per second (rad/s).
1891 * @param timeInterval time interval between measurements being
1892 * captured expressed in seconds (s).
1893 * @param measurements collection of body kinematics
1894 * measurements with standard deviations
1895 * taken at the same position with zero
1896 * velocity and unknown different
1897 * orientations.
1898 * @param initialBias initial gyroscope bias to be used to
1899 * find a solution. This must have length
1900 * 3 and is expressed in radians per
1901 * second (rad/s).
1902 * @param initialMg initial gyroscope scale factors and
1903 * cross coupling errors matrix. Must
1904 * be 3x3.
1905 * @param initialGg initial gyroscope G-dependent cross
1906 * biases introduced on the gyroscope by
1907 * the specific forces sensed by the
1908 * accelerometer. Must be 3x3.
1909 * @param accelerometerBias known accelerometer bias. This must
1910 * have length 3 and is expressed in
1911 * meters per squared second
1912 * (m/s^2).
1913 * @param accelerometerMa known accelerometer scale factors and
1914 * cross coupling matrix. Must be 3x3.
1915 * @throws IllegalArgumentException if any of the provided values does
1916 * not have proper size, if either
1917 * turntable rotation rate or
1918 * time interval is zero or negative or
1919 * if provided quality scores length is
1920 * smaller than 10 samples.
1921 */
1922 public PROSACRobustTurntableGyroscopeCalibrator(
1923 final double[] qualityScores, final ECEFPosition position, final double turntableRotationRate,
1924 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
1925 final double[] initialBias, final Matrix initialMg, final Matrix initialGg,
1926 final double[] accelerometerBias, final Matrix accelerometerMa) {
1927 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg,
1928 accelerometerBias, accelerometerMa);
1929 internalSetQualityScores(qualityScores);
1930 }
1931
1932 /**
1933 * Constructor.
1934 *
1935 * @param qualityScores quality scores corresponding to each provided
1936 * measurement. The larger the score value the better
1937 * the quality of the sample.
1938 * @param position position where body kinematics measures
1939 * have been taken.
1940 * @param turntableRotationRate constant rotation rate at which the
1941 * turntable is spinning. Must be
1942 * expressed in radians per second (rad/s).
1943 * @param timeInterval time interval between measurements being
1944 * captured expressed in seconds (s).
1945 * @param measurements collection of body kinematics
1946 * measurements with standard deviations
1947 * taken at the same position with zero
1948 * velocity and unknown different
1949 * orientations.
1950 * @param initialBias initial gyroscope bias to be used to
1951 * find a solution. This must have length
1952 * 3 and is expressed in radians per
1953 * second (rad/s).
1954 * @param initialMg initial gyroscope scale factors and
1955 * cross coupling errors matrix. Must
1956 * be 3x3.
1957 * @param initialGg initial gyroscope G-dependent cross
1958 * biases introduced on the gyroscope by
1959 * the specific forces sensed by the
1960 * accelerometer. Must be 3x3.
1961 * @param accelerometerBias known accelerometer bias. This must
1962 * have length 3 and is expressed in
1963 * meters per squared second (m/s^2).
1964 * @param accelerometerMa known accelerometer scale factors and
1965 * cross coupling matrix. Must be 3x3.
1966 * @param listener listener to handle events raised by
1967 * this calibrator.
1968 * @throws IllegalArgumentException if any of the provided values does
1969 * not have proper size, if either
1970 * turntable rotation rate or
1971 * time interval is zero or negative or
1972 * if provided quality scores length is
1973 * smaller than 10 samples.
1974 */
1975 public PROSACRobustTurntableGyroscopeCalibrator(
1976 final double[] qualityScores, final ECEFPosition position, final double turntableRotationRate,
1977 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
1978 final double[] initialBias, final Matrix initialMg, final Matrix initialGg,
1979 final double[] accelerometerBias, final Matrix accelerometerMa,
1980 final RobustTurntableGyroscopeCalibratorListener listener) {
1981 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg,
1982 accelerometerBias, accelerometerMa, listener);
1983 internalSetQualityScores(qualityScores);
1984 }
1985
1986 /**
1987 * Constructor.
1988 *
1989 * @param qualityScores quality scores corresponding to each provided
1990 * measurement. The larger the score value the better
1991 * the quality of the sample.
1992 * @param position position where body kinematics measures
1993 * have been taken.
1994 * @param turntableRotationRate constant rotation rate at which the
1995 * turntable is spinning. Must be
1996 * expressed in radians per second (rad/s).
1997 * @param timeInterval time interval between measurements being
1998 * captured expressed in seconds (s).
1999 * @param measurements collection of body kinematics
2000 * measurements with standard deviations
2001 * taken at the same position with zero
2002 * velocity and unknown different
2003 * orientations.
2004 * @param initialBias initial gyroscope bias to be used to
2005 * find a solution. This must be 3x1 and
2006 * is expressed in radians per second
2007 * (rad/s).
2008 * @param initialMg initial gyroscope scale factors and
2009 * cross coupling errors matrix. Must
2010 * be 3x3.
2011 * @param initialGg initial gyroscope G-dependent cross
2012 * biases introduced on the gyroscope by
2013 * the specific forces sensed by the
2014 * accelerometer. Must be 3x3.
2015 * @param accelerometerBias known accelerometer bias. This must
2016 * have length 3 and is expressed in
2017 * meters per squared second
2018 * (m/s^2).
2019 * @param accelerometerMa known accelerometer scale factors and
2020 * cross coupling matrix. Must be 3x3.
2021 * @throws IllegalArgumentException if any of the provided values does
2022 * not have proper size, if either
2023 * turntable rotation rate or
2024 * time interval is zero or negative or
2025 * if provided quality scores length is
2026 * smaller than 10 samples.
2027 */
2028 public PROSACRobustTurntableGyroscopeCalibrator(
2029 final double[] qualityScores, final ECEFPosition position, final double turntableRotationRate,
2030 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
2031 final Matrix initialBias, final Matrix initialMg, final Matrix initialGg, final Matrix accelerometerBias,
2032 final Matrix accelerometerMa) {
2033 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg,
2034 accelerometerBias, accelerometerMa);
2035 internalSetQualityScores(qualityScores);
2036 }
2037
2038 /**
2039 * Constructor.
2040 *
2041 * @param qualityScores quality scores corresponding to each provided
2042 * measurement. The larger the score value the better
2043 * the quality of the sample.
2044 * @param position position where body kinematics measures
2045 * have been taken.
2046 * @param turntableRotationRate constant rotation rate at which the
2047 * turntable is spinning. Must be
2048 * expressed in radians per second (rad/s).
2049 * @param timeInterval time interval between measurements being
2050 * captured expressed in seconds (s).
2051 * @param measurements collection of body kinematics
2052 * measurements with standard deviations
2053 * taken at the same position with zero
2054 * velocity and unknown different
2055 * orientations.
2056 * @param initialBias initial gyroscope bias to be used to
2057 * find a solution. This must be 3x1 and
2058 * is expressed in radians per second
2059 * (rad/s).
2060 * @param initialMg initial gyroscope scale factors and
2061 * cross coupling errors matrix. Must
2062 * be 3x3.
2063 * @param initialGg initial gyroscope G-dependent cross
2064 * biases introduced on the gyroscope by
2065 * the specific forces sensed by the
2066 * accelerometer. Must be 3x3.
2067 * @param accelerometerBias known accelerometer bias. This must
2068 * have length 3 and is expressed in
2069 * meters per squared second (m/s^2).
2070 * @param accelerometerMa known accelerometer scale factors and
2071 * cross coupling matrix. Must be 3x3.
2072 * @param listener listener to handle events raised by
2073 * this calibrator.
2074 * @throws IllegalArgumentException if any of the provided values does
2075 * not have proper size, if either
2076 * turntable rotation rate or
2077 * time interval is zero or negative or
2078 * if provided quality scores length is
2079 * smaller than 10 samples.
2080 */
2081 public PROSACRobustTurntableGyroscopeCalibrator(
2082 final double[] qualityScores, final ECEFPosition position, final double turntableRotationRate,
2083 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
2084 final Matrix initialBias, final Matrix initialMg, final Matrix initialGg, final Matrix accelerometerBias,
2085 final Matrix accelerometerMa, final RobustTurntableGyroscopeCalibratorListener listener) {
2086 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg,
2087 accelerometerBias, accelerometerMa, listener);
2088 internalSetQualityScores(qualityScores);
2089 }
2090
2091 /**
2092 * Constructor.
2093 *
2094 * @param qualityScores quality scores corresponding to each provided
2095 * measurement. The larger the score value the better
2096 * the quality of the sample.
2097 * @param position position where body kinematics
2098 * measures have been taken.
2099 * @param turntableRotationRate constant rotation rate at which
2100 * the turntable is spinning. Must
2101 * be expressed in radians per
2102 * second (rad/s).
2103 * @param timeInterval time interval between measurements
2104 * being captured expressed in
2105 * seconds (s).
2106 * @param measurements collection of body kinematics
2107 * measurements with standard
2108 * deviations taken at the same
2109 * position with zero velocity
2110 * and unknown different
2111 * orientations.
2112 * @param commonAxisUsed indicates whether z-axis is
2113 * assumed to be common for
2114 * accelerometer and gyroscope.
2115 * @param estimateGDependentCrossBiases true if G-dependent cross biases
2116 * will be estimated, false
2117 * otherwise.
2118 * @param initialBias initial gyroscope bias to be
2119 * used to find a solution. This
2120 * must be 3x1 and is expressed in
2121 * radians per second (rad/s).
2122 * @param initialMg initial gyroscope scale factors
2123 * and cross coupling errors matrix.
2124 * Must be 3x3.
2125 * @param initialGg initial gyroscope G-dependent
2126 * cross biases introduced on the
2127 * gyroscope by the specific
2128 * forces sensed by the
2129 * accelerometer. Must be 3x3.
2130 * @throws IllegalArgumentException if any of the provided values does
2131 * not have proper size, if either
2132 * turntable rotation rate or
2133 * time interval is zero or negative or
2134 * if provided quality scores length is
2135 * smaller than 10 samples.
2136 */
2137 public PROSACRobustTurntableGyroscopeCalibrator(
2138 final double[] qualityScores, final ECEFPosition position, final double turntableRotationRate,
2139 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
2140 final boolean commonAxisUsed, final boolean estimateGDependentCrossBiases, final Matrix initialBias,
2141 final Matrix initialMg, final Matrix initialGg) {
2142 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
2143 estimateGDependentCrossBiases, initialBias, initialMg, initialGg);
2144 internalSetQualityScores(qualityScores);
2145 }
2146
2147 /**
2148 * Constructor.
2149 *
2150 * @param qualityScores quality scores corresponding to each provided
2151 * measurement. The larger the score value the better
2152 * the quality of the sample.
2153 * @param position position where body kinematics
2154 * measures have been taken.
2155 * @param turntableRotationRate constant rotation rate at which
2156 * the turntable is spinning. Must
2157 * be expressed in radians per
2158 * second (rad/s).
2159 * @param timeInterval time interval between measurements
2160 * being captured expressed in
2161 * seconds (s).
2162 * @param measurements collection of body kinematics
2163 * measurements with standard
2164 * deviations taken at the same
2165 * position with zero velocity and
2166 * unknown different orientations.
2167 * @param commonAxisUsed indicates whether z-axis is
2168 * assumed to be common for
2169 * accelerometer and gyroscope.
2170 * @param estimateGDependentCrossBiases true if G-dependent cross
2171 * biases will be estimated, false
2172 * otherwise.
2173 * @param initialBias initial gyroscope bias to be
2174 * used to find a solution. This
2175 * must be 3x1 and is expressed in
2176 * radians per second (rad/s).
2177 * @param initialMg initial gyroscope scale factors
2178 * and cross coupling errors
2179 * matrix. Must be 3x3.
2180 * @param initialGg initial gyroscope G-dependent
2181 * cross biases introduced on the
2182 * gyroscope by the specific
2183 * forces sensed by the
2184 * accelerometer. Must be 3x3.
2185 * @param listener listener to handle events
2186 * raised by this calibrator.
2187 * @throws IllegalArgumentException if any of the provided values does
2188 * not have proper size, if either
2189 * turntable rotation rate or
2190 * time interval is zero or negative or
2191 * if provided quality scores length is
2192 * smaller than 10 samples.
2193 */
2194 public PROSACRobustTurntableGyroscopeCalibrator(
2195 final double[] qualityScores, final ECEFPosition position, final double turntableRotationRate,
2196 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
2197 final boolean commonAxisUsed, final boolean estimateGDependentCrossBiases, final Matrix initialBias,
2198 final Matrix initialMg, final Matrix initialGg, final RobustTurntableGyroscopeCalibratorListener listener) {
2199 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
2200 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, listener);
2201 internalSetQualityScores(qualityScores);
2202 }
2203
2204 /**
2205 * Constructor.
2206 *
2207 * @param qualityScores quality scores corresponding to each provided
2208 * measurement. The larger the score value the better
2209 * the quality of the sample.
2210 * @param position position where body kinematics
2211 * measures have been taken.
2212 * @param turntableRotationRate constant rotation rate at which
2213 * the turntable is spinning. Must
2214 * be expressed in radians per
2215 * second (rad/s).
2216 * @param timeInterval time interval between measurements
2217 * being captured expressed in
2218 * seconds (s).
2219 * @param measurements collection of body kinematics
2220 * measurements with standard
2221 * deviations taken at the same
2222 * position with zero velocity
2223 * and unknown different
2224 * orientations.
2225 * @param commonAxisUsed indicates whether z-axis is
2226 * assumed to be common for
2227 * accelerometer and gyroscope.
2228 * @param estimateGDependentCrossBiases true if G-dependent cross biases
2229 * will be estimated, false
2230 * otherwise.
2231 * @param initialBias initial gyroscope bias to be
2232 * used to find a solution. This
2233 * must have length 3 and is
2234 * expressed in radians per second
2235 * (rad/s).
2236 * @param initialMg initial gyroscope scale factors
2237 * and cross coupling errors matrix.
2238 * Must be 3x3.
2239 * @param initialGg initial gyroscope G-dependent
2240 * cross biases introduced on the
2241 * gyroscope by the specific forces
2242 * sensed by the accelerometer.
2243 * Must be 3x3.
2244 * @throws IllegalArgumentException if any of the provided values does
2245 * not have proper size, if either
2246 * turntable rotation rate or
2247 * time interval is zero or negative or
2248 * if provided quality scores length is
2249 * smaller than 10 samples.
2250 */
2251 public PROSACRobustTurntableGyroscopeCalibrator(
2252 final double[] qualityScores, final ECEFPosition position, final double turntableRotationRate,
2253 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
2254 final boolean commonAxisUsed, final boolean estimateGDependentCrossBiases, final double[] initialBias,
2255 final Matrix initialMg, final Matrix initialGg) {
2256 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
2257 estimateGDependentCrossBiases, initialBias, initialMg, initialGg);
2258 internalSetQualityScores(qualityScores);
2259 }
2260
2261 /**
2262 * Constructor.
2263 *
2264 * @param qualityScores quality scores corresponding to each provided
2265 * measurement. The larger the score value the better
2266 * the quality of the sample.
2267 * @param position position where body kinematics
2268 * measures have been taken.
2269 * @param turntableRotationRate constant rotation rate at which
2270 * the turntable is spinning. Must
2271 * be expressed in radians per
2272 * second (rad/s).
2273 * @param timeInterval time interval between measurements
2274 * being captured expressed in
2275 * seconds (s).
2276 * @param measurements collection of body kinematics
2277 * measurements with standard
2278 * deviations taken at the same
2279 * position with zero velocity
2280 * and unknown different
2281 * orientations.
2282 * @param commonAxisUsed indicates whether z-axis is
2283 * assumed to be common for
2284 * accelerometer and gyroscope.
2285 * @param estimateGDependentCrossBiases true if G-dependent cross biases
2286 * will be estimated, false
2287 * otherwise.
2288 * @param initialBias initial gyroscope bias to be
2289 * used to find a solution. This
2290 * must have length 3 and is
2291 * expressed in radians per second
2292 * (rad/s).
2293 * @param initialMg initial gyroscope scale factors
2294 * and cross coupling errors
2295 * matrix. Must be 3x3.
2296 * @param initialGg initial gyroscope G-dependent
2297 * cross biases introduced on the
2298 * gyroscope by the specific forces
2299 * sensed by the accelerometer.
2300 * Must be 3x3.
2301 * @param listener listener to handle events raised
2302 * by this calibrator.
2303 * @throws IllegalArgumentException if any of the provided values does
2304 * not have proper size, if either
2305 * turntable rotation rate or
2306 * time interval is zero or negative or
2307 * if provided quality scores length is
2308 * smaller than 10 samples.
2309 */
2310 public PROSACRobustTurntableGyroscopeCalibrator(
2311 final double[] qualityScores, final ECEFPosition position, final double turntableRotationRate,
2312 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
2313 final boolean commonAxisUsed, final boolean estimateGDependentCrossBiases, final double[] initialBias,
2314 final Matrix initialMg, final Matrix initialGg, final RobustTurntableGyroscopeCalibratorListener listener) {
2315 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
2316 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, listener);
2317 internalSetQualityScores(qualityScores);
2318 }
2319
2320 /**
2321 * Constructor.
2322 *
2323 * @param qualityScores quality scores corresponding to each provided
2324 * measurement. The larger the score value the better
2325 * the quality of the sample.
2326 * @param position position where body kinematics
2327 * measures have been taken.
2328 * @param turntableRotationRate constant rotation rate at which
2329 * the turntable is spinning. Must
2330 * be expressed in radians per
2331 * second (rad/s).
2332 * @param timeInterval time interval between measurements
2333 * being captured expressed in
2334 * seconds (s).
2335 * @param measurements collection of body kinematics
2336 * measurements with standard
2337 * deviations taken at the same
2338 * position with zero velocity
2339 * and unknown different
2340 * orientations.
2341 * @param commonAxisUsed indicates whether z-axis is
2342 * assumed to be common for
2343 * accelerometer and gyroscope.
2344 * @param estimateGDependentCrossBiases true if G-dependent cross
2345 * biases will be estimated,
2346 * false otherwise.
2347 * @param initialBias initial gyroscope bias to be
2348 * used to find a solution. This
2349 * must have length 3 and is
2350 * expressed in radians per second
2351 * (rad/s).
2352 * @param initialMg initial gyroscope scale factors
2353 * and cross coupling errors
2354 * matrix. Must be 3x3.
2355 * @param initialGg initial gyroscope G-dependent
2356 * cross biases introduced on the
2357 * gyroscope by the specific forces
2358 * sensed by the accelerometer.
2359 * Must be 3x3.
2360 * @param accelerometerBias known accelerometer bias. This
2361 * must have length 3 and is
2362 * expressed in meters per squared
2363 * second (m/s^2).
2364 * @param accelerometerMa known accelerometer scale factors
2365 * and cross coupling matrix. Must
2366 * be 3x3.
2367 * @throws IllegalArgumentException if any of the provided values does
2368 * not have proper size, if either
2369 * turntable rotation rate or
2370 * time interval is zero or negative or
2371 * if provided quality scores length is
2372 * smaller than 10 samples.
2373 */
2374 public PROSACRobustTurntableGyroscopeCalibrator(
2375 final double[] qualityScores, final ECEFPosition position, final double turntableRotationRate,
2376 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
2377 final boolean commonAxisUsed, final boolean estimateGDependentCrossBiases, final double[] initialBias,
2378 final Matrix initialMg, final Matrix initialGg, final double[] accelerometerBias,
2379 final Matrix accelerometerMa) {
2380 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
2381 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, accelerometerBias, accelerometerMa);
2382 internalSetQualityScores(qualityScores);
2383 }
2384
2385 /**
2386 * Constructor.
2387 *
2388 * @param qualityScores quality scores corresponding to each provided
2389 * measurement. The larger the score value the better
2390 * the quality of the sample.
2391 * @param position position where body kinematics
2392 * measures have been taken.
2393 * @param turntableRotationRate constant rotation rate at which
2394 * the turntable is spinning. Must
2395 * be expressed in radians per
2396 * second (rad/s).
2397 * @param timeInterval time interval between measurements
2398 * being captured expressed in
2399 * seconds (s).
2400 * @param measurements collection of body kinematics
2401 * measurements with standard
2402 * deviations taken at the same
2403 * position with zero velocity
2404 * and unknown different
2405 * orientations.
2406 * @param commonAxisUsed indicates whether z-axis is
2407 * assumed to be common for
2408 * accelerometer and gyroscope.
2409 * @param estimateGDependentCrossBiases true if G-dependent cross biases
2410 * will be estimated, false
2411 * otherwise.
2412 * @param initialBias initial gyroscope bias to be used
2413 * to find a solution. This must
2414 * have length 3 and is expressed
2415 * in radians per second (rad/s).
2416 * @param initialMg initial gyroscope scale factors
2417 * and cross coupling errors matrix.
2418 * Must be 3x3.
2419 * @param initialGg initial gyroscope G-dependent
2420 * cross biases introduced on the
2421 * gyroscope by the specific forces
2422 * sensed by the accelerometer. Must
2423 * be 3x3.
2424 * @param accelerometerBias known accelerometer bias. This
2425 * must have length 3 and is
2426 * expressed in meters per squared
2427 * second (m/s^2).
2428 * @param accelerometerMa known accelerometer scale factors
2429 * and cross coupling matrix. Must
2430 * be 3x3.
2431 * @param listener listener to handle events raised
2432 * by this calibrator.
2433 * @throws IllegalArgumentException if any of the provided values does
2434 * not have proper size, if either
2435 * turntable rotation rate or
2436 * time interval is zero or negative or
2437 * if provided quality scores length is
2438 * smaller than 10 samples.
2439 */
2440 public PROSACRobustTurntableGyroscopeCalibrator(
2441 final double[] qualityScores, final ECEFPosition position, final double turntableRotationRate,
2442 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
2443 final boolean commonAxisUsed, final boolean estimateGDependentCrossBiases, final double[] initialBias,
2444 final Matrix initialMg, final Matrix initialGg, final double[] accelerometerBias,
2445 final Matrix accelerometerMa, final RobustTurntableGyroscopeCalibratorListener listener) {
2446 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
2447 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, accelerometerBias, accelerometerMa,
2448 listener);
2449 internalSetQualityScores(qualityScores);
2450 }
2451
2452 /**
2453 * Constructor.
2454 *
2455 * @param qualityScores quality scores corresponding to each provided
2456 * measurement. The larger the score value the better
2457 * the quality of the sample.
2458 * @param position position where body kinematics
2459 * measures have been taken.
2460 * @param turntableRotationRate constant rotation rate at which
2461 * the turntable is spinning. Must
2462 * be expressed in radians per
2463 * second (rad/s).
2464 * @param timeInterval time interval between measurements
2465 * being captured expressed in
2466 * seconds (s).
2467 * @param measurements collection of body kinematics
2468 * measurements with standard
2469 * deviations taken at the same
2470 * position with zero velocity and
2471 * unknown different orientations.
2472 * @param commonAxisUsed indicates whether z-axis is
2473 * assumed to be common for
2474 * accelerometer and gyroscope.
2475 * @param estimateGDependentCrossBiases true if G-dependent cross biases
2476 * will be estimated, false
2477 * otherwise.
2478 * @param initialBias initial gyroscope bias to be
2479 * used to find a solution. This
2480 * must be 3x1 and is expressed in
2481 * radians per second (rad/s).
2482 * @param initialMg initial gyroscope scale factors
2483 * and cross coupling errors matrix.
2484 * Must be 3x3.
2485 * @param initialGg initial gyroscope G-dependent
2486 * cross biases introduced on the
2487 * gyroscope by the specific forces
2488 * sensed by the accelerometer. Must
2489 * be 3x3.
2490 * @param accelerometerBias known accelerometer bias. This
2491 * must have length 3 and is
2492 * expressed in meters per squared
2493 * second (m/s^2).
2494 * @param accelerometerMa known accelerometer scale factors
2495 * and cross coupling matrix. Must
2496 * be 3x3.
2497 * @throws IllegalArgumentException if any of the provided values does
2498 * not have proper size, if either
2499 * turntable rotation rate or
2500 * time interval is zero or negative or
2501 * if provided quality scores length is
2502 * smaller than 10 samples.
2503 */
2504 public PROSACRobustTurntableGyroscopeCalibrator(
2505 final double[] qualityScores, final ECEFPosition position, final double turntableRotationRate,
2506 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
2507 final boolean commonAxisUsed, final boolean estimateGDependentCrossBiases, final Matrix initialBias,
2508 final Matrix initialMg, final Matrix initialGg, final Matrix accelerometerBias,
2509 final Matrix accelerometerMa) {
2510 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
2511 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, accelerometerBias, accelerometerMa);
2512 internalSetQualityScores(qualityScores);
2513 }
2514
2515 /**
2516 * Constructor.
2517 *
2518 * @param qualityScores quality scores corresponding to each provided
2519 * measurement. The larger the score value the better
2520 * the quality of the sample.
2521 * @param position position where body kinematics
2522 * measures have been taken.
2523 * @param turntableRotationRate constant rotation rate at which
2524 * the turntable is spinning. Must
2525 * be expressed in radians per
2526 * second (rad/s).
2527 * @param timeInterval time interval between measurements
2528 * being captured expressed in
2529 * seconds (s).
2530 * @param measurements collection of body kinematics
2531 * measurements with standard
2532 * deviations taken at the same
2533 * position with zero velocity and
2534 * unknown different orientations.
2535 * @param commonAxisUsed indicates whether z-axis is
2536 * assumed to be common for
2537 * accelerometer and gyroscope.
2538 * @param estimateGDependentCrossBiases true if G-dependent cross biases
2539 * will be estimated, false
2540 * otherwise.
2541 * @param initialBias initial gyroscope bias to be used
2542 * to find a solution. This must be
2543 * 3x1 and is expressed in radians
2544 * per second (rad/s).
2545 * @param initialMg initial gyroscope scale factors
2546 * and cross coupling errors matrix.
2547 * Must be 3x3.
2548 * @param initialGg initial gyroscope G-dependent
2549 * cross biases introduced on the
2550 * gyroscope by the specific forces
2551 * sensed by the accelerometer. Must
2552 * be 3x3.
2553 * @param accelerometerBias known accelerometer bias. This
2554 * must have length 3 and is
2555 * expressed in meters per squared
2556 * second (m/s^2).
2557 * @param accelerometerMa known accelerometer scale factors
2558 * and cross coupling matrix. Must
2559 * be 3x3.
2560 * @param listener listener to handle events raised
2561 * by this calibrator.
2562 * @throws IllegalArgumentException if any of the provided values does
2563 * not have proper size, if either
2564 * turntable rotation rate or
2565 * time interval is zero or negative or
2566 * if provided quality scores length is
2567 * smaller than 10 samples.
2568 */
2569 public PROSACRobustTurntableGyroscopeCalibrator(
2570 final double[] qualityScores, final ECEFPosition position, final double turntableRotationRate,
2571 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
2572 final boolean commonAxisUsed, final boolean estimateGDependentCrossBiases, final Matrix initialBias,
2573 final Matrix initialMg, final Matrix initialGg, final Matrix accelerometerBias,
2574 final Matrix accelerometerMa, final RobustTurntableGyroscopeCalibratorListener listener) {
2575 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
2576 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, accelerometerBias, accelerometerMa,
2577 listener);
2578 internalSetQualityScores(qualityScores);
2579 }
2580
2581 /**
2582 * Constructor.
2583 *
2584 * @param qualityScores quality scores corresponding to each provided
2585 * measurement. The larger the score value the better
2586 * the quality of the sample.
2587 * @param position position where body kinematics measures
2588 * have been taken.
2589 * @param turntableRotationRate constant rotation rate at which the
2590 * turntable is spinning. Must be
2591 * expressed in radians per second (rad/s).
2592 * @param timeInterval time interval between measurements being
2593 * captured expressed in seconds (s).
2594 * @param measurements collection of body kinematics
2595 * measurements with standard deviations
2596 * taken at the same position with zero
2597 * velocity and unknown different
2598 * orientations.
2599 * @param initialBias initial gyroscope bias to be used to
2600 * find a solution. This must be 3x1 and
2601 * is expressed in radians per second
2602 * (rad/s).
2603 * @param initialMg initial gyroscope scale factors and
2604 * cross coupling errors matrix. Must
2605 * be 3x3.
2606 * @param initialGg initial gyroscope G-dependent cross
2607 * biases introduced on the gyroscope by
2608 * the specific forces sensed by the
2609 * accelerometer. Must be 3x3.
2610 * @throws IllegalArgumentException if any of the provided values does
2611 * not have proper size, if either
2612 * turntable rotation rate or
2613 * time interval is zero or negative or
2614 * if provided quality scores length is
2615 * smaller than 10 samples.
2616 */
2617 public PROSACRobustTurntableGyroscopeCalibrator(
2618 final double[] qualityScores, final NEDPosition position, final double turntableRotationRate,
2619 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
2620 final Matrix initialBias, final Matrix initialMg, final Matrix initialGg) {
2621 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg);
2622 internalSetQualityScores(qualityScores);
2623 }
2624
2625 /**
2626 * Constructor.
2627 *
2628 * @param qualityScores quality scores corresponding to each provided
2629 * measurement. The larger the score value the better
2630 * the quality of the sample.
2631 * @param position position where body kinematics measures
2632 * have been taken.
2633 * @param turntableRotationRate constant rotation rate at which the
2634 * turntable is spinning. Must be
2635 * expressed in radians per second (rad/s).
2636 * @param timeInterval time interval between measurements being
2637 * captured expressed in seconds (s).
2638 * @param measurements collection of body kinematics
2639 * measurements with standard deviations
2640 * taken at the same position with zero
2641 * velocity and unknown different
2642 * orientations.
2643 * @param initialBias initial gyroscope bias to be used to
2644 * find a solution. This must be 3x1 and
2645 * is expressed in radians per second
2646 * (rad/s).
2647 * @param initialMg initial gyroscope scale factors and
2648 * cross coupling errors matrix. Must
2649 * be 3x3.
2650 * @param initialGg initial gyroscope G-dependent cross
2651 * biases introduced on the gyroscope by
2652 * the specific forces sensed by the
2653 * accelerometer. Must be 3x3.
2654 * @param listener listener to handle events raised by this
2655 * calibrator.
2656 * @throws IllegalArgumentException if any of the provided values does
2657 * not have proper size, if either
2658 * turntable rotation rate or
2659 * time interval is zero or negative or
2660 * if provided quality scores length is
2661 * smaller than 10 samples.
2662 */
2663 public PROSACRobustTurntableGyroscopeCalibrator(
2664 final double[] qualityScores, final NEDPosition position, final double turntableRotationRate,
2665 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
2666 final Matrix initialBias, final Matrix initialMg, final Matrix initialGg,
2667 final RobustTurntableGyroscopeCalibratorListener listener) {
2668 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg, listener);
2669 internalSetQualityScores(qualityScores);
2670 }
2671
2672 /**
2673 * Constructor.
2674 *
2675 * @param qualityScores quality scores corresponding to each provided
2676 * measurement. The larger the score value the better
2677 * the quality of the sample.
2678 * @param position position where body kinematics measures
2679 * have been taken.
2680 * @param turntableRotationRate constant rotation rate at which the
2681 * turntable is spinning. Must be
2682 * expressed in radians per second (rad/s).
2683 * @param timeInterval time interval between measurements being
2684 * captured expressed in seconds (s).
2685 * @param measurements collection of body kinematics
2686 * measurements with standard deviations
2687 * taken at the same position with zero
2688 * velocity and unknown different
2689 * orientations.
2690 * @param initialBias initial gyroscope bias to be used to
2691 * find a solution. This must have
2692 * length 3 and is expressed in radians
2693 * per second (rad/s).
2694 * @param initialMg initial gyroscope scale factors and
2695 * cross coupling errors matrix. Must
2696 * be 3x3.
2697 * @param initialGg initial gyroscope G-dependent cross
2698 * biases introduced on the gyroscope by
2699 * the specific forces sensed by the
2700 * accelerometer. Must be 3x3.
2701 * @throws IllegalArgumentException if any of the provided values does
2702 * not have proper size, if either
2703 * turntable rotation rate or
2704 * time interval is zero or negative or
2705 * if provided quality scores length is
2706 * smaller than 10 samples.
2707 */
2708 public PROSACRobustTurntableGyroscopeCalibrator(
2709 final double[] qualityScores, final NEDPosition position, final double turntableRotationRate,
2710 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
2711 final double[] initialBias, final Matrix initialMg, final Matrix initialGg) {
2712 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg);
2713 internalSetQualityScores(qualityScores);
2714 }
2715
2716 /**
2717 * Constructor.
2718 *
2719 * @param qualityScores quality scores corresponding to each provided
2720 * measurement. The larger the score value the better
2721 * the quality of the sample.
2722 * @param position position where body kinematics measures
2723 * have been taken.
2724 * @param turntableRotationRate constant rotation rate at which the
2725 * turntable is spinning. Must be
2726 * expressed in radians per second (rad/s).
2727 * @param timeInterval time interval between measurements being
2728 * captured expressed in seconds (s).
2729 * @param measurements collection of body kinematics
2730 * measurements with standard deviations
2731 * taken at the same position with zero
2732 * velocity and unknown different
2733 * orientations.
2734 * @param initialBias initial gyroscope bias to be used to
2735 * find a solution. This must have length
2736 * 3 and is expressed in radians
2737 * per second (rad/s).
2738 * @param initialMg initial gyroscope scale factors and
2739 * cross coupling errors matrix. Must
2740 * be 3x3.
2741 * @param initialGg initial gyroscope G-dependent cross
2742 * biases introduced on the gyroscope by
2743 * the specific forces sensed by the
2744 * accelerometer. Must be 3x3.
2745 * @param listener listener to handle events raised by
2746 * this calibrator.
2747 * @throws IllegalArgumentException if any of the provided values does
2748 * not have proper size, if either
2749 * turntable rotation rate or
2750 * time interval is zero or negative or
2751 * if provided quality scores length is
2752 * smaller than 10 samples.
2753 */
2754 public PROSACRobustTurntableGyroscopeCalibrator(
2755 final double[] qualityScores, final NEDPosition position, final double turntableRotationRate,
2756 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
2757 final double[] initialBias, final Matrix initialMg, final Matrix initialGg,
2758 final RobustTurntableGyroscopeCalibratorListener listener) {
2759 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg, listener);
2760 internalSetQualityScores(qualityScores);
2761 }
2762
2763 /**
2764 * Constructor.
2765 *
2766 * @param qualityScores quality scores corresponding to each provided
2767 * measurement. The larger the score value the better
2768 * the quality of the sample.
2769 * @param position position where body kinematics measures
2770 * have been taken.
2771 * @param turntableRotationRate constant rotation rate at which the
2772 * turntable is spinning. Must be
2773 * expressed in radians per second (rad/s).
2774 * @param timeInterval time interval between measurements being
2775 * captured expressed in seconds (s).
2776 * @param measurements collection of body kinematics
2777 * measurements with standard deviations
2778 * taken at the same position with zero
2779 * velocity and unknown different
2780 * orientations.
2781 * @param initialBias initial gyroscope bias to be used to
2782 * find a solution. This must have length
2783 * 3 and is expressed in radians per
2784 * second (rad/s).
2785 * @param initialMg initial gyroscope scale factors and
2786 * cross coupling errors matrix. Must
2787 * be 3x3.
2788 * @param initialGg initial gyroscope G-dependent cross
2789 * biases introduced on the gyroscope by
2790 * the specific forces sensed by the
2791 * accelerometer. Must be 3x3.
2792 * @param accelerometerBias known accelerometer bias. This must
2793 * have length 3 and is expressed in
2794 * meters per squared second
2795 * (m/s^2).
2796 * @param accelerometerMa known accelerometer scale factors and
2797 * cross coupling matrix. Must be 3x3.
2798 * @throws IllegalArgumentException if any of the provided values does
2799 * not have proper size, if either
2800 * turntable rotation rate or
2801 * time interval is zero or negative or
2802 * if provided quality scores length is
2803 * smaller than 10 samples.
2804 */
2805 public PROSACRobustTurntableGyroscopeCalibrator(
2806 final double[] qualityScores, final NEDPosition position, final double turntableRotationRate,
2807 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
2808 final double[] initialBias, final Matrix initialMg, final Matrix initialGg,
2809 final double[] accelerometerBias, final Matrix accelerometerMa) {
2810 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg,
2811 accelerometerBias, accelerometerMa);
2812 internalSetQualityScores(qualityScores);
2813 }
2814
2815 /**
2816 * Constructor.
2817 *
2818 * @param qualityScores quality scores corresponding to each provided
2819 * measurement. The larger the score value the better
2820 * the quality of the sample.
2821 * @param position position where body kinematics measures
2822 * have been taken.
2823 * @param turntableRotationRate constant rotation rate at which the
2824 * turntable is spinning. Must be
2825 * expressed in radians per second (rad/s).
2826 * @param timeInterval time interval between measurements being
2827 * captured expressed in seconds (s).
2828 * @param measurements collection of body kinematics
2829 * measurements with standard deviations
2830 * taken at the same position with zero
2831 * velocity and unknown different
2832 * orientations.
2833 * @param initialBias initial gyroscope bias to be used to
2834 * find a solution. This must have length
2835 * 3 and is expressed in radians per
2836 * second (rad/s).
2837 * @param initialMg initial gyroscope scale factors and
2838 * cross coupling errors matrix. Must
2839 * be 3x3.
2840 * @param initialGg initial gyroscope G-dependent cross
2841 * biases introduced on the gyroscope by
2842 * the specific forces sensed by the
2843 * accelerometer. Must be 3x3.
2844 * @param accelerometerBias known accelerometer bias. This must
2845 * have length 3 and is expressed in
2846 * meters per squared second (m/s^2).
2847 * @param accelerometerMa known accelerometer scale factors and
2848 * cross coupling matrix. Must be 3x3.
2849 * @param listener listener to handle events raised by
2850 * this calibrator.
2851 * @throws IllegalArgumentException if any of the provided values does
2852 * not have proper size, if either
2853 * turntable rotation rate or
2854 * time interval is zero or negative or
2855 * if provided quality scores length is
2856 * smaller than 10 samples.
2857 */
2858 public PROSACRobustTurntableGyroscopeCalibrator(
2859 final double[] qualityScores, final NEDPosition position, final double turntableRotationRate,
2860 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
2861 final double[] initialBias, final Matrix initialMg, final Matrix initialGg,
2862 final double[] accelerometerBias, final Matrix accelerometerMa,
2863 final RobustTurntableGyroscopeCalibratorListener listener) {
2864 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg,
2865 accelerometerBias, accelerometerMa, listener);
2866 internalSetQualityScores(qualityScores);
2867 }
2868
2869 /**
2870 * Constructor.
2871 *
2872 * @param qualityScores quality scores corresponding to each provided
2873 * measurement. The larger the score value the better
2874 * the quality of the sample.
2875 * @param position position where body kinematics measures
2876 * have been taken.
2877 * @param turntableRotationRate constant rotation rate at which the
2878 * turntable is spinning. Must be
2879 * expressed in radians per second (rad/s).
2880 * @param timeInterval time interval between measurements being
2881 * captured expressed in seconds (s).
2882 * @param measurements collection of body kinematics
2883 * measurements with standard deviations
2884 * taken at the same position with zero
2885 * velocity and unknown different
2886 * orientations.
2887 * @param initialBias initial gyroscope bias to be used to
2888 * find a solution. This must be 3x1 and
2889 * is expressed in radians per second
2890 * (rad/s).
2891 * @param initialMg initial gyroscope scale factors and
2892 * cross coupling errors matrix. Must
2893 * be 3x3.
2894 * @param initialGg initial gyroscope G-dependent cross
2895 * biases introduced on the gyroscope by
2896 * the specific forces sensed by the
2897 * accelerometer. Must be 3x3.
2898 * @param accelerometerBias known accelerometer bias. This must
2899 * have length 3 and is expressed in
2900 * meters per squared second
2901 * (m/s^2).
2902 * @param accelerometerMa known accelerometer scale factors and
2903 * cross coupling matrix. Must be 3x3.
2904 * @throws IllegalArgumentException if any of the provided values does
2905 * not have proper size, if either
2906 * turntable rotation rate or
2907 * time interval is zero or negative or
2908 * if provided quality scores length is
2909 * smaller than 10 samples.
2910 */
2911 public PROSACRobustTurntableGyroscopeCalibrator(
2912 final double[] qualityScores, final NEDPosition position, final double turntableRotationRate,
2913 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
2914 final Matrix initialBias, final Matrix initialMg, final Matrix initialGg, final Matrix accelerometerBias,
2915 final Matrix accelerometerMa) {
2916 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg,
2917 accelerometerBias, accelerometerMa);
2918 internalSetQualityScores(qualityScores);
2919 }
2920
2921 /**
2922 * Constructor.
2923 *
2924 * @param qualityScores quality scores corresponding to each provided
2925 * measurement. The larger the score value the better
2926 * the quality of the sample.
2927 * @param position position where body kinematics measures
2928 * have been taken.
2929 * @param turntableRotationRate constant rotation rate at which the
2930 * turntable is spinning. Must be
2931 * expressed in radians per second (rad/s).
2932 * @param timeInterval time interval between measurements being
2933 * captured expressed in seconds (s).
2934 * @param measurements collection of body kinematics
2935 * measurements with standard deviations
2936 * taken at the same position with zero
2937 * velocity and unknown different
2938 * orientations.
2939 * @param initialBias initial gyroscope bias to be used to
2940 * find a solution. This must be 3x1 and
2941 * is expressed in radians per second
2942 * (rad/s).
2943 * @param initialMg initial gyroscope scale factors and
2944 * cross coupling errors matrix. Must
2945 * be 3x3.
2946 * @param initialGg initial gyroscope G-dependent cross
2947 * biases introduced on the gyroscope by
2948 * the specific forces sensed by the
2949 * accelerometer. Must be 3x3.
2950 * @param accelerometerBias known accelerometer bias. This must
2951 * have length 3 and is expressed in
2952 * meters per squared second (m/s^2).
2953 * @param accelerometerMa known accelerometer scale factors and
2954 * cross coupling matrix. Must be 3x3.
2955 * @param listener listener to handle events raised by
2956 * this calibrator.
2957 * @throws IllegalArgumentException if any of the provided values does
2958 * not have proper size, if either
2959 * turntable rotation rate or
2960 * time interval is zero or negative or
2961 * if provided quality scores length is
2962 * smaller than 10 samples.
2963 */
2964 public PROSACRobustTurntableGyroscopeCalibrator(
2965 final double[] qualityScores, final NEDPosition position, final double turntableRotationRate,
2966 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
2967 final Matrix initialBias, final Matrix initialMg, final Matrix initialGg, final Matrix accelerometerBias,
2968 final Matrix accelerometerMa, final RobustTurntableGyroscopeCalibratorListener listener) {
2969 super(position, turntableRotationRate, timeInterval, measurements, initialBias, initialMg, initialGg,
2970 accelerometerBias, accelerometerMa, listener);
2971 internalSetQualityScores(qualityScores);
2972 }
2973
2974 /**
2975 * Constructor.
2976 *
2977 * @param qualityScores quality scores corresponding to each provided
2978 * measurement. The larger the score value the better
2979 * the quality of the sample.
2980 * @param position position where body kinematics
2981 * measures have been taken.
2982 * @param turntableRotationRate constant rotation rate at which
2983 * the turntable is spinning. Must
2984 * be expressed in radians per
2985 * second (rad/s).
2986 * @param timeInterval time interval between measurements
2987 * being captured expressed in
2988 * seconds (s).
2989 * @param measurements collection of body kinematics
2990 * measurements with standard
2991 * deviations taken at the same
2992 * position with zero velocity
2993 * and unknown different
2994 * orientations.
2995 * @param commonAxisUsed indicates whether z-axis is
2996 * assumed to be common for
2997 * accelerometer and gyroscope.
2998 * @param estimateGDependentCrossBiases true if G-dependent cross biases
2999 * will be estimated, false
3000 * otherwise.
3001 * @param initialBias initial gyroscope bias to be
3002 * used to find a solution. This
3003 * must be 3x1 and is expressed in
3004 * radians per second (rad/s).
3005 * @param initialMg initial gyroscope scale factors
3006 * and cross coupling errors matrix.
3007 * Must be 3x3.
3008 * @param initialGg initial gyroscope G-dependent
3009 * cross biases introduced on the
3010 * gyroscope by the specific
3011 * forces sensed by the
3012 * accelerometer. Must be 3x3.
3013 * @throws IllegalArgumentException if any of the provided values does
3014 * not have proper size, if either
3015 * turntable rotation rate or
3016 * time interval is zero or negative or
3017 * if provided quality scores length is
3018 * smaller than 10 samples.
3019 */
3020 public PROSACRobustTurntableGyroscopeCalibrator(
3021 final double[] qualityScores, final NEDPosition position, final double turntableRotationRate,
3022 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
3023 final boolean commonAxisUsed, final boolean estimateGDependentCrossBiases, final Matrix initialBias,
3024 final Matrix initialMg, final Matrix initialGg) {
3025 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
3026 estimateGDependentCrossBiases, initialBias, initialMg, initialGg);
3027 internalSetQualityScores(qualityScores);
3028 }
3029
3030 /**
3031 * Constructor.
3032 *
3033 * @param qualityScores quality scores corresponding to each provided
3034 * measurement. The larger the score value the better
3035 * the quality of the sample.
3036 * @param position position where body kinematics
3037 * measures have been taken.
3038 * @param turntableRotationRate constant rotation rate at which
3039 * the turntable is spinning. Must
3040 * be expressed in radians per
3041 * second (rad/s).
3042 * @param timeInterval time interval between measurements
3043 * being captured expressed in
3044 * seconds (s).
3045 * @param measurements collection of body kinematics
3046 * measurements with standard
3047 * deviations taken at the same
3048 * position with zero velocity and
3049 * unknown different orientations.
3050 * @param commonAxisUsed indicates whether z-axis is
3051 * assumed to be common for
3052 * accelerometer and gyroscope.
3053 * @param estimateGDependentCrossBiases true if G-dependent cross
3054 * biases will be estimated, false
3055 * otherwise.
3056 * @param initialBias initial gyroscope bias to be
3057 * used to find a solution. This
3058 * must be 3x1 and is expressed in
3059 * radians per second (rad/s).
3060 * @param initialMg initial gyroscope scale factors
3061 * and cross coupling errors
3062 * matrix. Must be 3x3.
3063 * @param initialGg initial gyroscope G-dependent
3064 * cross biases introduced on the
3065 * gyroscope by the specific
3066 * forces sensed by the
3067 * accelerometer. Must be 3x3.
3068 * @param listener listener to handle events
3069 * raised by this calibrator.
3070 * @throws IllegalArgumentException if any of the provided values does
3071 * not have proper size, if either
3072 * turntable rotation rate or
3073 * time interval is zero or negative or
3074 * if provided quality scores length is
3075 * smaller than 10 samples.
3076 */
3077 public PROSACRobustTurntableGyroscopeCalibrator(
3078 final double[] qualityScores, final NEDPosition position, final double turntableRotationRate,
3079 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
3080 final boolean commonAxisUsed, final boolean estimateGDependentCrossBiases, final Matrix initialBias,
3081 final Matrix initialMg, final Matrix initialGg, final RobustTurntableGyroscopeCalibratorListener listener) {
3082 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
3083 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, listener);
3084 internalSetQualityScores(qualityScores);
3085 }
3086
3087 /**
3088 * Constructor.
3089 *
3090 * @param qualityScores quality scores corresponding to each provided
3091 * measurement. The larger the score value the better
3092 * the quality of the sample.
3093 * @param position position where body kinematics
3094 * measures have been taken.
3095 * @param turntableRotationRate constant rotation rate at which
3096 * the turntable is spinning. Must
3097 * be expressed in radians per
3098 * second (rad/s).
3099 * @param timeInterval time interval between measurements
3100 * being captured expressed in
3101 * seconds (s).
3102 * @param measurements collection of body kinematics
3103 * measurements with standard
3104 * deviations taken at the same
3105 * position with zero velocity
3106 * and unknown different
3107 * orientations.
3108 * @param commonAxisUsed indicates whether z-axis is
3109 * assumed to be common for
3110 * accelerometer and gyroscope.
3111 * @param estimateGDependentCrossBiases true if G-dependent cross biases
3112 * will be estimated, false
3113 * otherwise.
3114 * @param initialBias initial gyroscope bias to be
3115 * used to find a solution. This
3116 * must have length 3 and is
3117 * expressed in radians per second
3118 * (rad/s).
3119 * @param initialMg initial gyroscope scale factors
3120 * and cross coupling errors matrix.
3121 * Must be 3x3.
3122 * @param initialGg initial gyroscope G-dependent
3123 * cross biases introduced on the
3124 * gyroscope by the specific forces
3125 * sensed by the accelerometer.
3126 * Must be 3x3.
3127 * @throws IllegalArgumentException if any of the provided values does
3128 * not have proper size, if either
3129 * turntable rotation rate or
3130 * time interval is zero or negative or
3131 * if provided quality scores length is
3132 * smaller than 10 samples.
3133 */
3134 public PROSACRobustTurntableGyroscopeCalibrator(
3135 final double[] qualityScores, final NEDPosition position, final double turntableRotationRate,
3136 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
3137 final boolean commonAxisUsed, final boolean estimateGDependentCrossBiases, final double[] initialBias,
3138 final Matrix initialMg, final Matrix initialGg) {
3139 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
3140 estimateGDependentCrossBiases, initialBias, initialMg, initialGg);
3141 internalSetQualityScores(qualityScores);
3142 }
3143
3144 /**
3145 * Constructor.
3146 *
3147 * @param qualityScores quality scores corresponding to each provided
3148 * measurement. The larger the score value the better
3149 * the quality of the sample.
3150 * @param position position where body kinematics
3151 * measures have been taken.
3152 * @param turntableRotationRate constant rotation rate at which
3153 * the turntable is spinning. Must
3154 * be expressed in radians per
3155 * second (rad/s).
3156 * @param timeInterval time interval between measurements
3157 * being captured expressed in
3158 * seconds (s).
3159 * @param measurements collection of body kinematics
3160 * measurements with standard
3161 * deviations taken at the same
3162 * position with zero velocity
3163 * and unknown different
3164 * orientations.
3165 * @param commonAxisUsed indicates whether z-axis is
3166 * assumed to be common for
3167 * accelerometer and gyroscope.
3168 * @param estimateGDependentCrossBiases true if G-dependent cross biases
3169 * will be estimated, false
3170 * otherwise.
3171 * @param initialBias initial gyroscope bias to be
3172 * used to find a solution. This
3173 * must have length 3 and is
3174 * expressed in radians per second
3175 * (rad/s).
3176 * @param initialMg initial gyroscope scale factors
3177 * and cross coupling errors
3178 * matrix. Must be 3x3.
3179 * @param initialGg initial gyroscope G-dependent
3180 * cross biases introduced on the
3181 * gyroscope by the specific forces
3182 * sensed by the accelerometer.
3183 * Must be 3x3.
3184 * @param listener listener to handle events raised
3185 * by this calibrator.
3186 * @throws IllegalArgumentException if any of the provided values does
3187 * not have proper size, if either
3188 * turntable rotation rate or
3189 * time interval is zero or negative or
3190 * if provided quality scores length is
3191 * smaller than 10 samples.
3192 */
3193 public PROSACRobustTurntableGyroscopeCalibrator(
3194 final double[] qualityScores, final NEDPosition position, final double turntableRotationRate,
3195 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
3196 final boolean commonAxisUsed, final boolean estimateGDependentCrossBiases, final double[] initialBias,
3197 final Matrix initialMg, final Matrix initialGg, final RobustTurntableGyroscopeCalibratorListener listener) {
3198 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
3199 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, listener);
3200 internalSetQualityScores(qualityScores);
3201 }
3202
3203 /**
3204 * Constructor.
3205 *
3206 * @param qualityScores quality scores corresponding to each provided
3207 * measurement. The larger the score value the better
3208 * the quality of the sample.
3209 * @param position position where body kinematics
3210 * measures have been taken.
3211 * @param turntableRotationRate constant rotation rate at which
3212 * the turntable is spinning. Must
3213 * be expressed in radians per
3214 * second (rad/s).
3215 * @param timeInterval time interval between measurements
3216 * being captured expressed in
3217 * seconds (s).
3218 * @param measurements collection of body kinematics
3219 * measurements with standard
3220 * deviations taken at the same
3221 * position with zero velocity
3222 * and unknown different
3223 * orientations.
3224 * @param commonAxisUsed indicates whether z-axis is
3225 * assumed to be common for
3226 * accelerometer and gyroscope.
3227 * @param estimateGDependentCrossBiases true if G-dependent cross
3228 * biases will be estimated,
3229 * false otherwise.
3230 * @param initialBias initial gyroscope bias to be
3231 * used to find a solution. This
3232 * must have length 3 and is
3233 * expressed in radians per second
3234 * (rad/s).
3235 * @param initialMg initial gyroscope scale factors
3236 * and cross coupling errors
3237 * matrix. Must be 3x3.
3238 * @param initialGg initial gyroscope G-dependent
3239 * cross biases introduced on the
3240 * gyroscope by the specific forces
3241 * sensed by the accelerometer.
3242 * Must be 3x3.
3243 * @param accelerometerBias known accelerometer bias. This
3244 * must have length 3 and is
3245 * expressed in meters per squared
3246 * second (m/s^2).
3247 * @param accelerometerMa known accelerometer scale factors
3248 * and cross coupling matrix. Must
3249 * be 3x3.
3250 * @throws IllegalArgumentException if any of the provided values does
3251 * not have proper size, if either
3252 * turntable rotation rate or
3253 * time interval is zero or negative or
3254 * if provided quality scores length is
3255 * smaller than 10 samples.
3256 */
3257 public PROSACRobustTurntableGyroscopeCalibrator(
3258 final double[] qualityScores, final NEDPosition position, final double turntableRotationRate,
3259 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
3260 final boolean commonAxisUsed, final boolean estimateGDependentCrossBiases, final double[] initialBias,
3261 final Matrix initialMg, final Matrix initialGg, final double[] accelerometerBias,
3262 final Matrix accelerometerMa) {
3263 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
3264 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, accelerometerBias, accelerometerMa);
3265 internalSetQualityScores(qualityScores);
3266 }
3267
3268 /**
3269 * Constructor.
3270 *
3271 * @param qualityScores quality scores corresponding to each provided
3272 * measurement. The larger the score value the better
3273 * the quality of the sample.
3274 * @param position position where body kinematics
3275 * measures have been taken.
3276 * @param turntableRotationRate constant rotation rate at which
3277 * the turntable is spinning. Must
3278 * be expressed in radians per
3279 * second (rad/s).
3280 * @param timeInterval time interval between measurements
3281 * being captured expressed in
3282 * seconds (s).
3283 * @param measurements collection of body kinematics
3284 * measurements with standard
3285 * deviations taken at the same
3286 * position with zero velocity
3287 * and unknown different
3288 * orientations.
3289 * @param commonAxisUsed indicates whether z-axis is
3290 * assumed to be common for
3291 * accelerometer and gyroscope.
3292 * @param estimateGDependentCrossBiases true if G-dependent cross biases
3293 * will be estimated, false
3294 * otherwise.
3295 * @param initialBias initial gyroscope bias to be used
3296 * to find a solution. This must
3297 * have length 3 and is expressed
3298 * in radians per second (rad/s).
3299 * @param initialMg initial gyroscope scale factors
3300 * and cross coupling errors matrix.
3301 * Must be 3x3.
3302 * @param initialGg initial gyroscope G-dependent
3303 * cross biases introduced on the
3304 * gyroscope by the specific forces
3305 * sensed by the accelerometer. Must
3306 * be 3x3.
3307 * @param accelerometerBias known accelerometer bias. This
3308 * must have length 3 and is
3309 * expressed in meters per squared
3310 * second (m/s^2).
3311 * @param accelerometerMa known accelerometer scale factors
3312 * and cross coupling matrix. Must
3313 * be 3x3.
3314 * @param listener listener to handle events raised
3315 * by this calibrator.
3316 * @throws IllegalArgumentException if any of the provided values does
3317 * not have proper size, if either
3318 * turntable rotation rate or
3319 * time interval is zero or negative or
3320 * if provided quality scores length is
3321 * smaller than 10 samples.
3322 */
3323 public PROSACRobustTurntableGyroscopeCalibrator(
3324 final double[] qualityScores, final NEDPosition position, final double turntableRotationRate,
3325 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
3326 final boolean commonAxisUsed, final boolean estimateGDependentCrossBiases, final double[] initialBias,
3327 final Matrix initialMg, final Matrix initialGg, final double[] accelerometerBias,
3328 final Matrix accelerometerMa, final RobustTurntableGyroscopeCalibratorListener listener) {
3329 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
3330 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, accelerometerBias, accelerometerMa,
3331 listener);
3332 internalSetQualityScores(qualityScores);
3333 }
3334
3335 /**
3336 * Constructor.
3337 *
3338 * @param qualityScores quality scores corresponding to each provided
3339 * measurement. The larger the score value the better
3340 * the quality of the sample.
3341 * @param position position where body kinematics
3342 * measures have been taken.
3343 * @param turntableRotationRate constant rotation rate at which
3344 * the turntable is spinning. Must
3345 * be expressed in radians per
3346 * second (rad/s).
3347 * @param timeInterval time interval between measurements
3348 * being captured expressed in
3349 * seconds (s).
3350 * @param measurements collection of body kinematics
3351 * measurements with standard
3352 * deviations taken at the same
3353 * position with zero velocity and
3354 * unknown different orientations.
3355 * @param commonAxisUsed indicates whether z-axis is
3356 * assumed to be common for
3357 * accelerometer and gyroscope.
3358 * @param estimateGDependentCrossBiases true if G-dependent cross biases
3359 * will be estimated, false
3360 * otherwise.
3361 * @param initialBias initial gyroscope bias to be
3362 * used to find a solution. This
3363 * must be 3x1 and is expressed in
3364 * radians per second (rad/s).
3365 * @param initialMg initial gyroscope scale factors
3366 * and cross coupling errors matrix.
3367 * Must be 3x3.
3368 * @param initialGg initial gyroscope G-dependent
3369 * cross biases introduced on the
3370 * gyroscope by the specific forces
3371 * sensed by the accelerometer. Must
3372 * be 3x3.
3373 * @param accelerometerBias known accelerometer bias. This
3374 * must have length 3 and is
3375 * expressed in meters per squared
3376 * second (m/s^2).
3377 * @param accelerometerMa known accelerometer scale factors
3378 * and cross coupling matrix. Must
3379 * be 3x3.
3380 * @throws IllegalArgumentException if any of the provided values does
3381 * not have proper size, if either
3382 * turntable rotation rate or
3383 * time interval is zero or negative or
3384 * if provided quality scores length is
3385 * smaller than 10 samples.
3386 */
3387 public PROSACRobustTurntableGyroscopeCalibrator(
3388 final double[] qualityScores, final NEDPosition position, final double turntableRotationRate,
3389 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
3390 final boolean commonAxisUsed, final boolean estimateGDependentCrossBiases, final Matrix initialBias,
3391 final Matrix initialMg, final Matrix initialGg, final Matrix accelerometerBias,
3392 final Matrix accelerometerMa) {
3393 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
3394 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, accelerometerBias, accelerometerMa);
3395 internalSetQualityScores(qualityScores);
3396 }
3397
3398 /**
3399 * Constructor.
3400 *
3401 * @param qualityScores quality scores corresponding to each provided
3402 * measurement. The larger the score value the better
3403 * the quality of the sample.
3404 * @param position position where body kinematics
3405 * measures have been taken.
3406 * @param turntableRotationRate constant rotation rate at which
3407 * the turntable is spinning. Must
3408 * be expressed in radians per
3409 * second (rad/s).
3410 * @param timeInterval time interval between measurements
3411 * being captured expressed in
3412 * seconds (s).
3413 * @param measurements collection of body kinematics
3414 * measurements with standard
3415 * deviations taken at the same
3416 * position with zero velocity and
3417 * unknown different orientations.
3418 * @param commonAxisUsed indicates whether z-axis is
3419 * assumed to be common for
3420 * accelerometer and gyroscope.
3421 * @param estimateGDependentCrossBiases true if G-dependent cross biases
3422 * will be estimated, false
3423 * otherwise.
3424 * @param initialBias initial gyroscope bias to be used
3425 * to find a solution. This must be
3426 * 3x1 and is expressed in radians
3427 * per second (rad/s).
3428 * @param initialMg initial gyroscope scale factors
3429 * and cross coupling errors matrix.
3430 * Must be 3x3.
3431 * @param initialGg initial gyroscope G-dependent
3432 * cross biases introduced on the
3433 * gyroscope by the specific forces
3434 * sensed by the accelerometer. Must
3435 * be 3x3.
3436 * @param accelerometerBias known accelerometer bias. This
3437 * must have length 3 and is
3438 * expressed in meters per squared
3439 * second (m/s^2).
3440 * @param accelerometerMa known accelerometer scale factors
3441 * and cross coupling matrix. Must
3442 * be 3x3.
3443 * @param listener listener to handle events raised
3444 * by this calibrator.
3445 * @throws IllegalArgumentException if any of the provided values does
3446 * not have proper size, if either
3447 * turntable rotation rate or
3448 * time interval is zero or negative or
3449 * if provided quality scores length is
3450 * smaller than 10 samples.
3451 */
3452 public PROSACRobustTurntableGyroscopeCalibrator(
3453 final double[] qualityScores, final NEDPosition position, final double turntableRotationRate,
3454 final double timeInterval, final List<StandardDeviationBodyKinematics> measurements,
3455 final boolean commonAxisUsed, final boolean estimateGDependentCrossBiases, final Matrix initialBias,
3456 final Matrix initialMg, final Matrix initialGg, final Matrix accelerometerBias,
3457 final Matrix accelerometerMa, final RobustTurntableGyroscopeCalibratorListener listener) {
3458 super(position, turntableRotationRate, timeInterval, measurements, commonAxisUsed,
3459 estimateGDependentCrossBiases, initialBias, initialMg, initialGg, accelerometerBias, accelerometerMa,
3460 listener);
3461 internalSetQualityScores(qualityScores);
3462 }
3463
3464 /**
3465 * Gets threshold to determine whether samples are inliers or not when testing possible solutions.
3466 * The threshold refers to the amount of error on norm between measured specific forces and the
3467 * ones generated with estimated calibration parameters provided for each sample.
3468 *
3469 * @return threshold to determine whether samples are inliers or not.
3470 */
3471 public double getThreshold() {
3472 return threshold;
3473 }
3474
3475 /**
3476 * Sets threshold to determine whether samples are inliers or not when testing possible solutions.
3477 * The threshold refers to the amount of error on norm between measured specific forces and the
3478 * ones generated with estimated calibration parameters provided for each sample.
3479 *
3480 * @param threshold threshold to determine whether samples are inliers or not.
3481 * @throws IllegalArgumentException if provided value is equal or less than zero.
3482 * @throws LockedException if calibrator is currently running.
3483 */
3484 public void setThreshold(final double threshold) throws LockedException {
3485 if (running) {
3486 throw new LockedException();
3487 }
3488 if (threshold <= MIN_THRESHOLD) {
3489 throw new IllegalArgumentException();
3490 }
3491 this.threshold = threshold;
3492 }
3493
3494 /**
3495 * Returns quality scores corresponding to each provided sample.
3496 * The larger the score value the better the quality of the sample.
3497 *
3498 * @return quality scores corresponding to each sample.
3499 */
3500 @Override
3501 public double[] getQualityScores() {
3502 return qualityScores;
3503 }
3504
3505 /**
3506 * Sets quality scores corresponding to each provided sample.
3507 * The larger the score value the better the quality of the sample.
3508 *
3509 * @param qualityScores quality scores corresponding to each sample.
3510 * @throws IllegalArgumentException if provided quality scores length
3511 * is smaller than minimum required samples.
3512 * @throws LockedException if calibrator is currently running.
3513 */
3514 @Override
3515 public void setQualityScores(final double[] qualityScores) throws LockedException {
3516 if (running) {
3517 throw new LockedException();
3518 }
3519 internalSetQualityScores(qualityScores);
3520 }
3521
3522 /**
3523 * Indicates whether calibrator is ready to find a solution.
3524 *
3525 * @return true if calibrator is ready, false otherwise.
3526 */
3527 @Override
3528 public boolean isReady() {
3529 return super.isReady() && qualityScores != null && qualityScores.length == measurements.size();
3530 }
3531
3532 /**
3533 * Indicates whether inliers must be computed and kept.
3534 *
3535 * @return true if inliers must be computed and kept, false if inliers
3536 * only need to be computed but not kept.
3537 */
3538 public boolean isComputeAndKeepInliersEnabled() {
3539 return computeAndKeepInliers;
3540 }
3541
3542 /**
3543 * Specifies whether inliers must be computed and kept.
3544 *
3545 * @param computeAndKeepInliers true if inliers must be computed and kept,
3546 * false if inliers only need to be computed but not kept.
3547 * @throws LockedException if calibrator is currently running.
3548 */
3549 public void setComputeAndKeepInliersEnabled(final boolean computeAndKeepInliers) throws LockedException {
3550 if (running) {
3551 throw new LockedException();
3552 }
3553 this.computeAndKeepInliers = computeAndKeepInliers;
3554 }
3555
3556 /**
3557 * Indicates whether residuals must be computed and kept.
3558 *
3559 * @return true if residuals must be computed and kept, false if residuals
3560 * only need to be computed but not kept.
3561 */
3562 public boolean isComputeAndKeepResiduals() {
3563 return computeAndKeepResiduals;
3564 }
3565
3566 /**
3567 * Specifies whether residuals must be computed and kept.
3568 *
3569 * @param computeAndKeepResiduals true if residuals must be computed and kept,
3570 * false if residuals only need to be computed but not kept.
3571 * @throws LockedException if calibrator is currently running.
3572 */
3573 public void setComputeAndKeepResidualsEnabled(final boolean computeAndKeepResiduals) throws LockedException {
3574 if (running) {
3575 throw new LockedException();
3576 }
3577 this.computeAndKeepResiduals = computeAndKeepResiduals;
3578 }
3579
3580 /**
3581 * Estimates gyroscope calibration parameters containing bias, scale factors
3582 * cross-coupling errors and g-dependant cross biases.
3583 *
3584 * @throws LockedException if calibrator is currently running.
3585 * @throws NotReadyException if calibrator is not ready.
3586 * @throws CalibrationException if estimation fails for numerical reasons.
3587 */
3588 @Override
3589 public void calibrate() throws LockedException, NotReadyException, CalibrationException {
3590 if (running) {
3591 throw new LockedException();
3592 }
3593 if (!isReady()) {
3594 throw new NotReadyException();
3595 }
3596
3597 final var innerEstimator = new PROSACRobustEstimator<>(new PROSACRobustEstimatorListener<PreliminaryResult>() {
3598 @Override
3599 public double[] getQualityScores() {
3600 return qualityScores;
3601 }
3602
3603 @Override
3604 public double getThreshold() {
3605 return threshold;
3606 }
3607
3608 @Override
3609 public int getTotalSamples() {
3610 return measurements.size();
3611 }
3612
3613 @Override
3614 public int getSubsetSize() {
3615 return preliminarySubsetSize;
3616 }
3617
3618 @Override
3619 public void estimatePreliminarSolutions(
3620 final int[] samplesIndices, final List<PreliminaryResult> solutions) {
3621 computePreliminarySolutions(samplesIndices, solutions);
3622 }
3623
3624 @Override
3625 public double computeResidual(final PreliminaryResult currentEstimation, final int i) {
3626 return computeError(measurements.get(i), currentEstimation);
3627 }
3628
3629 @Override
3630 public boolean isReady() {
3631 return PROSACRobustTurntableGyroscopeCalibrator.this.isReady();
3632 }
3633
3634 @Override
3635 public void onEstimateStart(final RobustEstimator<PreliminaryResult> estimator) {
3636 // no action needed
3637 }
3638
3639 @Override
3640 public void onEstimateEnd(final RobustEstimator<PreliminaryResult> estimator) {
3641 // no action needed
3642 }
3643
3644 @Override
3645 public void onEstimateNextIteration(
3646 final RobustEstimator<PreliminaryResult> estimator, final int iteration) {
3647 if (listener != null) {
3648 listener.onCalibrateNextIteration(
3649 PROSACRobustTurntableGyroscopeCalibrator.this, iteration);
3650 }
3651 }
3652
3653 @Override
3654 public void onEstimateProgressChange(
3655 final RobustEstimator<PreliminaryResult> estimator, final float progress) {
3656 if (listener != null) {
3657 listener.onCalibrateProgressChange(
3658 PROSACRobustTurntableGyroscopeCalibrator.this, progress);
3659 }
3660 }
3661 });
3662
3663 try {
3664 running = true;
3665
3666 if (listener != null) {
3667 listener.onCalibrateStart(this);
3668 }
3669
3670 inliersData = null;
3671 innerEstimator.setComputeAndKeepInliersEnabled(computeAndKeepInliers || refineResult);
3672 innerEstimator.setComputeAndKeepResidualsEnabled(computeAndKeepResiduals || refineResult);
3673 innerEstimator.setConfidence(confidence);
3674 innerEstimator.setMaxIterations(maxIterations);
3675 innerEstimator.setProgressDelta(progressDelta);
3676 final var preliminaryResult = innerEstimator.estimate();
3677 inliersData = innerEstimator.getInliersData();
3678
3679 attemptRefine(preliminaryResult);
3680
3681 if (listener != null) {
3682 listener.onCalibrateEnd(this);
3683 }
3684
3685 } catch (final com.irurueta.numerical.LockedException e) {
3686 throw new LockedException(e);
3687 } catch (final com.irurueta.numerical.NotReadyException e) {
3688 throw new NotReadyException(e);
3689 } catch (final RobustEstimatorException e) {
3690 throw new CalibrationException(e);
3691 } finally {
3692 running = false;
3693 }
3694 }
3695
3696 /**
3697 * Returns method being used for robust estimation.
3698 *
3699 * @return method being used for robust estimation.
3700 */
3701 @Override
3702 public RobustEstimatorMethod getMethod() {
3703 return RobustEstimatorMethod.PROSAC;
3704 }
3705
3706 /**
3707 * Indicates whether this calibrator requires quality scores for each
3708 * measurement/sequence or not.
3709 *
3710 * @return true if quality scores are required, false otherwise.
3711 */
3712 @Override
3713 public boolean isQualityScoresRequired() {
3714 return true;
3715 }
3716
3717 /**
3718 * Sets quality scores corresponding to each provided sample.
3719 * This method is used internally and does not check whether instance is
3720 * locked or not.
3721 *
3722 * @param qualityScores quality scores to be set.
3723 * @throws IllegalArgumentException if provided quality scores length
3724 * is smaller than 4 samples.
3725 */
3726 private void internalSetQualityScores(final double[] qualityScores) {
3727 if (qualityScores == null
3728 || qualityScores.length < TurntableGyroscopeCalibrator.MINIMUM_MEASUREMENTS_COMMON_Z_AXIS) {
3729 throw new IllegalArgumentException();
3730 }
3731
3732 this.qualityScores = qualityScores;
3733 }
3734 }