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  
19  import java.util.List;
20  
21  import org.orekit.files.rinex.observation.ObservationData;
22  import org.orekit.gnss.MeasurementType;
23  
24  /**
25   * Combined observation data.
26   * @author Bryan Cazabonne
27   * @since 10.1
28   */
29  public class CombinedObservationData {
30  
31      /** Type of the combination of measurements. */
32      private final CombinationType combinationType;
33  
34      /** Measurement type. */
35      private final MeasurementType measurementType;
36  
37      /** Combined observed value. */
38      private final double value;
39  
40      /** Frequency of the combined observation data [Hz]. */
41      private final double combinedFrequency;
42  
43      /** Observation data used to perform the combination of measurements. */
44      private final List<ObservationData> usedData;
45  
46      /**
47       * Constructor.
48       * @param combinedValue combined observed value
49       * (may be {@code Double.NaN} if combined observation not available)
50       * @param combinedFrequency frequency of the combined observation data in Hz
51       * (may be {@code Double.NaN} if combined frequency is not available)
52       * @param combinationType combination of measurements used to build the combined observation data
53       * @param measurementType measurement type used for the combination of measurement
54       * @param usedData observation data used to perform the combination of measurements
55       * @since 12.1
56       */
57      public CombinedObservationData(final double combinedValue, final double combinedFrequency,
58                                     final CombinationType combinationType, final MeasurementType measurementType,
59                                     final List<ObservationData> usedData) {
60          this.combinationType   = combinationType;
61          this.measurementType   = measurementType;
62          this.value             = combinedValue;
63          this.combinedFrequency = combinedFrequency;
64          this.usedData          = usedData;
65      }
66  
67      /** Get the combined observed value.
68       * @return observed value (may be {@code Double.NaN} if observation not available)
69       */
70      public double getValue() {
71          return value;
72      }
73  
74      /** Get the value of the combined frequency in MHz.
75       * <p>
76       * For the single frequency combinations, this method returns
77       * the common frequency of both measurements.
78       * </p>
79       * @return value of the combined frequency in Hz
80       * @since 12.1
81       */
82      public double getCombinedFrequency() {
83          return combinedFrequency;
84      }
85  
86      /** Get the type of the combination of measurements used to build the instance.
87       * @return the combination of measurements type
88       */
89      public CombinationType getCombinationType() {
90          return combinationType;
91      }
92  
93      /** Get the measurement type.
94       * @return measurement type
95       */
96      public MeasurementType getMeasurementType() {
97          return measurementType;
98      }
99  
100     /**
101      * Get the list of observation data used to perform the combination of measurements.
102      * @return a list of observation data
103      */
104     public List<ObservationData> getUsedObservationData() {
105         return usedData;
106     }
107 
108 }