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