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