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.accelerometer;
17
18 import com.irurueta.algebra.Matrix;
19 import com.irurueta.navigation.LockedException;
20 import com.irurueta.navigation.frames.ECEFPosition;
21 import com.irurueta.navigation.frames.ECEFVelocity;
22 import com.irurueta.navigation.frames.NEDPosition;
23 import com.irurueta.navigation.frames.NEDVelocity;
24 import com.irurueta.navigation.frames.converters.ECEFtoNEDPositionVelocityConverter;
25 import com.irurueta.navigation.frames.converters.NEDtoECEFPositionVelocityConverter;
26 import com.irurueta.navigation.inertial.calibration.StandardDeviationBodyKinematics;
27 import com.irurueta.navigation.inertial.estimators.ECEFGravityEstimator;
28 import com.irurueta.units.Acceleration;
29
30 import java.util.Collection;
31
32 /**
33 * Estimates accelerometer cross couplings and scaling factors when accelerometer biases
34 * are known.
35 * This calibrator uses Levenberg-Marquardt to find a minimum least squared error
36 * solution.
37 * <p>
38 * To use this calibrator at least 7 measurements taken at a single known position must
39 * be taken at 7 different unknown orientations and zero velocity when common z-axis
40 * is assumed, otherwise at least 10 measurements are required.
41 * <p>
42 * Measured specific force is assumed to follow the model shown below:
43 * <pre>
44 * fmeas = ba + (I + Ma) * ftrue + w
45 * </pre>
46 * Where:
47 * - fmeas is the measured specific force. This is a 3x1 vector.
48 * - ba is accelerometer bias, which is known. This is a 3x1 vector.
49 * - I is the 3x3 identity matrix.
50 * - Ma is the 3x3 matrix containing cross-couplings and scaling factors. Ideally, on
51 * a perfect accelerometer, this should be a 3x3 zero matrix.
52 * - ftrue is ground-truth specific force.
53 * - w is measurement noise.
54 */
55 public class KnownBiasAndPositionAccelerometerCalibrator extends
56 BaseBiasGravityNormAccelerometerCalibrator<KnownBiasAndPositionAccelerometerCalibrator,
57 KnownBiasAndPositionAccelerometerCalibrationListener> {
58
59 /**
60 * Position where body kinematics measures have been taken.
61 */
62 private ECEFPosition position;
63
64 /**
65 * Constructor.
66 */
67 public KnownBiasAndPositionAccelerometerCalibrator() {
68 super();
69 }
70
71 /**
72 * Constructor.
73 *
74 * @param listener listener to handle events raised by this calibrator.
75 */
76 public KnownBiasAndPositionAccelerometerCalibrator(
77 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
78 super(listener);
79 }
80
81 /**
82 * Constructor.
83 *
84 * @param measurements collection of body kinematics measurements with standard
85 * deviations taken at the same position with zero velocity
86 * and unknown different orientations.
87 */
88 public KnownBiasAndPositionAccelerometerCalibrator(final Collection<StandardDeviationBodyKinematics> measurements) {
89 super(measurements);
90 }
91
92 /**
93 * Constructor.
94 *
95 * @param measurements collection of body kinematics measurements with standard
96 * deviations taken at the same position with zero velocity
97 * and unknown different orientations.
98 * @param listener listener to handle events raised by this calibrator.
99 */
100 public KnownBiasAndPositionAccelerometerCalibrator(
101 final Collection<StandardDeviationBodyKinematics> measurements,
102 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
103 super(measurements, listener);
104 }
105
106 /**
107 * Constructor.
108 *
109 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
110 * accelerometer and gyroscope.
111 */
112 public KnownBiasAndPositionAccelerometerCalibrator(final boolean commonAxisUsed) {
113 super(commonAxisUsed);
114 }
115
116 /**
117 * Constructor.
118 *
119 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
120 * accelerometer and gyroscope.
121 * @param listener listener to handle events raised by this calibrator.
122 */
123 public KnownBiasAndPositionAccelerometerCalibrator(
124 final boolean commonAxisUsed,
125 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
126 super(commonAxisUsed, listener);
127 }
128
129 /**
130 * Constructor.
131 *
132 * @param measurements collection of body kinematics measurements with standard
133 * deviations taken at the same position with zero velocity
134 * and unknown different orientations.
135 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
136 * accelerometer and gyroscope.
137 */
138 public KnownBiasAndPositionAccelerometerCalibrator(
139 final Collection<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed) {
140 super(measurements, commonAxisUsed);
141 }
142
143 /**
144 * Constructor.
145 *
146 * @param measurements collection of body kinematics measurements with standard
147 * deviations taken at the same position with zero velocity
148 * and unknown different orientations.
149 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
150 * accelerometer and gyroscope.
151 * @param listener listener to handle events raised by this calibrator.
152 */
153 public KnownBiasAndPositionAccelerometerCalibrator(
154 final Collection<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
155 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
156 super(measurements, commonAxisUsed, listener);
157 }
158
159 /**
160 * Constructor.
161 *
162 * @param biasX x-coordinate of accelerometer bias.
163 * This is expressed in meters per squared second (m/s^2).
164 * @param biasY y-coordinate of accelerometer bias.
165 * This is expressed in meters per squared second (m/s^2).
166 * @param biasZ z-coordinate of accelerometer bias.
167 * This is expressed in meters per squared second (m/s^2).
168 */
169 public KnownBiasAndPositionAccelerometerCalibrator(
170 final double biasX, final double biasY, final double biasZ) {
171 super(biasX, biasY, biasZ);
172 }
173
174 /**
175 * Constructor.
176 *
177 * @param biasX x-coordinate of accelerometer bias.
178 * This is expressed in meters per squared second (m/s^2).
179 * @param biasY y-coordinate of accelerometer bias.
180 * This is expressed in meters per squared second (m/s^2).
181 * @param biasZ z-coordinate of accelerometer bias.
182 * This is expressed in meters per squared second (m/s^2).
183 * @param listener listener to handle events raised by this calibrator.
184 */
185 public KnownBiasAndPositionAccelerometerCalibrator(
186 final double biasX, final double biasY, final double biasZ,
187 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
188 super(biasX, biasY, biasZ, listener);
189 }
190
191 /**
192 * Constructor.
193 *
194 * @param measurements collection of body kinematics measurements with standard
195 * deviations taken at the same position with zero velocity
196 * and unknown different orientations.
197 * @param biasX x-coordinate of accelerometer bias.
198 * This is expressed in meters per squared second (m/s^2).
199 * @param biasY y-coordinate of accelerometer bias.
200 * This is expressed in meters per squared second (m/s^2).
201 * @param biasZ z-coordinate of accelerometer bias.
202 * This is expressed in meters per squared second (m/s^2).
203 */
204 public KnownBiasAndPositionAccelerometerCalibrator(
205 final Collection<StandardDeviationBodyKinematics> measurements,
206 final double biasX, final double biasY, final double biasZ) {
207 super(measurements, biasX, biasY, biasZ);
208 }
209
210 /**
211 * Constructor.
212 *
213 * @param measurements collection of body kinematics measurements with standard
214 * deviations taken at the same position with zero velocity
215 * and unknown different orientations.
216 * @param biasX x-coordinate of accelerometer bias.
217 * This is expressed in meters per squared second (m/s^2).
218 * @param biasY y-coordinate of accelerometer bias.
219 * This is expressed in meters per squared second (m/s^2).
220 * @param biasZ z-coordinate of accelerometer bias.
221 * This is expressed in meters per squared second (m/s^2).
222 * @param listener listener to handle events raised by this calibrator.
223 */
224 public KnownBiasAndPositionAccelerometerCalibrator(
225 final Collection<StandardDeviationBodyKinematics> measurements,
226 final double biasX, final double biasY, final double biasZ,
227 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
228 super(measurements, biasX, biasY, biasZ, listener);
229 }
230
231 /**
232 * Constructor.
233 *
234 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
235 * accelerometer and gyroscope.
236 * @param biasX x-coordinate of accelerometer bias.
237 * This is expressed in meters per squared second (m/s^2).
238 * @param biasY y-coordinate of accelerometer bias.
239 * This is expressed in meters per squared second (m/s^2).
240 * @param biasZ z-coordinate of accelerometer bias.
241 * This is expressed in meters per squared second (m/s^2).
242 */
243 public KnownBiasAndPositionAccelerometerCalibrator(
244 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ) {
245 super(commonAxisUsed, biasX, biasY, biasZ);
246 }
247
248 /**
249 * Constructor.
250 *
251 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
252 * accelerometer and gyroscope.
253 * @param biasX x-coordinate of accelerometer bias.
254 * This is expressed in meters per squared second (m/s^2).
255 * @param biasY y-coordinate of accelerometer bias.
256 * This is expressed in meters per squared second (m/s^2).
257 * @param biasZ z-coordinate of accelerometer bias.
258 * This is expressed in meters per squared second (m/s^2).
259 * @param listener listener to handle events raised by this calibrator.
260 */
261 public KnownBiasAndPositionAccelerometerCalibrator(
262 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ,
263 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
264 super(commonAxisUsed, biasX, biasY, biasZ, listener);
265 }
266
267 /**
268 * Constructor.
269 *
270 * @param measurements collection of body kinematics measurements with standard
271 * deviations taken at the same position with zero velocity
272 * and unknown different orientations.
273 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
274 * accelerometer and gyroscope.
275 * @param biasX x-coordinate of accelerometer bias.
276 * This is expressed in meters per squared second (m/s^2).
277 * @param biasY y-coordinate of accelerometer bias.
278 * This is expressed in meters per squared second (m/s^2).
279 * @param biasZ z-coordinate of accelerometer bias.
280 * This is expressed in meters per squared second (m/s^2).
281 */
282 public KnownBiasAndPositionAccelerometerCalibrator(
283 final Collection<StandardDeviationBodyKinematics> measurements,
284 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ) {
285 super(measurements, commonAxisUsed, biasX, biasY, biasZ);
286 }
287
288 /**
289 * Constructor.
290 *
291 * @param measurements collection of body kinematics measurements with standard
292 * deviations taken at the same position with zero velocity
293 * and unknown different orientations.
294 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
295 * accelerometer and gyroscope.
296 * @param biasX x-coordinate of accelerometer bias.
297 * This is expressed in meters per squared second (m/s^2).
298 * @param biasY y-coordinate of accelerometer bias.
299 * This is expressed in meters per squared second (m/s^2).
300 * @param biasZ z-coordinate of accelerometer bias.
301 * This is expressed in meters per squared second (m/s^2).
302 * @param listener listener to handle events raised by this calibrator.
303 */
304 public KnownBiasAndPositionAccelerometerCalibrator(
305 final Collection<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
306 final double biasX, final double biasY, final double biasZ,
307 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
308 super(measurements, commonAxisUsed, biasX, biasY, biasZ, listener);
309 }
310
311 /**
312 * Constructor.
313 *
314 * @param biasX x-coordinate of accelerometer bias.
315 * @param biasY y-coordinate of accelerometer bias.
316 * @param biasZ z-coordinate of accelerometer bias.
317 */
318 public KnownBiasAndPositionAccelerometerCalibrator(
319 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ) {
320 super(biasX, biasY, biasZ);
321 }
322
323 /**
324 * Constructor.
325 *
326 * @param biasX x-coordinate of accelerometer bias.
327 * @param biasY y-coordinate of accelerometer bias.
328 * @param biasZ z-coordinate of accelerometer bias.
329 * @param listener listener to handle events raised by this calibrator.
330 */
331 public KnownBiasAndPositionAccelerometerCalibrator(
332 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
333 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
334 super(biasX, biasY, biasZ, listener);
335 }
336
337 /**
338 * Constructor.
339 *
340 * @param measurements collection of body kinematics measurements with standard
341 * deviations taken at the same position with zero velocity
342 * and unknown different orientations.
343 * @param biasX x-coordinate of accelerometer bias.
344 * @param biasY y-coordinate of accelerometer bias.
345 * @param biasZ z-coordinate of accelerometer bias.
346 */
347 public KnownBiasAndPositionAccelerometerCalibrator(
348 final Collection<StandardDeviationBodyKinematics> measurements,
349 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ) {
350 super(measurements, biasX, biasY, biasZ);
351 }
352
353 /**
354 * Constructor.
355 *
356 * @param measurements collection of body kinematics measurements with standard
357 * deviations taken at the same position with zero velocity
358 * and unknown different orientations.
359 * @param biasX x-coordinate of accelerometer bias.
360 * @param biasY y-coordinate of accelerometer bias.
361 * @param biasZ z-coordinate of accelerometer bias.
362 * @param listener listener to handle events raised by this calibrator.
363 */
364 public KnownBiasAndPositionAccelerometerCalibrator(
365 final Collection<StandardDeviationBodyKinematics> measurements,
366 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
367 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
368 super(measurements, biasX, biasY, biasZ, listener);
369 }
370
371 /**
372 * Constructor.
373 *
374 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
375 * accelerometer and gyroscope.
376 * @param biasX x-coordinate of accelerometer bias.
377 * @param biasY y-coordinate of accelerometer bias.
378 * @param biasZ z-coordinate of accelerometer bias.
379 */
380 public KnownBiasAndPositionAccelerometerCalibrator(
381 final boolean commonAxisUsed, final Acceleration biasX,
382 final Acceleration biasY, final Acceleration biasZ) {
383 super(commonAxisUsed, biasX, biasY, biasZ);
384 }
385
386 /**
387 * Constructor.
388 *
389 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
390 * accelerometer and gyroscope.
391 * @param biasX x-coordinate of accelerometer bias.
392 * @param biasY y-coordinate of accelerometer bias.
393 * @param biasZ z-coordinate of accelerometer bias.
394 * @param listener listener to handle events raised by this calibrator.
395 */
396 public KnownBiasAndPositionAccelerometerCalibrator(
397 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
398 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
399 super(commonAxisUsed, biasX, biasY, biasZ, listener);
400 }
401
402 /**
403 * Constructor.
404 *
405 * @param measurements collection of body kinematics measurements with standard
406 * deviations taken at the same position with zero velocity
407 * and unknown different orientations.
408 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
409 * accelerometer and gyroscope.
410 * @param biasX x-coordinate of accelerometer bias.
411 * @param biasY y-coordinate of accelerometer bias.
412 * @param biasZ z-coordinate of accelerometer bias.
413 */
414 public KnownBiasAndPositionAccelerometerCalibrator(
415 final Collection<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
416 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ) {
417 super(measurements, commonAxisUsed, biasX, biasY, biasZ);
418 }
419
420 /**
421 * Constructor.
422 *
423 * @param measurements collection of body kinematics measurements with standard
424 * deviations taken at the same position with zero velocity
425 * and unknown different orientations.
426 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
427 * accelerometer and gyroscope.
428 * @param biasX x-coordinate of accelerometer bias.
429 * @param biasY y-coordinate of accelerometer bias.
430 * @param biasZ z-coordinate of accelerometer bias.
431 * @param listener listener to handle events raised by this calibrator.
432 */
433 public KnownBiasAndPositionAccelerometerCalibrator(
434 final Collection<StandardDeviationBodyKinematics> measurements,
435 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
436 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
437 super(measurements, commonAxisUsed, biasX, biasY, biasZ, listener);
438 }
439
440 /**
441 * Constructor.
442 *
443 * @param biasX x-coordinate of accelerometer bias.
444 * This is expressed in meters per squared second (m/s^2).
445 * @param biasY y-coordinate of accelerometer bias.
446 * This is expressed in meters per squared second (m/s^2).
447 * @param biasZ z-coordinate of accelerometer bias.
448 * This is expressed in meters per squared second (m/s^2).
449 * @param initialSx initial x scaling factor.
450 * @param initialSy initial y scaling factor.
451 * @param initialSz initial z scaling factor.
452 */
453 public KnownBiasAndPositionAccelerometerCalibrator(
454 final double biasX, final double biasY, final double biasZ, final double initialSx, final double initialSy,
455 final double initialSz) {
456 super(biasX, biasY, biasZ, initialSx, initialSy, initialSz);
457 }
458
459 /**
460 * Constructor.
461 *
462 * @param measurements collection of body kinematics measurements with standard
463 * deviations taken at the same position with zero velocity
464 * and unknown different orientations.
465 * @param biasX x-coordinate of accelerometer bias.
466 * This is expressed in meters per squared second (m/s^2).
467 * @param biasY y-coordinate of accelerometer bias.
468 * This is expressed in meters per squared second (m/s^2).
469 * @param biasZ z-coordinate of accelerometer bias.
470 * This is expressed in meters per squared second (m/s^2).
471 * @param initialSx initial x scaling factor.
472 * @param initialSy initial y scaling factor.
473 * @param initialSz initial z scaling factor.
474 */
475 public KnownBiasAndPositionAccelerometerCalibrator(
476 final Collection<StandardDeviationBodyKinematics> measurements,
477 final double biasX, final double biasY, final double biasZ, final double initialSx, final double initialSy,
478 final double initialSz) {
479 super(measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz);
480 }
481
482 /**
483 * Constructor.
484 *
485 * @param measurements collection of body kinematics measurements with standard
486 * deviations taken at the same position with zero velocity
487 * and unknown different orientations.
488 * @param biasX x-coordinate of accelerometer bias.
489 * This is expressed in meters per squared second (m/s^2).
490 * @param biasY y-coordinate of accelerometer bias.
491 * This is expressed in meters per squared second (m/s^2).
492 * @param biasZ z-coordinate of accelerometer bias.
493 * This is expressed in meters per squared second (m/s^2).
494 * @param initialSx initial x scaling factor.
495 * @param initialSy initial y scaling factor.
496 * @param initialSz initial z scaling factor.
497 * @param listener listener to handle events raised by this calibrator.
498 */
499 public KnownBiasAndPositionAccelerometerCalibrator(
500 final Collection<StandardDeviationBodyKinematics> measurements, final double biasX, final double biasY,
501 final double biasZ, final double initialSx, final double initialSy, final double initialSz,
502 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
503 super(measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
504 }
505
506 /**
507 * Constructor.
508 *
509 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
510 * accelerometer and gyroscope.
511 * @param biasX x-coordinate of accelerometer bias.
512 * This is expressed in meters per squared second (m/s^2).
513 * @param biasY y-coordinate of accelerometer bias.
514 * This is expressed in meters per squared second (m/s^2).
515 * @param biasZ z-coordinate of accelerometer bias.
516 * This is expressed in meters per squared second (m/s^2).
517 * @param initialSx initial x scaling factor.
518 * @param initialSy initial y scaling factor.
519 * @param initialSz initial z scaling factor.
520 */
521 public KnownBiasAndPositionAccelerometerCalibrator(
522 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ,
523 final double initialSx, final double initialSy, final double initialSz) {
524 super(commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz);
525 }
526
527 /**
528 * Constructor.
529 *
530 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
531 * accelerometer and gyroscope.
532 * @param biasX x-coordinate of accelerometer bias.
533 * This is expressed in meters per squared second (m/s^2).
534 * @param biasY y-coordinate of accelerometer bias.
535 * This is expressed in meters per squared second (m/s^2).
536 * @param biasZ z-coordinate of accelerometer bias.
537 * This is expressed in meters per squared second (m/s^2).
538 * @param initialSx initial x scaling factor.
539 * @param initialSy initial y scaling factor.
540 * @param initialSz initial z scaling factor.
541 * @param listener listener to handle events raised by this calibrator.
542 */
543 public KnownBiasAndPositionAccelerometerCalibrator(
544 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ,
545 final double initialSx, final double initialSy, final double initialSz,
546 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
547 super(commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
548 }
549
550 /**
551 * Constructor.
552 *
553 * @param measurements collection of body kinematics measurements with standard
554 * deviations taken at the same position with zero velocity
555 * and unknown different orientations.
556 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
557 * accelerometer and gyroscope.
558 * @param biasX x-coordinate of accelerometer bias.
559 * This is expressed in meters per squared second (m/s^2).
560 * @param biasY y-coordinate of accelerometer bias.
561 * This is expressed in meters per squared second (m/s^2).
562 * @param biasZ z-coordinate of accelerometer bias.
563 * This is expressed in meters per squared second (m/s^2).
564 * @param initialSx initial x scaling factor.
565 * @param initialSy initial y scaling factor.
566 * @param initialSz initial z scaling factor.
567 */
568 public KnownBiasAndPositionAccelerometerCalibrator(
569 final Collection<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
570 final double biasX, final double biasY, final double biasZ,
571 final double initialSx, final double initialSy, final double initialSz) {
572 super(measurements, commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz);
573 }
574
575 /**
576 * Constructor.
577 *
578 * @param measurements collection of body kinematics measurements with standard
579 * deviations taken at the same position with zero velocity
580 * and unknown different orientations.
581 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
582 * accelerometer and gyroscope.
583 * @param biasX x-coordinate of accelerometer bias.
584 * This is expressed in meters per squared second (m/s^2).
585 * @param biasY y-coordinate of accelerometer bias.
586 * This is expressed in meters per squared second (m/s^2).
587 * @param biasZ z-coordinate of accelerometer bias.
588 * This is expressed in meters per squared second (m/s^2).
589 * @param initialSx initial x scaling factor.
590 * @param initialSy initial y scaling factor.
591 * @param initialSz initial z scaling factor.
592 * @param listener listener to handle events raised by this calibrator.
593 */
594 public KnownBiasAndPositionAccelerometerCalibrator(
595 final Collection<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
596 final double biasX, final double biasY, final double biasZ,
597 final double initialSx, final double initialSy, final double initialSz,
598 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
599 super(measurements, commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
600 }
601
602 /**
603 * Constructor.
604 *
605 * @param biasX x-coordinate of accelerometer bias.
606 * @param biasY y-coordinate of accelerometer bias.
607 * @param biasZ z-coordinate of accelerometer bias.
608 * @param initialSx initial x scaling factor.
609 * @param initialSy initial y scaling factor.
610 * @param initialSz initial z scaling factor.
611 */
612 public KnownBiasAndPositionAccelerometerCalibrator(
613 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
614 final double initialSx, final double initialSy, final double initialSz) {
615 super(biasX, biasY, biasZ, initialSx, initialSy, initialSz);
616 }
617
618 /**
619 * Constructor.
620 *
621 * @param biasX x-coordinate of accelerometer bias.
622 * @param biasY y-coordinate of accelerometer bias.
623 * @param biasZ z-coordinate of accelerometer bias.
624 * @param initialSx initial x scaling factor.
625 * @param initialSy initial y scaling factor.
626 * @param initialSz initial z scaling factor.
627 * @param listener listener to handle events raised by this calibrator.
628 */
629 public KnownBiasAndPositionAccelerometerCalibrator(
630 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
631 final double initialSx, final double initialSy, final double initialSz,
632 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
633 super(biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
634 }
635
636 /**
637 * Constructor.
638 *
639 * @param measurements collection of body kinematics measurements with standard
640 * deviations taken at the same position with zero velocity
641 * and unknown different orientations.
642 * @param biasX x-coordinate of accelerometer bias.
643 * @param biasY y-coordinate of accelerometer bias.
644 * @param biasZ z-coordinate of accelerometer bias.
645 * @param initialSx initial x scaling factor.
646 * @param initialSy initial y scaling factor.
647 * @param initialSz initial z scaling factor.
648 */
649 public KnownBiasAndPositionAccelerometerCalibrator(
650 final Collection<StandardDeviationBodyKinematics> measurements,
651 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
652 final double initialSx, final double initialSy, final double initialSz) {
653 super(measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz);
654 }
655
656 /**
657 * Constructor.
658 *
659 * @param measurements collection of body kinematics measurements with standard
660 * deviations taken at the same position with zero velocity
661 * and unknown different orientations.
662 * @param biasX x-coordinate of accelerometer bias.
663 * @param biasY y-coordinate of accelerometer bias.
664 * @param biasZ z-coordinate of accelerometer bias.
665 * @param initialSx initial x scaling factor.
666 * @param initialSy initial y scaling factor.
667 * @param initialSz initial z scaling factor.
668 * @param listener listener to handle events raised by this calibrator.
669 */
670 public KnownBiasAndPositionAccelerometerCalibrator(
671 final Collection<StandardDeviationBodyKinematics> measurements,
672 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
673 final double initialSx, final double initialSy, final double initialSz,
674 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
675 super(measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
676 }
677
678 /**
679 * Constructor.
680 *
681 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
682 * accelerometer and gyroscope.
683 * @param biasX x-coordinate of accelerometer bias.
684 * @param biasY y-coordinate of accelerometer bias.
685 * @param biasZ z-coordinate of accelerometer bias.
686 * @param initialSx initial x scaling factor.
687 * @param initialSy initial y scaling factor.
688 * @param initialSz initial z scaling factor.
689 */
690 public KnownBiasAndPositionAccelerometerCalibrator(
691 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
692 final double initialSx, final double initialSy, final double initialSz) {
693 super(commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz);
694 }
695
696 /**
697 * Constructor.
698 *
699 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
700 * accelerometer and gyroscope.
701 * @param biasX x-coordinate of accelerometer bias.
702 * @param biasY y-coordinate of accelerometer bias.
703 * @param biasZ z-coordinate of accelerometer bias.
704 * @param initialSx initial x scaling factor.
705 * @param initialSy initial y scaling factor.
706 * @param initialSz initial z scaling factor.
707 * @param listener listener to handle events raised by this calibrator.
708 */
709 public KnownBiasAndPositionAccelerometerCalibrator(
710 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
711 final double initialSx, final double initialSy, final double initialSz,
712 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
713 super(commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
714 }
715
716 /**
717 * Constructor.
718 *
719 * @param measurements collection of body kinematics measurements with standard
720 * deviations taken at the same position with zero velocity
721 * and unknown different orientations.
722 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
723 * accelerometer and gyroscope.
724 * @param biasX x-coordinate of accelerometer bias.
725 * @param biasY y-coordinate of accelerometer bias.
726 * @param biasZ z-coordinate of accelerometer bias.
727 * @param initialSx initial x scaling factor.
728 * @param initialSy initial y scaling factor.
729 * @param initialSz initial z scaling factor.
730 */
731 public KnownBiasAndPositionAccelerometerCalibrator(
732 final Collection<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
733 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
734 final double initialSx, final double initialSy, final double initialSz) {
735 super(measurements, commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz);
736 }
737
738 /**
739 * Constructor.
740 *
741 * @param measurements collection of body kinematics measurements with standard
742 * deviations taken at the same position with zero velocity
743 * and unknown different orientations.
744 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
745 * accelerometer and gyroscope.
746 * @param biasX x-coordinate of accelerometer bias.
747 * @param biasY y-coordinate of accelerometer bias.
748 * @param biasZ z-coordinate of accelerometer bias.
749 * @param initialSx initial x scaling factor.
750 * @param initialSy initial y scaling factor.
751 * @param initialSz initial z scaling factor.
752 * @param listener listener to handle events raised by this calibrator.
753 */
754 public KnownBiasAndPositionAccelerometerCalibrator(
755 final Collection<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
756 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
757 final double initialSx, final double initialSy, final double initialSz,
758 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
759 super(measurements, commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
760 }
761
762 /**
763 * Constructor.
764 *
765 * @param biasX x-coordinate of accelerometer bias.
766 * This is expressed in meters per squared second (m/s^2).
767 * @param biasY y-coordinate of accelerometer bias.
768 * This is expressed in meters per squared second (m/s^2).
769 * @param biasZ z-coordinate of accelerometer bias.
770 * This is expressed in meters per squared second (m/s^2).
771 * @param initialSx initial x scaling factor.
772 * @param initialSy initial y scaling factor.
773 * @param initialSz initial z scaling factor.
774 * @param initialMxy initial x-y cross coupling error.
775 * @param initialMxz initial x-z cross coupling error.
776 * @param initialMyx initial y-x cross coupling error.
777 * @param initialMyz initial y-z cross coupling error.
778 * @param initialMzx initial z-x cross coupling error.
779 * @param initialMzy initial z-y cross coupling error.
780 */
781 public KnownBiasAndPositionAccelerometerCalibrator(
782 final double biasX, final double biasY, final double biasZ, final double initialSx, final double initialSy,
783 final double initialSz, final double initialMxy, final double initialMxz, final double initialMyx,
784 final double initialMyz, final double initialMzx, final double initialMzy) {
785 super(biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx, initialMyz,
786 initialMzx, initialMzy);
787 }
788
789 /**
790 * Constructor.
791 *
792 * @param measurements collection of body kinematics measurements with standard
793 * deviations taken at the same position with zero velocity
794 * and unknown different orientations.
795 * @param biasX x-coordinate of accelerometer bias.
796 * This is expressed in meters per squared second (m/s^2).
797 * @param biasY y-coordinate of accelerometer bias.
798 * This is expressed in meters per squared second (m/s^2).
799 * @param biasZ z-coordinate of accelerometer bias.
800 * This is expressed in meters per squared second (m/s^2).
801 * @param initialSx initial x scaling factor.
802 * @param initialSy initial y scaling factor.
803 * @param initialSz initial z scaling factor.
804 * @param initialMxy initial x-y cross coupling error.
805 * @param initialMxz initial x-z cross coupling error.
806 * @param initialMyx initial y-x cross coupling error.
807 * @param initialMyz initial y-z cross coupling error.
808 * @param initialMzx initial z-x cross coupling error.
809 * @param initialMzy initial z-y cross coupling error.
810 */
811 public KnownBiasAndPositionAccelerometerCalibrator(
812 final Collection<StandardDeviationBodyKinematics> measurements, final double biasX, final double biasY,
813 final double biasZ, final double initialSx, final double initialSy, final double initialSz,
814 final double initialMxy, final double initialMxz, final double initialMyx, final double initialMyz,
815 final double initialMzx, final double initialMzy) {
816 super(measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
817 initialMyz, initialMzx, initialMzy);
818 }
819
820 /**
821 * Constructor.
822 *
823 * @param measurements collection of body kinematics measurements with standard
824 * deviations taken at the same position with zero velocity
825 * and unknown different orientations.
826 * @param biasX x-coordinate of accelerometer bias.
827 * This is expressed in meters per squared second (m/s^2).
828 * @param biasY y-coordinate of accelerometer bias.
829 * This is expressed in meters per squared second (m/s^2).
830 * @param biasZ z-coordinate of accelerometer bias.
831 * This is expressed in meters per squared second (m/s^2).
832 * @param initialSx initial x scaling factor.
833 * @param initialSy initial y scaling factor.
834 * @param initialSz initial z scaling factor.
835 * @param initialMxy initial x-y cross coupling error.
836 * @param initialMxz initial x-z cross coupling error.
837 * @param initialMyx initial y-x cross coupling error.
838 * @param initialMyz initial y-z cross coupling error.
839 * @param initialMzx initial z-x cross coupling error.
840 * @param initialMzy initial z-y cross coupling error.
841 * @param listener listener to handle events raised by this calibrator.
842 */
843 public KnownBiasAndPositionAccelerometerCalibrator(
844 final Collection<StandardDeviationBodyKinematics> measurements,
845 final double biasX, final double biasY, final double biasZ, final double initialSx, final double initialSy,
846 final double initialSz, final double initialMxy, final double initialMxz, final double initialMyx,
847 final double initialMyz, final double initialMzx, final double initialMzy,
848 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
849 super(measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
850 initialMyz, initialMzx, initialMzy, listener);
851 }
852
853 /**
854 * Constructor.
855 *
856 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
857 * accelerometer and gyroscope.
858 * @param biasX x-coordinate of accelerometer bias.
859 * This is expressed in meters per squared second (m/s^2).
860 * @param biasY y-coordinate of accelerometer bias.
861 * This is expressed in meters per squared second (m/s^2).
862 * @param biasZ z-coordinate of accelerometer bias.
863 * This is expressed in meters per squared second (m/s^2).
864 * @param initialSx initial x scaling factor.
865 * @param initialSy initial y scaling factor.
866 * @param initialSz initial z scaling factor.
867 * @param initialMxy initial x-y cross coupling error.
868 * @param initialMxz initial x-z cross coupling error.
869 * @param initialMyx initial y-x cross coupling error.
870 * @param initialMyz initial y-z cross coupling error.
871 * @param initialMzx initial z-x cross coupling error.
872 * @param initialMzy initial z-y cross coupling error.
873 */
874 public KnownBiasAndPositionAccelerometerCalibrator(
875 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ,
876 final double initialSx, final double initialSy, final double initialSz, final double initialMxy,
877 final double initialMxz, final double initialMyx, final double initialMyz, final double initialMzx,
878 final double initialMzy) {
879 super(commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
880 initialMyz, initialMzx, initialMzy);
881 }
882
883 /**
884 * Constructor.
885 *
886 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
887 * accelerometer and gyroscope.
888 * @param biasX x-coordinate of accelerometer bias.
889 * This is expressed in meters per squared second (m/s^2).
890 * @param biasY y-coordinate of accelerometer bias.
891 * This is expressed in meters per squared second (m/s^2).
892 * @param biasZ z-coordinate of accelerometer bias.
893 * This is expressed in meters per squared second (m/s^2).
894 * @param initialSx initial x scaling factor.
895 * @param initialSy initial y scaling factor.
896 * @param initialSz initial z scaling factor.
897 * @param initialMxy initial x-y cross coupling error.
898 * @param initialMxz initial x-z cross coupling error.
899 * @param initialMyx initial y-x cross coupling error.
900 * @param initialMyz initial y-z cross coupling error.
901 * @param initialMzx initial z-x cross coupling error.
902 * @param initialMzy initial z-y cross coupling error.
903 * @param listener listener to handle events raised by this calibrator.
904 */
905 public KnownBiasAndPositionAccelerometerCalibrator(
906 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ,
907 final double initialSx, final double initialSy, final double initialSz, final double initialMxy,
908 final double initialMxz, final double initialMyx, final double initialMyz, final double initialMzx,
909 final double initialMzy, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
910 super(commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
911 initialMyz, initialMzx, initialMzy, listener);
912 }
913
914 /**
915 * Constructor.
916 *
917 * @param measurements collection of body kinematics measurements with standard
918 * deviations taken at the same position with zero velocity
919 * and unknown different orientations.
920 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
921 * accelerometer and gyroscope.
922 * @param biasX x-coordinate of accelerometer bias.
923 * This is expressed in meters per squared second (m/s^2).
924 * @param biasY y-coordinate of accelerometer bias.
925 * This is expressed in meters per squared second (m/s^2).
926 * @param biasZ z-coordinate of accelerometer bias.
927 * This is expressed in meters per squared second (m/s^2).
928 * @param initialSx initial x scaling factor.
929 * @param initialSy initial y scaling factor.
930 * @param initialSz initial z scaling factor.
931 * @param initialMxy initial x-y cross coupling error.
932 * @param initialMxz initial x-z cross coupling error.
933 * @param initialMyx initial y-x cross coupling error.
934 * @param initialMyz initial y-z cross coupling error.
935 * @param initialMzx initial z-x cross coupling error.
936 * @param initialMzy initial z-y cross coupling error.
937 */
938 public KnownBiasAndPositionAccelerometerCalibrator(
939 final Collection<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
940 final double biasX, final double biasY, final double biasZ, final double initialSx, final double initialSy,
941 final double initialSz, final double initialMxy, final double initialMxz, final double initialMyx,
942 final double initialMyz, final double initialMzx, final double initialMzy) {
943 super(measurements, commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz,
944 initialMxy, initialMxz, initialMyx, initialMyz, initialMzx, initialMzy);
945 }
946
947 /**
948 * Constructor.
949 *
950 * @param measurements collection of body kinematics measurements with standard
951 * deviations taken at the same position with zero velocity
952 * and unknown different orientations.
953 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
954 * accelerometer and gyroscope.
955 * @param biasX x-coordinate of accelerometer bias.
956 * This is expressed in meters per squared second (m/s^2).
957 * @param biasY y-coordinate of accelerometer bias.
958 * This is expressed in meters per squared second (m/s^2).
959 * @param biasZ z-coordinate of accelerometer bias.
960 * This is expressed in meters per squared second (m/s^2).
961 * @param initialSx initial x scaling factor.
962 * @param initialSy initial y scaling factor.
963 * @param initialSz initial z scaling factor.
964 * @param initialMxy initial x-y cross coupling error.
965 * @param initialMxz initial x-z cross coupling error.
966 * @param initialMyx initial y-x cross coupling error.
967 * @param initialMyz initial y-z cross coupling error.
968 * @param initialMzx initial z-x cross coupling error.
969 * @param initialMzy initial z-y cross coupling error.
970 * @param listener listener to handle events raised by this calibrator.
971 */
972 public KnownBiasAndPositionAccelerometerCalibrator(
973 final Collection<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
974 final double biasX, final double biasY, final double biasZ, final double initialSx, final double initialSy,
975 final double initialSz, final double initialMxy, final double initialMxz, final double initialMyx,
976 final double initialMyz, final double initialMzx, final double initialMzy,
977 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
978 super(measurements, commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz,
979 initialMxy, initialMxz, initialMyx, initialMyz, initialMzx, initialMzy, listener);
980 }
981
982 /**
983 * Constructor.
984 *
985 * @param biasX x-coordinate of accelerometer bias.
986 * @param biasY y-coordinate of accelerometer bias.
987 * @param biasZ z-coordinate of accelerometer bias.
988 * @param initialSx initial x scaling factor.
989 * @param initialSy initial y scaling factor.
990 * @param initialSz initial z scaling factor.
991 * @param initialMxy initial x-y cross coupling error.
992 * @param initialMxz initial x-z cross coupling error.
993 * @param initialMyx initial y-x cross coupling error.
994 * @param initialMyz initial y-z cross coupling error.
995 * @param initialMzx initial z-x cross coupling error.
996 * @param initialMzy initial z-y cross coupling error.
997 */
998 public KnownBiasAndPositionAccelerometerCalibrator(
999 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ, final double initialSx,
1000 final double initialSy, final double initialSz, final double initialMxy, final double initialMxz,
1001 final double initialMyx, final double initialMyz, final double initialMzx, final double initialMzy) {
1002 super(biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
1003 initialMyz, initialMzx, initialMzy);
1004 }
1005
1006 /**
1007 * Constructor.
1008 *
1009 * @param biasX x-coordinate of accelerometer bias.
1010 * @param biasY y-coordinate of accelerometer bias.
1011 * @param biasZ z-coordinate of accelerometer bias.
1012 * @param initialSx initial x scaling factor.
1013 * @param initialSy initial y scaling factor.
1014 * @param initialSz initial z scaling factor.
1015 * @param initialMxy initial x-y cross coupling error.
1016 * @param initialMxz initial x-z cross coupling error.
1017 * @param initialMyx initial y-x cross coupling error.
1018 * @param initialMyz initial y-z cross coupling error.
1019 * @param initialMzx initial z-x cross coupling error.
1020 * @param initialMzy initial z-y cross coupling error.
1021 * @param listener listener to handle events raised by this calibrator.
1022 */
1023 public KnownBiasAndPositionAccelerometerCalibrator(
1024 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ, final double initialSx,
1025 final double initialSy, final double initialSz, final double initialMxy, final double initialMxz,
1026 final double initialMyx, final double initialMyz, final double initialMzx, final double initialMzy,
1027 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1028 super(biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
1029 initialMyz, initialMzx, initialMzy, listener);
1030 }
1031
1032 /**
1033 * Constructor.
1034 *
1035 * @param measurements collection of body kinematics measurements with standard
1036 * deviations taken at the same position with zero velocity
1037 * and unknown different orientations.
1038 * @param biasX x-coordinate of accelerometer bias.
1039 * @param biasY y-coordinate of accelerometer bias.
1040 * @param biasZ z-coordinate of accelerometer bias.
1041 * @param initialSx initial x scaling factor.
1042 * @param initialSy initial y scaling factor.
1043 * @param initialSz initial z scaling factor.
1044 * @param initialMxy initial x-y cross coupling error.
1045 * @param initialMxz initial x-z cross coupling error.
1046 * @param initialMyx initial y-x cross coupling error.
1047 * @param initialMyz initial y-z cross coupling error.
1048 * @param initialMzx initial z-x cross coupling error.
1049 * @param initialMzy initial z-y cross coupling error.
1050 */
1051 public KnownBiasAndPositionAccelerometerCalibrator(
1052 final Collection<StandardDeviationBodyKinematics> measurements, final Acceleration biasX,
1053 final Acceleration biasY, final Acceleration biasZ, final double initialSx, final double initialSy,
1054 final double initialSz, final double initialMxy, final double initialMxz, final double initialMyx,
1055 final double initialMyz, final double initialMzx, final double initialMzy) {
1056 super(measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
1057 initialMyz, initialMzx, initialMzy);
1058 }
1059
1060 /**
1061 * Constructor.
1062 *
1063 * @param measurements collection of body kinematics measurements with standard
1064 * deviations taken at the same position with zero velocity
1065 * and unknown different orientations.
1066 * @param biasX x-coordinate of accelerometer bias.
1067 * @param biasY y-coordinate of accelerometer bias.
1068 * @param biasZ z-coordinate of accelerometer bias.
1069 * @param initialSx initial x scaling factor.
1070 * @param initialSy initial y scaling factor.
1071 * @param initialSz initial z scaling factor.
1072 * @param initialMxy initial x-y cross coupling error.
1073 * @param initialMxz initial x-z cross coupling error.
1074 * @param initialMyx initial y-x cross coupling error.
1075 * @param initialMyz initial y-z cross coupling error.
1076 * @param initialMzx initial z-x cross coupling error.
1077 * @param initialMzy initial z-y cross coupling error.
1078 * @param listener listener to handle events raised by this calibrator.
1079 */
1080 public KnownBiasAndPositionAccelerometerCalibrator(
1081 final Collection<StandardDeviationBodyKinematics> measurements,
1082 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ, final double initialSx,
1083 final double initialSy, final double initialSz, final double initialMxy, final double initialMxz,
1084 final double initialMyx, final double initialMyz, final double initialMzx, final double initialMzy,
1085 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1086 super(measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
1087 initialMyz, initialMzx, initialMzy, listener);
1088 }
1089
1090 /**
1091 * Constructor.
1092 *
1093 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1094 * accelerometer and gyroscope.
1095 * @param biasX x-coordinate of accelerometer bias.
1096 * @param biasY y-coordinate of accelerometer bias.
1097 * @param biasZ z-coordinate of accelerometer bias.
1098 * @param initialSx initial x scaling factor.
1099 * @param initialSy initial y scaling factor.
1100 * @param initialSz initial z scaling factor.
1101 * @param initialMxy initial x-y cross coupling error.
1102 * @param initialMxz initial x-z cross coupling error.
1103 * @param initialMyx initial y-x cross coupling error.
1104 * @param initialMyz initial y-z cross coupling error.
1105 * @param initialMzx initial z-x cross coupling error.
1106 * @param initialMzy initial z-y cross coupling error.
1107 */
1108 public KnownBiasAndPositionAccelerometerCalibrator(
1109 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
1110 final double initialSx, final double initialSy, final double initialSz,
1111 final double initialMxy, final double initialMxz, final double initialMyx,
1112 final double initialMyz, final double initialMzx, final double initialMzy) {
1113 super(commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
1114 initialMyz, initialMzx, initialMzy);
1115 }
1116
1117 /**
1118 * Constructor.
1119 *
1120 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1121 * accelerometer and gyroscope.
1122 * @param biasX x-coordinate of accelerometer bias.
1123 * @param biasY y-coordinate of accelerometer bias.
1124 * @param biasZ z-coordinate of accelerometer bias.
1125 * @param initialSx initial x scaling factor.
1126 * @param initialSy initial y scaling factor.
1127 * @param initialSz initial z scaling factor.
1128 * @param initialMxy initial x-y cross coupling error.
1129 * @param initialMxz initial x-z cross coupling error.
1130 * @param initialMyx initial y-x cross coupling error.
1131 * @param initialMyz initial y-z cross coupling error.
1132 * @param initialMzx initial z-x cross coupling error.
1133 * @param initialMzy initial z-y cross coupling error.
1134 * @param listener listener to handle events raised by this calibrator.
1135 */
1136 public KnownBiasAndPositionAccelerometerCalibrator(
1137 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
1138 final double initialSx, final double initialSy, final double initialSz,
1139 final double initialMxy, final double initialMxz, final double initialMyx,
1140 final double initialMyz, final double initialMzx, final double initialMzy,
1141 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1142 super(commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
1143 initialMyz, initialMzx, initialMzy, listener);
1144 }
1145
1146 /**
1147 * Constructor.
1148 *
1149 * @param measurements collection of body kinematics measurements with standard
1150 * deviations taken at the same position with zero velocity
1151 * and unknown different orientations.
1152 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1153 * accelerometer and gyroscope.
1154 * @param biasX x-coordinate of accelerometer bias.
1155 * @param biasY y-coordinate of accelerometer bias.
1156 * @param biasZ z-coordinate of accelerometer bias.
1157 * @param initialSx initial x scaling factor.
1158 * @param initialSy initial y scaling factor.
1159 * @param initialSz initial z scaling factor.
1160 * @param initialMxy initial x-y cross coupling error.
1161 * @param initialMxz initial x-z cross coupling error.
1162 * @param initialMyx initial y-x cross coupling error.
1163 * @param initialMyz initial y-z cross coupling error.
1164 * @param initialMzx initial z-x cross coupling error.
1165 * @param initialMzy initial z-y cross coupling error.
1166 */
1167 public KnownBiasAndPositionAccelerometerCalibrator(
1168 final Collection<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
1169 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
1170 final double initialSx, final double initialSy, final double initialSz,
1171 final double initialMxy, final double initialMxz, final double initialMyx,
1172 final double initialMyz, final double initialMzx, final double initialMzy) {
1173 super(measurements, commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz,
1174 initialMxy, initialMxz, initialMyx, initialMyz, initialMzx, initialMzy);
1175 }
1176
1177 /**
1178 * Constructor.
1179 *
1180 * @param measurements collection of body kinematics measurements with standard
1181 * deviations taken at the same position with zero velocity
1182 * and unknown different orientations.
1183 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1184 * accelerometer and gyroscope.
1185 * @param biasX x-coordinate of accelerometer bias.
1186 * @param biasY y-coordinate of accelerometer bias.
1187 * @param biasZ z-coordinate of accelerometer bias.
1188 * @param initialSx initial x scaling factor.
1189 * @param initialSy initial y scaling factor.
1190 * @param initialSz initial z scaling factor.
1191 * @param initialMxy initial x-y cross coupling error.
1192 * @param initialMxz initial x-z cross coupling error.
1193 * @param initialMyx initial y-x cross coupling error.
1194 * @param initialMyz initial y-z cross coupling error.
1195 * @param initialMzx initial z-x cross coupling error.
1196 * @param initialMzy initial z-y cross coupling error.
1197 * @param listener listener to handle events raised by this calibrator.
1198 */
1199 public KnownBiasAndPositionAccelerometerCalibrator(
1200 final Collection<StandardDeviationBodyKinematics> measurements,
1201 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
1202 final double initialSx, final double initialSy, final double initialSz,
1203 final double initialMxy, final double initialMxz, final double initialMyx,
1204 final double initialMyz, final double initialMzx, final double initialMzy,
1205 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1206 super(measurements, commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz,
1207 initialMxy, initialMxz, initialMyx, initialMyz, initialMzx, initialMzy, listener);
1208 }
1209
1210 /**
1211 * Constructor.
1212 *
1213 * @param bias known accelerometer bias. This must have length 3 and is expressed
1214 * in meters per squared second (m/s^2).
1215 * @throws IllegalArgumentException if provided bias array does not have length 3.
1216 */
1217 public KnownBiasAndPositionAccelerometerCalibrator(final double[] bias) {
1218 super(bias);
1219 }
1220
1221 /**
1222 * Constructor.
1223 *
1224 * @param bias known accelerometer bias. This must have length 3 and is expressed
1225 * in meters per squared second (m/s^2).
1226 * @param listener listener to handle events raised by this calibrator.
1227 * @throws IllegalArgumentException if provided bias array does not have length 3.
1228 */
1229 public KnownBiasAndPositionAccelerometerCalibrator(
1230 final double[] bias, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1231 super(bias, listener);
1232 }
1233
1234 /**
1235 * Constructor.
1236 *
1237 * @param measurements collection of body kinematics measurements with standard
1238 * deviations taken at the same position with zero velocity
1239 * and unknown different orientations.
1240 * @param bias known accelerometer bias. This must have length 3 and is expressed
1241 * in meters per squared second (m/s^2).
1242 * @throws IllegalArgumentException if provided bias array does not have length 3.
1243 */
1244 public KnownBiasAndPositionAccelerometerCalibrator(
1245 final Collection<StandardDeviationBodyKinematics> measurements, final double[] bias) {
1246 super(measurements, bias);
1247 }
1248
1249 /**
1250 * Constructor.
1251 *
1252 * @param measurements collection of body kinematics measurements with standard
1253 * deviations taken at the same position with zero velocity
1254 * and unknown different orientations.
1255 * @param bias known accelerometer bias. This must have length 3 and is expressed
1256 * in meters per squared second (m/s^2).
1257 * @param listener listener to handle events raised by this calibrator.
1258 * @throws IllegalArgumentException if provided bias array does not have length 3.
1259 */
1260 public KnownBiasAndPositionAccelerometerCalibrator(
1261 final Collection<StandardDeviationBodyKinematics> measurements, final double[] bias,
1262 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1263 super(measurements, bias, listener);
1264 }
1265
1266 /**
1267 * Constructor.
1268 *
1269 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1270 * accelerometer and gyroscope.
1271 * @param bias known accelerometer bias. This must have length 3 and is expressed
1272 * in meters per squared second (m/s^2).
1273 * @throws IllegalArgumentException if provided bias array does not have length 3.
1274 */
1275 public KnownBiasAndPositionAccelerometerCalibrator(final boolean commonAxisUsed, final double[] bias) {
1276 super(commonAxisUsed, bias);
1277 }
1278
1279 /**
1280 * Constructor.
1281 *
1282 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1283 * accelerometer and gyroscope.
1284 * @param bias known accelerometer bias. This must have length 3 and is expressed
1285 * in meters per squared second (m/s^2).
1286 * @param listener listener to handle events raised by this calibrator.
1287 * @throws IllegalArgumentException if provided bias array does not have length 3.
1288 */
1289 public KnownBiasAndPositionAccelerometerCalibrator(
1290 final boolean commonAxisUsed, final double[] bias,
1291 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1292 super(commonAxisUsed, bias, listener);
1293 }
1294
1295 /**
1296 * Constructor.
1297 *
1298 * @param measurements collection of body kinematics measurements with standard
1299 * deviations taken at the same position with zero velocity
1300 * and unknown different orientations.
1301 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1302 * accelerometer and gyroscope.
1303 * @param bias known accelerometer bias. This must have length 3 and is expressed
1304 * in meters per squared second (m/s^2).
1305 * @throws IllegalArgumentException if provided bias array does not have length 3.
1306 */
1307 public KnownBiasAndPositionAccelerometerCalibrator(
1308 final Collection<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
1309 final double[] bias) {
1310 super(measurements, commonAxisUsed, bias);
1311 }
1312
1313 /**
1314 * Constructor.
1315 *
1316 * @param measurements collection of body kinematics measurements with standard
1317 * deviations taken at the same position with zero velocity
1318 * and unknown different orientations.
1319 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1320 * accelerometer and gyroscope.
1321 * @param bias known accelerometer bias. This must have length 3 and is expressed
1322 * in meters per squared second (m/s^2).
1323 * @param listener listener to handle events raised by this calibrator.
1324 * @throws IllegalArgumentException if provided bias array does not have length 3.
1325 */
1326 public KnownBiasAndPositionAccelerometerCalibrator(
1327 final Collection<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
1328 final double[] bias, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1329 super(measurements, commonAxisUsed, bias, listener);
1330 }
1331
1332 /**
1333 * Constructor.
1334 *
1335 * @param bias known accelerometer bias.
1336 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
1337 */
1338 public KnownBiasAndPositionAccelerometerCalibrator(final Matrix bias) {
1339 super(bias);
1340 }
1341
1342 /**
1343 * Constructor.
1344 *
1345 * @param bias known accelerometer bias.
1346 * @param listener listener to handle events raised by this calibrator.
1347 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
1348 */
1349 public KnownBiasAndPositionAccelerometerCalibrator(
1350 final Matrix bias, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1351 super(bias, listener);
1352 }
1353
1354 /**
1355 * Constructor.
1356 *
1357 * @param measurements collection of body kinematics measurements with standard
1358 * deviations taken at the same position with zero velocity
1359 * and unknown different orientations.
1360 * @param bias known accelerometer bias.
1361 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
1362 */
1363 public KnownBiasAndPositionAccelerometerCalibrator(
1364 final Collection<StandardDeviationBodyKinematics> measurements, final Matrix bias) {
1365 super(measurements, bias);
1366 }
1367
1368 /**
1369 * Constructor.
1370 *
1371 * @param measurements collection of body kinematics measurements with standard
1372 * deviations taken at the same position with zero velocity
1373 * and unknown different orientations.
1374 * @param bias known accelerometer bias.
1375 * @param listener listener to handle events raised by this calibrator.
1376 */
1377 public KnownBiasAndPositionAccelerometerCalibrator(
1378 final Collection<StandardDeviationBodyKinematics> measurements, final Matrix bias,
1379 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1380 super(measurements, bias, listener);
1381 }
1382
1383 /**
1384 * Constructor.
1385 *
1386 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1387 * accelerometer and gyroscope.
1388 * @param bias known accelerometer bias.
1389 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
1390 */
1391 public KnownBiasAndPositionAccelerometerCalibrator(final boolean commonAxisUsed, final Matrix bias) {
1392 super(commonAxisUsed, bias);
1393 }
1394
1395 /**
1396 * Constructor.
1397 *
1398 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1399 * accelerometer and gyroscope.
1400 * @param bias known accelerometer bias.
1401 * @param listener listener to handle events raised by this calibrator.
1402 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
1403 */
1404 public KnownBiasAndPositionAccelerometerCalibrator(
1405 final boolean commonAxisUsed, final Matrix bias,
1406 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1407 super(commonAxisUsed, bias, listener);
1408 }
1409
1410 /**
1411 * Constructor.
1412 *
1413 * @param measurements collection of body kinematics measurements with standard
1414 * deviations taken at the same position with zero velocity
1415 * and unknown different orientations.
1416 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1417 * accelerometer and gyroscope.
1418 * @param bias known accelerometer bias.
1419 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
1420 */
1421 public KnownBiasAndPositionAccelerometerCalibrator(
1422 final Collection<StandardDeviationBodyKinematics> measurements,
1423 final boolean commonAxisUsed, final Matrix bias) {
1424 super(measurements, commonAxisUsed, bias);
1425 }
1426
1427 /**
1428 * Constructor.
1429 *
1430 * @param measurements collection of body kinematics measurements with standard
1431 * deviations taken at the same position with zero velocity
1432 * and unknown different orientations.
1433 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1434 * accelerometer and gyroscope.
1435 * @param bias known accelerometer bias.
1436 * @param listener listener to handle events raised by this calibrator.
1437 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
1438 */
1439 public KnownBiasAndPositionAccelerometerCalibrator(
1440 final Collection<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
1441 final Matrix bias, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1442 super(measurements, commonAxisUsed, bias, listener);
1443 }
1444
1445 /**
1446 * Constructor.
1447 *
1448 * @param bias known accelerometer bias.
1449 * @param initialMa initial scale factors and cross coupling errors matrix.
1450 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
1451 * scaling and coupling error matrix is not 3x3.
1452 */
1453 public KnownBiasAndPositionAccelerometerCalibrator(final Matrix bias, final Matrix initialMa) {
1454 super(bias, initialMa);
1455 }
1456
1457 /**
1458 * Constructor.
1459 *
1460 * @param bias known accelerometer bias.
1461 * @param initialMa initial scale factors and cross coupling errors matrix.
1462 * @param listener listener to handle events raised by this calibrator.
1463 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
1464 * scaling and coupling error matrix is not 3x3.
1465 */
1466 public KnownBiasAndPositionAccelerometerCalibrator(
1467 final Matrix bias, final Matrix initialMa,
1468 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1469 super(bias, initialMa, listener);
1470 }
1471
1472 /**
1473 * Constructor.
1474 *
1475 * @param measurements collection of body kinematics measurements with standard
1476 * deviations taken at the same position with zero velocity
1477 * and unknown different orientations.
1478 * @param bias known accelerometer bias.
1479 * @param initialMa initial scale factors and cross coupling errors matrix.
1480 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
1481 * scaling and coupling error matrix is not 3x3.
1482 */
1483 public KnownBiasAndPositionAccelerometerCalibrator(
1484 final Collection<StandardDeviationBodyKinematics> measurements, final Matrix bias,
1485 final Matrix initialMa) {
1486 super(measurements, bias, initialMa);
1487 }
1488
1489 /**
1490 * Constructor.
1491 *
1492 * @param measurements collection of body kinematics measurements with standard
1493 * deviations taken at the same position with zero velocity
1494 * and unknown different orientations.
1495 * @param bias known accelerometer bias.
1496 * @param initialMa initial scale factors and cross coupling errors matrix.
1497 * @param listener listener to handle events raised by this calibrator.
1498 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
1499 * scaling and coupling error matrix is not 3x3.
1500 */
1501 public KnownBiasAndPositionAccelerometerCalibrator(
1502 final Collection<StandardDeviationBodyKinematics> measurements, final Matrix bias, final Matrix initialMa,
1503 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1504 super(measurements, bias, initialMa, listener);
1505 }
1506
1507 /**
1508 * Constructor.
1509 *
1510 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1511 * accelerometer and gyroscope.
1512 * @param bias known accelerometer bias.
1513 * @param initialMa initial scale factors and cross coupling errors matrix.
1514 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
1515 * scaling and coupling error matrix is not 3x3.
1516 */
1517 public KnownBiasAndPositionAccelerometerCalibrator(
1518 final boolean commonAxisUsed, final Matrix bias, final Matrix initialMa) {
1519 super(commonAxisUsed, bias, initialMa);
1520 }
1521
1522 /**
1523 * Constructor.
1524 *
1525 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1526 * accelerometer and gyroscope.
1527 * @param bias known accelerometer bias.
1528 * @param initialMa initial scale factors and cross coupling errors matrix.
1529 * @param listener listener to handle events raised by this calibrator.
1530 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
1531 * scaling and coupling error matrix is not 3x3.
1532 */
1533 public KnownBiasAndPositionAccelerometerCalibrator(
1534 final boolean commonAxisUsed, final Matrix bias, final Matrix initialMa,
1535 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1536 super(commonAxisUsed, bias, initialMa, listener);
1537 }
1538
1539 /**
1540 * Constructor.
1541 *
1542 * @param measurements collection of body kinematics measurements with standard
1543 * deviations taken at the same position with zero velocity
1544 * and unknown different orientations.
1545 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1546 * accelerometer and gyroscope.
1547 * @param bias known accelerometer bias.
1548 * @param initialMa initial scale factors and cross coupling errors matrix.
1549 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
1550 * scaling and coupling error matrix is not 3x3.
1551 */
1552 public KnownBiasAndPositionAccelerometerCalibrator(
1553 final Collection<StandardDeviationBodyKinematics> measurements,
1554 final boolean commonAxisUsed, final Matrix bias, final Matrix initialMa) {
1555 super(measurements, commonAxisUsed, bias, initialMa);
1556 }
1557
1558 /**
1559 * Constructor.
1560 *
1561 * @param measurements collection of body kinematics measurements with standard
1562 * deviations taken at the same position with zero velocity
1563 * and unknown different orientations.
1564 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1565 * accelerometer and gyroscope.
1566 * @param bias known accelerometer bias.
1567 * @param initialMa initial scale factors and cross coupling errors matrix.
1568 * @param listener listener to handle events raised by this calibrator.
1569 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
1570 * scaling and coupling error matrix is not 3x3.
1571 */
1572 public KnownBiasAndPositionAccelerometerCalibrator(
1573 final Collection<StandardDeviationBodyKinematics> measurements, final boolean commonAxisUsed,
1574 final Matrix bias, final Matrix initialMa,
1575 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1576 super(measurements, commonAxisUsed, bias, initialMa, listener);
1577 }
1578
1579 /**
1580 * Constructor.
1581 *
1582 * @param position position where body kinematics measures have been taken.
1583 */
1584 public KnownBiasAndPositionAccelerometerCalibrator(final ECEFPosition position) {
1585 try {
1586 setPosition(position);
1587 } catch (final LockedException ignore) {
1588 // never happens
1589 }
1590 }
1591
1592 /**
1593 * Constructor.
1594 *
1595 * @param position position where body kinematics measures have been taken.
1596 * @param listener listener to handle events raised by this calibrator.
1597 */
1598 public KnownBiasAndPositionAccelerometerCalibrator(
1599 final ECEFPosition position, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1600 this(position);
1601 try {
1602 setListener(listener);
1603 } catch (final LockedException ignore) {
1604 // never happens
1605 }
1606 }
1607
1608 /**
1609 * Constructor.
1610 *
1611 * @param position position where body kinematics measures have been taken.
1612 * @param measurements collection of body kinematics measurements with standard
1613 * deviations taken at the same position with zero velocity
1614 * and unknown different orientations.
1615 */
1616 public KnownBiasAndPositionAccelerometerCalibrator(
1617 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements) {
1618 this(position);
1619 try {
1620 setMeasurements(measurements);
1621 } catch (final LockedException ignore) {
1622 // never happens
1623 }
1624 }
1625
1626 /**
1627 * Constructor.
1628 *
1629 * @param position position where body kinematics measures have been taken.
1630 * @param measurements collection of body kinematics measurements with standard
1631 * deviations taken at the same position with zero velocity
1632 * and unknown different orientations.
1633 * @param listener listener to handle events raised by this calibrator.
1634 */
1635 public KnownBiasAndPositionAccelerometerCalibrator(
1636 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
1637 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1638 this(measurements, listener);
1639 try {
1640 setPosition(position);
1641 } catch (final LockedException ignore) {
1642 // never happens
1643 }
1644 }
1645
1646 /**
1647 * Constructor.
1648 *
1649 * @param position position where body kinematics measures have been taken.
1650 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1651 * accelerometer and gyroscope.
1652 */
1653 public KnownBiasAndPositionAccelerometerCalibrator(final ECEFPosition position, final boolean commonAxisUsed) {
1654 this(commonAxisUsed);
1655 try {
1656 setPosition(position);
1657 } catch (final LockedException ignore) {
1658 // never happens
1659 }
1660 }
1661
1662 /**
1663 * Constructor.
1664 *
1665 * @param position position where body kinematics measures have been taken.
1666 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1667 * accelerometer and gyroscope.
1668 * @param listener listener to handle events raised by this calibrator.
1669 */
1670 public KnownBiasAndPositionAccelerometerCalibrator(
1671 final ECEFPosition position, final boolean commonAxisUsed,
1672 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1673 this(commonAxisUsed, listener);
1674 try {
1675 setPosition(position);
1676 } catch (final LockedException ignore) {
1677 // never happens
1678 }
1679 }
1680
1681 /**
1682 * Constructor.
1683 *
1684 * @param position position where body kinematics measures have been taken.
1685 * @param measurements collection of body kinematics measurements with standard
1686 * deviations taken at the same position with zero velocity
1687 * and unknown different orientations.
1688 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1689 * accelerometer and gyroscope.
1690 */
1691 public KnownBiasAndPositionAccelerometerCalibrator(
1692 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
1693 final boolean commonAxisUsed) {
1694 this(measurements, commonAxisUsed);
1695 try {
1696 setPosition(position);
1697 } catch (final LockedException ignore) {
1698 // never happens
1699 }
1700 }
1701
1702 /**
1703 * Constructor.
1704 *
1705 * @param position position where body kinematics measures have been taken.
1706 * @param measurements collection of body kinematics measurements with standard
1707 * deviations taken at the same position with zero velocity
1708 * and unknown different orientations.
1709 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1710 * accelerometer and gyroscope.
1711 * @param listener listener to handle events raised by this calibrator.
1712 */
1713 public KnownBiasAndPositionAccelerometerCalibrator(
1714 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
1715 final boolean commonAxisUsed, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1716 this(measurements, commonAxisUsed, listener);
1717 try {
1718 setPosition(position);
1719 } catch (final LockedException ignore) {
1720 // never happens
1721 }
1722 }
1723
1724 /**
1725 * Constructor.
1726 *
1727 * @param position position where body kinematics measures have been taken.
1728 * @param biasX x-coordinate of accelerometer bias.
1729 * This is expressed in meters per squared second (m/s^2).
1730 * @param biasY y-coordinate of accelerometer bias.
1731 * This is expressed in meters per squared second (m/s^2).
1732 * @param biasZ z-coordinate of accelerometer bias.
1733 * This is expressed in meters per squared second (m/s^2).
1734 */
1735 public KnownBiasAndPositionAccelerometerCalibrator(
1736 final ECEFPosition position, final double biasX, final double biasY, final double biasZ) {
1737 this(biasX, biasY, biasZ);
1738 try {
1739 setPosition(position);
1740 } catch (final LockedException ignore) {
1741 // never happens
1742 }
1743 }
1744
1745 /**
1746 * Constructor.
1747 *
1748 * @param position position where body kinematics measures have been taken.
1749 * @param biasX x-coordinate of accelerometer bias.
1750 * This is expressed in meters per squared second (m/s^2).
1751 * @param biasY y-coordinate of accelerometer bias.
1752 * This is expressed in meters per squared second (m/s^2).
1753 * @param biasZ z-coordinate of accelerometer bias.
1754 * This is expressed in meters per squared second (m/s^2).
1755 * @param listener listener to handle events raised by this calibrator.
1756 */
1757 public KnownBiasAndPositionAccelerometerCalibrator(
1758 final ECEFPosition position, final double biasX, final double biasY, final double biasZ,
1759 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1760 this(biasX, biasY, biasZ, listener);
1761 try {
1762 setPosition(position);
1763 } catch (final LockedException ignore) {
1764 // never happens
1765 }
1766 }
1767
1768 /**
1769 * Constructor.
1770 *
1771 * @param position position where body kinematics measures have been taken.
1772 * @param measurements collection of body kinematics measurements with standard
1773 * deviations taken at the same position with zero velocity
1774 * and unknown different orientations.
1775 * @param biasX x-coordinate of accelerometer bias.
1776 * This is expressed in meters per squared second (m/s^2).
1777 * @param biasY y-coordinate of accelerometer bias.
1778 * This is expressed in meters per squared second (m/s^2).
1779 * @param biasZ z-coordinate of accelerometer bias.
1780 * This is expressed in meters per squared second (m/s^2).
1781 */
1782 public KnownBiasAndPositionAccelerometerCalibrator(
1783 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
1784 final double biasX, final double biasY, final double biasZ) {
1785 this(measurements, biasX, biasY, biasZ);
1786 try {
1787 setPosition(position);
1788 } catch (final LockedException ignore) {
1789 // never happens
1790 }
1791 }
1792
1793 /**
1794 * Constructor.
1795 *
1796 * @param position position where body kinematics measures have been taken.
1797 * @param measurements collection of body kinematics measurements with standard
1798 * deviations taken at the same position with zero velocity
1799 * and unknown different orientations.
1800 * @param biasX x-coordinate of accelerometer bias.
1801 * This is expressed in meters per squared second (m/s^2).
1802 * @param biasY y-coordinate of accelerometer bias.
1803 * This is expressed in meters per squared second (m/s^2).
1804 * @param biasZ z-coordinate of accelerometer bias.
1805 * This is expressed in meters per squared second (m/s^2).
1806 * @param listener listener to handle events raised by this calibrator.
1807 */
1808 public KnownBiasAndPositionAccelerometerCalibrator(
1809 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
1810 final double biasX, final double biasY, final double biasZ,
1811 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1812 this(measurements, biasX, biasY, biasZ, listener);
1813 try {
1814 setPosition(position);
1815 } catch (final LockedException ignore) {
1816 // never happens
1817 }
1818 }
1819
1820 /**
1821 * Constructor.
1822 *
1823 * @param position position where body kinematics measures have been taken.
1824 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1825 * accelerometer and gyroscope.
1826 * @param biasX x-coordinate of accelerometer bias.
1827 * This is expressed in meters per squared second (m/s^2).
1828 * @param biasY y-coordinate of accelerometer bias.
1829 * This is expressed in meters per squared second (m/s^2).
1830 * @param biasZ z-coordinate of accelerometer bias.
1831 * This is expressed in meters per squared second (m/s^2).
1832 */
1833 public KnownBiasAndPositionAccelerometerCalibrator(
1834 final ECEFPosition position, final boolean commonAxisUsed,
1835 final double biasX, final double biasY, final double biasZ) {
1836 this(commonAxisUsed, biasX, biasY, biasZ);
1837 try {
1838 setPosition(position);
1839 } catch (final LockedException ignore) {
1840 // never happens
1841 }
1842 }
1843
1844 /**
1845 * Constructor.
1846 *
1847 * @param position position where body kinematics measures have been taken.
1848 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1849 * accelerometer and gyroscope.
1850 * @param biasX x-coordinate of accelerometer bias.
1851 * This is expressed in meters per squared second (m/s^2).
1852 * @param biasY y-coordinate of accelerometer bias.
1853 * This is expressed in meters per squared second (m/s^2).
1854 * @param biasZ z-coordinate of accelerometer bias.
1855 * This is expressed in meters per squared second (m/s^2).
1856 * @param listener listener to handle events raised by this calibrator.
1857 */
1858 public KnownBiasAndPositionAccelerometerCalibrator(
1859 final ECEFPosition position, final boolean commonAxisUsed,
1860 final double biasX, final double biasY, final double biasZ,
1861 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1862 this(commonAxisUsed, biasX, biasY, biasZ, listener);
1863 try {
1864 setPosition(position);
1865 } catch (LockedException ignore) {
1866 // never happens
1867 }
1868 }
1869
1870 /**
1871 * Constructor.
1872 *
1873 * @param position position where body kinematics measures have been taken.
1874 * @param measurements collection of body kinematics measurements with standard
1875 * deviations taken at the same position with zero velocity
1876 * and unknown different orientations.
1877 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1878 * accelerometer and gyroscope.
1879 * @param biasX x-coordinate of accelerometer bias.
1880 * This is expressed in meters per squared second (m/s^2).
1881 * @param biasY y-coordinate of accelerometer bias.
1882 * This is expressed in meters per squared second (m/s^2).
1883 * @param biasZ z-coordinate of accelerometer bias.
1884 * This is expressed in meters per squared second (m/s^2).
1885 */
1886 public KnownBiasAndPositionAccelerometerCalibrator(
1887 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
1888 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ) {
1889 this(measurements, commonAxisUsed, biasX, biasY, biasZ);
1890 try {
1891 setPosition(position);
1892 } catch (final LockedException ignore) {
1893 // never happens
1894 }
1895 }
1896
1897 /**
1898 * Constructor.
1899 *
1900 * @param position position where body kinematics measures have been taken.
1901 * @param measurements collection of body kinematics measurements with standard
1902 * deviations taken at the same position with zero velocity
1903 * and unknown different orientations.
1904 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
1905 * accelerometer and gyroscope.
1906 * @param biasX x-coordinate of accelerometer bias.
1907 * This is expressed in meters per squared second (m/s^2).
1908 * @param biasY y-coordinate of accelerometer bias.
1909 * This is expressed in meters per squared second (m/s^2).
1910 * @param biasZ z-coordinate of accelerometer bias.
1911 * This is expressed in meters per squared second (m/s^2).
1912 * @param listener listener to handle events raised by this calibrator.
1913 */
1914 public KnownBiasAndPositionAccelerometerCalibrator(
1915 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
1916 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ,
1917 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1918 this(measurements, commonAxisUsed, biasX, biasY, biasZ, listener);
1919 try {
1920 setPosition(position);
1921 } catch (final LockedException ignore) {
1922 // never happens
1923 }
1924 }
1925
1926 /**
1927 * Constructor.
1928 *
1929 * @param position position where body kinematics measures have been taken.
1930 * @param biasX x-coordinate of accelerometer bias.
1931 * @param biasY y-coordinate of accelerometer bias.
1932 * @param biasZ z-coordinate of accelerometer bias.
1933 */
1934 public KnownBiasAndPositionAccelerometerCalibrator(
1935 final ECEFPosition position, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ) {
1936 this(biasX, biasY, biasZ);
1937 try {
1938 setPosition(position);
1939 } catch (final LockedException ignore) {
1940 // never happens
1941 }
1942 }
1943
1944 /**
1945 * Constructor.
1946 *
1947 * @param position position where body kinematics measures have been taken.
1948 * @param biasX x-coordinate of accelerometer bias.
1949 * @param biasY y-coordinate of accelerometer bias.
1950 * @param biasZ z-coordinate of accelerometer bias.
1951 * @param listener listener to handle events raised by this calibrator.
1952 */
1953 public KnownBiasAndPositionAccelerometerCalibrator(
1954 final ECEFPosition position, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
1955 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
1956 this(biasX, biasY, biasZ, listener);
1957 try {
1958 setPosition(position);
1959 } catch (final LockedException ignore) {
1960 // never happens
1961 }
1962 }
1963
1964 /**
1965 * Constructor.
1966 *
1967 * @param position position where body kinematics measures have been taken.
1968 * @param measurements collection of body kinematics measurements with standard
1969 * deviations taken at the same position with zero velocity
1970 * and unknown different orientations.
1971 * @param biasX x-coordinate of accelerometer bias.
1972 * @param biasY y-coordinate of accelerometer bias.
1973 * @param biasZ z-coordinate of accelerometer bias.
1974 */
1975 public KnownBiasAndPositionAccelerometerCalibrator(
1976 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
1977 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ) {
1978 this(measurements, biasX, biasY, biasZ);
1979 try {
1980 setPosition(position);
1981 } catch (final LockedException ignore) {
1982 // never happens
1983 }
1984 }
1985
1986 /**
1987 * Constructor.
1988 *
1989 * @param position position where body kinematics measures have been taken.
1990 * @param measurements collection of body kinematics measurements with standard
1991 * deviations taken at the same position with zero velocity
1992 * and unknown different orientations.
1993 * @param biasX x-coordinate of accelerometer bias.
1994 * @param biasY y-coordinate of accelerometer bias.
1995 * @param biasZ z-coordinate of accelerometer bias.
1996 * @param listener listener to handle events raised by this calibrator.
1997 */
1998 public KnownBiasAndPositionAccelerometerCalibrator(
1999 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
2000 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
2001 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
2002 this(measurements, biasX, biasY, biasZ, listener);
2003 try {
2004 setPosition(position);
2005 } catch (final LockedException ignore) {
2006 // never happens
2007 }
2008 }
2009
2010 /**
2011 * Constructor.
2012 *
2013 * @param position position where body kinematics measures have been taken.
2014 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2015 * accelerometer and gyroscope.
2016 * @param biasX x-coordinate of accelerometer bias.
2017 * @param biasY y-coordinate of accelerometer bias.
2018 * @param biasZ z-coordinate of accelerometer bias.
2019 */
2020 public KnownBiasAndPositionAccelerometerCalibrator(
2021 final ECEFPosition position, final boolean commonAxisUsed, final Acceleration biasX,
2022 final Acceleration biasY, final Acceleration biasZ) {
2023 this(commonAxisUsed, biasX, biasY, biasZ);
2024 try {
2025 setPosition(position);
2026 } catch (final LockedException ignore) {
2027 // never happens
2028 }
2029 }
2030
2031 /**
2032 * Constructor.
2033 *
2034 * @param position position where body kinematics measures have been taken.
2035 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2036 * accelerometer and gyroscope.
2037 * @param biasX x-coordinate of accelerometer bias.
2038 * @param biasY y-coordinate of accelerometer bias.
2039 * @param biasZ z-coordinate of accelerometer bias.
2040 * @param listener listener to handle events raised by this calibrator.
2041 */
2042 public KnownBiasAndPositionAccelerometerCalibrator(
2043 final ECEFPosition position, final boolean commonAxisUsed, final Acceleration biasX,
2044 final Acceleration biasY, final Acceleration biasZ,
2045 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
2046 this(commonAxisUsed, biasX, biasY, biasZ, listener);
2047 try {
2048 setPosition(position);
2049 } catch (final LockedException ignore) {
2050 // never happens
2051 }
2052 }
2053
2054 /**
2055 * Constructor.
2056 *
2057 * @param position position where body kinematics measures have been taken.
2058 * @param measurements collection of body kinematics measurements with standard
2059 * deviations taken at the same position with zero velocity
2060 * and unknown different orientations.
2061 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2062 * accelerometer and gyroscope.
2063 * @param biasX x-coordinate of accelerometer bias.
2064 * @param biasY y-coordinate of accelerometer bias.
2065 * @param biasZ z-coordinate of accelerometer bias.
2066 */
2067 public KnownBiasAndPositionAccelerometerCalibrator(
2068 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
2069 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY,
2070 final Acceleration biasZ) {
2071 this(measurements, commonAxisUsed, biasX, biasY, biasZ);
2072 try {
2073 setPosition(position);
2074 } catch (final LockedException ignore) {
2075 // never happens
2076 }
2077 }
2078
2079 /**
2080 * Constructor.
2081 *
2082 * @param position position where body kinematics measures have been taken.
2083 * @param measurements collection of body kinematics measurements with standard
2084 * deviations taken at the same position with zero velocity
2085 * and unknown different orientations.
2086 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2087 * accelerometer and gyroscope.
2088 * @param biasX x-coordinate of accelerometer bias.
2089 * @param biasY y-coordinate of accelerometer bias.
2090 * @param biasZ z-coordinate of accelerometer bias.
2091 * @param listener listener to handle events raised by this calibrator.
2092 */
2093 public KnownBiasAndPositionAccelerometerCalibrator(
2094 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
2095 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
2096 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
2097 this(measurements, commonAxisUsed, biasX, biasY, biasZ, listener);
2098 try {
2099 setPosition(position);
2100 } catch (final LockedException ignore) {
2101 // never happens
2102 }
2103 }
2104
2105 /**
2106 * Constructor.
2107 *
2108 * @param position position where body kinematics measures have been taken.
2109 * @param biasX x-coordinate of accelerometer bias.
2110 * This is expressed in meters per squared second (m/s^2).
2111 * @param biasY y-coordinate of accelerometer bias.
2112 * This is expressed in meters per squared second (m/s^2).
2113 * @param biasZ z-coordinate of accelerometer bias.
2114 * This is expressed in meters per squared second (m/s^2).
2115 * @param initialSx initial x scaling factor.
2116 * @param initialSy initial y scaling factor.
2117 * @param initialSz initial z scaling factor.
2118 */
2119 public KnownBiasAndPositionAccelerometerCalibrator(
2120 final ECEFPosition position, final double biasX, final double biasY, final double biasZ,
2121 final double initialSx, final double initialSy, final double initialSz) {
2122 this(biasX, biasY, biasZ, initialSx, initialSy, initialSz);
2123 try {
2124 setPosition(position);
2125 } catch (final LockedException ignore) {
2126 // never happens
2127 }
2128 }
2129
2130 /**
2131 * Constructor.
2132 *
2133 * @param position position where body kinematics measures have been taken.
2134 * @param measurements collection of body kinematics measurements with standard
2135 * deviations taken at the same position with zero velocity
2136 * and unknown different orientations.
2137 * @param biasX x-coordinate of accelerometer bias.
2138 * This is expressed in meters per squared second (m/s^2).
2139 * @param biasY y-coordinate of accelerometer bias.
2140 * This is expressed in meters per squared second (m/s^2).
2141 * @param biasZ z-coordinate of accelerometer bias.
2142 * This is expressed in meters per squared second (m/s^2).
2143 * @param initialSx initial x scaling factor.
2144 * @param initialSy initial y scaling factor.
2145 * @param initialSz initial z scaling factor.
2146 */
2147 public KnownBiasAndPositionAccelerometerCalibrator(
2148 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
2149 final double biasX, final double biasY, final double biasZ,
2150 final double initialSx, final double initialSy, final double initialSz) {
2151 this(measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz);
2152 try {
2153 setPosition(position);
2154 } catch (final LockedException ignore) {
2155 // never happens
2156 }
2157 }
2158
2159 /**
2160 * Constructor.
2161 *
2162 * @param position position where body kinematics measures have been taken.
2163 * @param measurements collection of body kinematics measurements with standard
2164 * deviations taken at the same position with zero velocity
2165 * and unknown different orientations.
2166 * @param biasX x-coordinate of accelerometer bias.
2167 * This is expressed in meters per squared second (m/s^2).
2168 * @param biasY y-coordinate of accelerometer bias.
2169 * This is expressed in meters per squared second (m/s^2).
2170 * @param biasZ z-coordinate of accelerometer bias.
2171 * This is expressed in meters per squared second (m/s^2).
2172 * @param initialSx initial x scaling factor.
2173 * @param initialSy initial y scaling factor.
2174 * @param initialSz initial z scaling factor.
2175 * @param listener listener to handle events raised by this calibrator.
2176 */
2177 public KnownBiasAndPositionAccelerometerCalibrator(
2178 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
2179 final double biasX, final double biasY, final double biasZ, final double initialSx, final double initialSy,
2180 final double initialSz, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
2181 this(measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
2182 try {
2183 setPosition(position);
2184 } catch (final LockedException ignore) {
2185 // never happens
2186 }
2187 }
2188
2189 /**
2190 * Constructor.
2191 *
2192 * @param position position where body kinematics measures have been taken.
2193 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2194 * accelerometer and gyroscope.
2195 * @param biasX x-coordinate of accelerometer bias.
2196 * This is expressed in meters per squared second (m/s^2).
2197 * @param biasY y-coordinate of accelerometer bias.
2198 * This is expressed in meters per squared second (m/s^2).
2199 * @param biasZ z-coordinate of accelerometer bias.
2200 * This is expressed in meters per squared second (m/s^2).
2201 * @param initialSx initial x scaling factor.
2202 * @param initialSy initial y scaling factor.
2203 * @param initialSz initial z scaling factor.
2204 */
2205 public KnownBiasAndPositionAccelerometerCalibrator(
2206 final ECEFPosition position, final boolean commonAxisUsed, final double biasX, final double biasY,
2207 final double biasZ, final double initialSx, final double initialSy, final double initialSz) {
2208 this(commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz);
2209 try {
2210 setPosition(position);
2211 } catch (final LockedException ignore) {
2212 // never happens
2213 }
2214 }
2215
2216 /**
2217 * Constructor.
2218 *
2219 * @param position position where body kinematics measures have been taken.
2220 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2221 * accelerometer and gyroscope.
2222 * @param biasX x-coordinate of accelerometer bias.
2223 * This is expressed in meters per squared second (m/s^2).
2224 * @param biasY y-coordinate of accelerometer bias.
2225 * This is expressed in meters per squared second (m/s^2).
2226 * @param biasZ z-coordinate of accelerometer bias.
2227 * This is expressed in meters per squared second (m/s^2).
2228 * @param initialSx initial x scaling factor.
2229 * @param initialSy initial y scaling factor.
2230 * @param initialSz initial z scaling factor.
2231 * @param listener listener to handle events raised by this calibrator.
2232 */
2233 public KnownBiasAndPositionAccelerometerCalibrator(
2234 final ECEFPosition position, final boolean commonAxisUsed, final double biasX, final double biasY,
2235 final double biasZ, final double initialSx, final double initialSy, final double initialSz,
2236 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
2237 this(commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
2238 try {
2239 setPosition(position);
2240 } catch (final LockedException ignore) {
2241 // never happens
2242 }
2243 }
2244
2245 /**
2246 * Constructor.
2247 *
2248 * @param position position where body kinematics measures have been taken.
2249 * @param measurements collection of body kinematics measurements with standard
2250 * deviations taken at the same position with zero velocity
2251 * and unknown different orientations.
2252 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2253 * accelerometer and gyroscope.
2254 * @param biasX x-coordinate of accelerometer bias.
2255 * This is expressed in meters per squared second (m/s^2).
2256 * @param biasY y-coordinate of accelerometer bias.
2257 * This is expressed in meters per squared second (m/s^2).
2258 * @param biasZ z-coordinate of accelerometer bias.
2259 * This is expressed in meters per squared second (m/s^2).
2260 * @param initialSx initial x scaling factor.
2261 * @param initialSy initial y scaling factor.
2262 * @param initialSz initial z scaling factor.
2263 */
2264 public KnownBiasAndPositionAccelerometerCalibrator(
2265 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
2266 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ,
2267 final double initialSx, final double initialSy, final double initialSz) {
2268 this(measurements, commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz);
2269 try {
2270 setPosition(position);
2271 } catch (final LockedException ignore) {
2272 // never happens
2273 }
2274 }
2275
2276 /**
2277 * Constructor.
2278 *
2279 * @param position position where body kinematics measures have been taken.
2280 * @param measurements collection of body kinematics measurements with standard
2281 * deviations taken at the same position with zero velocity
2282 * and unknown different orientations.
2283 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2284 * accelerometer and gyroscope.
2285 * @param biasX x-coordinate of accelerometer bias.
2286 * This is expressed in meters per squared second (m/s^2).
2287 * @param biasY y-coordinate of accelerometer bias.
2288 * This is expressed in meters per squared second (m/s^2).
2289 * @param biasZ z-coordinate of accelerometer bias.
2290 * This is expressed in meters per squared second (m/s^2).
2291 * @param initialSx initial x scaling factor.
2292 * @param initialSy initial y scaling factor.
2293 * @param initialSz initial z scaling factor.
2294 * @param listener listener to handle events raised by this calibrator.
2295 */
2296 public KnownBiasAndPositionAccelerometerCalibrator(
2297 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
2298 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ,
2299 final double initialSx, final double initialSy, final double initialSz,
2300 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
2301 this(measurements, commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
2302 try {
2303 setPosition(position);
2304 } catch (final LockedException ignore) {
2305 // never happens
2306 }
2307 }
2308
2309 /**
2310 * Constructor.
2311 *
2312 * @param position position where body kinematics measures have been taken.
2313 * @param biasX x-coordinate of accelerometer bias.
2314 * @param biasY y-coordinate of accelerometer bias.
2315 * @param biasZ z-coordinate of accelerometer bias.
2316 * @param initialSx initial x scaling factor.
2317 * @param initialSy initial y scaling factor.
2318 * @param initialSz initial z scaling factor.
2319 */
2320 public KnownBiasAndPositionAccelerometerCalibrator(
2321 final ECEFPosition position, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
2322 final double initialSx, final double initialSy, final double initialSz) {
2323 this(biasX, biasY, biasZ, initialSx, initialSy, initialSz);
2324 try {
2325 setPosition(position);
2326 } catch (final LockedException ignore) {
2327 // never happens
2328 }
2329 }
2330
2331 /**
2332 * Constructor.
2333 *
2334 * @param position position where body kinematics measures have been taken.
2335 * @param biasX x-coordinate of accelerometer bias.
2336 * @param biasY y-coordinate of accelerometer bias.
2337 * @param biasZ z-coordinate of accelerometer bias.
2338 * @param initialSx initial x scaling factor.
2339 * @param initialSy initial y scaling factor.
2340 * @param initialSz initial z scaling factor.
2341 * @param listener listener to handle events raised by this calibrator.
2342 */
2343 public KnownBiasAndPositionAccelerometerCalibrator(
2344 final ECEFPosition position, final Acceleration biasX, final Acceleration biasY,
2345 final Acceleration biasZ, final double initialSx, final double initialSy, final double initialSz,
2346 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
2347 this(biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
2348 try {
2349 setPosition(position);
2350 } catch (final LockedException ignore) {
2351 // never happens
2352 }
2353 }
2354
2355 /**
2356 * Constructor.
2357 *
2358 * @param position position where body kinematics measures have been taken.
2359 * @param measurements collection of body kinematics measurements with standard
2360 * deviations taken at the same position with zero velocity
2361 * and unknown different orientations.
2362 * @param biasX x-coordinate of accelerometer bias.
2363 * @param biasY y-coordinate of accelerometer bias.
2364 * @param biasZ z-coordinate of accelerometer bias.
2365 * @param initialSx initial x scaling factor.
2366 * @param initialSy initial y scaling factor.
2367 * @param initialSz initial z scaling factor.
2368 */
2369 public KnownBiasAndPositionAccelerometerCalibrator(
2370 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
2371 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ, final double initialSx,
2372 final double initialSy, final double initialSz) {
2373 this(measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz);
2374 try {
2375 setPosition(position);
2376 } catch (final LockedException ignore) {
2377 // never happens
2378 }
2379 }
2380
2381 /**
2382 * Constructor.
2383 *
2384 * @param position position where body kinematics measures have been taken.
2385 * @param measurements collection of body kinematics measurements with standard
2386 * deviations taken at the same position with zero velocity
2387 * and unknown different orientations.
2388 * @param biasX x-coordinate of accelerometer bias.
2389 * @param biasY y-coordinate of accelerometer bias.
2390 * @param biasZ z-coordinate of accelerometer bias.
2391 * @param initialSx initial x scaling factor.
2392 * @param initialSy initial y scaling factor.
2393 * @param initialSz initial z scaling factor.
2394 * @param listener listener to handle events raised by this calibrator.
2395 */
2396 public KnownBiasAndPositionAccelerometerCalibrator(
2397 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
2398 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ, final double initialSx,
2399 final double initialSy, final double initialSz,
2400 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
2401 this(measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
2402 try {
2403 setPosition(position);
2404 } catch (final LockedException ignore) {
2405 // never happens
2406 }
2407 }
2408
2409 /**
2410 * Constructor.
2411 *
2412 * @param position position where body kinematics measures have been taken.
2413 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2414 * accelerometer and gyroscope.
2415 * @param biasX x-coordinate of accelerometer bias.
2416 * @param biasY y-coordinate of accelerometer bias.
2417 * @param biasZ z-coordinate of accelerometer bias.
2418 * @param initialSx initial x scaling factor.
2419 * @param initialSy initial y scaling factor.
2420 * @param initialSz initial z scaling factor.
2421 */
2422 public KnownBiasAndPositionAccelerometerCalibrator(
2423 final ECEFPosition position, final boolean commonAxisUsed, final Acceleration biasX,
2424 final Acceleration biasY, final Acceleration biasZ, final double initialSx, final double initialSy,
2425 final double initialSz) {
2426 this(commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz);
2427 try {
2428 setPosition(position);
2429 } catch (final LockedException ignore) {
2430 // never happens
2431 }
2432 }
2433
2434 /**
2435 * Constructor.
2436 *
2437 * @param position position where body kinematics measures have been taken.
2438 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2439 * accelerometer and gyroscope.
2440 * @param biasX x-coordinate of accelerometer bias.
2441 * @param biasY y-coordinate of accelerometer bias.
2442 * @param biasZ z-coordinate of accelerometer bias.
2443 * @param initialSx initial x scaling factor.
2444 * @param initialSy initial y scaling factor.
2445 * @param initialSz initial z scaling factor.
2446 * @param listener listener to handle events raised by this calibrator.
2447 */
2448 public KnownBiasAndPositionAccelerometerCalibrator(
2449 final ECEFPosition position, final boolean commonAxisUsed, final Acceleration biasX,
2450 final Acceleration biasY, final Acceleration biasZ, final double initialSx, final double initialSy,
2451 final double initialSz, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
2452 this(commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
2453 try {
2454 setPosition(position);
2455 } catch (final LockedException ignore) {
2456 // never happens
2457 }
2458 }
2459
2460 /**
2461 * Constructor.
2462 *
2463 * @param position position where body kinematics measures have been taken.
2464 * @param measurements collection of body kinematics measurements with standard
2465 * deviations taken at the same position with zero velocity
2466 * and unknown different orientations.
2467 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2468 * accelerometer and gyroscope.
2469 * @param biasX x-coordinate of accelerometer bias.
2470 * @param biasY y-coordinate of accelerometer bias.
2471 * @param biasZ z-coordinate of accelerometer bias.
2472 * @param initialSx initial x scaling factor.
2473 * @param initialSy initial y scaling factor.
2474 * @param initialSz initial z scaling factor.
2475 */
2476 public KnownBiasAndPositionAccelerometerCalibrator(
2477 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
2478 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
2479 final double initialSx, final double initialSy, final double initialSz) {
2480 this(measurements, commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz);
2481 try {
2482 setPosition(position);
2483 } catch (final LockedException ignore) {
2484 // never happens
2485 }
2486 }
2487
2488 /**
2489 * Constructor.
2490 *
2491 * @param position position where body kinematics measures have been taken.
2492 * @param measurements collection of body kinematics measurements with standard
2493 * deviations taken at the same position with zero velocity
2494 * and unknown different orientations.
2495 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2496 * accelerometer and gyroscope.
2497 * @param biasX x-coordinate of accelerometer bias.
2498 * @param biasY y-coordinate of accelerometer bias.
2499 * @param biasZ z-coordinate of accelerometer bias.
2500 * @param initialSx initial x scaling factor.
2501 * @param initialSy initial y scaling factor.
2502 * @param initialSz initial z scaling factor.
2503 * @param listener listener to handle events raised by this calibrator.
2504 */
2505 public KnownBiasAndPositionAccelerometerCalibrator(
2506 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
2507 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
2508 final double initialSx, final double initialSy, final double initialSz,
2509 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
2510 this(measurements, commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
2511 try {
2512 setPosition(position);
2513 } catch (final LockedException ignore) {
2514 // never happens
2515 }
2516 }
2517
2518 /**
2519 * Constructor.
2520 *
2521 * @param position position where body kinematics measures have been taken.
2522 * @param biasX x-coordinate of accelerometer bias.
2523 * This is expressed in meters per squared second (m/s^2).
2524 * @param biasY y-coordinate of accelerometer bias.
2525 * This is expressed in meters per squared second (m/s^2).
2526 * @param biasZ z-coordinate of accelerometer bias.
2527 * This is expressed in meters per squared second (m/s^2).
2528 * @param initialSx initial x scaling factor.
2529 * @param initialSy initial y scaling factor.
2530 * @param initialSz initial z scaling factor.
2531 * @param initialMxy initial x-y cross coupling error.
2532 * @param initialMxz initial x-z cross coupling error.
2533 * @param initialMyx initial y-x cross coupling error.
2534 * @param initialMyz initial y-z cross coupling error.
2535 * @param initialMzx initial z-x cross coupling error.
2536 * @param initialMzy initial z-y cross coupling error.
2537 */
2538 public KnownBiasAndPositionAccelerometerCalibrator(
2539 final ECEFPosition position, final double biasX, final double biasY, final double biasZ,
2540 final double initialSx, final double initialSy, final double initialSz,
2541 final double initialMxy, final double initialMxz, final double initialMyx,
2542 final double initialMyz, final double initialMzx, final double initialMzy) {
2543 this(biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
2544 initialMyz, initialMzx, initialMzy);
2545 try {
2546 setPosition(position);
2547 } catch (final LockedException ignore) {
2548 // never happens
2549 }
2550 }
2551
2552 /**
2553 * Constructor.
2554 *
2555 * @param position position where body kinematics measures have been taken.
2556 * @param measurements collection of body kinematics measurements with standard
2557 * deviations taken at the same position with zero velocity
2558 * and unknown different orientations.
2559 * @param biasX x-coordinate of accelerometer bias.
2560 * This is expressed in meters per squared second (m/s^2).
2561 * @param biasY y-coordinate of accelerometer bias.
2562 * This is expressed in meters per squared second (m/s^2).
2563 * @param biasZ z-coordinate of accelerometer bias.
2564 * This is expressed in meters per squared second (m/s^2).
2565 * @param initialSx initial x scaling factor.
2566 * @param initialSy initial y scaling factor.
2567 * @param initialSz initial z scaling factor.
2568 * @param initialMxy initial x-y cross coupling error.
2569 * @param initialMxz initial x-z cross coupling error.
2570 * @param initialMyx initial y-x cross coupling error.
2571 * @param initialMyz initial y-z cross coupling error.
2572 * @param initialMzx initial z-x cross coupling error.
2573 * @param initialMzy initial z-y cross coupling error.
2574 */
2575 public KnownBiasAndPositionAccelerometerCalibrator(
2576 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
2577 final double biasX, final double biasY, final double biasZ, final double initialSx, final double initialSy,
2578 final double initialSz, final double initialMxy, final double initialMxz, final double initialMyx,
2579 final double initialMyz, final double initialMzx, final double initialMzy) {
2580 this(measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
2581 initialMyz, initialMzx, initialMzy);
2582 try {
2583 setPosition(position);
2584 } catch (final LockedException ignore) {
2585 // never happens
2586 }
2587 }
2588
2589 /**
2590 * Constructor.
2591 *
2592 * @param position position where body kinematics measures have been taken.
2593 * @param measurements collection of body kinematics measurements with standard
2594 * deviations taken at the same position with zero velocity
2595 * and unknown different orientations.
2596 * @param biasX x-coordinate of accelerometer bias.
2597 * This is expressed in meters per squared second (m/s^2).
2598 * @param biasY y-coordinate of accelerometer bias.
2599 * This is expressed in meters per squared second (m/s^2).
2600 * @param biasZ z-coordinate of accelerometer bias.
2601 * This is expressed in meters per squared second (m/s^2).
2602 * @param initialSx initial x scaling factor.
2603 * @param initialSy initial y scaling factor.
2604 * @param initialSz initial z scaling factor.
2605 * @param initialMxy initial x-y cross coupling error.
2606 * @param initialMxz initial x-z cross coupling error.
2607 * @param initialMyx initial y-x cross coupling error.
2608 * @param initialMyz initial y-z cross coupling error.
2609 * @param initialMzx initial z-x cross coupling error.
2610 * @param initialMzy initial z-y cross coupling error.
2611 * @param listener listener to handle events raised by this calibrator.
2612 */
2613 public KnownBiasAndPositionAccelerometerCalibrator(
2614 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
2615 final double biasX, final double biasY, final double biasZ, final double initialSx, final double initialSy,
2616 final double initialSz, final double initialMxy, final double initialMxz, final double initialMyx,
2617 final double initialMyz, final double initialMzx, final double initialMzy,
2618 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
2619 this(measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz,
2620 initialMyx, initialMyz, initialMzx, initialMzy, listener);
2621 try {
2622 setPosition(position);
2623 } catch (final LockedException ignore) {
2624 // never happens
2625 }
2626 }
2627
2628 /**
2629 * Constructor.
2630 *
2631 * @param position position where body kinematics measures have been taken.
2632 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2633 * accelerometer and gyroscope.
2634 * @param biasX x-coordinate of accelerometer bias.
2635 * This is expressed in meters per squared second (m/s^2).
2636 * @param biasY y-coordinate of accelerometer bias.
2637 * This is expressed in meters per squared second (m/s^2).
2638 * @param biasZ z-coordinate of accelerometer bias.
2639 * This is expressed in meters per squared second (m/s^2).
2640 * @param initialSx initial x scaling factor.
2641 * @param initialSy initial y scaling factor.
2642 * @param initialSz initial z scaling factor.
2643 * @param initialMxy initial x-y cross coupling error.
2644 * @param initialMxz initial x-z cross coupling error.
2645 * @param initialMyx initial y-x cross coupling error.
2646 * @param initialMyz initial y-z cross coupling error.
2647 * @param initialMzx initial z-x cross coupling error.
2648 * @param initialMzy initial z-y cross coupling error.
2649 */
2650 public KnownBiasAndPositionAccelerometerCalibrator(
2651 final ECEFPosition position, final boolean commonAxisUsed, final double biasX, final double biasY,
2652 final double biasZ, final double initialSx, final double initialSy, final double initialSz,
2653 final double initialMxy, final double initialMxz, final double initialMyx, final double initialMyz,
2654 final double initialMzx, final double initialMzy) {
2655 this(commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
2656 initialMyz, initialMzx, initialMzy);
2657 try {
2658 setPosition(position);
2659 } catch (final LockedException ignore) {
2660 // never happens
2661 }
2662 }
2663
2664 /**
2665 * Constructor.
2666 *
2667 * @param position position where body kinematics measures have been taken.
2668 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2669 * accelerometer and gyroscope.
2670 * @param biasX x-coordinate of accelerometer bias.
2671 * This is expressed in meters per squared second (m/s^2).
2672 * @param biasY y-coordinate of accelerometer bias.
2673 * This is expressed in meters per squared second (m/s^2).
2674 * @param biasZ z-coordinate of accelerometer bias.
2675 * This is expressed in meters per squared second (m/s^2).
2676 * @param initialSx initial x scaling factor.
2677 * @param initialSy initial y scaling factor.
2678 * @param initialSz initial z scaling factor.
2679 * @param initialMxy initial x-y cross coupling error.
2680 * @param initialMxz initial x-z cross coupling error.
2681 * @param initialMyx initial y-x cross coupling error.
2682 * @param initialMyz initial y-z cross coupling error.
2683 * @param initialMzx initial z-x cross coupling error.
2684 * @param initialMzy initial z-y cross coupling error.
2685 * @param listener listener to handle events raised by this calibrator.
2686 */
2687 public KnownBiasAndPositionAccelerometerCalibrator(
2688 final ECEFPosition position, final boolean commonAxisUsed, final double biasX, final double biasY,
2689 final double biasZ, final double initialSx, final double initialSy, final double initialSz,
2690 final double initialMxy, final double initialMxz, final double initialMyx, final double initialMyz,
2691 final double initialMzx, final double initialMzy,
2692 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
2693 this(commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
2694 initialMyz, initialMzx, initialMzy, listener);
2695 try {
2696 setPosition(position);
2697 } catch (final LockedException ignore) {
2698 // never happens
2699 }
2700 }
2701
2702 /**
2703 * Constructor.
2704 *
2705 * @param position position where body kinematics measures have been taken.
2706 * @param measurements collection of body kinematics measurements with standard
2707 * deviations taken at the same position with zero velocity
2708 * and unknown different orientations.
2709 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2710 * accelerometer and gyroscope.
2711 * @param biasX x-coordinate of accelerometer bias.
2712 * This is expressed in meters per squared second (m/s^2).
2713 * @param biasY y-coordinate of accelerometer bias.
2714 * This is expressed in meters per squared second (m/s^2).
2715 * @param biasZ z-coordinate of accelerometer bias.
2716 * This is expressed in meters per squared second (m/s^2).
2717 * @param initialSx initial x scaling factor.
2718 * @param initialSy initial y scaling factor.
2719 * @param initialSz initial z scaling factor.
2720 * @param initialMxy initial x-y cross coupling error.
2721 * @param initialMxz initial x-z cross coupling error.
2722 * @param initialMyx initial y-x cross coupling error.
2723 * @param initialMyz initial y-z cross coupling error.
2724 * @param initialMzx initial z-x cross coupling error.
2725 * @param initialMzy initial z-y cross coupling error.
2726 */
2727 public KnownBiasAndPositionAccelerometerCalibrator(
2728 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
2729 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ,
2730 final double initialSx, final double initialSy, final double initialSz,
2731 final double initialMxy, final double initialMxz, final double initialMyx,
2732 final double initialMyz, final double initialMzx, final double initialMzy) {
2733 this(measurements, commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz,
2734 initialMxy, initialMxz, initialMyx, initialMyz, initialMzx, initialMzy);
2735 try {
2736 setPosition(position);
2737 } catch (final LockedException ignore) {
2738 // never happens
2739 }
2740 }
2741
2742 /**
2743 * Constructor.
2744 *
2745 * @param position position where body kinematics measures have been taken.
2746 * @param measurements collection of body kinematics measurements with standard
2747 * deviations taken at the same position with zero velocity
2748 * and unknown different orientations.
2749 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2750 * accelerometer and gyroscope.
2751 * @param biasX x-coordinate of accelerometer bias.
2752 * This is expressed in meters per squared second (m/s^2).
2753 * @param biasY y-coordinate of accelerometer bias.
2754 * This is expressed in meters per squared second (m/s^2).
2755 * @param biasZ z-coordinate of accelerometer bias.
2756 * This is expressed in meters per squared second (m/s^2).
2757 * @param initialSx initial x scaling factor.
2758 * @param initialSy initial y scaling factor.
2759 * @param initialSz initial z scaling factor.
2760 * @param initialMxy initial x-y cross coupling error.
2761 * @param initialMxz initial x-z cross coupling error.
2762 * @param initialMyx initial y-x cross coupling error.
2763 * @param initialMyz initial y-z cross coupling error.
2764 * @param initialMzx initial z-x cross coupling error.
2765 * @param initialMzy initial z-y cross coupling error.
2766 * @param listener listener to handle events raised by this calibrator.
2767 */
2768 public KnownBiasAndPositionAccelerometerCalibrator(
2769 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
2770 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ,
2771 final double initialSx, final double initialSy, final double initialSz,
2772 final double initialMxy, final double initialMxz, final double initialMyx,
2773 final double initialMyz, final double initialMzx, final double initialMzy,
2774 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
2775 this(measurements, commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz,
2776 initialMxy, initialMxz, initialMyx, initialMyz, initialMzx, initialMzy, listener);
2777 try {
2778 setPosition(position);
2779 } catch (final LockedException ignore) {
2780 // never happens
2781 }
2782 }
2783
2784 /**
2785 * Constructor.
2786 *
2787 * @param position position where body kinematics measures have been taken.
2788 * @param biasX x-coordinate of accelerometer bias.
2789 * @param biasY y-coordinate of accelerometer bias.
2790 * @param biasZ z-coordinate of accelerometer bias.
2791 * @param initialSx initial x scaling factor.
2792 * @param initialSy initial y scaling factor.
2793 * @param initialSz initial z scaling factor.
2794 * @param initialMxy initial x-y cross coupling error.
2795 * @param initialMxz initial x-z cross coupling error.
2796 * @param initialMyx initial y-x cross coupling error.
2797 * @param initialMyz initial y-z cross coupling error.
2798 * @param initialMzx initial z-x cross coupling error.
2799 * @param initialMzy initial z-y cross coupling error.
2800 */
2801 public KnownBiasAndPositionAccelerometerCalibrator(
2802 final ECEFPosition position, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
2803 final double initialSx, final double initialSy, final double initialSz,
2804 final double initialMxy, final double initialMxz, final double initialMyx, final double initialMyz,
2805 final double initialMzx, final double initialMzy) {
2806 this(biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
2807 initialMyz, initialMzx, initialMzy);
2808 try {
2809 setPosition(position);
2810 } catch (final LockedException ignore) {
2811 // never happens
2812 }
2813 }
2814
2815 /**
2816 * Constructor.
2817 *
2818 * @param position position where body kinematics measures have been taken.
2819 * @param biasX x-coordinate of accelerometer bias.
2820 * @param biasY y-coordinate of accelerometer bias.
2821 * @param biasZ z-coordinate of accelerometer bias.
2822 * @param initialSx initial x scaling factor.
2823 * @param initialSy initial y scaling factor.
2824 * @param initialSz initial z scaling factor.
2825 * @param initialMxy initial x-y cross coupling error.
2826 * @param initialMxz initial x-z cross coupling error.
2827 * @param initialMyx initial y-x cross coupling error.
2828 * @param initialMyz initial y-z cross coupling error.
2829 * @param initialMzx initial z-x cross coupling error.
2830 * @param initialMzy initial z-y cross coupling error.
2831 * @param listener listener to handle events raised by this calibrator.
2832 */
2833 public KnownBiasAndPositionAccelerometerCalibrator(
2834 final ECEFPosition position, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
2835 final double initialSx, final double initialSy, final double initialSz,
2836 final double initialMxy, final double initialMxz, final double initialMyx, final double initialMyz,
2837 final double initialMzx, final double initialMzy,
2838 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
2839 this(biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
2840 initialMyz, initialMzx, initialMzy, listener);
2841 try {
2842 setPosition(position);
2843 } catch (final LockedException ignore) {
2844 // never happens
2845 }
2846 }
2847
2848 /**
2849 * Constructor.
2850 *
2851 * @param position position where body kinematics measures have been taken.
2852 * @param measurements collection of body kinematics measurements with standard
2853 * deviations taken at the same position with zero velocity
2854 * and unknown different orientations.
2855 * @param biasX x-coordinate of accelerometer bias.
2856 * @param biasY y-coordinate of accelerometer bias.
2857 * @param biasZ z-coordinate of accelerometer bias.
2858 * @param initialSx initial x scaling factor.
2859 * @param initialSy initial y scaling factor.
2860 * @param initialSz initial z scaling factor.
2861 * @param initialMxy initial x-y cross coupling error.
2862 * @param initialMxz initial x-z cross coupling error.
2863 * @param initialMyx initial y-x cross coupling error.
2864 * @param initialMyz initial y-z cross coupling error.
2865 * @param initialMzx initial z-x cross coupling error.
2866 * @param initialMzy initial z-y cross coupling error.
2867 */
2868 public KnownBiasAndPositionAccelerometerCalibrator(
2869 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
2870 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ, final double initialSx,
2871 final double initialSy, final double initialSz, final double initialMxy, final double initialMxz,
2872 final double initialMyx, final double initialMyz, final double initialMzx, final double initialMzy) {
2873 this(measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
2874 initialMyz, initialMzx, initialMzy);
2875 try {
2876 setPosition(position);
2877 } catch (final LockedException ignore) {
2878 // never happens
2879 }
2880 }
2881
2882 /**
2883 * Constructor.
2884 *
2885 * @param position position where body kinematics measures have been taken.
2886 * @param measurements collection of body kinematics measurements with standard
2887 * deviations taken at the same position with zero velocity
2888 * and unknown different orientations.
2889 * @param biasX x-coordinate of accelerometer bias.
2890 * @param biasY y-coordinate of accelerometer bias.
2891 * @param biasZ z-coordinate of accelerometer bias.
2892 * @param initialSx initial x scaling factor.
2893 * @param initialSy initial y scaling factor.
2894 * @param initialSz initial z scaling factor.
2895 * @param initialMxy initial x-y cross coupling error.
2896 * @param initialMxz initial x-z cross coupling error.
2897 * @param initialMyx initial y-x cross coupling error.
2898 * @param initialMyz initial y-z cross coupling error.
2899 * @param initialMzx initial z-x cross coupling error.
2900 * @param initialMzy initial z-y cross coupling error.
2901 * @param listener listener to handle events raised by this calibrator.
2902 */
2903 public KnownBiasAndPositionAccelerometerCalibrator(
2904 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
2905 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ, final double initialSx,
2906 final double initialSy, final double initialSz, final double initialMxy, final double initialMxz,
2907 final double initialMyx, final double initialMyz, final double initialMzx, final double initialMzy,
2908 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
2909 this(measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
2910 initialMyz, initialMzx, initialMzy, listener);
2911 try {
2912 setPosition(position);
2913 } catch (final LockedException ignore) {
2914 // never happens
2915 }
2916 }
2917
2918 /**
2919 * Constructor.
2920 *
2921 * @param position position where body kinematics measures have been taken.
2922 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2923 * accelerometer and gyroscope.
2924 * @param biasX x-coordinate of accelerometer bias.
2925 * @param biasY y-coordinate of accelerometer bias.
2926 * @param biasZ z-coordinate of accelerometer bias.
2927 * @param initialSx initial x scaling factor.
2928 * @param initialSy initial y scaling factor.
2929 * @param initialSz initial z scaling factor.
2930 * @param initialMxy initial x-y cross coupling error.
2931 * @param initialMxz initial x-z cross coupling error.
2932 * @param initialMyx initial y-x cross coupling error.
2933 * @param initialMyz initial y-z cross coupling error.
2934 * @param initialMzx initial z-x cross coupling error.
2935 * @param initialMzy initial z-y cross coupling error.
2936 */
2937 public KnownBiasAndPositionAccelerometerCalibrator(
2938 final ECEFPosition position, final boolean commonAxisUsed, final Acceleration biasX,
2939 final Acceleration biasY, final Acceleration biasZ, final double initialSx, final double initialSy,
2940 final double initialSz, final double initialMxy, final double initialMxz, final double initialMyx,
2941 final double initialMyz, final double initialMzx, final double initialMzy) {
2942 this(commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
2943 initialMyz, initialMzx, initialMzy);
2944 try {
2945 setPosition(position);
2946 } catch (final LockedException ignore) {
2947 // never happens
2948 }
2949 }
2950
2951 /**
2952 * Constructor.
2953 *
2954 * @param position position where body kinematics measures have been taken.
2955 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2956 * accelerometer and gyroscope.
2957 * @param biasX x-coordinate of accelerometer bias.
2958 * @param biasY y-coordinate of accelerometer bias.
2959 * @param biasZ z-coordinate of accelerometer bias.
2960 * @param initialSx initial x scaling factor.
2961 * @param initialSy initial y scaling factor.
2962 * @param initialSz initial z scaling factor.
2963 * @param initialMxy initial x-y cross coupling error.
2964 * @param initialMxz initial x-z cross coupling error.
2965 * @param initialMyx initial y-x cross coupling error.
2966 * @param initialMyz initial y-z cross coupling error.
2967 * @param initialMzx initial z-x cross coupling error.
2968 * @param initialMzy initial z-y cross coupling error.
2969 * @param listener listener to handle events raised by this calibrator.
2970 */
2971 public KnownBiasAndPositionAccelerometerCalibrator(
2972 final ECEFPosition position, final boolean commonAxisUsed, final Acceleration biasX,
2973 final Acceleration biasY, final Acceleration biasZ, final double initialSx, final double initialSy,
2974 final double initialSz, final double initialMxy, final double initialMxz, final double initialMyx,
2975 final double initialMyz, final double initialMzx, final double initialMzy,
2976 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
2977 this(commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
2978 initialMyz, initialMzx, initialMzy, listener);
2979 try {
2980 setPosition(position);
2981 } catch (final LockedException ignore) {
2982 // never happens
2983 }
2984 }
2985
2986 /**
2987 * Constructor.
2988 *
2989 * @param position position where body kinematics measures have been taken.
2990 * @param measurements collection of body kinematics measurements with standard
2991 * deviations taken at the same position with zero velocity
2992 * and unknown different orientations.
2993 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
2994 * accelerometer and gyroscope.
2995 * @param biasX x-coordinate of accelerometer bias.
2996 * @param biasY y-coordinate of accelerometer bias.
2997 * @param biasZ z-coordinate of accelerometer bias.
2998 * @param initialSx initial x scaling factor.
2999 * @param initialSy initial y scaling factor.
3000 * @param initialSz initial z scaling factor.
3001 * @param initialMxy initial x-y cross coupling error.
3002 * @param initialMxz initial x-z cross coupling error.
3003 * @param initialMyx initial y-x cross coupling error.
3004 * @param initialMyz initial y-z cross coupling error.
3005 * @param initialMzx initial z-x cross coupling error.
3006 * @param initialMzy initial z-y cross coupling error.
3007 */
3008 public KnownBiasAndPositionAccelerometerCalibrator(
3009 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3010 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
3011 final double initialSx, final double initialSy, final double initialSz,
3012 final double initialMxy, final double initialMxz, final double initialMyx,
3013 final double initialMyz, final double initialMzx, final double initialMzy) {
3014 this(measurements, commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz,
3015 initialMxy, initialMxz, initialMyx, initialMyz, initialMzx, initialMzy);
3016 try {
3017 setPosition(position);
3018 } catch (final LockedException ignore) {
3019 // never happens
3020 }
3021 }
3022
3023 /**
3024 * Constructor.
3025 *
3026 * @param position position where body kinematics measures have been taken.
3027 * @param measurements collection of body kinematics measurements with standard
3028 * deviations taken at the same position with zero velocity
3029 * and unknown different orientations.
3030 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3031 * accelerometer and gyroscope.
3032 * @param biasX x-coordinate of accelerometer bias.
3033 * @param biasY y-coordinate of accelerometer bias.
3034 * @param biasZ z-coordinate of accelerometer bias.
3035 * @param initialSx initial x scaling factor.
3036 * @param initialSy initial y scaling factor.
3037 * @param initialSz initial z scaling factor.
3038 * @param initialMxy initial x-y cross coupling error.
3039 * @param initialMxz initial x-z cross coupling error.
3040 * @param initialMyx initial y-x cross coupling error.
3041 * @param initialMyz initial y-z cross coupling error.
3042 * @param initialMzx initial z-x cross coupling error.
3043 * @param initialMzy initial z-y cross coupling error.
3044 * @param listener listener to handle events raised by this calibrator.
3045 */
3046 public KnownBiasAndPositionAccelerometerCalibrator(
3047 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3048 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
3049 final double initialSx, final double initialSy, final double initialSz,
3050 final double initialMxy, final double initialMxz, final double initialMyx,
3051 final double initialMyz, final double initialMzx, final double initialMzy,
3052 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3053 this(measurements, commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz,
3054 initialMxy, initialMxz, initialMyx, initialMyz, initialMzx, initialMzy, listener);
3055 try {
3056 setPosition(position);
3057 } catch (final LockedException ignore) {
3058 // never happens
3059 }
3060 }
3061
3062 /**
3063 * Constructor.
3064 *
3065 * @param position position where body kinematics measures have been taken.
3066 * @param bias known accelerometer bias. This must have length 3 and is expressed
3067 * in meters per squared second (m/s^2).
3068 * @throws IllegalArgumentException if provided bias array does not have length 3.
3069 */
3070 public KnownBiasAndPositionAccelerometerCalibrator(final ECEFPosition position, final double[] bias) {
3071 this(bias);
3072 try {
3073 setPosition(position);
3074 } catch (final LockedException ignore) {
3075 // never happens
3076 }
3077 }
3078
3079 /**
3080 * Constructor.
3081 *
3082 * @param position position where body kinematics measures have been taken.
3083 * @param bias known accelerometer bias. This must have length 3 and is expressed
3084 * in meters per squared second (m/s^2).
3085 * @param listener listener to handle events raised by this calibrator.
3086 * @throws IllegalArgumentException if provided bias array does not have length 3.
3087 */
3088 public KnownBiasAndPositionAccelerometerCalibrator(
3089 final ECEFPosition position, final double[] bias,
3090 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3091 this(bias, listener);
3092 try {
3093 setPosition(position);
3094 } catch (final LockedException ignore) {
3095 // never happens
3096 }
3097 }
3098
3099 /**
3100 * Constructor.
3101 *
3102 * @param position position where body kinematics measures have been taken.
3103 * @param measurements collection of body kinematics measurements with standard
3104 * deviations taken at the same position with zero velocity
3105 * and unknown different orientations.
3106 * @param bias known accelerometer bias. This must have length 3 and is expressed
3107 * in meters per squared second (m/s^2).
3108 * @throws IllegalArgumentException if provided bias array does not have length 3.
3109 */
3110 public KnownBiasAndPositionAccelerometerCalibrator(
3111 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3112 final double[] bias) {
3113 this(measurements, bias);
3114 try {
3115 setPosition(position);
3116 } catch (final LockedException ignore) {
3117 // never happens
3118 }
3119 }
3120
3121 /**
3122 * Constructor.
3123 *
3124 * @param position position where body kinematics measures have been taken.
3125 * @param measurements collection of body kinematics measurements with standard
3126 * deviations taken at the same position with zero velocity
3127 * and unknown different orientations.
3128 * @param bias known accelerometer bias. This must have length 3 and is expressed
3129 * in meters per squared second (m/s^2).
3130 * @param listener listener to handle events raised by this calibrator.
3131 * @throws IllegalArgumentException if provided bias array does not have length 3.
3132 */
3133 public KnownBiasAndPositionAccelerometerCalibrator(
3134 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3135 final double[] bias, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3136 this(measurements, bias, listener);
3137 try {
3138 setPosition(position);
3139 } catch (final LockedException ignore) {
3140 // never happens
3141 }
3142 }
3143
3144 /**
3145 * Constructor.
3146 *
3147 * @param position position where body kinematics measures have been taken.
3148 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3149 * accelerometer and gyroscope.
3150 * @param bias known accelerometer bias. This must have length 3 and is expressed
3151 * in meters per squared second (m/s^2).
3152 * @throws IllegalArgumentException if provided bias array does not have length 3.
3153 */
3154 public KnownBiasAndPositionAccelerometerCalibrator(
3155 final ECEFPosition position, final boolean commonAxisUsed, final double[] bias) {
3156 this(commonAxisUsed, bias);
3157 try {
3158 setPosition(position);
3159 } catch (final LockedException ignore) {
3160 // never happens
3161 }
3162 }
3163
3164 /**
3165 * Constructor.
3166 *
3167 * @param position position where body kinematics measures have been taken.
3168 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3169 * accelerometer and gyroscope.
3170 * @param bias known accelerometer bias. This must have length 3 and is expressed
3171 * in meters per squared second (m/s^2).
3172 * @param listener listener to handle events raised by this calibrator.
3173 * @throws IllegalArgumentException if provided bias array does not have length 3.
3174 */
3175 public KnownBiasAndPositionAccelerometerCalibrator(
3176 final ECEFPosition position, final boolean commonAxisUsed, final double[] bias,
3177 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3178 this(commonAxisUsed, bias, listener);
3179 try {
3180 setPosition(position);
3181 } catch (final LockedException ignore) {
3182 // never happens
3183 }
3184 }
3185
3186 /**
3187 * Constructor.
3188 *
3189 * @param position position where body kinematics measures have been taken.
3190 * @param measurements collection of body kinematics measurements with standard
3191 * deviations taken at the same position with zero velocity
3192 * and unknown different orientations.
3193 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3194 * accelerometer and gyroscope.
3195 * @param bias known accelerometer bias. This must have length 3 and is expressed
3196 * in meters per squared second (m/s^2).
3197 * @throws IllegalArgumentException if provided bias array does not have length 3.
3198 */
3199 public KnownBiasAndPositionAccelerometerCalibrator(
3200 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3201 final boolean commonAxisUsed, final double[] bias) {
3202 this(measurements, commonAxisUsed, bias);
3203 try {
3204 setPosition(position);
3205 } catch (final LockedException ignore) {
3206 // never happens
3207 }
3208 }
3209
3210 /**
3211 * Constructor.
3212 *
3213 * @param position position where body kinematics measures have been taken.
3214 * @param measurements collection of body kinematics measurements with standard
3215 * deviations taken at the same position with zero velocity
3216 * and unknown different orientations.
3217 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3218 * accelerometer and gyroscope.
3219 * @param bias known accelerometer bias. This must have length 3 and is expressed
3220 * in meters per squared second (m/s^2).
3221 * @param listener listener to handle events raised by this calibrator.
3222 * @throws IllegalArgumentException if provided bias array does not have length 3.
3223 */
3224 public KnownBiasAndPositionAccelerometerCalibrator(
3225 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3226 final boolean commonAxisUsed, final double[] bias,
3227 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3228 this(measurements, commonAxisUsed, bias, listener);
3229 try {
3230 setPosition(position);
3231 } catch (final LockedException ignore) {
3232 // never happens
3233 }
3234 }
3235
3236 /**
3237 * Constructor.
3238 *
3239 * @param position position where body kinematics measures have been taken.
3240 * @param bias known accelerometer bias.
3241 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
3242 */
3243 public KnownBiasAndPositionAccelerometerCalibrator(final ECEFPosition position, final Matrix bias) {
3244 this(bias);
3245 try {
3246 setPosition(position);
3247 } catch (final LockedException ignore) {
3248 // never happens
3249 }
3250 }
3251
3252 /**
3253 * Constructor.
3254 *
3255 * @param position position where body kinematics measures have been taken.
3256 * @param bias known accelerometer bias.
3257 * @param listener listener to handle events raised by this calibrator.
3258 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
3259 */
3260 public KnownBiasAndPositionAccelerometerCalibrator(
3261 final ECEFPosition position, final Matrix bias,
3262 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3263 this(bias, listener);
3264 try {
3265 setPosition(position);
3266 } catch (final LockedException ignore) {
3267 // never happens
3268 }
3269 }
3270
3271 /**
3272 * Constructor.
3273 *
3274 * @param position position where body kinematics measures have been taken.
3275 * @param measurements collection of body kinematics measurements with standard
3276 * deviations taken at the same position with zero velocity
3277 * and unknown different orientations.
3278 * @param bias known accelerometer bias.
3279 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
3280 */
3281 public KnownBiasAndPositionAccelerometerCalibrator(
3282 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3283 final Matrix bias) {
3284 this(measurements, bias);
3285 try {
3286 setPosition(position);
3287 } catch (final LockedException ignore) {
3288 // never happens
3289 }
3290 }
3291
3292 /**
3293 * Constructor.
3294 *
3295 * @param position position where body kinematics measures have been taken.
3296 * @param measurements collection of body kinematics measurements with standard
3297 * deviations taken at the same position with zero velocity
3298 * and unknown different orientations.
3299 * @param bias known accelerometer bias.
3300 * @param listener listener to handle events raised by this calibrator.
3301 */
3302 public KnownBiasAndPositionAccelerometerCalibrator(
3303 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3304 final Matrix bias, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3305 this(measurements, bias, listener);
3306 try {
3307 setPosition(position);
3308 } catch (final LockedException ignore) {
3309 // never happens
3310 }
3311 }
3312
3313 /**
3314 * Constructor.
3315 *
3316 * @param position position where body kinematics measures have been taken.
3317 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3318 * accelerometer and gyroscope.
3319 * @param bias known accelerometer bias.
3320 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
3321 */
3322 public KnownBiasAndPositionAccelerometerCalibrator(
3323 final ECEFPosition position, final boolean commonAxisUsed, final Matrix bias) {
3324 this(commonAxisUsed, bias);
3325 try {
3326 setPosition(position);
3327 } catch (final LockedException ignore) {
3328 // never happens
3329 }
3330 }
3331
3332 /**
3333 * Constructor.
3334 *
3335 * @param position position where body kinematics measures have been taken.
3336 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3337 * accelerometer and gyroscope.
3338 * @param bias known accelerometer bias.
3339 * @param listener listener to handle events raised by this calibrator.
3340 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
3341 */
3342 public KnownBiasAndPositionAccelerometerCalibrator(
3343 final ECEFPosition position, final boolean commonAxisUsed, final Matrix bias,
3344 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3345 this(commonAxisUsed, bias, listener);
3346 try {
3347 setPosition(position);
3348 } catch (final LockedException ignore) {
3349 // never happens
3350 }
3351 }
3352
3353 /**
3354 * Constructor.
3355 *
3356 * @param position position where body kinematics measures have been taken.
3357 * @param measurements collection of body kinematics measurements with standard
3358 * deviations taken at the same position with zero velocity
3359 * and unknown different orientations.
3360 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3361 * accelerometer and gyroscope.
3362 * @param bias known accelerometer bias.
3363 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
3364 */
3365 public KnownBiasAndPositionAccelerometerCalibrator(
3366 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3367 final boolean commonAxisUsed, final Matrix bias) {
3368 this(measurements, commonAxisUsed, bias);
3369 try {
3370 setPosition(position);
3371 } catch (final LockedException ignore) {
3372 // never happens
3373 }
3374 }
3375
3376 /**
3377 * Constructor.
3378 *
3379 * @param position position where body kinematics measures have been taken.
3380 * @param measurements collection of body kinematics measurements with standard
3381 * deviations taken at the same position with zero velocity
3382 * and unknown different orientations.
3383 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3384 * accelerometer and gyroscope.
3385 * @param bias known accelerometer bias.
3386 * @param listener listener to handle events raised by this calibrator.
3387 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
3388 */
3389 public KnownBiasAndPositionAccelerometerCalibrator(
3390 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3391 final boolean commonAxisUsed, final Matrix bias,
3392 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3393 this(measurements, commonAxisUsed, bias, listener);
3394 try {
3395 setPosition(position);
3396 } catch (final LockedException ignore) {
3397 // never happens
3398 }
3399 }
3400
3401 /**
3402 * Constructor.
3403 *
3404 * @param position position where body kinematics measures have been taken.
3405 * @param bias known accelerometer bias.
3406 * @param initialMa initial scale factors and cross coupling errors matrix.
3407 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
3408 * scaling and coupling error matrix is not 3x3.
3409 */
3410 public KnownBiasAndPositionAccelerometerCalibrator(
3411 final ECEFPosition position, final Matrix bias, final Matrix initialMa) {
3412 this(bias, initialMa);
3413 try {
3414 setPosition(position);
3415 } catch (final LockedException ignore) {
3416 // never happens
3417 }
3418 }
3419
3420 /**
3421 * Constructor.
3422 *
3423 * @param position position where body kinematics measures have been taken.
3424 * @param bias known accelerometer bias.
3425 * @param initialMa initial scale factors and cross coupling errors matrix.
3426 * @param listener listener to handle events raised by this calibrator.
3427 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
3428 * scaling and coupling error matrix is not 3x3.
3429 */
3430 public KnownBiasAndPositionAccelerometerCalibrator(
3431 final ECEFPosition position, final Matrix bias, final Matrix initialMa,
3432 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3433 this(bias, initialMa, listener);
3434 try {
3435 setPosition(position);
3436 } catch (final LockedException ignore) {
3437 // never happens
3438 }
3439 }
3440
3441 /**
3442 * Constructor.
3443 *
3444 * @param position position where body kinematics measures have been taken.
3445 * @param measurements collection of body kinematics measurements with standard
3446 * deviations taken at the same position with zero velocity
3447 * and unknown different orientations.
3448 * @param bias known accelerometer bias.
3449 * @param initialMa initial scale factors and cross coupling errors matrix.
3450 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
3451 * scaling and coupling error matrix is not 3x3.
3452 */
3453 public KnownBiasAndPositionAccelerometerCalibrator(
3454 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3455 final Matrix bias, final Matrix initialMa) {
3456 this(measurements, bias, initialMa);
3457 try {
3458 setPosition(position);
3459 } catch (final LockedException ignore) {
3460 // never happens
3461 }
3462 }
3463
3464 /**
3465 * Constructor.
3466 *
3467 * @param position position where body kinematics measures have been taken.
3468 * @param measurements collection of body kinematics measurements with standard
3469 * deviations taken at the same position with zero velocity
3470 * and unknown different orientations.
3471 * @param bias known accelerometer bias.
3472 * @param initialMa initial scale factors and cross coupling errors matrix.
3473 * @param listener listener to handle events raised by this calibrator.
3474 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
3475 * scaling and coupling error matrix is not 3x3.
3476 */
3477 public KnownBiasAndPositionAccelerometerCalibrator(
3478 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3479 final Matrix bias, final Matrix initialMa,
3480 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3481 this(measurements, bias, initialMa, listener);
3482 try {
3483 setPosition(position);
3484 } catch (final LockedException ignore) {
3485 // never happens
3486 }
3487 }
3488
3489 /**
3490 * Constructor.
3491 *
3492 * @param position position where body kinematics measures have been taken.
3493 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3494 * accelerometer and gyroscope.
3495 * @param bias known accelerometer bias.
3496 * @param initialMa initial scale factors and cross coupling errors matrix.
3497 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
3498 * scaling and coupling error matrix is not 3x3.
3499 */
3500 public KnownBiasAndPositionAccelerometerCalibrator(
3501 final ECEFPosition position, final boolean commonAxisUsed, final Matrix bias,
3502 final Matrix initialMa) {
3503 this(commonAxisUsed, bias, initialMa);
3504 try {
3505 setPosition(position);
3506 } catch (final LockedException ignore) {
3507 // never happens
3508 }
3509 }
3510
3511 /**
3512 * Constructor.
3513 *
3514 * @param position position where body kinematics measures have been taken.
3515 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3516 * accelerometer and gyroscope.
3517 * @param bias known accelerometer bias.
3518 * @param initialMa initial scale factors and cross coupling errors matrix.
3519 * @param listener listener to handle events raised by this calibrator.
3520 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
3521 * scaling and coupling error matrix is not 3x3.
3522 */
3523 public KnownBiasAndPositionAccelerometerCalibrator(
3524 final ECEFPosition position, final boolean commonAxisUsed, final Matrix bias,
3525 final Matrix initialMa, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3526 this(commonAxisUsed, bias, initialMa, listener);
3527 try {
3528 setPosition(position);
3529 } catch (final LockedException ignore) {
3530 // never happens
3531 }
3532 }
3533
3534 /**
3535 * Constructor.
3536 *
3537 * @param position position where body kinematics measures have been taken.
3538 * @param measurements collection of body kinematics measurements with standard
3539 * deviations taken at the same position with zero velocity
3540 * and unknown different orientations.
3541 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3542 * accelerometer and gyroscope.
3543 * @param bias known accelerometer bias.
3544 * @param initialMa initial scale factors and cross coupling errors matrix.
3545 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
3546 * scaling and coupling error matrix is not 3x3.
3547 */
3548 public KnownBiasAndPositionAccelerometerCalibrator(
3549 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3550 final boolean commonAxisUsed, final Matrix bias, final Matrix initialMa) {
3551 this(measurements, commonAxisUsed, bias, initialMa);
3552 try {
3553 setPosition(position);
3554 } catch (final LockedException ignore) {
3555 // never happens
3556 }
3557 }
3558
3559 /**
3560 * Constructor.
3561 *
3562 * @param position position where body kinematics measures have been taken.
3563 * @param measurements collection of body kinematics measurements with standard
3564 * deviations taken at the same position with zero velocity
3565 * and unknown different orientations.
3566 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3567 * accelerometer and gyroscope.
3568 * @param bias known accelerometer bias.
3569 * @param initialMa initial scale factors and cross coupling errors matrix.
3570 * @param listener listener to handle events raised by this calibrator.
3571 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
3572 * scaling and coupling error matrix is not 3x3.
3573 */
3574 public KnownBiasAndPositionAccelerometerCalibrator(
3575 final ECEFPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3576 final boolean commonAxisUsed, final Matrix bias, final Matrix initialMa,
3577 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3578 this(measurements, commonAxisUsed, bias, initialMa, listener);
3579 try {
3580 setPosition(position);
3581 } catch (final LockedException ignore) {
3582 // never happens
3583 }
3584 }
3585
3586 /**
3587 * Constructor.
3588 *
3589 * @param position position where body kinematics measures have been taken.
3590 */
3591 public KnownBiasAndPositionAccelerometerCalibrator(final NEDPosition position) {
3592 this(convertPosition(position));
3593 }
3594
3595 /**
3596 * Constructor.
3597 *
3598 * @param position position where body kinematics measures have been taken.
3599 * @param listener listener to handle events raised by this calibrator.
3600 */
3601 public KnownBiasAndPositionAccelerometerCalibrator(
3602 final NEDPosition position, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3603 this(convertPosition(position), listener);
3604 }
3605
3606 /**
3607 * Constructor.
3608 *
3609 * @param position position where body kinematics measures have been taken.
3610 * @param measurements collection of body kinematics measurements with standard
3611 * deviations taken at the same position with zero velocity
3612 * and unknown different orientations.
3613 */
3614 public KnownBiasAndPositionAccelerometerCalibrator(
3615 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements) {
3616 this(convertPosition(position), measurements);
3617 }
3618
3619 /**
3620 * Constructor.
3621 *
3622 * @param position position where body kinematics measures have been taken.
3623 * @param measurements collection of body kinematics measurements with standard
3624 * deviations taken at the same position with zero velocity
3625 * and unknown different orientations.
3626 * @param listener listener to handle events raised by this calibrator.
3627 */
3628 public KnownBiasAndPositionAccelerometerCalibrator(
3629 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3630 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3631 this(convertPosition(position), measurements, listener);
3632 }
3633
3634 /**
3635 * Constructor.
3636 *
3637 * @param position position where body kinematics measures have been taken.
3638 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3639 * accelerometer and gyroscope.
3640 */
3641 public KnownBiasAndPositionAccelerometerCalibrator(final NEDPosition position, final boolean commonAxisUsed) {
3642 this(convertPosition(position), commonAxisUsed);
3643 }
3644
3645 /**
3646 * Constructor.
3647 *
3648 * @param position position where body kinematics measures have been taken.
3649 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3650 * accelerometer and gyroscope.
3651 * @param listener listener to handle events raised by this calibrator.
3652 */
3653 public KnownBiasAndPositionAccelerometerCalibrator(
3654 final NEDPosition position, final boolean commonAxisUsed,
3655 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3656 this(convertPosition(position), commonAxisUsed, listener);
3657 }
3658
3659 /**
3660 * Constructor.
3661 *
3662 * @param position position where body kinematics measures have been taken.
3663 * @param measurements collection of body kinematics measurements with standard
3664 * deviations taken at the same position with zero velocity
3665 * and unknown different orientations.
3666 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3667 * accelerometer and gyroscope.
3668 */
3669 public KnownBiasAndPositionAccelerometerCalibrator(
3670 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3671 final boolean commonAxisUsed) {
3672 this(convertPosition(position), measurements, commonAxisUsed);
3673 }
3674
3675 /**
3676 * Constructor.
3677 *
3678 * @param position position where body kinematics measures have been taken.
3679 * @param measurements collection of body kinematics measurements with standard
3680 * deviations taken at the same position with zero velocity
3681 * and unknown different orientations.
3682 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3683 * accelerometer and gyroscope.
3684 * @param listener listener to handle events raised by this calibrator.
3685 */
3686 public KnownBiasAndPositionAccelerometerCalibrator(
3687 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3688 final boolean commonAxisUsed, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3689 this(convertPosition(position), measurements, commonAxisUsed, listener);
3690 }
3691
3692 /**
3693 * Constructor.
3694 *
3695 * @param position position where body kinematics measures have been taken.
3696 * @param biasX x-coordinate of accelerometer bias.
3697 * This is expressed in meters per squared second (m/s^2).
3698 * @param biasY y-coordinate of accelerometer bias.
3699 * This is expressed in meters per squared second (m/s^2).
3700 * @param biasZ z-coordinate of accelerometer bias.
3701 * This is expressed in meters per squared second (m/s^2).
3702 */
3703 public KnownBiasAndPositionAccelerometerCalibrator(
3704 final NEDPosition position, final double biasX, final double biasY, final double biasZ) {
3705 this(convertPosition(position), biasX, biasY, biasZ);
3706 }
3707
3708 /**
3709 * Constructor.
3710 *
3711 * @param position position where body kinematics measures have been taken.
3712 * @param biasX x-coordinate of accelerometer bias.
3713 * This is expressed in meters per squared second (m/s^2).
3714 * @param biasY y-coordinate of accelerometer bias.
3715 * This is expressed in meters per squared second (m/s^2).
3716 * @param biasZ z-coordinate of accelerometer bias.
3717 * This is expressed in meters per squared second (m/s^2).
3718 * @param listener listener to handle events raised by this calibrator.
3719 */
3720 public KnownBiasAndPositionAccelerometerCalibrator(
3721 final NEDPosition position, final double biasX, final double biasY, final double biasZ,
3722 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3723 this(convertPosition(position), biasX, biasY, biasZ, listener);
3724 }
3725
3726 /**
3727 * Constructor.
3728 *
3729 * @param position position where body kinematics measures have been taken.
3730 * @param measurements collection of body kinematics measurements with standard
3731 * deviations taken at the same position with zero velocity
3732 * and unknown different orientations.
3733 * @param biasX x-coordinate of accelerometer bias.
3734 * This is expressed in meters per squared second (m/s^2).
3735 * @param biasY y-coordinate of accelerometer bias.
3736 * This is expressed in meters per squared second (m/s^2).
3737 * @param biasZ z-coordinate of accelerometer bias.
3738 * This is expressed in meters per squared second (m/s^2).
3739 */
3740 public KnownBiasAndPositionAccelerometerCalibrator(
3741 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3742 final double biasX, final double biasY, final double biasZ) {
3743 this(convertPosition(position), measurements, biasX, biasY, biasZ);
3744 }
3745
3746 /**
3747 * Constructor.
3748 *
3749 * @param position position where body kinematics measures have been taken.
3750 * @param measurements collection of body kinematics measurements with standard
3751 * deviations taken at the same position with zero velocity
3752 * and unknown different orientations.
3753 * @param biasX x-coordinate of accelerometer bias.
3754 * This is expressed in meters per squared second (m/s^2).
3755 * @param biasY y-coordinate of accelerometer bias.
3756 * This is expressed in meters per squared second (m/s^2).
3757 * @param biasZ z-coordinate of accelerometer bias.
3758 * This is expressed in meters per squared second (m/s^2).
3759 * @param listener listener to handle events raised by this calibrator.
3760 */
3761 public KnownBiasAndPositionAccelerometerCalibrator(
3762 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3763 final double biasX, final double biasY, final double biasZ,
3764 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3765 this(convertPosition(position), measurements, biasX, biasY, biasZ, listener);
3766 }
3767
3768 /**
3769 * Constructor.
3770 *
3771 * @param position position where body kinematics measures have been taken.
3772 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3773 * accelerometer and gyroscope.
3774 * @param biasX x-coordinate of accelerometer bias.
3775 * This is expressed in meters per squared second (m/s^2).
3776 * @param biasY y-coordinate of accelerometer bias.
3777 * This is expressed in meters per squared second (m/s^2).
3778 * @param biasZ z-coordinate of accelerometer bias.
3779 * This is expressed in meters per squared second (m/s^2).
3780 */
3781 public KnownBiasAndPositionAccelerometerCalibrator(
3782 final NEDPosition position, final boolean commonAxisUsed,
3783 final double biasX, final double biasY, final double biasZ) {
3784 this(convertPosition(position), commonAxisUsed, biasX, biasY, biasZ);
3785 }
3786
3787 /**
3788 * Constructor.
3789 *
3790 * @param position position where body kinematics measures have been taken.
3791 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3792 * accelerometer and gyroscope.
3793 * @param biasX x-coordinate of accelerometer bias.
3794 * This is expressed in meters per squared second (m/s^2).
3795 * @param biasY y-coordinate of accelerometer bias.
3796 * This is expressed in meters per squared second (m/s^2).
3797 * @param biasZ z-coordinate of accelerometer bias.
3798 * This is expressed in meters per squared second (m/s^2).
3799 * @param listener listener to handle events raised by this calibrator.
3800 */
3801 public KnownBiasAndPositionAccelerometerCalibrator(
3802 final NEDPosition position, final boolean commonAxisUsed,
3803 final double biasX, final double biasY, final double biasZ,
3804 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3805 this(convertPosition(position), commonAxisUsed, biasX, biasY, biasZ, listener);
3806 }
3807
3808 /**
3809 * Constructor.
3810 *
3811 * @param position position where body kinematics measures have been taken.
3812 * @param measurements collection of body kinematics measurements with standard
3813 * deviations taken at the same position with zero velocity
3814 * and unknown different orientations.
3815 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3816 * accelerometer and gyroscope.
3817 * @param biasX x-coordinate of accelerometer bias.
3818 * This is expressed in meters per squared second (m/s^2).
3819 * @param biasY y-coordinate of accelerometer bias.
3820 * This is expressed in meters per squared second (m/s^2).
3821 * @param biasZ z-coordinate of accelerometer bias.
3822 * This is expressed in meters per squared second (m/s^2).
3823 */
3824 public KnownBiasAndPositionAccelerometerCalibrator(
3825 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3826 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ) {
3827 this(convertPosition(position), measurements, commonAxisUsed, biasX, biasY, biasZ);
3828 }
3829
3830 /**
3831 * Constructor.
3832 *
3833 * @param position position where body kinematics measures have been taken.
3834 * @param measurements collection of body kinematics measurements with standard
3835 * deviations taken at the same position with zero velocity
3836 * and unknown different orientations.
3837 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3838 * accelerometer and gyroscope.
3839 * @param biasX x-coordinate of accelerometer bias.
3840 * This is expressed in meters per squared second (m/s^2).
3841 * @param biasY y-coordinate of accelerometer bias.
3842 * This is expressed in meters per squared second (m/s^2).
3843 * @param biasZ z-coordinate of accelerometer bias.
3844 * This is expressed in meters per squared second (m/s^2).
3845 * @param listener listener to handle events raised by this calibrator.
3846 */
3847 public KnownBiasAndPositionAccelerometerCalibrator(
3848 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3849 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ,
3850 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3851 this(convertPosition(position), measurements, commonAxisUsed, biasX, biasY, biasZ, listener);
3852 }
3853
3854 /**
3855 * Constructor.
3856 *
3857 * @param position position where body kinematics measures have been taken.
3858 * @param biasX x-coordinate of accelerometer bias.
3859 * @param biasY y-coordinate of accelerometer bias.
3860 * @param biasZ z-coordinate of accelerometer bias.
3861 */
3862 public KnownBiasAndPositionAccelerometerCalibrator(
3863 final NEDPosition position, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ) {
3864 this(convertPosition(position), biasX, biasY, biasZ);
3865 }
3866
3867 /**
3868 * Constructor.
3869 *
3870 * @param position position where body kinematics measures have been taken.
3871 * @param biasX x-coordinate of accelerometer bias.
3872 * @param biasY y-coordinate of accelerometer bias.
3873 * @param biasZ z-coordinate of accelerometer bias.
3874 * @param listener listener to handle events raised by this calibrator.
3875 */
3876 public KnownBiasAndPositionAccelerometerCalibrator(
3877 final NEDPosition position, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
3878 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3879 this(convertPosition(position), biasX, biasY, biasZ, listener);
3880 }
3881
3882 /**
3883 * Constructor.
3884 *
3885 * @param position position where body kinematics measures have been taken.
3886 * @param measurements collection of body kinematics measurements with standard
3887 * deviations taken at the same position with zero velocity
3888 * and unknown different orientations.
3889 * @param biasX x-coordinate of accelerometer bias.
3890 * @param biasY y-coordinate of accelerometer bias.
3891 * @param biasZ z-coordinate of accelerometer bias.
3892 */
3893 public KnownBiasAndPositionAccelerometerCalibrator(
3894 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3895 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ) {
3896 this(convertPosition(position), measurements, biasX, biasY, biasZ);
3897 }
3898
3899 /**
3900 * Constructor.
3901 *
3902 * @param position position where body kinematics measures have been taken.
3903 * @param measurements collection of body kinematics measurements with standard
3904 * deviations taken at the same position with zero velocity
3905 * and unknown different orientations.
3906 * @param biasX x-coordinate of accelerometer bias.
3907 * @param biasY y-coordinate of accelerometer bias.
3908 * @param biasZ z-coordinate of accelerometer bias.
3909 * @param listener listener to handle events raised by this calibrator.
3910 */
3911 public KnownBiasAndPositionAccelerometerCalibrator(
3912 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3913 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
3914 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3915 this(convertPosition(position), measurements, biasX, biasY, biasZ, listener);
3916 }
3917
3918 /**
3919 * Constructor.
3920 *
3921 * @param position position where body kinematics measures have been taken.
3922 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3923 * accelerometer and gyroscope.
3924 * @param biasX x-coordinate of accelerometer bias.
3925 * @param biasY y-coordinate of accelerometer bias.
3926 * @param biasZ z-coordinate of accelerometer bias.
3927 */
3928 public KnownBiasAndPositionAccelerometerCalibrator(
3929 final NEDPosition position, final boolean commonAxisUsed, final Acceleration biasX,
3930 final Acceleration biasY, final Acceleration biasZ) {
3931 this(convertPosition(position), commonAxisUsed, biasX, biasY, biasZ);
3932 }
3933
3934 /**
3935 * Constructor.
3936 *
3937 * @param position position where body kinematics measures have been taken.
3938 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3939 * accelerometer and gyroscope.
3940 * @param biasX x-coordinate of accelerometer bias.
3941 * @param biasY y-coordinate of accelerometer bias.
3942 * @param biasZ z-coordinate of accelerometer bias.
3943 * @param listener listener to handle events raised by this calibrator.
3944 */
3945 public KnownBiasAndPositionAccelerometerCalibrator(
3946 final NEDPosition position, final boolean commonAxisUsed, final Acceleration biasX,
3947 final Acceleration biasY, final Acceleration biasZ,
3948 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3949 this(convertPosition(position), commonAxisUsed, biasX, biasY, biasZ, listener);
3950 }
3951
3952 /**
3953 * Constructor.
3954 *
3955 * @param position position where body kinematics measures have been taken.
3956 * @param measurements collection of body kinematics measurements with standard
3957 * deviations taken at the same position with zero velocity
3958 * and unknown different orientations.
3959 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3960 * accelerometer and gyroscope.
3961 * @param biasX x-coordinate of accelerometer bias.
3962 * @param biasY y-coordinate of accelerometer bias.
3963 * @param biasZ z-coordinate of accelerometer bias.
3964 */
3965 public KnownBiasAndPositionAccelerometerCalibrator(
3966 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3967 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY,
3968 final Acceleration biasZ) {
3969 this(convertPosition(position), measurements, commonAxisUsed, biasX, biasY, biasZ);
3970 }
3971
3972 /**
3973 * Constructor.
3974 *
3975 * @param position position where body kinematics measures have been taken.
3976 * @param measurements collection of body kinematics measurements with standard
3977 * deviations taken at the same position with zero velocity
3978 * and unknown different orientations.
3979 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
3980 * accelerometer and gyroscope.
3981 * @param biasX x-coordinate of accelerometer bias.
3982 * @param biasY y-coordinate of accelerometer bias.
3983 * @param biasZ z-coordinate of accelerometer bias.
3984 * @param listener listener to handle events raised by this calibrator.
3985 */
3986 public KnownBiasAndPositionAccelerometerCalibrator(
3987 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
3988 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
3989 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
3990 this(convertPosition(position), measurements, commonAxisUsed, biasX, biasY, biasZ, listener);
3991 }
3992
3993 /**
3994 * Constructor.
3995 *
3996 * @param position position where body kinematics measures have been taken.
3997 * @param biasX x-coordinate of accelerometer bias.
3998 * This is expressed in meters per squared second (m/s^2).
3999 * @param biasY y-coordinate of accelerometer bias.
4000 * This is expressed in meters per squared second (m/s^2).
4001 * @param biasZ z-coordinate of accelerometer bias.
4002 * This is expressed in meters per squared second (m/s^2).
4003 * @param initialSx initial x scaling factor.
4004 * @param initialSy initial y scaling factor.
4005 * @param initialSz initial z scaling factor.
4006 */
4007 public KnownBiasAndPositionAccelerometerCalibrator(
4008 final NEDPosition position, final double biasX, final double biasY, final double biasZ,
4009 final double initialSx, final double initialSy, final double initialSz) {
4010 this(convertPosition(position), biasX, biasY, biasZ, initialSx, initialSy, initialSz);
4011 }
4012
4013 /**
4014 * Constructor.
4015 *
4016 * @param position position where body kinematics measures have been taken.
4017 * @param measurements collection of body kinematics measurements with standard
4018 * deviations taken at the same position with zero velocity
4019 * and unknown different orientations.
4020 * @param biasX x-coordinate of accelerometer bias.
4021 * This is expressed in meters per squared second (m/s^2).
4022 * @param biasY y-coordinate of accelerometer bias.
4023 * This is expressed in meters per squared second (m/s^2).
4024 * @param biasZ z-coordinate of accelerometer bias.
4025 * This is expressed in meters per squared second (m/s^2).
4026 * @param initialSx initial x scaling factor.
4027 * @param initialSy initial y scaling factor.
4028 * @param initialSz initial z scaling factor.
4029 */
4030 public KnownBiasAndPositionAccelerometerCalibrator(
4031 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4032 final double biasX, final double biasY, final double biasZ, final double initialSx, final double initialSy,
4033 final double initialSz) {
4034 this(convertPosition(position), measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz);
4035 }
4036
4037 /**
4038 * Constructor.
4039 *
4040 * @param position position where body kinematics measures have been taken.
4041 * @param measurements collection of body kinematics measurements with standard
4042 * deviations taken at the same position with zero velocity
4043 * and unknown different orientations.
4044 * @param biasX x-coordinate of accelerometer bias.
4045 * This is expressed in meters per squared second (m/s^2).
4046 * @param biasY y-coordinate of accelerometer bias.
4047 * This is expressed in meters per squared second (m/s^2).
4048 * @param biasZ z-coordinate of accelerometer bias.
4049 * This is expressed in meters per squared second (m/s^2).
4050 * @param initialSx initial x scaling factor.
4051 * @param initialSy initial y scaling factor.
4052 * @param initialSz initial z scaling factor.
4053 * @param listener listener to handle events raised by this calibrator.
4054 */
4055 public KnownBiasAndPositionAccelerometerCalibrator(
4056 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4057 final double biasX, final double biasY, final double biasZ, final double initialSx, final double initialSy,
4058 final double initialSz, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4059 this(convertPosition(position), measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
4060 }
4061
4062 /**
4063 * Constructor.
4064 *
4065 * @param position position where body kinematics measures have been taken.
4066 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4067 * accelerometer and gyroscope.
4068 * @param biasX x-coordinate of accelerometer bias.
4069 * This is expressed in meters per squared second (m/s^2).
4070 * @param biasY y-coordinate of accelerometer bias.
4071 * This is expressed in meters per squared second (m/s^2).
4072 * @param biasZ z-coordinate of accelerometer bias.
4073 * This is expressed in meters per squared second (m/s^2).
4074 * @param initialSx initial x scaling factor.
4075 * @param initialSy initial y scaling factor.
4076 * @param initialSz initial z scaling factor.
4077 */
4078 public KnownBiasAndPositionAccelerometerCalibrator(
4079 final NEDPosition position, final boolean commonAxisUsed, final double biasX, final double biasY,
4080 final double biasZ, final double initialSx, final double initialSy, final double initialSz) {
4081 this(convertPosition(position), commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz);
4082 }
4083
4084 /**
4085 * Constructor.
4086 *
4087 * @param position position where body kinematics measures have been taken.
4088 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4089 * accelerometer and gyroscope.
4090 * @param biasX x-coordinate of accelerometer bias.
4091 * This is expressed in meters per squared second (m/s^2).
4092 * @param biasY y-coordinate of accelerometer bias.
4093 * This is expressed in meters per squared second (m/s^2).
4094 * @param biasZ z-coordinate of accelerometer bias.
4095 * This is expressed in meters per squared second (m/s^2).
4096 * @param initialSx initial x scaling factor.
4097 * @param initialSy initial y scaling factor.
4098 * @param initialSz initial z scaling factor.
4099 * @param listener listener to handle events raised by this calibrator.
4100 */
4101 public KnownBiasAndPositionAccelerometerCalibrator(
4102 final NEDPosition position, final boolean commonAxisUsed, final double biasX, final double biasY,
4103 final double biasZ, final double initialSx, final double initialSy, final double initialSz,
4104 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4105 this(convertPosition(position), commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
4106 }
4107
4108 /**
4109 * Constructor.
4110 *
4111 * @param position position where body kinematics measures have been taken.
4112 * @param measurements collection of body kinematics measurements with standard
4113 * deviations taken at the same position with zero velocity
4114 * and unknown different orientations.
4115 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4116 * accelerometer and gyroscope.
4117 * @param biasX x-coordinate of accelerometer bias.
4118 * This is expressed in meters per squared second (m/s^2).
4119 * @param biasY y-coordinate of accelerometer bias.
4120 * This is expressed in meters per squared second (m/s^2).
4121 * @param biasZ z-coordinate of accelerometer bias.
4122 * This is expressed in meters per squared second (m/s^2).
4123 * @param initialSx initial x scaling factor.
4124 * @param initialSy initial y scaling factor.
4125 * @param initialSz initial z scaling factor.
4126 */
4127 public KnownBiasAndPositionAccelerometerCalibrator(
4128 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4129 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ,
4130 final double initialSx, final double initialSy, final double initialSz) {
4131 this(convertPosition(position), measurements, commonAxisUsed, biasX, biasY, biasZ,
4132 initialSx, initialSy, initialSz);
4133 }
4134
4135 /**
4136 * Constructor.
4137 *
4138 * @param position position where body kinematics measures have been taken.
4139 * @param measurements collection of body kinematics measurements with standard
4140 * deviations taken at the same position with zero velocity
4141 * and unknown different orientations.
4142 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4143 * accelerometer and gyroscope.
4144 * @param biasX x-coordinate of accelerometer bias.
4145 * This is expressed in meters per squared second (m/s^2).
4146 * @param biasY y-coordinate of accelerometer bias.
4147 * This is expressed in meters per squared second (m/s^2).
4148 * @param biasZ z-coordinate of accelerometer bias.
4149 * This is expressed in meters per squared second (m/s^2).
4150 * @param initialSx initial x scaling factor.
4151 * @param initialSy initial y scaling factor.
4152 * @param initialSz initial z scaling factor.
4153 * @param listener listener to handle events raised by this calibrator.
4154 */
4155 public KnownBiasAndPositionAccelerometerCalibrator(
4156 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4157 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ,
4158 final double initialSx, final double initialSy, final double initialSz,
4159 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4160 this(convertPosition(position), measurements, commonAxisUsed, biasX, biasY, biasZ,
4161 initialSx, initialSy, initialSz, listener);
4162 }
4163
4164 /**
4165 * Constructor.
4166 *
4167 * @param position position where body kinematics measures have been taken.
4168 * @param biasX x-coordinate of accelerometer bias.
4169 * @param biasY y-coordinate of accelerometer bias.
4170 * @param biasZ z-coordinate of accelerometer bias.
4171 * @param initialSx initial x scaling factor.
4172 * @param initialSy initial y scaling factor.
4173 * @param initialSz initial z scaling factor.
4174 */
4175 public KnownBiasAndPositionAccelerometerCalibrator(
4176 final NEDPosition position, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
4177 final double initialSx, final double initialSy, final double initialSz) {
4178 this(convertPosition(position), biasX, biasY, biasZ, initialSx, initialSy, initialSz);
4179 }
4180
4181 /**
4182 * Constructor.
4183 *
4184 * @param position position where body kinematics measures have been taken.
4185 * @param biasX x-coordinate of accelerometer bias.
4186 * @param biasY y-coordinate of accelerometer bias.
4187 * @param biasZ z-coordinate of accelerometer bias.
4188 * @param initialSx initial x scaling factor.
4189 * @param initialSy initial y scaling factor.
4190 * @param initialSz initial z scaling factor.
4191 * @param listener listener to handle events raised by this calibrator.
4192 */
4193 public KnownBiasAndPositionAccelerometerCalibrator(
4194 final NEDPosition position, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
4195 final double initialSx, final double initialSy, final double initialSz,
4196 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4197 this(convertPosition(position), biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
4198 }
4199
4200 /**
4201 * Constructor.
4202 *
4203 * @param position position where body kinematics measures have been taken.
4204 * @param measurements collection of body kinematics measurements with standard
4205 * deviations taken at the same position with zero velocity
4206 * and unknown different orientations.
4207 * @param biasX x-coordinate of accelerometer bias.
4208 * @param biasY y-coordinate of accelerometer bias.
4209 * @param biasZ z-coordinate of accelerometer bias.
4210 * @param initialSx initial x scaling factor.
4211 * @param initialSy initial y scaling factor.
4212 * @param initialSz initial z scaling factor.
4213 */
4214 public KnownBiasAndPositionAccelerometerCalibrator(
4215 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4216 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ, final double initialSx,
4217 final double initialSy, final double initialSz) {
4218 this(convertPosition(position), measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz);
4219 }
4220
4221 /**
4222 * Constructor.
4223 *
4224 * @param position position where body kinematics measures have been taken.
4225 * @param measurements collection of body kinematics measurements with standard
4226 * deviations taken at the same position with zero velocity
4227 * and unknown different orientations.
4228 * @param biasX x-coordinate of accelerometer bias.
4229 * @param biasY y-coordinate of accelerometer bias.
4230 * @param biasZ z-coordinate of accelerometer bias.
4231 * @param initialSx initial x scaling factor.
4232 * @param initialSy initial y scaling factor.
4233 * @param initialSz initial z scaling factor.
4234 * @param listener listener to handle events raised by this calibrator.
4235 */
4236 public KnownBiasAndPositionAccelerometerCalibrator(
4237 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4238 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ, final double initialSx,
4239 final double initialSy, final double initialSz,
4240 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4241 this(convertPosition(position), measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
4242 }
4243
4244 /**
4245 * Constructor.
4246 *
4247 * @param position position where body kinematics measures have been taken.
4248 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4249 * accelerometer and gyroscope.
4250 * @param biasX x-coordinate of accelerometer bias.
4251 * @param biasY y-coordinate of accelerometer bias.
4252 * @param biasZ z-coordinate of accelerometer bias.
4253 * @param initialSx initial x scaling factor.
4254 * @param initialSy initial y scaling factor.
4255 * @param initialSz initial z scaling factor.
4256 */
4257 public KnownBiasAndPositionAccelerometerCalibrator(
4258 final NEDPosition position, final boolean commonAxisUsed, final Acceleration biasX,
4259 final Acceleration biasY, final Acceleration biasZ, final double initialSx, final double initialSy,
4260 final double initialSz) {
4261 this(convertPosition(position), commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz);
4262 }
4263
4264 /**
4265 * Constructor.
4266 *
4267 * @param position position where body kinematics measures have been taken.
4268 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4269 * accelerometer and gyroscope.
4270 * @param biasX x-coordinate of accelerometer bias.
4271 * @param biasY y-coordinate of accelerometer bias.
4272 * @param biasZ z-coordinate of accelerometer bias.
4273 * @param initialSx initial x scaling factor.
4274 * @param initialSy initial y scaling factor.
4275 * @param initialSz initial z scaling factor.
4276 * @param listener listener to handle events raised by this calibrator.
4277 */
4278 public KnownBiasAndPositionAccelerometerCalibrator(
4279 final NEDPosition position, final boolean commonAxisUsed, final Acceleration biasX,
4280 final Acceleration biasY, final Acceleration biasZ, final double initialSx, final double initialSy,
4281 final double initialSz, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4282 this(convertPosition(position), commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz, listener);
4283 }
4284
4285 /**
4286 * Constructor.
4287 *
4288 * @param position position where body kinematics measures have been taken.
4289 * @param measurements collection of body kinematics measurements with standard
4290 * deviations taken at the same position with zero velocity
4291 * and unknown different orientations.
4292 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4293 * accelerometer and gyroscope.
4294 * @param biasX x-coordinate of accelerometer bias.
4295 * @param biasY y-coordinate of accelerometer bias.
4296 * @param biasZ z-coordinate of accelerometer bias.
4297 * @param initialSx initial x scaling factor.
4298 * @param initialSy initial y scaling factor.
4299 * @param initialSz initial z scaling factor.
4300 */
4301 public KnownBiasAndPositionAccelerometerCalibrator(
4302 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4303 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
4304 final double initialSx, final double initialSy, final double initialSz) {
4305 this(convertPosition(position), measurements, commonAxisUsed, biasX, biasY, biasZ,
4306 initialSx, initialSy, initialSz);
4307 }
4308
4309 /**
4310 * Constructor.
4311 *
4312 * @param position position where body kinematics measures have been taken.
4313 * @param measurements collection of body kinematics measurements with standard
4314 * deviations taken at the same position with zero velocity
4315 * and unknown different orientations.
4316 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4317 * accelerometer and gyroscope.
4318 * @param biasX x-coordinate of accelerometer bias.
4319 * @param biasY y-coordinate of accelerometer bias.
4320 * @param biasZ z-coordinate of accelerometer bias.
4321 * @param initialSx initial x scaling factor.
4322 * @param initialSy initial y scaling factor.
4323 * @param initialSz initial z scaling factor.
4324 * @param listener listener to handle events raised by this calibrator.
4325 */
4326 public KnownBiasAndPositionAccelerometerCalibrator(
4327 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4328 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
4329 final double initialSx, final double initialSy, final double initialSz,
4330 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4331 this(convertPosition(position), measurements, commonAxisUsed, biasX, biasY, biasZ,
4332 initialSx, initialSy, initialSz, listener);
4333 }
4334
4335 /**
4336 * Constructor.
4337 *
4338 * @param position position where body kinematics measures have been taken.
4339 * @param biasX x-coordinate of accelerometer bias.
4340 * This is expressed in meters per squared second (m/s^2).
4341 * @param biasY y-coordinate of accelerometer bias.
4342 * This is expressed in meters per squared second (m/s^2).
4343 * @param biasZ z-coordinate of accelerometer bias.
4344 * This is expressed in meters per squared second (m/s^2).
4345 * @param initialSx initial x scaling factor.
4346 * @param initialSy initial y scaling factor.
4347 * @param initialSz initial z scaling factor.
4348 * @param initialMxy initial x-y cross coupling error.
4349 * @param initialMxz initial x-z cross coupling error.
4350 * @param initialMyx initial y-x cross coupling error.
4351 * @param initialMyz initial y-z cross coupling error.
4352 * @param initialMzx initial z-x cross coupling error.
4353 * @param initialMzy initial z-y cross coupling error.
4354 */
4355 public KnownBiasAndPositionAccelerometerCalibrator(
4356 final NEDPosition position, final double biasX, final double biasY, final double biasZ,
4357 final double initialSx, final double initialSy, final double initialSz,
4358 final double initialMxy, final double initialMxz, final double initialMyx,
4359 final double initialMyz, final double initialMzx, final double initialMzy) {
4360 this(convertPosition(position), biasX, biasY, biasZ, initialSx, initialSy, initialSz,
4361 initialMxy, initialMxz, initialMyx, initialMyz, initialMzx, initialMzy);
4362 }
4363
4364 /**
4365 * Constructor.
4366 *
4367 * @param position position where body kinematics measures have been taken.
4368 * @param measurements collection of body kinematics measurements with standard
4369 * deviations taken at the same position with zero velocity
4370 * and unknown different orientations.
4371 * @param biasX x-coordinate of accelerometer bias.
4372 * This is expressed in meters per squared second (m/s^2).
4373 * @param biasY y-coordinate of accelerometer bias.
4374 * This is expressed in meters per squared second (m/s^2).
4375 * @param biasZ z-coordinate of accelerometer bias.
4376 * This is expressed in meters per squared second (m/s^2).
4377 * @param initialSx initial x scaling factor.
4378 * @param initialSy initial y scaling factor.
4379 * @param initialSz initial z scaling factor.
4380 * @param initialMxy initial x-y cross coupling error.
4381 * @param initialMxz initial x-z cross coupling error.
4382 * @param initialMyx initial y-x cross coupling error.
4383 * @param initialMyz initial y-z cross coupling error.
4384 * @param initialMzx initial z-x cross coupling error.
4385 * @param initialMzy initial z-y cross coupling error.
4386 */
4387 public KnownBiasAndPositionAccelerometerCalibrator(
4388 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4389 final double biasX, final double biasY, final double biasZ,
4390 final double initialSx, final double initialSy, final double initialSz,
4391 final double initialMxy, final double initialMxz, final double initialMyx,
4392 final double initialMyz, final double initialMzx, final double initialMzy) {
4393 this(convertPosition(position), measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz,
4394 initialMxy, initialMxz, initialMyx, initialMyz, initialMzx, initialMzy);
4395 }
4396
4397 /**
4398 * Constructor.
4399 *
4400 * @param position position where body kinematics measures have been taken.
4401 * @param measurements collection of body kinematics measurements with standard
4402 * deviations taken at the same position with zero velocity
4403 * and unknown different orientations.
4404 * @param biasX x-coordinate of accelerometer bias.
4405 * This is expressed in meters per squared second (m/s^2).
4406 * @param biasY y-coordinate of accelerometer bias.
4407 * This is expressed in meters per squared second (m/s^2).
4408 * @param biasZ z-coordinate of accelerometer bias.
4409 * This is expressed in meters per squared second (m/s^2).
4410 * @param initialSx initial x scaling factor.
4411 * @param initialSy initial y scaling factor.
4412 * @param initialSz initial z scaling factor.
4413 * @param initialMxy initial x-y cross coupling error.
4414 * @param initialMxz initial x-z cross coupling error.
4415 * @param initialMyx initial y-x cross coupling error.
4416 * @param initialMyz initial y-z cross coupling error.
4417 * @param initialMzx initial z-x cross coupling error.
4418 * @param initialMzy initial z-y cross coupling error.
4419 * @param listener listener to handle events raised by this calibrator.
4420 */
4421 public KnownBiasAndPositionAccelerometerCalibrator(
4422 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4423 final double biasX, final double biasY, final double biasZ,
4424 final double initialSx, final double initialSy, final double initialSz,
4425 final double initialMxy, final double initialMxz, final double initialMyx,
4426 final double initialMyz, final double initialMzx, final double initialMzy,
4427 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4428 this(convertPosition(position), measurements, biasX, biasY, biasZ,
4429 initialSx, initialSy, initialSz, initialMxy, initialMxz,
4430 initialMyx, initialMyz, initialMzx, initialMzy, listener);
4431 }
4432
4433 /**
4434 * Constructor.
4435 *
4436 * @param position position where body kinematics measures have been taken.
4437 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4438 * accelerometer and gyroscope.
4439 * @param biasX x-coordinate of accelerometer bias.
4440 * This is expressed in meters per squared second (m/s^2).
4441 * @param biasY y-coordinate of accelerometer bias.
4442 * This is expressed in meters per squared second (m/s^2).
4443 * @param biasZ z-coordinate of accelerometer bias.
4444 * This is expressed in meters per squared second (m/s^2).
4445 * @param initialSx initial x scaling factor.
4446 * @param initialSy initial y scaling factor.
4447 * @param initialSz initial z scaling factor.
4448 * @param initialMxy initial x-y cross coupling error.
4449 * @param initialMxz initial x-z cross coupling error.
4450 * @param initialMyx initial y-x cross coupling error.
4451 * @param initialMyz initial y-z cross coupling error.
4452 * @param initialMzx initial z-x cross coupling error.
4453 * @param initialMzy initial z-y cross coupling error.
4454 */
4455 public KnownBiasAndPositionAccelerometerCalibrator(
4456 final NEDPosition position, final boolean commonAxisUsed,
4457 final double biasX, final double biasY, final double biasZ,
4458 final double initialSx, final double initialSy, final double initialSz,
4459 final double initialMxy, final double initialMxz, final double initialMyx,
4460 final double initialMyz, final double initialMzx, final double initialMzy) {
4461 this(convertPosition(position), commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz,
4462 initialMxy, initialMxz, initialMyx, initialMyz, initialMzx, initialMzy);
4463 }
4464
4465 /**
4466 * Constructor.
4467 *
4468 * @param position position where body kinematics measures have been taken.
4469 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4470 * accelerometer and gyroscope.
4471 * @param biasX x-coordinate of accelerometer bias.
4472 * This is expressed in meters per squared second (m/s^2).
4473 * @param biasY y-coordinate of accelerometer bias.
4474 * This is expressed in meters per squared second (m/s^2).
4475 * @param biasZ z-coordinate of accelerometer bias.
4476 * This is expressed in meters per squared second (m/s^2).
4477 * @param initialSx initial x scaling factor.
4478 * @param initialSy initial y scaling factor.
4479 * @param initialSz initial z scaling factor.
4480 * @param initialMxy initial x-y cross coupling error.
4481 * @param initialMxz initial x-z cross coupling error.
4482 * @param initialMyx initial y-x cross coupling error.
4483 * @param initialMyz initial y-z cross coupling error.
4484 * @param initialMzx initial z-x cross coupling error.
4485 * @param initialMzy initial z-y cross coupling error.
4486 * @param listener listener to handle events raised by this calibrator.
4487 */
4488 public KnownBiasAndPositionAccelerometerCalibrator(
4489 final NEDPosition position, final boolean commonAxisUsed,
4490 final double biasX, final double biasY, final double biasZ,
4491 final double initialSx, final double initialSy, final double initialSz,
4492 final double initialMxy, final double initialMxz, final double initialMyx,
4493 final double initialMyz, final double initialMzx, final double initialMzy,
4494 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4495 this(convertPosition(position), commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz,
4496 initialMxy, initialMxz, initialMyx, initialMyz, initialMzx, initialMzy, listener);
4497 }
4498
4499 /**
4500 * Constructor.
4501 *
4502 * @param position position where body kinematics measures have been taken.
4503 * @param measurements collection of body kinematics measurements with standard
4504 * deviations taken at the same position with zero velocity
4505 * and unknown different orientations.
4506 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4507 * accelerometer and gyroscope.
4508 * @param biasX x-coordinate of accelerometer bias.
4509 * This is expressed in meters per squared second (m/s^2).
4510 * @param biasY y-coordinate of accelerometer bias.
4511 * This is expressed in meters per squared second (m/s^2).
4512 * @param biasZ z-coordinate of accelerometer bias.
4513 * This is expressed in meters per squared second (m/s^2).
4514 * @param initialSx initial x scaling factor.
4515 * @param initialSy initial y scaling factor.
4516 * @param initialSz initial z scaling factor.
4517 * @param initialMxy initial x-y cross coupling error.
4518 * @param initialMxz initial x-z cross coupling error.
4519 * @param initialMyx initial y-x cross coupling error.
4520 * @param initialMyz initial y-z cross coupling error.
4521 * @param initialMzx initial z-x cross coupling error.
4522 * @param initialMzy initial z-y cross coupling error.
4523 */
4524 public KnownBiasAndPositionAccelerometerCalibrator(
4525 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4526 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ,
4527 final double initialSx, final double initialSy, final double initialSz,
4528 final double initialMxy, final double initialMxz, final double initialMyx,
4529 final double initialMyz, final double initialMzx, final double initialMzy) {
4530 this(convertPosition(position), measurements, commonAxisUsed, biasX, biasY, biasZ,
4531 initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
4532 initialMyz, initialMzx, initialMzy);
4533 }
4534
4535 /**
4536 * Constructor.
4537 *
4538 * @param position position where body kinematics measures have been taken.
4539 * @param measurements collection of body kinematics measurements with standard
4540 * deviations taken at the same position with zero velocity
4541 * and unknown different orientations.
4542 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4543 * accelerometer and gyroscope.
4544 * @param biasX x-coordinate of accelerometer bias.
4545 * This is expressed in meters per squared second (m/s^2).
4546 * @param biasY y-coordinate of accelerometer bias.
4547 * This is expressed in meters per squared second (m/s^2).
4548 * @param biasZ z-coordinate of accelerometer bias.
4549 * This is expressed in meters per squared second (m/s^2).
4550 * @param initialSx initial x scaling factor.
4551 * @param initialSy initial y scaling factor.
4552 * @param initialSz initial z scaling factor.
4553 * @param initialMxy initial x-y cross coupling error.
4554 * @param initialMxz initial x-z cross coupling error.
4555 * @param initialMyx initial y-x cross coupling error.
4556 * @param initialMyz initial y-z cross coupling error.
4557 * @param initialMzx initial z-x cross coupling error.
4558 * @param initialMzy initial z-y cross coupling error.
4559 * @param listener listener to handle events raised by this calibrator.
4560 */
4561 public KnownBiasAndPositionAccelerometerCalibrator(
4562 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4563 final boolean commonAxisUsed, final double biasX, final double biasY, final double biasZ,
4564 final double initialSx, final double initialSy, final double initialSz,
4565 final double initialMxy, final double initialMxz, final double initialMyx,
4566 final double initialMyz, final double initialMzx, final double initialMzy,
4567 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4568 this(convertPosition(position), measurements, commonAxisUsed, biasX, biasY, biasZ,
4569 initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
4570 initialMyz, initialMzx, initialMzy, listener);
4571 }
4572
4573 /**
4574 * Constructor.
4575 *
4576 * @param position position where body kinematics measures have been taken.
4577 * @param biasX x-coordinate of accelerometer bias.
4578 * @param biasY y-coordinate of accelerometer bias.
4579 * @param biasZ z-coordinate of accelerometer bias.
4580 * @param initialSx initial x scaling factor.
4581 * @param initialSy initial y scaling factor.
4582 * @param initialSz initial z scaling factor.
4583 * @param initialMxy initial x-y cross coupling error.
4584 * @param initialMxz initial x-z cross coupling error.
4585 * @param initialMyx initial y-x cross coupling error.
4586 * @param initialMyz initial y-z cross coupling error.
4587 * @param initialMzx initial z-x cross coupling error.
4588 * @param initialMzy initial z-y cross coupling error.
4589 */
4590 public KnownBiasAndPositionAccelerometerCalibrator(
4591 final NEDPosition position, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
4592 final double initialSx, final double initialSy, final double initialSz,
4593 final double initialMxy, final double initialMxz, final double initialMyx,
4594 final double initialMyz, final double initialMzx, final double initialMzy) {
4595 this(convertPosition(position), biasX, biasY, biasZ, initialSx, initialSy, initialSz,
4596 initialMxy, initialMxz, initialMyx, initialMyz, initialMzx, initialMzy);
4597 }
4598
4599 /**
4600 * Constructor.
4601 *
4602 * @param position position where body kinematics measures have been taken.
4603 * @param biasX x-coordinate of accelerometer bias.
4604 * @param biasY y-coordinate of accelerometer bias.
4605 * @param biasZ z-coordinate of accelerometer bias.
4606 * @param initialSx initial x scaling factor.
4607 * @param initialSy initial y scaling factor.
4608 * @param initialSz initial z scaling factor.
4609 * @param initialMxy initial x-y cross coupling error.
4610 * @param initialMxz initial x-z cross coupling error.
4611 * @param initialMyx initial y-x cross coupling error.
4612 * @param initialMyz initial y-z cross coupling error.
4613 * @param initialMzx initial z-x cross coupling error.
4614 * @param initialMzy initial z-y cross coupling error.
4615 * @param listener listener to handle events raised by this calibrator.
4616 */
4617 public KnownBiasAndPositionAccelerometerCalibrator(
4618 final NEDPosition position, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
4619 final double initialSx, final double initialSy, final double initialSz,
4620 final double initialMxy, final double initialMxz, final double initialMyx,
4621 final double initialMyz, final double initialMzx, final double initialMzy,
4622 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4623 this(convertPosition(position), biasX, biasY, biasZ, initialSx, initialSy, initialSz,
4624 initialMxy, initialMxz, initialMyx, initialMyz, initialMzx, initialMzy, listener);
4625 }
4626
4627 /**
4628 * Constructor.
4629 *
4630 * @param position position where body kinematics measures have been taken.
4631 * @param measurements collection of body kinematics measurements with standard
4632 * deviations taken at the same position with zero velocity
4633 * and unknown different orientations.
4634 * @param biasX x-coordinate of accelerometer bias.
4635 * @param biasY y-coordinate of accelerometer bias.
4636 * @param biasZ z-coordinate of accelerometer bias.
4637 * @param initialSx initial x scaling factor.
4638 * @param initialSy initial y scaling factor.
4639 * @param initialSz initial z scaling factor.
4640 * @param initialMxy initial x-y cross coupling error.
4641 * @param initialMxz initial x-z cross coupling error.
4642 * @param initialMyx initial y-x cross coupling error.
4643 * @param initialMyz initial y-z cross coupling error.
4644 * @param initialMzx initial z-x cross coupling error.
4645 * @param initialMzy initial z-y cross coupling error.
4646 */
4647 public KnownBiasAndPositionAccelerometerCalibrator(
4648 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4649 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
4650 final double initialSx, final double initialSy, final double initialSz,
4651 final double initialMxy, final double initialMxz, final double initialMyx,
4652 final double initialMyz, final double initialMzx, final double initialMzy) {
4653 this(convertPosition(position), measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz,
4654 initialMxy, initialMxz, initialMyx, initialMyz, initialMzx, initialMzy);
4655 }
4656
4657 /**
4658 * Constructor.
4659 *
4660 * @param position position where body kinematics measures have been taken.
4661 * @param measurements collection of body kinematics measurements with standard
4662 * deviations taken at the same position with zero velocity
4663 * and unknown different orientations.
4664 * @param biasX x-coordinate of accelerometer bias.
4665 * @param biasY y-coordinate of accelerometer bias.
4666 * @param biasZ z-coordinate of accelerometer bias.
4667 * @param initialSx initial x scaling factor.
4668 * @param initialSy initial y scaling factor.
4669 * @param initialSz initial z scaling factor.
4670 * @param initialMxy initial x-y cross coupling error.
4671 * @param initialMxz initial x-z cross coupling error.
4672 * @param initialMyx initial y-x cross coupling error.
4673 * @param initialMyz initial y-z cross coupling error.
4674 * @param initialMzx initial z-x cross coupling error.
4675 * @param initialMzy initial z-y cross coupling error.
4676 * @param listener listener to handle events raised by this calibrator.
4677 */
4678 public KnownBiasAndPositionAccelerometerCalibrator(
4679 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4680 final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
4681 final double initialSx, final double initialSy, final double initialSz,
4682 final double initialMxy, final double initialMxz, final double initialMyx,
4683 final double initialMyz, final double initialMzx, final double initialMzy,
4684 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4685 this(convertPosition(position), measurements, biasX, biasY, biasZ, initialSx, initialSy, initialSz,
4686 initialMxy, initialMxz, initialMyx, initialMyz, initialMzx, initialMzy, listener);
4687 }
4688
4689 /**
4690 * Constructor.
4691 *
4692 * @param position position where body kinematics measures have been taken.
4693 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4694 * accelerometer and gyroscope.
4695 * @param biasX x-coordinate of accelerometer bias.
4696 * @param biasY y-coordinate of accelerometer bias.
4697 * @param biasZ z-coordinate of accelerometer bias.
4698 * @param initialSx initial x scaling factor.
4699 * @param initialSy initial y scaling factor.
4700 * @param initialSz initial z scaling factor.
4701 * @param initialMxy initial x-y cross coupling error.
4702 * @param initialMxz initial x-z cross coupling error.
4703 * @param initialMyx initial y-x cross coupling error.
4704 * @param initialMyz initial y-z cross coupling error.
4705 * @param initialMzx initial z-x cross coupling error.
4706 * @param initialMzy initial z-y cross coupling error.
4707 */
4708 public KnownBiasAndPositionAccelerometerCalibrator(
4709 final NEDPosition position, final boolean commonAxisUsed, final Acceleration biasX,
4710 final Acceleration biasY, final Acceleration biasZ,
4711 final double initialSx, final double initialSy, final double initialSz,
4712 final double initialMxy, final double initialMxz, final double initialMyx,
4713 final double initialMyz, final double initialMzx, final double initialMzy) {
4714 this(convertPosition(position), commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz,
4715 initialMxy, initialMxz, initialMyx, initialMyz, initialMzx, initialMzy);
4716 }
4717
4718 /**
4719 * Constructor.
4720 *
4721 * @param position position where body kinematics measures have been taken.
4722 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4723 * accelerometer and gyroscope.
4724 * @param biasX x-coordinate of accelerometer bias.
4725 * @param biasY y-coordinate of accelerometer bias.
4726 * @param biasZ z-coordinate of accelerometer bias.
4727 * @param initialSx initial x scaling factor.
4728 * @param initialSy initial y scaling factor.
4729 * @param initialSz initial z scaling factor.
4730 * @param initialMxy initial x-y cross coupling error.
4731 * @param initialMxz initial x-z cross coupling error.
4732 * @param initialMyx initial y-x cross coupling error.
4733 * @param initialMyz initial y-z cross coupling error.
4734 * @param initialMzx initial z-x cross coupling error.
4735 * @param initialMzy initial z-y cross coupling error.
4736 * @param listener listener to handle events raised by this calibrator.
4737 */
4738 public KnownBiasAndPositionAccelerometerCalibrator(
4739 final NEDPosition position, final boolean commonAxisUsed, final Acceleration biasX,
4740 final Acceleration biasY, final Acceleration biasZ,
4741 final double initialSx, final double initialSy, final double initialSz,
4742 final double initialMxy, final double initialMxz, final double initialMyx,
4743 final double initialMyz, final double initialMzx, final double initialMzy,
4744 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4745 this(convertPosition(position), commonAxisUsed, biasX, biasY, biasZ, initialSx, initialSy, initialSz,
4746 initialMxy, initialMxz, initialMyx, initialMyz, initialMzx, initialMzy, listener);
4747 }
4748
4749 /**
4750 * Constructor.
4751 *
4752 * @param position position where body kinematics measures have been taken.
4753 * @param measurements collection of body kinematics measurements with standard
4754 * deviations taken at the same position with zero velocity
4755 * and unknown different orientations.
4756 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4757 * accelerometer and gyroscope.
4758 * @param biasX x-coordinate of accelerometer bias.
4759 * @param biasY y-coordinate of accelerometer bias.
4760 * @param biasZ z-coordinate of accelerometer bias.
4761 * @param initialSx initial x scaling factor.
4762 * @param initialSy initial y scaling factor.
4763 * @param initialSz initial z scaling factor.
4764 * @param initialMxy initial x-y cross coupling error.
4765 * @param initialMxz initial x-z cross coupling error.
4766 * @param initialMyx initial y-x cross coupling error.
4767 * @param initialMyz initial y-z cross coupling error.
4768 * @param initialMzx initial z-x cross coupling error.
4769 * @param initialMzy initial z-y cross coupling error.
4770 */
4771 public KnownBiasAndPositionAccelerometerCalibrator(
4772 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4773 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
4774 final double initialSx, final double initialSy, final double initialSz,
4775 final double initialMxy, final double initialMxz, final double initialMyx,
4776 final double initialMyz, final double initialMzx, final double initialMzy) {
4777 this(convertPosition(position), measurements, commonAxisUsed, biasX, biasY, biasZ,
4778 initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
4779 initialMyz, initialMzx, initialMzy);
4780 }
4781
4782 /**
4783 * Constructor.
4784 *
4785 * @param position position where body kinematics measures have been taken.
4786 * @param measurements collection of body kinematics measurements with standard
4787 * deviations taken at the same position with zero velocity
4788 * and unknown different orientations.
4789 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4790 * accelerometer and gyroscope.
4791 * @param biasX x-coordinate of accelerometer bias.
4792 * @param biasY y-coordinate of accelerometer bias.
4793 * @param biasZ z-coordinate of accelerometer bias.
4794 * @param initialSx initial x scaling factor.
4795 * @param initialSy initial y scaling factor.
4796 * @param initialSz initial z scaling factor.
4797 * @param initialMxy initial x-y cross coupling error.
4798 * @param initialMxz initial x-z cross coupling error.
4799 * @param initialMyx initial y-x cross coupling error.
4800 * @param initialMyz initial y-z cross coupling error.
4801 * @param initialMzx initial z-x cross coupling error.
4802 * @param initialMzy initial z-y cross coupling error.
4803 * @param listener listener to handle events raised by this calibrator.
4804 */
4805 public KnownBiasAndPositionAccelerometerCalibrator(
4806 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4807 final boolean commonAxisUsed, final Acceleration biasX, final Acceleration biasY, final Acceleration biasZ,
4808 final double initialSx, final double initialSy, final double initialSz,
4809 final double initialMxy, final double initialMxz, final double initialMyx,
4810 final double initialMyz, final double initialMzx, final double initialMzy,
4811 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4812 this(convertPosition(position), measurements, commonAxisUsed, biasX, biasY, biasZ,
4813 initialSx, initialSy, initialSz, initialMxy, initialMxz, initialMyx,
4814 initialMyz, initialMzx, initialMzy, listener);
4815 }
4816
4817 /**
4818 * Constructor.
4819 *
4820 * @param position position where body kinematics measures have been taken.
4821 * @param bias known accelerometer bias. This must have length 3 and is expressed
4822 * in meters per squared second (m/s^2).
4823 * @throws IllegalArgumentException if provided bias array does not have length 3.
4824 */
4825 public KnownBiasAndPositionAccelerometerCalibrator(final NEDPosition position, final double[] bias) {
4826 this(convertPosition(position), bias);
4827 }
4828
4829 /**
4830 * Constructor.
4831 *
4832 * @param position position where body kinematics measures have been taken.
4833 * @param bias known accelerometer bias. This must have length 3 and is expressed
4834 * in meters per squared second (m/s^2).
4835 * @param listener listener to handle events raised by this calibrator.
4836 * @throws IllegalArgumentException if provided bias array does not have length 3.
4837 */
4838 public KnownBiasAndPositionAccelerometerCalibrator(
4839 final NEDPosition position, final double[] bias,
4840 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4841 this(convertPosition(position), bias, listener);
4842 }
4843
4844 /**
4845 * Constructor.
4846 *
4847 * @param position position where body kinematics measures have been taken.
4848 * @param measurements collection of body kinematics measurements with standard
4849 * deviations taken at the same position with zero velocity
4850 * and unknown different orientations.
4851 * @param bias known accelerometer bias. This must have length 3 and is expressed
4852 * in meters per squared second (m/s^2).
4853 * @throws IllegalArgumentException if provided bias array does not have length 3.
4854 */
4855 public KnownBiasAndPositionAccelerometerCalibrator(
4856 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4857 final double[] bias) {
4858 this(convertPosition(position), measurements, bias);
4859 }
4860
4861 /**
4862 * Constructor.
4863 *
4864 * @param position position where body kinematics measures have been taken.
4865 * @param measurements collection of body kinematics measurements with standard
4866 * deviations taken at the same position with zero velocity
4867 * and unknown different orientations.
4868 * @param bias known accelerometer bias. This must have length 3 and is expressed
4869 * in meters per squared second (m/s^2).
4870 * @param listener listener to handle events raised by this calibrator.
4871 * @throws IllegalArgumentException if provided bias array does not have length 3.
4872 */
4873 public KnownBiasAndPositionAccelerometerCalibrator(
4874 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4875 final double[] bias, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4876 this(convertPosition(position), measurements, bias, listener);
4877 }
4878
4879 /**
4880 * Constructor.
4881 *
4882 * @param position position where body kinematics measures have been taken.
4883 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4884 * accelerometer and gyroscope.
4885 * @param bias known accelerometer bias. This must have length 3 and is expressed
4886 * in meters per squared second (m/s^2).
4887 * @throws IllegalArgumentException if provided bias array does not have length 3.
4888 */
4889 public KnownBiasAndPositionAccelerometerCalibrator(
4890 final NEDPosition position, final boolean commonAxisUsed, final double[] bias) {
4891 this(convertPosition(position), commonAxisUsed, bias);
4892 }
4893
4894 /**
4895 * Constructor.
4896 *
4897 * @param position position where body kinematics measures have been taken.
4898 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4899 * accelerometer and gyroscope.
4900 * @param bias known accelerometer bias. This must have length 3 and is expressed
4901 * in meters per squared second (m/s^2).
4902 * @param listener listener to handle events raised by this calibrator.
4903 * @throws IllegalArgumentException if provided bias array does not have length 3.
4904 */
4905 public KnownBiasAndPositionAccelerometerCalibrator(
4906 final NEDPosition position, final boolean commonAxisUsed, final double[] bias,
4907 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4908 this(convertPosition(position), commonAxisUsed, bias, listener);
4909 }
4910
4911 /**
4912 * Constructor.
4913 *
4914 * @param position position where body kinematics measures have been taken.
4915 * @param measurements collection of body kinematics measurements with standard
4916 * deviations taken at the same position with zero velocity
4917 * and unknown different orientations.
4918 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4919 * accelerometer and gyroscope.
4920 * @param bias known accelerometer bias. This must have length 3 and is expressed
4921 * in meters per squared second (m/s^2).
4922 * @throws IllegalArgumentException if provided bias array does not have length 3.
4923 */
4924 public KnownBiasAndPositionAccelerometerCalibrator(
4925 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4926 final boolean commonAxisUsed, final double[] bias) {
4927 this(convertPosition(position), measurements, commonAxisUsed, bias);
4928 }
4929
4930 /**
4931 * Constructor.
4932 *
4933 * @param position position where body kinematics measures have been taken.
4934 * @param measurements collection of body kinematics measurements with standard
4935 * deviations taken at the same position with zero velocity
4936 * and unknown different orientations.
4937 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
4938 * accelerometer and gyroscope.
4939 * @param bias known accelerometer bias. This must have length 3 and is expressed
4940 * in meters per squared second (m/s^2).
4941 * @param listener listener to handle events raised by this calibrator.
4942 * @throws IllegalArgumentException if provided bias array does not have length 3.
4943 */
4944 public KnownBiasAndPositionAccelerometerCalibrator(
4945 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4946 final boolean commonAxisUsed, final double[] bias,
4947 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4948 this(convertPosition(position), measurements, commonAxisUsed, bias, listener);
4949 }
4950
4951 /**
4952 * Constructor.
4953 *
4954 * @param position position where body kinematics measures have been taken.
4955 * @param bias known accelerometer bias.
4956 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
4957 */
4958 public KnownBiasAndPositionAccelerometerCalibrator(final NEDPosition position, final Matrix bias) {
4959 this(convertPosition(position), bias);
4960 }
4961
4962 /**
4963 * Constructor.
4964 *
4965 * @param position position where body kinematics measures have been taken.
4966 * @param bias known accelerometer bias.
4967 * @param listener listener to handle events raised by this calibrator.
4968 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
4969 */
4970 public KnownBiasAndPositionAccelerometerCalibrator(
4971 final NEDPosition position, final Matrix bias,
4972 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
4973 this(convertPosition(position), bias, listener);
4974 }
4975
4976 /**
4977 * Constructor.
4978 *
4979 * @param position position where body kinematics measures have been taken.
4980 * @param measurements collection of body kinematics measurements with standard
4981 * deviations taken at the same position with zero velocity
4982 * and unknown different orientations.
4983 * @param bias known accelerometer bias.
4984 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
4985 */
4986 public KnownBiasAndPositionAccelerometerCalibrator(
4987 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
4988 final Matrix bias) {
4989 this(convertPosition(position), measurements, bias);
4990 }
4991
4992 /**
4993 * Constructor.
4994 *
4995 * @param position position where body kinematics measures have been taken.
4996 * @param measurements collection of body kinematics measurements with standard
4997 * deviations taken at the same position with zero velocity
4998 * and unknown different orientations.
4999 * @param bias known accelerometer bias.
5000 * @param listener listener to handle events raised by this calibrator.
5001 */
5002 public KnownBiasAndPositionAccelerometerCalibrator(
5003 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
5004 final Matrix bias, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
5005 this(convertPosition(position), measurements, bias, listener);
5006 }
5007
5008 /**
5009 * Constructor.
5010 *
5011 * @param position position where body kinematics measures have been taken.
5012 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
5013 * accelerometer and gyroscope.
5014 * @param bias known accelerometer bias.
5015 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
5016 */
5017 public KnownBiasAndPositionAccelerometerCalibrator(
5018 final NEDPosition position, final boolean commonAxisUsed, final Matrix bias) {
5019 this(convertPosition(position), commonAxisUsed, bias);
5020 }
5021
5022 /**
5023 * Constructor.
5024 *
5025 * @param position position where body kinematics measures have been taken.
5026 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
5027 * accelerometer and gyroscope.
5028 * @param bias known accelerometer bias.
5029 * @param listener listener to handle events raised by this calibrator.
5030 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
5031 */
5032 public KnownBiasAndPositionAccelerometerCalibrator(
5033 final NEDPosition position, final boolean commonAxisUsed, final Matrix bias,
5034 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
5035 this(convertPosition(position), commonAxisUsed, bias, listener);
5036 }
5037
5038 /**
5039 * Constructor.
5040 *
5041 * @param position position where body kinematics measures have been taken.
5042 * @param measurements collection of body kinematics measurements with standard
5043 * deviations taken at the same position with zero velocity
5044 * and unknown different orientations.
5045 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
5046 * accelerometer and gyroscope.
5047 * @param bias known accelerometer bias.
5048 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
5049 */
5050 public KnownBiasAndPositionAccelerometerCalibrator(
5051 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
5052 final boolean commonAxisUsed, final Matrix bias) {
5053 this(convertPosition(position), measurements, commonAxisUsed, bias);
5054 }
5055
5056 /**
5057 * Constructor.
5058 *
5059 * @param position position where body kinematics measures have been taken.
5060 * @param measurements collection of body kinematics measurements with standard
5061 * deviations taken at the same position with zero velocity
5062 * and unknown different orientations.
5063 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
5064 * accelerometer and gyroscope.
5065 * @param bias known accelerometer bias.
5066 * @param listener listener to handle events raised by this calibrator.
5067 * @throws IllegalArgumentException if provided bias matrix is not 3x1.
5068 */
5069 public KnownBiasAndPositionAccelerometerCalibrator(
5070 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
5071 final boolean commonAxisUsed, final Matrix bias,
5072 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
5073 this(convertPosition(position), measurements, commonAxisUsed, bias, listener);
5074 }
5075
5076 /**
5077 * Constructor.
5078 *
5079 * @param position position where body kinematics measures have been taken.
5080 * @param bias known accelerometer bias.
5081 * @param initialMa initial scale factors and cross coupling errors matrix.
5082 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
5083 * scaling and coupling error matrix is not 3x3.
5084 */
5085 public KnownBiasAndPositionAccelerometerCalibrator(
5086 final NEDPosition position, final Matrix bias, final Matrix initialMa) {
5087 this(convertPosition(position), bias, initialMa);
5088 }
5089
5090 /**
5091 * Constructor.
5092 *
5093 * @param position position where body kinematics measures have been taken.
5094 * @param bias known accelerometer bias.
5095 * @param initialMa initial scale factors and cross coupling errors matrix.
5096 * @param listener listener to handle events raised by this calibrator.
5097 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
5098 * scaling and coupling error matrix is not 3x3.
5099 */
5100 public KnownBiasAndPositionAccelerometerCalibrator(
5101 final NEDPosition position, final Matrix bias, final Matrix initialMa,
5102 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
5103 this(convertPosition(position), bias, initialMa, listener);
5104 }
5105
5106 /**
5107 * Constructor.
5108 *
5109 * @param position position where body kinematics measures have been taken.
5110 * @param measurements collection of body kinematics measurements with standard
5111 * deviations taken at the same position with zero velocity
5112 * and unknown different orientations.
5113 * @param bias known accelerometer bias.
5114 * @param initialMa initial scale factors and cross coupling errors matrix.
5115 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
5116 * scaling and coupling error matrix is not 3x3.
5117 */
5118 public KnownBiasAndPositionAccelerometerCalibrator(
5119 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
5120 final Matrix bias, final Matrix initialMa) {
5121 this(convertPosition(position), measurements, bias, initialMa);
5122 }
5123
5124 /**
5125 * Constructor.
5126 *
5127 * @param position position where body kinematics measures have been taken.
5128 * @param measurements collection of body kinematics measurements with standard
5129 * deviations taken at the same position with zero velocity
5130 * and unknown different orientations.
5131 * @param bias known accelerometer bias.
5132 * @param initialMa initial scale factors and cross coupling errors matrix.
5133 * @param listener listener to handle events raised by this calibrator.
5134 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
5135 * scaling and coupling error matrix is not 3x3.
5136 */
5137 public KnownBiasAndPositionAccelerometerCalibrator(
5138 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
5139 final Matrix bias, final Matrix initialMa,
5140 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
5141 this(convertPosition(position), measurements, bias, initialMa, listener);
5142 }
5143
5144 /**
5145 * Constructor.
5146 *
5147 * @param position position where body kinematics measures have been taken.
5148 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
5149 * accelerometer and gyroscope.
5150 * @param bias known accelerometer bias.
5151 * @param initialMa initial scale factors and cross coupling errors matrix.
5152 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
5153 * scaling and coupling error matrix is not 3x3.
5154 */
5155 public KnownBiasAndPositionAccelerometerCalibrator(
5156 final NEDPosition position, final boolean commonAxisUsed, final Matrix bias, final Matrix initialMa) {
5157 this(convertPosition(position), commonAxisUsed, bias, initialMa);
5158 }
5159
5160 /**
5161 * Constructor.
5162 *
5163 * @param position position where body kinematics measures have been taken.
5164 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
5165 * accelerometer and gyroscope.
5166 * @param bias known accelerometer bias.
5167 * @param initialMa initial scale factors and cross coupling errors matrix.
5168 * @param listener listener to handle events raised by this calibrator.
5169 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
5170 * scaling and coupling error matrix is not 3x3.
5171 */
5172 public KnownBiasAndPositionAccelerometerCalibrator(
5173 final NEDPosition position, final boolean commonAxisUsed, final Matrix bias,
5174 final Matrix initialMa, final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
5175 this(convertPosition(position), commonAxisUsed, bias, initialMa, listener);
5176 }
5177
5178 /**
5179 * Constructor.
5180 *
5181 * @param position position where body kinematics measures have been taken.
5182 * @param measurements collection of body kinematics measurements with standard
5183 * deviations taken at the same position with zero velocity
5184 * and unknown different orientations.
5185 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
5186 * accelerometer and gyroscope.
5187 * @param bias known accelerometer bias.
5188 * @param initialMa initial scale factors and cross coupling errors matrix.
5189 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
5190 * scaling and coupling error matrix is not 3x3.
5191 */
5192 public KnownBiasAndPositionAccelerometerCalibrator(
5193 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
5194 final boolean commonAxisUsed, final Matrix bias, final Matrix initialMa) {
5195 this(convertPosition(position), measurements, commonAxisUsed, bias, initialMa);
5196 }
5197
5198 /**
5199 * Constructor.
5200 *
5201 * @param position position where body kinematics measures have been taken.
5202 * @param measurements collection of body kinematics measurements with standard
5203 * deviations taken at the same position with zero velocity
5204 * and unknown different orientations.
5205 * @param commonAxisUsed indicates whether z-axis is assumed to be common for
5206 * accelerometer and gyroscope.
5207 * @param bias known accelerometer bias.
5208 * @param initialMa initial scale factors and cross coupling errors matrix.
5209 * @param listener listener to handle events raised by this calibrator.
5210 * @throws IllegalArgumentException if either provided bias matrix is not 3x1 or
5211 * scaling and coupling error matrix is not 3x3.
5212 */
5213 public KnownBiasAndPositionAccelerometerCalibrator(
5214 final NEDPosition position, final Collection<StandardDeviationBodyKinematics> measurements,
5215 final boolean commonAxisUsed, final Matrix bias, final Matrix initialMa,
5216 final KnownBiasAndPositionAccelerometerCalibrationListener listener) {
5217 this(convertPosition(position), measurements, commonAxisUsed, bias, initialMa, listener);
5218 }
5219
5220 /**
5221 * Gets position where body kinematics measures have been taken expressed in
5222 * ECEF coordinates.
5223 *
5224 * @return position where body kinematics measures have been taken.
5225 */
5226 public ECEFPosition getEcefPosition() {
5227 return position;
5228 }
5229
5230 /**
5231 * Gets position where body kinematics measures have been taken expressed in
5232 * ECEF coordinates.
5233 *
5234 * @param position position where body kinematics measures have been taken.
5235 * @throws LockedException if calibrator is currently running.
5236 */
5237 public void setPosition(final ECEFPosition position) throws LockedException {
5238 if (isRunning()) {
5239 throw new LockedException();
5240 }
5241
5242 this.position = position;
5243 if (position != null) {
5244 final var gravity = ECEFGravityEstimator.estimateGravityAndReturnNew(
5245 this.position.getX(), this.position.getY(), this.position.getZ());
5246 groundTruthGravityNorm = gravity.getNorm();
5247 } else {
5248 groundTruthGravityNorm = null;
5249 }
5250 }
5251
5252 /**
5253 * Gets position where body kinematics measures have been taken expressed in
5254 * NED coordinates.
5255 *
5256 * @return position where body kinematics measures have been taken or null if
5257 * not available.
5258 */
5259 public NEDPosition getNedPosition() {
5260 final var result = new NEDPosition();
5261 return getNedPosition(result) ? result : null;
5262 }
5263
5264 /**
5265 * Gets position where body kinematics measures have been taken expressed in
5266 * NED coordinates.
5267 *
5268 * @param result instance where result will be stored.
5269 * @return true if NED position could be computed, false otherwise.
5270 */
5271 public boolean getNedPosition(final NEDPosition result) {
5272
5273 if (position != null) {
5274 final var velocity = new NEDVelocity();
5275 ECEFtoNEDPositionVelocityConverter.convertECEFtoNED(
5276 position.getX(), position.getY(), position.getZ(),
5277 0.0, 0.0, 0.0, result, velocity);
5278 return true;
5279 } else {
5280 return false;
5281 }
5282 }
5283
5284 /**
5285 * Sets position where body kinematics measures have been taken expressed in
5286 * NED coordinates.
5287 *
5288 * @param position position where body kinematics measures have been taken.
5289 * @throws LockedException if calibrator is currently running.
5290 */
5291 public void setPosition(final NEDPosition position) throws LockedException {
5292 setPosition(position != null ? convertPosition(position) : null);
5293 }
5294
5295 /**
5296 * Indicates whether calibrator is ready to start.
5297 *
5298 * @return true if calibrator is ready, false otherwise.
5299 */
5300 @Override
5301 public boolean isReady() {
5302 return super.isReady() && position != null;
5303 }
5304
5305 /**
5306 * Converts provided NED position expressed in terms of latitude, longitude and height respect
5307 * mean Earth surface, to position expressed in ECEF coordinates.
5308 *
5309 * @param position NED position to be converted.
5310 * @return converted position expressed in ECEF coordinates.
5311 */
5312 private static ECEFPosition convertPosition(final NEDPosition position) {
5313 final var velocity = new ECEFVelocity();
5314 final var result = new ECEFPosition();
5315 NEDtoECEFPositionVelocityConverter.convertNEDtoECEF(
5316 position.getLatitude(), position.getLongitude(), position.getHeight(),
5317 0.0, 0.0, 0.0, result, velocity);
5318 return result;
5319 }
5320 }