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.algebra.WrongSizeException;
20 import com.irurueta.navigation.inertial.calibration.AngularSpeedTriad;
21 import com.irurueta.units.AngularSpeed;
22
23 /**
24 * Interface for gyroscope calibrator where bias is unknown and needs to
25 * be estimated.
26 */
27 public interface UnknownBiasGyroscopeCalibrator {
28
29 /**
30 * Gets array containing x,y,z components of estimated gyroscope biases
31 * expressed in radians per second (rad/s).
32 *
33 * @return array containing x,y,z components of estimated gyroscope biases.
34 */
35 double[] getEstimatedBiases();
36
37 /**
38 * Gets array containing x,y,z components of estimated gyroscope biases
39 * expressed in radians per second (rad/s).
40 *
41 * @param result instance where estimated gyroscope 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 gyroscope biases
49 * expressed in radians per second (rad/s).
50 *
51 * @return column matrix containing x,y,z component of estimated gyroscope
52 * biases.
53 */
54 Matrix getEstimatedBiasesAsMatrix();
55
56 /**
57 * Gets column matrix containing x,y,z components of estimated gyroscope biases
58 * expressed in radians per second (rad/s).
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 gyroscope bias expressed in radians per second
68 * (rad/s).
69 *
70 * @return x coordinate of estimated gyroscope bias or null if not available.
71 */
72 Double getEstimatedBiasX();
73
74 /**
75 * Gets y coordinate of estimated gyroscope bias expressed in radians per second
76 * (rad/s).
77 *
78 * @return y coordinate of estimated gyroscope bias or null if not available.
79 */
80 Double getEstimatedBiasY();
81
82 /**
83 * Gets z coordinate of estimated gyroscope bias expressed in radians per second
84 * (rad/s).
85 *
86 * @return z coordinate of estimated gyroscope bias or null if not available.
87 */
88 Double getEstimatedBiasZ();
89
90 /**
91 * Gets x coordinate of estimated gyroscope bias.
92 *
93 * @return x coordinate of estimated gyroscope bias or null if not available.
94 */
95 AngularSpeed getEstimatedBiasAngularSpeedX();
96
97 /**
98 * Gets x coordinate of estimated gyroscope 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 getEstimatedBiasAngularSpeedX(final AngularSpeed result);
104
105 /**
106 * Gets y coordinate of estimated gyroscope bias.
107 *
108 * @return y coordinate of estimated gyroscope bias or null if not available.
109 */
110 AngularSpeed getEstimatedBiasAngularSpeedY();
111
112 /**
113 * Gets y coordinate of estimated gyroscope 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 getEstimatedBiasAngularSpeedY(final AngularSpeed result);
119
120 /**
121 * Gets z coordinate of estimated gyroscope bias.
122 *
123 * @return z coordinate of estimated gyroscope bias or null if not available.
124 */
125 AngularSpeed getEstimatedBiasAngularSpeedZ();
126
127 /**
128 * Gets z coordinate of estimated gyroscope 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 getEstimatedBiasAngularSpeedZ(final AngularSpeed result);
134
135 /**
136 * Gets estimated gyroscope bias.
137 *
138 * @return estimated gyroscope bias or null if not available.
139 */
140 AngularSpeedTriad getEstimatedBiasAsTriad();
141
142 /**
143 * Gets estimated gyroscope bias.
144 *
145 * @param result instance where result will be stored.
146 * @return true if estimated gyroscope bias is available and result was
147 * modified, false otherwise.
148 */
149 boolean getEstimatedBiasAsTriad(final AngularSpeedTriad result);
150 }