CombinedObservationData.java

  1. /* Copyright 2002-2022 CS GROUP
  2.  * Licensed to CS GROUP (CS) under one or more
  3.  * contributor license agreements.  See the NOTICE file distributed with
  4.  * this work for additional information regarding copyright ownership.
  5.  * CS licenses this file to You under the Apache License, Version 2.0
  6.  * (the "License"); you may not use this file except in compliance with
  7.  * the License.  You may obtain a copy of the License at
  8.  *
  9.  *   http://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */
  17. package org.orekit.gnss;

  18. import java.util.List;

  19. import org.orekit.estimation.measurements.gnss.CombinationType;

  20. /**
  21.  * Combined observation data.
  22.  * @author Bryan Cazabonne
  23.  * @since 10.1
  24.  */
  25. public class CombinedObservationData {

  26.     /** Type of the combination of measurements. */
  27.     private final CombinationType combinationType;

  28.     /** Measurement type. */
  29.     private final MeasurementType measurementType;

  30.     /** Combined observed value. */
  31.     private double value;

  32.     /** Frequency of the combined observation data [MHz]. */
  33.     private final double combinedFrequency;

  34.     /** Observation data used to perform the combination of measurements. */
  35.     private final List<ObservationData> usedData;

  36.     /**
  37.      * Constructor.
  38.      * @param combinationType combination of measurements used to build the combined observation data
  39.      * @param measurementType measurement type used for the combination of measurement
  40.      * @param combinedValue combined observed value
  41.      * (may be {@code Double.NaN} if combined observation not available)
  42.      * @param combinedFrequency frequency of the combined observation data in MHz
  43.      * (may be {@code Double.NaN} if combined frequency is not available)
  44.      * @param usedData observation data used to perform the combination of measurements
  45.      */
  46.     public CombinedObservationData(final CombinationType combinationType, final MeasurementType measurementType,
  47.                                    final double combinedValue, final double combinedFrequency,
  48.                                    final List<ObservationData> usedData) {
  49.         this.combinationType   = combinationType;
  50.         this.measurementType   = measurementType;
  51.         this.value             = combinedValue;
  52.         this.combinedFrequency = combinedFrequency;
  53.         this.usedData          = usedData;
  54.     }

  55.     /** Get the combined observed value.
  56.      * @return observed value (may be {@code Double.NaN} if observation not available)
  57.      */
  58.     public double getValue() {
  59.         return value;
  60.     }

  61.     /** Get the value of the combined frequency in MHz.
  62.      * <p>
  63.      * For the single frequency combinations, this method returns
  64.      * the common frequency of both measurements.
  65.      * </p>
  66.      * @return value of the combined frequency in MHz
  67.      */
  68.     public double getCombinedMHzFrequency() {
  69.         return combinedFrequency;
  70.     }

  71.     /** Get the type of the combination of measurements used to build the instance.
  72.      * @return the combination of measurements type
  73.      */
  74.     public CombinationType getCombinationType() {
  75.         return combinationType;
  76.     }

  77.     /** Get the measurement type.
  78.      * @return measurement type
  79.      */
  80.     public MeasurementType getMeasurementType() {
  81.         return measurementType;
  82.     }

  83.     /**
  84.      * Get the list of observation data used to perform the combination of measurements.
  85.      * @return a list of observation data
  86.      */
  87.     public List<ObservationData> getUsedObservationData() {
  88.         return usedData;
  89.     }

  90. }