1   /* Copyright 2002-2024 Luc Maisonobe
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.propagation.analytical.gnss.data;
18  
19  /**
20   * Container for data contained in a GPS/QZNSS civilian navigation message.
21   * @author Luc Maisonobe
22   * @since 12.0
23   */
24  public class CivilianNavigationMessage extends AbstractNavigationMessage implements GNSSClockElements {
25  
26      /** Identifier for message type. */
27      public static final String CNAV = "CNAV";
28  
29      /** Identifier for message type. */
30      public static final String CNV2 = "CNV2";
31  
32      /** Indicator for CNV 2 messages. */
33      private final boolean cnv2;
34  
35      /** Change rate in semi-major axis (m/s). */
36      private double aDot;
37  
38      /** Change rate in Δn₀. */
39      private double deltaN0Dot;
40  
41      /** Group Delay Differential (s). */
42      private double tgd;
43  
44      /** The user SV accuracy (m). */
45      private double svAccuracy;
46  
47      /** Satellite health status. */
48      private int svHealth;
49  
50      /** Inter Signal Delay for L1 C/A. */
51      private double iscL1CA;
52  
53      /** Inter Signal Delay for L1 CD. */
54      private double iscL1CD;
55  
56      /** Inter Signal Delay for L1 CP. */
57      private double iscL1CP;
58  
59      /** Inter Signal Delay for L2 C. */
60      private double iscL2C;
61  
62      /** Inter Signal Delay for L5I. */
63      private double iscL5I5;
64  
65      /** Inter Signal Delay for L5Q. */
66      private double iscL5Q5;
67  
68      /** Elevation-Dependent User Range Accuracy. */
69      private int uraiEd;
70  
71      /** Term 0 of Non-Elevation-Dependent User Range Accuracy. */
72      private int uraiNed0;
73  
74      /** Term 1 of Non-Elevation-Dependent User Range Accuracy. */
75      private int uraiNed1;
76  
77      /** Term 2 of Non-Elevation-Dependent User Range Accuracy. */
78      private int uraiNed2;
79  
80      /**
81       * Constructor.
82       * @param cnv2 indicator for CNV2 messages
83       * @param mu Earth's universal gravitational parameter
84       * @param angularVelocity mean angular velocity of the Earth for the GNSS model
85       * @param weekNumber number of weeks in the GNSS cycle
86       */
87      protected CivilianNavigationMessage(final boolean cnv2,
88                                          final double mu,
89                                          final double angularVelocity,
90                                          final int weekNumber) {
91          super(mu, angularVelocity, weekNumber);
92          this.cnv2 = cnv2;
93      }
94  
95      /** Check it message is a CNV2 message.
96       * @return true if message is a CNV2 message
97       */
98      public boolean isCnv2() {
99          return cnv2;
100     }
101 
102     /**
103      * Getter for the change rate in semi-major axis.
104      * @return the change rate in semi-major axis
105      */
106     public double getADot() {
107         return aDot;
108     }
109 
110     /**
111      * Setter for the change rate in semi-major axis.
112      * @param value the change rate in semi-major axis
113      */
114     public void setADot(final double value) {
115         this.aDot = value;
116     }
117 
118     /**
119      * Getter for change rate in Δn₀.
120      * @return change rate in Δn₀
121      */
122     public double getDeltaN0Dot() {
123         return deltaN0Dot;
124     }
125 
126     /**
127      * Setter for change rate in Δn₀.
128      * @param deltaN0Dot change rate in Δn₀
129      */
130     public void setDeltaN0Dot(final double deltaN0Dot) {
131         this.deltaN0Dot = deltaN0Dot;
132     }
133 
134     /**
135      * Getter for the Group Delay Differential (s).
136      * @return the Group Delay Differential in seconds
137      */
138     public double getTGD() {
139         return tgd;
140     }
141 
142     /**
143      * Setter for the Group Delay Differential (s).
144      * @param time the group delay differential to set
145      */
146     public void setTGD(final double time) {
147         this.tgd = time;
148     }
149 
150     /**
151      * Getter for the user SV accuray (meters).
152      * @return the user SV accuracy
153      */
154     public double getSvAccuracy() {
155         return svAccuracy;
156     }
157 
158     /**
159      * Setter for the user SV accuracy.
160      * @param svAccuracy the value to set
161      */
162     public void setSvAccuracy(final double svAccuracy) {
163         this.svAccuracy = svAccuracy;
164     }
165 
166     /**
167      * Getter for the satellite health status.
168      * @return the satellite health status
169      */
170     public int getSvHealth() {
171         return svHealth;
172     }
173 
174     /**
175      * Setter for the satellite health status.
176      * @param svHealth the value to set
177      */
178     public void setSvHealth(final int svHealth) {
179         this.svHealth = svHealth;
180     }
181 
182     /**
183      * Getter for inter Signal Delay for L1 C/A.
184      * @return inter signal delay
185      */
186     public double getIscL1CA() {
187         return iscL1CA;
188     }
189 
190     /**
191      * Setter for inter Signal Delay for L1 C/A.
192      * @param delay delay to set
193      */
194     public void setIscL1CA(final double delay) {
195         this.iscL1CA = delay;
196     }
197 
198     /**
199      * Getter for inter Signal Delay for L1 CD.
200      * @return inter signal delay
201      */
202     public double getIscL1CD() {
203         return iscL1CD;
204     }
205 
206     /**
207      * Setter for inter Signal Delay for L1 CD.
208      * @param delay delay to set
209      */
210     public void setIscL1CD(final double delay) {
211         this.iscL1CD = delay;
212     }
213 
214     /**
215      * Getter for inter Signal Delay for L1 CP.
216      * @return inter signal delay
217      */
218     public double getIscL1CP() {
219         return iscL1CP;
220     }
221 
222     /**
223      * Setter for inter Signal Delay for L1 CP.
224      * @param delay delay to set
225      */
226     public void setIscL1CP(final double delay) {
227         this.iscL1CP = delay;
228     }
229 
230     /**
231      * Getter for inter Signal Delay for L2 C.
232      * @return inter signal delay
233      */
234     public double getIscL2C() {
235         return iscL2C;
236     }
237 
238     /**
239      * Setter for inter Signal Delay for L2 C.
240      * @param delay delay to set
241      */
242     public void setIscL2C(final double delay) {
243         this.iscL2C = delay;
244     }
245 
246     /**
247      * Getter for inter Signal Delay for L5I.
248      * @return inter signal delay
249      */
250     public double getIscL5I5() {
251         return iscL5I5;
252     }
253 
254     /**
255      * Setter for inter Signal Delay for L5I.
256      * @param delay delay to set
257      */
258     public void setIscL5I5(final double delay) {
259         this.iscL5I5 = delay;
260     }
261 
262     /**
263      * Getter for inter Signal Delay for L5Q.
264      * @return inter signal delay
265      */
266     public double getIscL5Q5() {
267         return iscL5Q5;
268     }
269 
270     /**
271      * Setter for inter Signal Delay for L5Q.
272      * @param delay delay to set
273      */
274     public void setIscL5Q5(final double delay) {
275         this.iscL5Q5 = delay;
276     }
277 
278     /**
279      * Getter for Elevation-Dependent User Range Accuracy.
280      * @return Elevation-Dependent User Range Accuracy
281      */
282     public int getUraiEd() {
283         return uraiEd;
284     }
285 
286     /**
287      * Setter for Elevation-Dependent User Range Accuracy.
288      * @param uraiEd Elevation-Dependent User Range Accuracy
289      */
290     public void setUraiEd(final int uraiEd) {
291         this.uraiEd = uraiEd;
292     }
293 
294     /**
295      * Getter for term 0 of Non-Elevation-Dependent User Range Accuracy.
296      * @return term 0 of Non-Elevation-Dependent User Range Accuracy
297      */
298     public int getUraiNed0() {
299         return uraiNed0;
300     }
301 
302     /**
303      * Setter for term 0 of Non-Elevation-Dependent User Range Accuracy.
304      * @param uraiNed0 term 0 of Non-Elevation-Dependent User Range Accuracy
305      */
306     public void setUraiNed0(final int uraiNed0) {
307         this.uraiNed0 = uraiNed0;
308     }
309 
310     /**
311      * Getter for term 1 of Non-Elevation-Dependent User Range Accuracy.
312      * @return term 1 of Non-Elevation-Dependent User Range Accuracy
313      */
314     public int getUraiNed1() {
315         return uraiNed1;
316     }
317 
318     /**
319      * Setter for term 1 of Non-Elevation-Dependent User Range Accuracy.
320      * @param uraiNed1 term 1 of Non-Elevation-Dependent User Range Accuracy
321      */
322     public void setUraiNed1(final int uraiNed1) {
323         this.uraiNed1 = uraiNed1;
324     }
325 
326     /**
327      * Getter for term 2 of Non-Elevation-Dependent User Range Accuracy.
328      * @return term 2 of Non-Elevation-Dependent User Range Accuracy
329      */
330     public int getUraiNed2() {
331         return uraiNed2;
332     }
333 
334     /**
335      * Setter for term 2 of Non-Elevation-Dependent User Range Accuracy.
336      * @param uraiNed2 term 2 of Non-Elevation-Dependent User Range Accuracy
337      */
338     public void setUraiNed2(final int uraiNed2) {
339         this.uraiNed2 = uraiNed2;
340     }
341 
342 }