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