View Javadoc
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  
20  /**
21   * Indicates that a gyroscope calibrator can accept quality scores for each
22   * measurement or sequence being provided.
23   */
24  public interface QualityScoredGyroscopeCalibrator extends GyroscopeCalibrator {
25  
26      /**
27       * Returns quality scores corresponding to each measurement or sequence.
28       * The larger the score value the better the quality of the sample.
29       * This implementation always returns null.
30       * Subclasses using quality scores must implement proper behavior.
31       *
32       * @return quality scores corresponding to each sample.
33       */
34      double[] getQualityScores();
35  
36      /**
37       * Sets quality scores corresponding to each measurement or sequence.
38       * The larger the score value the better the quality of the sample.
39       * This implementation makes no action.
40       * Subclasses using quality scores must implement proper behaviour.
41       *
42       * @param qualityScores quality scores corresponding to each sample.
43       * @throws IllegalArgumentException if provided quality scores length
44       *                                  is smaller than minimum required samples.
45       * @throws LockedException          if calibrator is currently running.
46       */
47      void setQualityScores(final double[] qualityScores) throws LockedException;
48  }