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.navigation.LockedException;
20 import com.irurueta.navigation.inertial.calibration.AccelerationTriad;
21 import com.irurueta.units.Acceleration;
22
23 /**
24 * Interface for non-linear accelerometer calibrator where bias is unknown
25 * and needs to be estimated.
26 */
27 public interface UnknownBiasNonLinearAccelerometerCalibrator extends UnknownBiasAccelerometerCalibrator {
28
29 /**
30 * Gets initial x-coordinate of accelerometer bias to be used to find a solution.
31 * This is expressed in meters per squared second (m/s^2).
32 *
33 * @return initial x-coordinate of accelerometer bias.
34 */
35 double getInitialBiasX();
36
37 /**
38 * Sets initial x-coordinate of accelerometer bias to be used to find a solution.
39 * This is expressed in meters per squared second (m/s^2).
40 *
41 * @param initialBiasX initial x-coordinate of accelerometer 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 accelerometer bias to be used to find a solution.
48 * This is expressed in meters per squared second (m/s^2).
49 *
50 * @return initial y-coordinate of accelerometer bias.
51 */
52 double getInitialBiasY();
53
54 /**
55 * Sets initial y-coordinate of accelerometer bias to be used to find a solution.
56 * This is expressed in meters per squared second (m/s^2).
57 *
58 * @param initialBiasY initial y-coordinate of accelerometer 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 accelerometer bias to be used to find a solution.
65 * This is expressed in meters per squared second (m/s^2).
66 *
67 * @return initial z-coordinate of accelerometer bias.
68 */
69 double getInitialBiasZ();
70
71 /**
72 * Sets initial z-coordinate of accelerometer bias to be used to find a solution.
73 * This is expressed in meters per squared second (m/s^2).
74 *
75 * @param initialBiasZ initial z-coordinate of accelerometer 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 accelerometer bias to be used to find a solution.
82 *
83 * @return initial x-coordinate of accelerometer bias.
84 */
85 Acceleration getInitialBiasXAsAcceleration();
86
87 /**
88 * Gets initial x-coordinate of accelerometer bias to be used to find a solution.
89 *
90 * @param result instance where result data will be stored.
91 */
92 void getInitialBiasXAsAcceleration(final Acceleration result);
93
94 /**
95 * Sets initial x-coordinate of accelerometer bias to be used to find a solution.
96 *
97 * @param initialBiasX initial x-coordinate of accelerometer bias.
98 * @throws LockedException if calibrator is currently running.
99 */
100 void setInitialBiasX(final Acceleration initialBiasX) throws LockedException;
101
102 /**
103 * Gets initial y-coordinate of accelerometer bias to be used to find a solution.
104 *
105 * @return initial y-coordinate of accelerometer bias.
106 */
107 Acceleration getInitialBiasYAsAcceleration();
108
109 /**
110 * Gets initial y-coordinate of accelerometer bias to be used to find a solution.
111 *
112 * @param result instance where result data will be stored.
113 */
114 void getInitialBiasYAsAcceleration(final Acceleration result);
115
116 /**
117 * Sets initial y-coordinate of accelerometer bias to be used to find a solution.
118 *
119 * @param initialBiasY initial y-coordinate of accelerometer bias.
120 * @throws LockedException if calibrator is currently running.
121 */
122 void setInitialBiasY(final Acceleration initialBiasY) throws LockedException;
123
124 /**
125 * Gets initial z-coordinate of accelerometer bias to be used to find a solution.
126 *
127 * @return initial z-coordinate of accelerometer bias.
128 */
129 Acceleration getInitialBiasZAsAcceleration();
130
131 /**
132 * Gets initial z-coordinate of accelerometer bias to be used to find a solution.
133 *
134 * @param result instance where result data will be stored.
135 */
136 void getInitialBiasZAsAcceleration(final Acceleration result);
137
138 /**
139 * Sets initial z-coordinate of accelerometer bias to be used to find a solution.
140 *
141 * @param initialBiasZ initial z-coordinate of accelerometer bias.
142 * @throws LockedException if calibrator is currently running.
143 */
144 void setInitialBiasZ(final Acceleration initialBiasZ) throws LockedException;
145
146 /**
147 * Sets initial bias coordinates of accelerometer used to find a solution
148 * expressed in meters per squared second (m/s^2).
149 *
150 * @param initialBiasX initial x-coordinate of accelerometer bias.
151 * @param initialBiasY initial y-coordinate of accelerometer bias.
152 * @param initialBiasZ initial z-coordinate of accelerometer 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 accelerometer used to find a solution.
160 *
161 * @param initialBiasX initial x-coordinate of accelerometer bias.
162 * @param initialBiasY initial y-coordinate of accelerometer bias.
163 * @param initialBiasZ initial z-coordinate of accelerometer bias.
164 * @throws LockedException if calibrator is currently running.
165 */
166 void setInitialBias(final Acceleration initialBiasX, final Acceleration initialBiasY,
167 final Acceleration 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 meters per squared second (m/s^2).
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 meters per squared second (m/s^2).
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 meters per squared second (m/s^2).
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 accelerometer used to find a solution.
222 *
223 * @return initial bias coordinates.
224 */
225 AccelerationTriad getInitialBiasAsTriad();
226
227 /**
228 * Gets initial bias coordinates of accelerometer used to find a solution.
229 *
230 * @param result instance where result will be stored.
231 */
232 void getInitialBiasAsTriad(final AccelerationTriad result);
233
234 /**
235 * Sets initial bias coordinates of accelerometer 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 AccelerationTriad initialBias) throws LockedException;
241 }