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;
17
18 import com.irurueta.algebra.Matrix;
19
20 /**
21 * Defines a source for estimated accelerometer calibration data.
22 */
23 public interface AccelerometerCalibrationSource {
24
25 /**
26 * Gets array containing x,y,z components of estimated accelerometer biases
27 * expressed in meters per squared second (m/s^2).
28 *
29 * @return array containing x,y,z components of estimated accelerometer biases.
30 */
31 double[] getEstimatedBiases();
32
33 /**
34 * Gets estimated accelerometer scale factors and cross coupling errors.
35 * This is the product of matrix Ta containing cross coupling errors and Ka
36 * containing scaling factors.
37 * So tat:
38 * <pre>
39 * Ma = [sx mxy mxz] = Ta*Ka
40 * [myx sy myz]
41 * [mzx mzy sz ]
42 * </pre>
43 * Where:
44 * <pre>
45 * Ka = [sx 0 0 ]
46 * [0 sy 0 ]
47 * [0 0 sz]
48 * </pre>
49 * and
50 * <pre>
51 * Ta = [1 -alphaXy alphaXz ]
52 * [alphaYx 1 -alphaYz]
53 * [-alphaZx alphaZy 1 ]
54 * </pre>
55 * Hence:
56 * <pre>
57 * Ma = [sx mxy mxz] = Ta*Ka = [sx -sy * alphaXy sz * alphaXz ]
58 * [myx sy myz] [sx * alphaYx sy -sz * alphaYz]
59 * [mzx mzy sz ] [-sx * alphaZx sy * alphaZy sz ]
60 * </pre>
61 * This instance allows any 3x3 matrix however, typically alphaYx, alphaZx and alphaZy
62 * are considered to be zero if the accelerometer z-axis is assumed to be the same
63 * as the body z-axis. When this is assumed, myx = mzx = mzy = 0 and the Ma matrix
64 * becomes upper diagonal:
65 * <pre>
66 * Ma = [sx mxy mxz]
67 * [0 sy myz]
68 * [0 0 sz ]
69 * </pre>
70 * Values of this matrix are unit-less.
71 *
72 * @return estimated accelerometer scale factors and cross coupling errors, or null
73 * if not available.
74 */
75 Matrix getEstimatedMa();
76 }