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.gnss.metric.messages.ssr.igm;
18  
19  import java.util.Collections;
20  import java.util.HashMap;
21  import java.util.Map;
22  
23  import org.orekit.gnss.metric.messages.common.PhaseBias;
24  
25  /**
26   * Container for SSR IGM06 data.
27   * @author Bryan Cazabonne
28   * @since 11.0
29   */
30  public class SsrIgm06Data extends SsrIgmData {
31  
32      /** Number of biases processed for the current satellite. */
33      private int numberOfBiasesProcessed;
34  
35      /** Yaw angle used for computation of phase wind-up correction [rad]. */
36      private double yawAngle;
37  
38      /** Yaw rate [rad/s]. */
39      private double yawRate;
40  
41      /** Map of phase biases.
42       * First key: the signal ID
43       * Second key: the phase bias object
44       */
45      private Map<Integer, PhaseBias> biases;
46  
47      /** Constructor. */
48      public SsrIgm06Data() {
49          // Initialize an empty map
50          this.biases = new HashMap<>();
51      }
52  
53      /**
54       * Get the number of biases processed for the current satellite.
55       * @return the number of biases processed
56       */
57      public int getNumberOfBiasesProcessed() {
58          return numberOfBiasesProcessed;
59      }
60  
61      /**
62       * Set the number of biases processed for the current satellite.
63       * @param numberOfBiasesProcessed the number to set
64       */
65      public void setNumberOfBiasesProcessed(final int numberOfBiasesProcessed) {
66          this.numberOfBiasesProcessed = numberOfBiasesProcessed;
67      }
68  
69      /**
70       * Get the yaw angle used for computation of phase wind-up correction.
71       * @return the yaw angle in radians
72       */
73      public double getYawAngle() {
74          return yawAngle;
75      }
76  
77      /**
78       * Set the yaw angle used for computation of phase wind-up correction.
79       * @param yawAngle the yaw angle to set in radians
80       */
81      public void setYawAngle(final double yawAngle) {
82          this.yawAngle = yawAngle;
83      }
84  
85      /**
86       * Get the yaw rate.
87       * @return the yaw rate in radians per second
88       */
89      public double getYawRate() {
90          return yawRate;
91      }
92  
93      /**
94       * Set the yaw rate.
95       * @param yawRate the yaw rate to set in radians per second
96       */
97      public void setYawRate(final double yawRate) {
98          this.yawRate = yawRate;
99      }
100 
101     /**
102      * Add a phase bias value for the current satellite.
103      * @param bias the phase bias to add
104      */
105     public void addPhaseBias(final PhaseBias bias) {
106         this.biases.put(bias.getSignalID(), bias);
107     }
108 
109     /**
110      * Get the phase biases for the current satellite.
111      * <p>
112      * First key: signal ID
113      * Second key: the phase bias object
114      * </p>
115      * @return the phase biases for the current satellite
116      */
117     public Map<Integer, PhaseBias> getPhaseBiases() {
118         return Collections.unmodifiableMap(biases);
119     }
120 
121     /**
122      * Get the phase bias for a given signal ID.
123      * @param signalID the signal IF
124      * @return the corresponding phase bias (null if not provided)
125      */
126     public PhaseBias getPhaseBias(final int signalID) {
127         return biases.get(signalID);
128     }
129 
130 }