1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.orekit.gnss.rflink.gps;
18
19 import org.hipparchus.util.FastMath;
20 import org.orekit.gnss.metric.parser.Units;
21 import org.orekit.utils.units.Unit;
22
23
24
25
26
27
28
29
30
31
32
33 public class SubFrame4D extends SubFrame45 {
34
35
36 private static final Unit S_PER_SC = Unit.SECOND.divide("s/sc", Units.SEMI_CIRCLE);
37
38
39 private static final Unit S_PER_SC2 = S_PER_SC.divide("s/sc²", Units.SEMI_CIRCLE);
40
41
42 private static final Unit S_PER_SC3 = S_PER_SC2.divide("s/sc³", Units.SEMI_CIRCLE);
43
44
45 private static final int ALPHA0 = 9;
46
47
48 private static final int ALPHA1 = 10;
49
50
51 private static final int ALPHA2 = 11;
52
53
54 private static final int ALPHA3 = 12;
55
56
57 private static final int BETA0 = 13;
58
59
60 private static final int BETA1 = 14;
61
62
63 private static final int BETA2 = 15;
64
65
66 private static final int BETA3 = 16;
67
68
69 private static final int A1 = 17;
70
71
72 private static final int A0 = 18;
73
74
75 private static final int TOT = 19;
76
77
78 private static final int WEEK_NUMBER_T = 20;
79
80
81 private static final int DELTA_T_LS = 21;
82
83
84 private static final int WEEK_NUMBER_LSF = 22;
85
86
87 private static final int DN = 23;
88
89
90 private static final int DELTA_T_LSF = 24;
91
92
93 private static final int RESERVED_10 = 25;
94
95
96
97
98 SubFrame4D(final int[] words) {
99
100
101 super(words, RESERVED_10 + 1);
102
103
104 setField(ALPHA0, 3, 14, 8, words);
105 setField(ALPHA1, 3, 6, 8, words);
106 setField(ALPHA2, 4, 22, 8, words);
107 setField(ALPHA3, 4, 14, 8, words);
108 setField(BETA0, 4, 6, 8, words);
109 setField(BETA1, 5, 22, 8, words);
110 setField(BETA2, 5, 14, 8, words);
111 setField(BETA3, 5, 6, 8, words);
112 setField(A1, 6, 6, 24, words);
113 setField(A0, 7, 6, 24, 8, 22, 8, words);
114 setField(TOT, 8, 14, 8, words);
115 setField(WEEK_NUMBER_T, 8, 6, 8, words);
116 setField(DELTA_T_LS, 9, 22, 8, words);
117 setField(WEEK_NUMBER_LSF, 9, 14, 8, words);
118 setField(DN, 9, 6, 8, words);
119 setField(DELTA_T_LSF, 10, 22, 8, words);
120 setField(RESERVED_10, 10, 8, 14, words);
121
122 }
123
124
125
126
127 public double getAlpha0() {
128 return FastMath.scalb((double) getField(ALPHA0), -30);
129 }
130
131
132
133
134 public double getAlpha1() {
135 return S_PER_SC.toSI(FastMath.scalb((double) getField(ALPHA1), -27));
136 }
137
138
139
140
141 public double getAlpha2() {
142 return S_PER_SC2.toSI(FastMath.scalb((double) getField(ALPHA2), -24));
143 }
144
145
146
147
148 public double getAlpha3() {
149 return S_PER_SC3.toSI(FastMath.scalb((double) getField(ALPHA3), -24));
150 }
151
152
153
154
155 public double getBeta0() {
156 return FastMath.scalb((double) getField(BETA0), 11);
157 }
158
159
160
161
162 public double getBeta1() {
163 return S_PER_SC.toSI(FastMath.scalb((double) getField(BETA1), 14));
164 }
165
166
167
168
169 public double getBeta2() {
170 return S_PER_SC2.toSI(FastMath.scalb((double) getField(BETA2), 16));
171 }
172
173
174
175
176 public double getBeta3() {
177 return S_PER_SC3.toSI(FastMath.scalb((double) getField(BETA3), 16));
178 }
179
180
181
182
183 public double getA1() {
184 return FastMath.scalb((double) getField(A1), -50);
185 }
186
187
188
189
190 public double getA0() {
191 return FastMath.scalb((double) getField(A0), -30);
192 }
193
194
195
196 public int getTot() {
197 return getField(TOT) << 12;
198 }
199
200
201
202 public int getWeekNumberT() {
203 return getField(WEEK_NUMBER_T);
204 }
205
206
207
208 public int getDeltaTLs() {
209 return getField(DELTA_T_LS);
210 }
211
212
213
214 public int getWeekNumberLsf() {
215 return getField(WEEK_NUMBER_LSF);
216 }
217
218
219
220 public int getDn() {
221 return getField(DN);
222 }
223
224
225
226 public int getDeltaTLsf() {
227 return getField(DELTA_T_LSF);
228 }
229
230
231
232 public int getReserved10() {
233 return getField(RESERVED_10);
234 }
235
236 }