1 /* Copyright 2022-2025 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.hipparchus.Field;
21 import org.orekit.gnss.SatelliteSystem;
22 import org.orekit.time.TimeScales;
23
24 /**
25 * Container for data contained in a NavIC navigation message.
26 * @author Luc Maisonobe
27 * @since 13.0
28 */
29 public class NavICL1NvNavigationMessage
30 extends CivilianNavigationMessage<NavICL1NvNavigationMessage> {
31
32 /** Message type.
33 * @since 14.0
34 */
35 public static final String L1NV = "L1NV";
36
37 /** Reference signal flag. */
38 private int referenceSignalFlag;
39
40 /** Estimated group delay differential TGD for S-L5 correction. */
41 private double tgdSL5;
42
43 /** Inter Signal Delay for S L1P. */
44 private double iscSL1P;
45
46 /** Inter Signal Delay for L1D L1P. */
47 private double iscL1DL1P;
48
49 /** Inter Signal Delay for L1P S. */
50 private double iscL1PS;
51
52 /** Inter Signal Delay for L1DS. */
53 private double iscL1DS;
54
55 /** Constructor.
56 * @param timeScales known time scales
57 * @param system satellite system to consider for interpreting week number
58 * (may be different from real system, for example in Rinex nav, weeks
59 * are always according to GPS)
60 * @param type message type
61 */
62 public NavICL1NvNavigationMessage(final TimeScales timeScales, final SatelliteSystem system,
63 final String type) {
64 super(true, GNSSConstants.NAVIC_MU, GNSSConstants.NAVIC_AV, GNSSConstants.NAVIC_WEEK_NB,
65 timeScales, system, type);
66 }
67
68 /** Constructor from field instance.
69 * @param <T> type of the field elements
70 * @param original regular field instance
71 */
72 public <T extends CalculusFieldElement<T>> NavICL1NvNavigationMessage(final FieldNavicL1NvNavigationMessage<T> original) {
73 super(original);
74 setReferenceSignalFlag(original.getReferenceSignalFlag());
75 setTGDSL5(original.getTGDSL5().getReal());
76 setIscSL1P(original.getIscSL1P().getReal());
77 setIscL1DL1P(original.getIscL1DL1P().getReal());
78 setIscL1PS(original.getIscL1PS().getReal());
79 setIscL1DS(original.getIscL1DS().getReal());
80 }
81
82 /** {@inheritDoc} */
83 @SuppressWarnings("unchecked")
84 @Override
85 public <T extends CalculusFieldElement<T>, F extends FieldGnssOrbitalElements<T, NavICL1NvNavigationMessage>>
86 F toField(final Field<T> field) {
87 return (F) new FieldNavicL1NvNavigationMessage<>(field, this);
88 }
89
90 /** Set reference signal flag.
91 * @param referenceSignalFlag reference signal flag
92 */
93 public void setReferenceSignalFlag(final int referenceSignalFlag) {
94 this.referenceSignalFlag = referenceSignalFlag;
95 }
96
97 /** Get reference signal flag.
98 * @return reference signal flag
99 */
100 public int getReferenceSignalFlag() {
101 return referenceSignalFlag;
102 }
103
104 /**
105 * Set the estimated group delay differential TGD for S-L5 correction.
106 * @param groupDelayDifferential the estimated group delay differential TGD for S-L3 correction (s)
107 */
108 public void setTGDSL5(final double groupDelayDifferential) {
109 this.tgdSL5 = groupDelayDifferential;
110 }
111
112 /**
113 * Set the estimated group delay differential TGD for S-L5 correction.
114 * @return estimated group delay differential TGD for S-L3 correction (s)
115 */
116 public double getTGDSL5() {
117 return tgdSL5;
118 }
119
120 /**
121 * Getter for inter Signal Delay for S L1P.
122 * @return inter signal delay
123 */
124 public double getIscSL1P() {
125 return iscSL1P;
126 }
127
128 /**
129 * Setter for inter Signal Delay for S L1P.
130 * @param delay delay to set
131 */
132 public void setIscSL1P(final double delay) {
133 this.iscSL1P = delay;
134 }
135
136 /**
137 * Getter for inter Signal Delay for L1D L1P.
138 * @return inter signal delay
139 */
140 public double getIscL1DL1P() {
141 return iscL1DL1P;
142 }
143
144 /**
145 * Setter for inter Signal Delay for L1D L1P.
146 * @param delay delay to set
147 */
148 public void setIscL1DL1P(final double delay) {
149 this.iscL1DL1P = delay;
150 }
151
152 /**
153 * Getter for inter Signal Delay for L1P S.
154 * @return inter signal delay
155 */
156 public double getIscL1PS() {
157 return iscL1PS;
158 }
159
160 /**
161 * Setter for inter Signal Delay for L1P S.
162 * @param delay delay to set
163 */
164 public void setIscL1PS(final double delay) {
165 this.iscL1PS = delay;
166 }
167
168 /**
169 * Getter for inter Signal Delay for L1D S.
170 * @return inter signal delay
171 */
172 public double getIscL1DS() {
173 return iscL1DS;
174 }
175
176 /**
177 * Setter for inter Signal Delay for L1D S.
178 * @param delay delay to set
179 */
180 public void setIscL1DS(final double delay) {
181 this.iscL1DS = delay;
182 }
183
184 }