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