View Javadoc
1   package com.irurueta.navigation.inertial.calibration.gyroscope;
2   
3   import com.irurueta.navigation.LockedException;
4   import com.irurueta.navigation.inertial.calibration.FrameBodyKinematics;
5   
6   import java.util.Collection;
7   
8   /**
9    * Interface defining gyroscope calibrators.
10   *
11   * @param <T> a {@link FrameBodyKinematics} containing measures used by the calibrator.
12   * @param <L> a listener type.
13   */
14  public interface KnownBiasAndFrameGyroscopeCalibrator<T extends FrameBodyKinematics,
15          L extends KnownBiasAndFrameGyroscopeCalibratorListener<?>> extends KnownBiasGyroscopeCalibrator,
16          GyroscopeCalibrator {
17  
18      /**
19       * Gets a collection of body kinematics measurements taken at different
20       * frames (positions, orientations and velocities).
21       * If a single device IMU needs to be calibrated, typically all measurements are
22       * taken at the same position, with zero velocity and multiple orientations.
23       * However, if we just want to calibrate a given IMU model (e.g. obtain
24       * an average and less precise calibration for the IMU of a given phone model),
25       * we could take measurements collected throughout the planet at multiple positions
26       * while the phone remains static (e.g. while charging), hence each measurement
27       * position will change, velocity will remain zero and orientation will be
28       * typically constant at horizontal orientation while the phone remains on a
29       * flat surface.
30       *
31       * @return a collection of body kinematics measurements taken at different
32       * frames (positions, orientations and velocities).
33       */
34      Collection<T> getMeasurements();
35  
36      /**
37       * Sets a collection of body kinematics measurements taken at different
38       * frames (positions, orientations and velocities).
39       * If a single device IMU needs to be calibrated, typically all measurements are
40       * taken at the same position, with zero velocity and multiple orientations.
41       * However, if we just want to calibrate the a given IMU model (e.g. obtain
42       * an average and less precise calibration for the IMU of a given phone model),
43       * we could take measurements collected throughout the planet at multiple positions
44       * while the phone remains static (e.g. while charging), hence each measurement
45       * position will change, velocity will remain zero and orientation will be
46       * typically constant at horizontal orientation while the phone remains on a
47       * flat surface.
48       *
49       * @param measurements collection of body kinematics measurements taken at different
50       *                     frames (positions, orientations and velocities).
51       * @throws LockedException if calibrator is currently running.
52       */
53      void setMeasurements(final Collection<? extends T> measurements) throws LockedException;
54  
55      /**
56       * Gets listener to handle events raised by this calibrator.
57       *
58       * @return listener to handle events raised by this calibrator.
59       */
60      L getListener();
61  
62      /**
63       * Sets listener to handle events raised by this calibrator.
64       *
65       * @param listener listener to handle events raised by this calibrator.
66       * @throws LockedException if calibrator is currently running.
67       */
68      void setListener(final L listener) throws LockedException;
69  }