View Javadoc
1   /*
2    * Copyright (C) 2020 Alberto Irurueta Carro (alberto@irurueta.com)
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *         http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package com.irurueta.navigation.inertial.calibration;
17  
18  import com.irurueta.algebra.Matrix;
19  
20  /**
21   * Defines a source for estimated gyroscope calibration data.
22   */
23  public interface GyroscopeCalibrationSource {
24  
25      /**
26       * Gets array containing x,y,z components of estimated gyroscope biases
27       * expressed in radians per second (rad/s).
28       *
29       * @return array containing x,y,z components of estimated gyroscope biases.
30       */
31      double[] getEstimatedBiases();
32  
33      /**
34       * Gets estimated gyroscope scale factors and cross coupling errors.
35       * This is the product of matrix Tg containing cross coupling errors and Kg
36       * containing scaling factors.
37       * So that:
38       * <pre>
39       *     Mg = [sx    mxy  mxz] = Tg*Kg
40       *          [myx   sy   myz]
41       *          [mzx   mzy  sz ]
42       * </pre>
43       * Where:
44       * <pre>
45       *     Kg = [sx 0   0 ]
46       *          [0  sy  0 ]
47       *          [0  0   sz]
48       * </pre>
49       * and
50       * <pre>
51       *     Tg = [1          -alphaXy    alphaXz ]
52       *          [alphaYx    1           -alphaYz]
53       *          [-alphaZx   alphaZy     1       ]
54       * </pre>
55       * Hence:
56       * <pre>
57       *     Mg = [sx    mxy  mxz] = Tg*Kg =  [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 gyroscope z-axis is assumed to be the same
63       * as the body z-axis. When this is assumed, myx = mzx = mzy = 0 and the Mg matrix
64       * becomes upper diagonal:
65       * <pre>
66       *     Mg = [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 gyroscope scale factors and cross coupling errors.
73       */
74      Matrix getEstimatedMg();
75  
76      /**
77       * Gets estimated G-dependent cross biases introduced on the gyroscope by the
78       * specific forces sensed by the accelerometer.
79       *
80       * @return a 3x3 matrix containing g-dependent cross biases.
81       */
82      Matrix getEstimatedGg();
83  }