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.propagation.analytical.gnss.data;
18
19 import org.hipparchus.CalculusFieldElement;
20 import org.hipparchus.Field;
21 import org.orekit.gnss.SatelliteSystem;
22 import org.orekit.time.TimeScales;
23
24 /**
25 * Container for data contained in a Galileo navigation message.
26 * @author Bryan Cazabonne
27 * @since 11.0
28 */
29 public class GalileoNavigationMessage extends AbstractNavigationMessage<GalileoNavigationMessage> {
30
31 /** Message type.
32 * @since 14.0
33 */
34 public static final String INAV = "INAV";
35
36 /** Message type.
37 * @since 14.0
38 */
39 public static final String FNAV = "FNAV";
40
41 /** Issue of Data of the navigation batch. */
42 private int iodNav;
43
44 /** Data source.
45 * @since 12.0
46 */
47 private int dataSource;
48
49 /** E1/E5a broadcast group delay (s). */
50 private double bgbE1E5a;
51
52 /** E5b/E1 broadcast group delay (s). */
53 private double bgdE5bE1;
54
55 /** Signal in space accuracy. */
56 private double sisa;
57
58 /** Satellite health status. */
59 private double svHealth;
60
61 /** Constructor.
62 * @param timeScales known time scales
63 * @param system satellite system to consider for interpreting week number
64 * (may be different from real system, for example in Rinex nav, weeks
65 * are always according to GPS)
66 * @param type message type
67 */
68 public GalileoNavigationMessage(final TimeScales timeScales, final SatelliteSystem system,
69 final String type) {
70 super(GNSSConstants.GALILEO_MU, GNSSConstants.GALILEO_AV, GNSSConstants.GALILEO_WEEK_NB,
71 timeScales, system, type);
72 }
73
74 /** Constructor from field instance.
75 * @param <T> type of the field elements
76 * @param original regular field instance
77 */
78 public <T extends CalculusFieldElement<T>> GalileoNavigationMessage(final FieldGalileoNavigationMessage<T> original) {
79 super(original);
80 setIODNav(original.getIODNav());
81 setDataSource(original.getDataSource());
82 setBGDE1E5a(original.getBGDE1E5a().getReal());
83 setBGDE5bE1(original.getBGDE5bE1().getReal());
84 setSisa(original.getSisa().getReal());
85 setSvHealth(original.getSvHealth().getReal());
86 }
87
88 /** {@inheritDoc} */
89 @SuppressWarnings("unchecked")
90 @Override
91 public <T extends CalculusFieldElement<T>, F extends FieldGnssOrbitalElements<T, GalileoNavigationMessage>>
92 F toField(final Field<T> field) {
93 return (F) new FieldGalileoNavigationMessage<>(field, this);
94 }
95
96 /**
97 * Getter for the the Issue Of Data (IOD).
98 * @return the Issue Of Data (IOD)
99 */
100 public int getIODNav() {
101 return iodNav;
102 }
103
104 /**
105 * Setter for the Issue of Data of the navigation batch.
106 * @param iod the IOD to set
107 */
108 public void setIODNav(final int iod) {
109 this.iodNav = iod;
110 }
111
112 /**
113 * Getter for the the data source.
114 * @return the data source
115 * @since 12.0
116 */
117 public int getDataSource() {
118 return dataSource;
119 }
120
121 /**
122 * Setter for the data source.
123 * @param dataSource data source
124 * @since 12.0
125 */
126 public void setDataSource(final int dataSource) {
127 this.dataSource = dataSource;
128 }
129
130 /**
131 * Getter for the E1/E5a broadcast group delay.
132 * @return the E1/E5a broadcast group delay (s)
133 */
134 public double getBGDE1E5a() {
135 return bgbE1E5a;
136 }
137
138 /**
139 * Setter for the E1/E5a broadcast group delay (s).
140 * @param bgd the E1/E5a broadcast group delay to set
141 */
142 public void setBGDE1E5a(final double bgd) {
143 this.bgbE1E5a = bgd;
144 }
145
146 /**
147 * Setter for the E5b/E1 broadcast group delay (s).
148 * @param bgd the E5b/E1 broadcast group delay to set
149 */
150 public void setBGDE5bE1(final double bgd) {
151 this.bgdE5bE1 = bgd;
152 }
153
154 /**
155 * Getter for the the Broadcast Group Delay E5b/E1.
156 * @return the Broadcast Group Delay E5b/E1 (s)
157 */
158 public double getBGDE5bE1() {
159 return bgdE5bE1;
160 }
161
162 /**
163 * Getter for the signal in space accuracy (m).
164 * @return the signal in space accuracy
165 */
166 public double getSisa() {
167 return sisa;
168 }
169
170 /**
171 * Setter for the signal in space accuracy.
172 * @param sisa the sisa to set
173 */
174 public void setSisa(final double sisa) {
175 this.sisa = sisa;
176 }
177
178 /**
179 * Getter for the SV health status.
180 * @return the SV health status
181 */
182 public double getSvHealth() {
183 return svHealth;
184 }
185
186 /**
187 * Setter for the SV health status.
188 * @param svHealth the SV health status to set
189 */
190 public void setSvHealth(final double svHealth) {
191 this.svHealth = svHealth;
192 }
193
194 }