CombinedObservationData.java

  1. /* Copyright 2002-2024 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.estimation.measurements.gnss;

  18. import java.util.List;

  19. import org.orekit.files.rinex.observation.ObservationData;
  20. import org.orekit.gnss.MeasurementType;

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

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

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

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

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

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

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

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

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

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

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

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

  91. }