1 /* Copyright 2022-2026 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 import org.hipparchus.CalculusFieldElement;
20 import org.orekit.orbits.FieldKeplerianOrbit;
21 import org.orekit.time.FieldGNSSDate;
22 import org.orekit.time.TimeScales;
23
24 /**
25 * Container for data contained in a GPS/QZNSS legacy navigation message.
26 * @param <T> type of the field elements
27 * @param <O> type of the orbital elements (non-field version)
28 * @author Luc Maisonobe
29 * @since 13.0
30 */
31 public abstract class FieldLegacyNavigationMessage<T extends CalculusFieldElement<T>,
32 O extends LegacyNavigationMessage<O>>
33 extends FieldAbstractNavigationMessage<T, O> {
34
35 /** Issue of Data, Ephemeris. */
36 private final int iode;
37
38 /** Issue of Data, Clock. */
39 private final int iodc;
40
41 /** The user SV accuracy (m). */
42 private final T svAccuracy;
43
44 /** Satellite health status. */
45 private final int svHealth;
46
47 /** Fit interval. */
48 private final int fitInterval;
49
50 /** Codes on L2 channel.
51 * @since 14.0
52 */
53 private final int l2Codes;
54
55 /** L2 P data flags.
56 * @since 14.0
57 */
58 private final int l2PFlags;
59
60 /** Creates a new instance.
61 * @param angularVelocity mean angular velocity of the Earth for the GNSS model
62 * @param weeksInCycle number of weeks in the GNSS cycle
63 * @param timeScales known time scales
64 * @param type type (null if not a navigation message)
65 * @param prn PRN number of the satellite
66 * @param toe time of ephemeris (<em>must</em> be consistent with {@code orbit})
67 * @param orbit Keplerian orbit in Earth-frozen frame
68 * @param nonKeplerian 15 non-Keplerian parameters (in the order given by {@link NonKeplerianDriversFactory}
69 * @param tgd group delay differential TGD for L1-L2 correction
70 * @param toc time of clock
71 * @param transmissionTime transmission time
72 * @param iode issue of data, ephemeris
73 * @param iodc issue of data, clock
74 * @param svAccuracy user SV accuracy (m)
75 * @param svHealth satellite health status
76 * @param fitInterval fit interval
77 * @param l2Codes codes on L2 channel
78 * @param l2PFlags L2 P data flags.
79 * @since 14.0
80 */
81 public FieldLegacyNavigationMessage(final double angularVelocity, final int weeksInCycle,
82 final TimeScales timeScales, final String type, final int prn,
83 final FieldGNSSDate<T> toe, final FieldKeplerianOrbit<T> orbit,
84 final T[] nonKeplerian, final T tgd,
85 final FieldGNSSDate<T> toc, final FieldGNSSDate<T> transmissionTime,
86 final int iode, final int iodc, final T svAccuracy,
87 final int svHealth, final int fitInterval,
88 final int l2Codes, final int l2PFlags) {
89 super(angularVelocity, weeksInCycle, timeScales, type, prn, toe,
90 orbit, nonKeplerian, tgd, toc, transmissionTime);
91 this.iode = iode;
92 this.iodc = iodc;
93 this.svAccuracy = svAccuracy;
94 this.svHealth = svHealth;
95 this.fitInterval = fitInterval;
96 this.l2Codes = l2Codes;
97 this.l2PFlags = l2PFlags;
98 }
99
100 /**
101 * Getter for the Issue Of Data Ephemeris (IODE).
102 * @return the Issue Of Data Ephemeris (IODE)
103 */
104 public int getIODE() {
105 return iode;
106 }
107
108 /**
109 * Getter for the Issue Of Data Clock (IODC).
110 * @return the Issue Of Data Clock (IODC)
111 */
112 public int getIODC() {
113 return iodc;
114 }
115
116 /**
117 * Getter for the user SV accuray (meters).
118 * @return the user SV accuracy
119 */
120 public T getSvAccuracy() {
121 return svAccuracy;
122 }
123
124 /**
125 * Getter for the satellite health status.
126 * @return the satellite health status
127 */
128 public int getSvHealth() {
129 return svHealth;
130 }
131
132 /**
133 * Getter for the fit interval.
134 * @return the fit interval
135 */
136 public int getFitInterval() {
137 return fitInterval;
138 }
139
140 /** Get the codes on L2 channel.
141 * @return codes on L2 channel
142 * @since 14.0
143 */
144 public int getL2Codes() {
145 return l2Codes;
146 }
147
148 /** Get the L2 P data flags.
149 * @return L2 P data flags
150 * @since 14.0
151 */
152 public int getL2PFlags() {
153 return l2PFlags;
154 }
155
156 }