CombinedObservationData.java

  1. /* Copyright 2002-2025 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 final double value;

  33.     /** Frequency of the combined observation data [Hz]. */
  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 combinedValue combined observed value
  40.      * (may be {@code Double.NaN} if combined observation not available)
  41.      * @param combinedFrequency frequency of the combined observation data in Hz
  42.      * (may be {@code Double.NaN} if combined frequency is not available)
  43.      * @param combinationType combination of measurements used to build the combined observation data
  44.      * @param measurementType measurement type used for the combination of measurement
  45.      * @param usedData observation data used to perform the combination of measurements
  46.      * @since 12.1
  47.      */
  48.     public CombinedObservationData(final double combinedValue, final double combinedFrequency,
  49.                                    final CombinationType combinationType, final MeasurementType measurementType,
  50.                                    final List<ObservationData> usedData) {
  51.         this.combinationType   = combinationType;
  52.         this.measurementType   = measurementType;
  53.         this.value             = combinedValue;
  54.         this.combinedFrequency = combinedFrequency;
  55.         this.usedData          = usedData;
  56.     }

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

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

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

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

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

  93. }