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 BeiDou navigation message.
21   * @author Bryan Cazabonne
22   * @since 11.0
23   */
24  public class BeidouLegacyNavigationMessage extends AbstractNavigationMessage {
25  
26      /** Identifier for message type. */
27      public static final String D1 = "D1";
28  
29      /** Identifier for message type. */
30      public static final String D2 = "D2";
31  
32      /** Age of Data, Ephemeris. */
33      private int aode;
34  
35      /** Age of Data, Clock. */
36      private int aodc;
37  
38      /** B1/B3 Group Delay Differential (s). */
39      private double tgd1;
40  
41      /** B2/B3 Group Delay Differential (s). */
42      private double tgd2;
43  
44      /** The user SV accuracy (m). */
45      private double svAccuracy;
46  
47      /** Constructor. */
48      public BeidouLegacyNavigationMessage() {
49          super(GNSSConstants.BEIDOU_MU, GNSSConstants.BEIDOU_AV, GNSSConstants.BEIDOU_WEEK_NB);
50      }
51  
52      /**
53       * Getter for the Age Of Data Clock (AODC).
54       * @return the Age Of Data Clock (AODC)
55       */
56      public int getAODC() {
57          return aodc;
58      }
59  
60      /**
61       * Setter for the age of data clock.
62       * @param aod the age of data to set
63       */
64      public void setAODC(final double aod) {
65          // The value is given as a floating number in the navigation message
66          this.aodc = (int) aod;
67      }
68  
69      /**
70       * Getter for the Age Of Data Ephemeris (AODE).
71       * @return the Age Of Data Ephemeris (AODE)
72       */
73      public int getAODE() {
74          return aode;
75      }
76  
77      /**
78       * Setter for the age of data ephemeris.
79       * @param aod the age of data to set
80       */
81      public void setAODE(final double aod) {
82          // The value is given as a floating number in the navigation message
83          this.aode = (int) aod;
84      }
85  
86      /**
87       * Getter for the estimated group delay differential TGD1 for B1I signal.
88       * @return the estimated group delay differential TGD1 for B1I signal (s)
89       */
90      public double getTGD1() {
91          return tgd1;
92      }
93  
94      /**
95       * Setter for the B1/B3 Group Delay Differential (s).
96       * @param tgd the group delay differential to set
97       */
98      public void setTGD1(final double tgd) {
99          this.tgd1 = tgd;
100     }
101 
102     /**
103      * Getter for the estimated group delay differential TGD for B2I signal.
104      * @return the estimated group delay differential TGD2 for B2I signal (s)
105      */
106     public double getTGD2() {
107         return tgd2;
108     }
109 
110     /**
111      * Setter for the B2/B3 Group Delay Differential (s).
112      * @param tgd the group delay differential to set
113      */
114     public void setTGD2(final double tgd) {
115         this.tgd2 = tgd;
116     }
117 
118     /**
119      * Getter for the user SV accuray (meters).
120      * @return the user SV accuracy
121      */
122     public double getSvAccuracy() {
123         return svAccuracy;
124     }
125 
126     /**
127      * Setter for the user SV accuracy.
128      * @param svAccuracy the value to set
129      */
130     public void setSvAccuracy(final double svAccuracy) {
131         this.svAccuracy = svAccuracy;
132     }
133 
134 }