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.files.rinex.observation;
18  
19  import java.util.List;
20  
21  import org.orekit.gnss.ObservationType;
22  import org.orekit.gnss.SatInSystem;
23  import org.orekit.gnss.SatelliteSystem;
24  
25  /** Phase Shift corrections.
26   * Contains the phase shift corrections used to
27   * generate phases consistent with respect to cycle shifts.
28   * @since 12.0
29   */
30  public class PhaseShiftCorrection {
31  
32      /** Satellite System. */
33      private final SatelliteSystem satSystemPhaseShift;
34  
35      /** Carrier Phase Observation Code (may be null). */
36      private final ObservationType typeObsPhaseShift;
37  
38      /** Phase Shift Corrections (cycles). */
39      private final double phaseShiftCorrection;
40  
41      /** List of satellites involved. */
42      private final List<SatInSystem> satsPhaseShift;
43  
44      /** Simple constructor.
45       * @param satSystemPhaseShift Satellite System
46       * @param typeObsPhaseShift Carrier Phase Observation Code (may be null)
47       * @param phaseShiftCorrection Phase Shift Corrections (cycles)
48       * @param satsPhaseShift List of satellites involved
49       */
50      public PhaseShiftCorrection(final SatelliteSystem satSystemPhaseShift,
51                                  final ObservationType typeObsPhaseShift,
52                                  final double phaseShiftCorrection,
53                                  final List<SatInSystem> satsPhaseShift) {
54          this.satSystemPhaseShift = satSystemPhaseShift;
55          this.typeObsPhaseShift = typeObsPhaseShift;
56          this.phaseShiftCorrection = phaseShiftCorrection;
57          this.satsPhaseShift = satsPhaseShift;
58      }
59  
60      /** Get the Satellite System.
61       * @return Satellite System.
62       */
63      public SatelliteSystem getSatelliteSystem() {
64          return satSystemPhaseShift;
65      }
66  
67      /** Get the Carrier Phase Observation Code.
68       * <p>
69       * The observation code may be null for the uncorrected reference
70       * signal group
71       * </p>
72       * @return Carrier Phase Observation Code.
73       */
74      public ObservationType getTypeObs() {
75          return typeObsPhaseShift;
76      }
77  
78      /** Get the Phase Shift Corrections.
79       * @return Phase Shift Corrections (cycles)
80       */
81      public double getCorrection() {
82          return phaseShiftCorrection;
83      }
84  
85      /** Get the list of satellites involved.
86       * @return List of satellites involved (if empty, all the sats are involved)
87       */
88      public List<SatInSystem> getSatsCorrected() {
89          //If empty, all the satellites of this constellation are affected for this Observation type
90          return satsPhaseShift;
91      }
92  
93  }