1 /*
2 * Copyright (C) 2021 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.navigation.LockedException;
19 import com.irurueta.navigation.inertial.calibration.FrameBodyKinematics;
20
21 import java.util.Collection;
22
23 /**
24 * Defines a gyroscope calibrator using unordered collections of
25 * {@link FrameBodyKinematics} measurements.
26 */
27 public interface UnorderedFrameBodyKinematicsGyroscopeCalibrator extends GyroscopeCalibrator {
28
29 /**
30 * Gets a collection of body kinematics measurements taken at different
31 * frames (positions, orientations and velocities).
32 * If a single device IMU needs to be calibrated, typically all measurements are
33 * taken at the same position, with zero velocity and multiple orientations.
34 * However, if we just want to calibrate a given IMU model (e.g. obtain
35 * an average and less precise calibration for the IMU of a given phone model),
36 * we could take measurements collected throughout the planet at multiple positions
37 * while the phone remains static (e.g. while charging), hence each measurement
38 * position will change, velocity will remain zero and orientation will be
39 * typically constant at horizontal orientation while the phone remains on a
40 * flat surface.
41 *
42 * @return a collection of body kinematics measurements taken at different
43 * frames (positions, orientations and velocities).
44 */
45 Collection<FrameBodyKinematics> getMeasurements();
46
47 /**
48 * Sets a collection of body kinematics measurements taken at different
49 * frames (positions, orientations and velocities).
50 * If a single device IMU needs to be calibrated, typically all measurements are
51 * taken at the same position, with zero velocity and multiple orientations.
52 * However, if we just want to calibrate the a given IMU model (e.g. obtain
53 * an average and less precise calibration for the IMU of a given phone model),
54 * we could take measurements collected throughout the planet at multiple positions
55 * while the phone remains static (e.g. while charging), hence each measurement
56 * position will change, velocity will remain zero and orientation will be
57 * typically constant at horizontal orientation while the phone remains on a
58 * flat surface.
59 *
60 * @param measurements collection of body kinematics measurements taken at different
61 * frames (positions, orientations and velocities).
62 * @throws LockedException if calibrator is currently running.
63 */
64 void setMeasurements(final Collection<? extends FrameBodyKinematics> measurements) throws LockedException;
65 }