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