View Javadoc
1   /*
2    * Copyright (C) 2020 Alberto Irurueta Carro (alberto@irurueta.com)
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *         http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package com.irurueta.navigation.inertial.calibration.gyroscope;
17  
18  import com.irurueta.algebra.Matrix;
19  import com.irurueta.navigation.LockedException;
20  import com.irurueta.navigation.inertial.calibration.AngularSpeedTriad;
21  import com.irurueta.units.AngularSpeed;
22  
23  /**
24   * Interface for non-linear gyroscope calibrator where bias is unknown
25   * and needs to be estimated.
26   */
27  public interface UnknownBiasNonLinearGyroscopeCalibrator extends UnknownBiasGyroscopeCalibrator {
28  
29      /**
30       * Gets initial x-coordinate of gyroscope bias to be used to find a solution.
31       * This is expressed in radians per second (rad/s).
32       *
33       * @return initial x-coordinate of gyroscope bias.
34       */
35      double getInitialBiasX();
36  
37      /**
38       * Sets initial x-coordinate of gyroscope bias to be used to find a solution.
39       * This is expressed in radians per second (rad/s).
40       *
41       * @param initialBiasX initial x-coordinate of gyroscope bias.
42       * @throws LockedException if calibrator is currently running.
43       */
44      void setInitialBiasX(final double initialBiasX) throws LockedException;
45  
46      /**
47       * Gets initial y-coordinate of gyroscope bias to be used to find a solution.
48       * This is expressed in radians per second (rad/s).
49       *
50       * @return initial y-coordinate of gyroscope bias.
51       */
52      double getInitialBiasY();
53  
54      /**
55       * Sets initial y-coordinate of gyroscope bias to be used to find a solution.
56       * This is expressed in radians per second (rad/s).
57       *
58       * @param initialBiasY initial y-coordinate of gyroscope bias.
59       * @throws LockedException if calibrator is currently running.
60       */
61      void setInitialBiasY(final double initialBiasY) throws LockedException;
62  
63      /**
64       * Gets initial z-coordinate of gyroscope bias to be used to find a solution.
65       * This is expressed in radians per second (rad/s).
66       *
67       * @return initial z-coordinate of gyroscope bias.
68       */
69      double getInitialBiasZ();
70  
71      /**
72       * Sets initial z-coordinate of gyroscope bias to be used to find a solution.
73       * This is expressed in radians per second (rad/s).
74       *
75       * @param initialBiasZ initial z-coordinate of gyroscope bias.
76       * @throws LockedException if calibrator is currently running.
77       */
78      void setInitialBiasZ(final double initialBiasZ) throws LockedException;
79  
80      /**
81       * Gets initial x-coordinate of gyroscope bias to be used to find a solution.
82       *
83       * @return initial x-coordinate of gyroscope bias.
84       */
85      AngularSpeed getInitialBiasAngularSpeedX();
86  
87      /**
88       * Gets initial x-coordinate of gyroscope bias to be used to find a solution.
89       *
90       * @param result instance where result data will be stored.
91       */
92      void getInitialBiasAngularSpeedX(final AngularSpeed result);
93  
94      /**
95       * Sets initial x-coordinate of gyroscope bias to be used to find a solution.
96       *
97       * @param initialBiasX initial x-coordinate of gyroscope bias.
98       * @throws LockedException if calibrator is currently running.
99       */
100     void setInitialBiasX(final AngularSpeed initialBiasX) throws LockedException;
101 
102     /**
103      * Gets initial y-coordinate of gyroscope bias to be used to find a solution.
104      *
105      * @return initial y-coordinate of gyroscope bias.
106      */
107     AngularSpeed getInitialBiasAngularSpeedY();
108 
109     /**
110      * Gets initial y-coordinate of gyroscope bias to be used to find a solution.
111      *
112      * @param result instance where result data will be stored.
113      */
114     void getInitialBiasAngularSpeedY(final AngularSpeed result);
115 
116     /**
117      * Sets initial y-coordinate of gyroscope bias to be used to find a solution.
118      *
119      * @param initialBiasY initial y-coordinate of gyroscope bias.
120      * @throws LockedException if calibrator is currently running.
121      */
122     void setInitialBiasY(final AngularSpeed initialBiasY) throws LockedException;
123 
124     /**
125      * Gets initial z-coordinate of gyroscope bias to be used to find a solution.
126      *
127      * @return initial z-coordinate of gyroscope bias.
128      */
129     AngularSpeed getInitialBiasAngularSpeedZ();
130 
131     /**
132      * Gets initial z-coordinate of gyroscope bias to be used to find a solution.
133      *
134      * @param result instance where result data will be stored.
135      */
136     void getInitialBiasAngularSpeedZ(final AngularSpeed result);
137 
138     /**
139      * Sets initial z-coordinate of gyroscope bias to be used to find a solution.
140      *
141      * @param initialBiasZ initial z-coordinate of gyroscope bias.
142      * @throws LockedException if calibrator is currently running.
143      */
144     void setInitialBiasZ(final AngularSpeed initialBiasZ) throws LockedException;
145 
146     /**
147      * Sets initial bias coordinates of gyroscope used to find a solution
148      * expressed in radians per second (rad/s).
149      *
150      * @param initialBiasX initial x-coordinate of gyroscope bias.
151      * @param initialBiasY initial y-coordinate of gyroscope bias.
152      * @param initialBiasZ initial z-coordinate of gyroscope bias.
153      * @throws LockedException if calibrator is currently running.
154      */
155     void setInitialBias(final double initialBiasX, final double initialBiasY, final double initialBiasZ)
156             throws LockedException;
157 
158     /**
159      * Sets initial bias coordinates of gyroscope used to find a solution.
160      *
161      * @param initialBiasX initial x-coordinate of gyroscope bias.
162      * @param initialBiasY initial y-coordinate of gyroscope bias.
163      * @param initialBiasZ initial z-coordinate of gyroscope bias.
164      * @throws LockedException if calibrator is currently running.
165      */
166     void setInitialBias(final AngularSpeed initialBiasX, final AngularSpeed initialBiasY,
167                         final AngularSpeed initialBiasZ) throws LockedException;
168 
169     /**
170      * Gets initial bias to be used to find a solution as an array.
171      * Array values are expressed in radians per second (rad/s).
172      *
173      * @return array containing coordinates of initial bias.
174      */
175     double[] getInitialBias();
176 
177     /**
178      * Gets initial bias to be used to find a solution as an array.
179      * Array values are expressed in radians per second (rad/s).
180      *
181      * @param result instance where result data will be copied to.
182      * @throws IllegalArgumentException if provided array does not have length 3.
183      */
184     void getInitialBias(final double[] result);
185 
186     /**
187      * Sets initial bias to be used to find a solution as an array.
188      * Array values are expressed in radians per second (rad/s).
189      *
190      * @param initialBias initial bias to find a solution.
191      * @throws LockedException          if calibrator is currently running.
192      * @throws IllegalArgumentException if provided array does not have length 3.
193      */
194     void setInitialBias(final double[] initialBias) throws LockedException;
195 
196     /**
197      * Gets initial bias to be used to find a solution as a column matrix.
198      *
199      * @return initial bias to be used to find a solution as a column matrix.
200      */
201     Matrix getInitialBiasAsMatrix();
202 
203     /**
204      * Gets initial bias to be used to find a solution as a column matrix.
205      *
206      * @param result instance where result data will be copied to.
207      * @throws IllegalArgumentException if provided matrix is not 3x1.
208      */
209     void getInitialBiasAsMatrix(final Matrix result);
210 
211     /**
212      * Sets initial bias to be used to find a solution as an array.
213      *
214      * @param initialBias initial bias to find a solution.
215      * @throws LockedException          if calibrator is currently running.
216      * @throws IllegalArgumentException if provided matrix is not 3x1.
217      */
218     void setInitialBias(final Matrix initialBias) throws LockedException;
219 
220     /**
221      * Gets initial bias coordinates of gyroscope used to find a solution.
222      *
223      * @return initial bias coordinates.
224      */
225     AngularSpeedTriad getInitialBiasAsTriad();
226 
227     /**
228      * Gets initial bias coordinates of gyroscope used to find a solution.
229      *
230      * @param result instance where result will be stored.
231      */
232     void getInitialBiasAsTriad(final AngularSpeedTriad result);
233 
234     /**
235      * Sets initial bias coordinates of gyroscope used to find a solution.
236      *
237      * @param initialBias initial bias coordinates to be set.
238      * @throws LockedException if calibrator is currently running.
239      */
240     void setInitialBias(final AngularSpeedTriad initialBias) throws LockedException;
241 }