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