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.accelerometer;
17  
18  import com.irurueta.algebra.Matrix;
19  import com.irurueta.algebra.WrongSizeException;
20  import com.irurueta.navigation.inertial.calibration.AccelerationTriad;
21  import com.irurueta.units.Acceleration;
22  
23  /**
24   * Interface for accelerometer calibrator where bias is unknown and needs to
25   * be estimated.
26   */
27  public interface UnknownBiasAccelerometerCalibrator {
28  
29      /**
30       * Gets array containing x,y,z components of estimated accelerometer biases
31       * expressed in meters per squared second (m/s^2).
32       *
33       * @return array containing x,y,z components of estimated accelerometer biases.
34       */
35      double[] getEstimatedBiases();
36  
37      /**
38       * Gets array containing x,y,z components of estimated accelerometer biases
39       * expressed in meters per squared second (m/s^2).
40       *
41       * @param result instance where estimated accelerometer biases will be stored.
42       * @return true if result instance was updated, false otherwise (when estimation
43       * is not yet available).
44       */
45      boolean getEstimatedBiases(final double[] result);
46  
47      /**
48       * Gets column matrix containing x,y,z components of estimated accelerometer biases
49       * expressed in meters per squared second (m/s^2).
50       *
51       * @return column matrix containing x,y,z components of estimated accelerometer
52       * biases
53       */
54      Matrix getEstimatedBiasesAsMatrix();
55  
56      /**
57       * Gets column matrix containing x,y,z components of estimated accelerometer biases
58       * expressed in meters per squared second (m/s^2).
59       *
60       * @param result instance where result data will be stored.
61       * @return true if result was updated, false otherwise.
62       * @throws WrongSizeException if provided result instance has invalid size.
63       */
64      boolean getEstimatedBiasesAsMatrix(final Matrix result) throws WrongSizeException;
65  
66      /**
67       * Gets x coordinate of estimated accelerometer bias expressed in meters per
68       * squared second (m/s^2).
69       *
70       * @return x coordinate of estimated accelerometer bias or null if not available.
71       */
72      Double getEstimatedBiasFx();
73  
74      /**
75       * Gets y coordinate of estimated accelerometer bias expressed in meters per
76       * squared second (m/s^2).
77       *
78       * @return y coordinate of estimated accelerometer bias or null if not available.
79       */
80      Double getEstimatedBiasFy();
81  
82      /**
83       * Gets z coordinate of estimated accelerometer bias expressed in meters per
84       * squared second (m/s^2).
85       *
86       * @return z coordinate of estimated accelerometer bias or null if not available.
87       */
88      Double getEstimatedBiasFz();
89  
90      /**
91       * Gets x coordinate of estimated accelerometer bias.
92       *
93       * @return x coordinate of estimated accelerometer bias or null if not available.
94       */
95      Acceleration getEstimatedBiasFxAsAcceleration();
96  
97      /**
98       * Gets x coordinate of estimated accelerometer bias.
99       *
100      * @param result instance where result will be stored.
101      * @return true if result was updated, false if estimation is not available.
102      */
103     boolean getEstimatedBiasFxAsAcceleration(final Acceleration result);
104 
105     /**
106      * Gets y coordinate of estimated accelerometer bias.
107      *
108      * @return y coordinate of estimated accelerometer bias or null if not available.
109      */
110     Acceleration getEstimatedBiasFyAsAcceleration();
111 
112     /**
113      * Gets y coordinate of estimated accelerometer bias.
114      *
115      * @param result instance where result will be stored.
116      * @return true if result was updated, false if estimation is not available.
117      */
118     boolean getEstimatedBiasFyAsAcceleration(final Acceleration result);
119 
120     /**
121      * Gets z coordinate of estimated accelerometer bias.
122      *
123      * @return z coordinate of estimated accelerometer bias or null if not available.
124      */
125     Acceleration getEstimatedBiasFzAsAcceleration();
126 
127     /**
128      * Gets z coordinate of estimated accelerometer bias.
129      *
130      * @param result instance where result will be stored.
131      * @return true if result was updated, false if estimation is not available.
132      */
133     boolean getEstimatedBiasFzAsAcceleration(final Acceleration result);
134 
135     /**
136      * Gets estimated accelerometer bias.
137      *
138      * @return estimated accelerometer bias or null if not available.
139      */
140     AccelerationTriad getEstimatedBiasAsTriad();
141 
142     /**
143      * Gets estimated accelerometer bias.
144      *
145      * @param result instance where result will be stored.
146      * @return true if estimated accelerometer bias is available and result was
147      * modified, false otherwise.
148      */
149     boolean getEstimatedBiasAsTriad(final AccelerationTriad result);
150 }