1   /* Copyright 2002-2024 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.propagation.analytical.gnss.data;
18  
19  /**
20   * Container for data contained in a GPS/QZNSS legacy navigation message.
21   * @author Bryan Cazabonne
22   * @since 11.0
23   */
24  public class LegacyNavigationMessage extends AbstractNavigationMessage implements GNSSClockElements {
25  
26      /** Identifier for message type. */
27      public static final String LNAV = "LNAV";
28  
29      /** Issue of Data, Ephemeris. */
30      private int iode;
31  
32      /** Issue of Data, Clock. */
33      private int iodc;
34  
35      /** Group Delay Differential (s). */
36      private double tgd;
37  
38      /** The user SV accuracy (m). */
39      private double svAccuracy;
40  
41      /** Satellite health status. */
42      private int svHealth;
43  
44      /** Fit interval.
45       * @since 12.0
46       */
47      private int fitInterval;
48  
49      /**
50       * Constructor.
51       * @param mu Earth's universal gravitational parameter
52       * @param angularVelocity mean angular velocity of the Earth for the GNSS model
53       * @param weekNumber number of weeks in the GNSS cycle
54       */
55      protected LegacyNavigationMessage(final double mu,
56                                        final double angularVelocity,
57                                        final int weekNumber) {
58          super(mu, angularVelocity, weekNumber);
59      }
60  
61      /**
62       * Getter for the Issue Of Data Ephemeris (IODE).
63       * @return the Issue Of Data Ephemeris (IODE)
64       */
65      public int getIODE() {
66          return iode;
67      }
68  
69      /**
70       * Setter for the Issue of Data Ephemeris.
71       * @param value the IODE to set
72       */
73      public void setIODE(final double value) {
74          // The value is given as a floating number in the navigation message
75          this.iode = (int) value;
76      }
77  
78      /**
79       * Getter for the Issue Of Data Clock (IODC).
80       * @return the Issue Of Data Clock (IODC)
81       */
82      public int getIODC() {
83          return iodc;
84      }
85  
86      /**
87       * Setter for the Issue of Data Clock.
88       * @param value the IODC to set
89       */
90      public void setIODC(final int value) {
91          this.iodc = value;
92      }
93  
94      /**
95       * Getter for the Group Delay Differential (s).
96       * @return the Group Delay Differential in seconds
97       */
98      public double getTGD() {
99          return tgd;
100     }
101 
102     /**
103      * Setter for the Group Delay Differential (s).
104      * @param time the group delay differential to set
105      */
106     public void setTGD(final double time) {
107         this.tgd = time;
108     }
109 
110     /**
111      * Getter for the user SV accuray (meters).
112      * @return the user SV accuracy
113      */
114     public double getSvAccuracy() {
115         return svAccuracy;
116     }
117 
118     /**
119      * Setter for the user SV accuracy.
120      * @param svAccuracy the value to set
121      */
122     public void setSvAccuracy(final double svAccuracy) {
123         this.svAccuracy = svAccuracy;
124     }
125 
126     /**
127      * Getter for the satellite health status.
128      * @return the satellite health status
129      */
130     public int getSvHealth() {
131         return svHealth;
132     }
133 
134     /**
135      * Setter for the satellite health status.
136      * @param svHealth the value to set
137      */
138     public void setSvHealth(final int svHealth) {
139         this.svHealth = svHealth;
140     }
141 
142     /**
143      * Getter for the fit interval.
144      * @return the fit interval
145      * @since 12.0
146      */
147     public int getFitInterval() {
148         return fitInterval;
149     }
150 
151     /**
152      * Setter for the fit interval.
153      * @param fitInterval fit interval
154      * @since 12.0
155      */
156     public void setFitInterval(final int fitInterval) {
157         this.fitInterval = fitInterval;
158     }
159 
160 }