1 | /* -------------------------------------------------------------------------
|
---|
2 | * BKG NTRIP Server
|
---|
3 | * -------------------------------------------------------------------------
|
---|
4 | *
|
---|
5 | * Class: bncRtnetUploadCaster
|
---|
6 | *
|
---|
7 | * Purpose: Connection to NTRIP Caster
|
---|
8 | *
|
---|
9 | * Author: L. Mervart
|
---|
10 | *
|
---|
11 | * Created: 29-Mar-2011
|
---|
12 | *
|
---|
13 | * Changes:
|
---|
14 | *
|
---|
15 | * -----------------------------------------------------------------------*/
|
---|
16 |
|
---|
17 | #include <math.h>
|
---|
18 | #include "bncrtnetuploadcaster.h"
|
---|
19 | #include "bncsettings.h"
|
---|
20 | #include "bncephuser.h"
|
---|
21 | #include "bncclockrinex.h"
|
---|
22 | #include "bncsp3.h"
|
---|
23 | #include "gnss.h"
|
---|
24 |
|
---|
25 | using namespace std;
|
---|
26 |
|
---|
27 | // Constructor
|
---|
28 | ////////////////////////////////////////////////////////////////////////////
|
---|
29 | bncRtnetUploadCaster::bncRtnetUploadCaster(const QString& mountpoint,
|
---|
30 | const QString& outHost, int outPort, const QString& password,
|
---|
31 | const QString& crdTrafo, bool CoM, const QString& sp3FileName,
|
---|
32 | const QString& rnxFileName, int PID, int SID, int IOD, int iRow) :
|
---|
33 | bncUploadCaster(mountpoint, outHost, outPort, password, iRow, 0) {
|
---|
34 |
|
---|
35 | if (!mountpoint.isEmpty()) {
|
---|
36 | _casterID += mountpoint;
|
---|
37 | }
|
---|
38 | if (!outHost.isEmpty()) {
|
---|
39 | _casterID += " " + outHost;
|
---|
40 | if (outPort) {
|
---|
41 | _casterID += ":" + QString("%1").arg(outPort, 10);
|
---|
42 | }
|
---|
43 | }
|
---|
44 | if (!crdTrafo.isEmpty()) {
|
---|
45 | _casterID += " " + crdTrafo;
|
---|
46 | }
|
---|
47 | if (!sp3FileName.isEmpty()) {
|
---|
48 | _casterID += " " + sp3FileName;
|
---|
49 | }
|
---|
50 | if (!rnxFileName.isEmpty()) {
|
---|
51 | _casterID += " " + rnxFileName;
|
---|
52 | }
|
---|
53 |
|
---|
54 | _crdTrafo = crdTrafo;
|
---|
55 | _CoM = CoM;
|
---|
56 | _PID = PID;
|
---|
57 | _SID = SID;
|
---|
58 | _IOD = IOD;
|
---|
59 |
|
---|
60 | // Member that receives the ephemeris
|
---|
61 | // ----------------------------------
|
---|
62 | _ephUser = new bncEphUser(true);
|
---|
63 |
|
---|
64 | bncSettings settings;
|
---|
65 | QString intr = settings.value("uploadIntr").toString();
|
---|
66 | QStringList hlp = settings.value("cmbStreams").toStringList();
|
---|
67 | _samplRtcmEphCorr = settings.value("uploadSamplRtcmEphCorr").toDouble();
|
---|
68 | if (hlp.size() > 1) { // combination stream upload
|
---|
69 | _samplRtcmClkCorr = settings.value("cmbSampl").toInt();
|
---|
70 | }
|
---|
71 | else { // single stream upload or sp3 file generation
|
---|
72 | _samplRtcmClkCorr = 5; // default
|
---|
73 | }
|
---|
74 | int samplClkRnx = settings.value("uploadSamplClkRnx").toInt();
|
---|
75 | int samplSp3 = settings.value("uploadSamplSp3").toInt() * 60;
|
---|
76 |
|
---|
77 | if (_samplRtcmEphCorr == 0.0) {
|
---|
78 | _usedEph = 0;
|
---|
79 | }
|
---|
80 | else {
|
---|
81 | _usedEph = new QMap<QString, const t_eph*>;
|
---|
82 | }
|
---|
83 |
|
---|
84 | // RINEX writer
|
---|
85 | // ------------
|
---|
86 | if (!rnxFileName.isEmpty()) {
|
---|
87 | _rnx = new bncClockRinex(rnxFileName, intr, samplClkRnx);
|
---|
88 | }
|
---|
89 | else {
|
---|
90 | _rnx = 0;
|
---|
91 | }
|
---|
92 |
|
---|
93 | // SP3 writer
|
---|
94 | // ----------
|
---|
95 | if (!sp3FileName.isEmpty()) {
|
---|
96 | _sp3 = new bncSP3(sp3FileName, intr, samplSp3);
|
---|
97 | }
|
---|
98 | else {
|
---|
99 | _sp3 = 0;
|
---|
100 | }
|
---|
101 |
|
---|
102 | // Set Transformation Parameters
|
---|
103 | // -----------------------------
|
---|
104 | // Transformation Parameters from ITRF2014 to ETRF2000
|
---|
105 | if (_crdTrafo == "ETRF2000") {
|
---|
106 | _dx = 0.0537;
|
---|
107 | _dy = 0.0512;
|
---|
108 | _dz = -0.0551;
|
---|
109 | _dxr = 0.0001;
|
---|
110 | _dyr = 0.0001;
|
---|
111 | _dzr = -0.0019;
|
---|
112 | _ox = -0.000891;
|
---|
113 | _oy = -0.005390;
|
---|
114 | _oz = 0.008712;
|
---|
115 | _oxr = -0.000081;
|
---|
116 | _oyr = -0.000490;
|
---|
117 | _ozr = +0.000792;
|
---|
118 | _sc = 1.02;
|
---|
119 | _scr = 0.11;
|
---|
120 | _t0 = 2000.0;
|
---|
121 | }
|
---|
122 | // Transformation Parameters from ITRF2014 to GDA2020 (Ryan Ruddick, GA)
|
---|
123 | else if (_crdTrafo == "GDA2020") {
|
---|
124 | _dx = 0.0;
|
---|
125 | _dy = 0.0;
|
---|
126 | _dz = 0.0;
|
---|
127 | _dxr = 0.0;
|
---|
128 | _dyr = 0.0;
|
---|
129 | _dzr = 0.0;
|
---|
130 | _ox = 0.0;
|
---|
131 | _oy = 0.0;
|
---|
132 | _oz = 0.0;
|
---|
133 | _oxr = 0.00150379;
|
---|
134 | _oyr = 0.00118346;
|
---|
135 | _ozr = 0.00120716;
|
---|
136 | _sc = 0.0;
|
---|
137 | _scr = 0.0;
|
---|
138 | _t0 = 2020.0;
|
---|
139 | }
|
---|
140 | // Transformation Parameters from IGb14 to SIRGAS2000 (Sonia Costa, BRA)
|
---|
141 | else if (_crdTrafo == "SIRGAS2000") {
|
---|
142 | _dx = 0.0026;
|
---|
143 | _dy = 0.0018;
|
---|
144 | _dz = -0.0061;
|
---|
145 | _dxr = 0.0000;
|
---|
146 | _dyr = 0.0000;
|
---|
147 | _dzr = 0.0000;
|
---|
148 | _ox = 0.000170;
|
---|
149 | _oy = -0.000030;
|
---|
150 | _oz = 0.000070;
|
---|
151 | _oxr = 0.000000;
|
---|
152 | _oyr = 0.000000;
|
---|
153 | _ozr = 0.000000;
|
---|
154 | _sc = -1.000;
|
---|
155 | _scr = 0.000;
|
---|
156 | _t0 = 2000.4;
|
---|
157 | }
|
---|
158 | // Transformation Parameters from ITRF2014 to DREF91
|
---|
159 | else if (_crdTrafo == "DREF91") {
|
---|
160 | _dx = 0.0537;
|
---|
161 | _dy = 0.0512;
|
---|
162 | _dz = -0.0551;
|
---|
163 | _dxr = 0.0001;
|
---|
164 | _dyr = 0.0001;
|
---|
165 | _dzr = -0.0019;
|
---|
166 | _ox = -0.000233;
|
---|
167 | _oy = -0.005598;
|
---|
168 | _oz = 0.009467;
|
---|
169 | _oxr = -0.000081;
|
---|
170 | _oyr = -0.000490;
|
---|
171 | _ozr = 0.000792;
|
---|
172 | _sc = 1.02;
|
---|
173 | _scr = 0.11;
|
---|
174 | _t0 = 2000.0;
|
---|
175 | }
|
---|
176 | else if (_crdTrafo == "Custom") {
|
---|
177 | _dx = settings.value("trafo_dx").toDouble();
|
---|
178 | _dy = settings.value("trafo_dy").toDouble();
|
---|
179 | _dz = settings.value("trafo_dz").toDouble();
|
---|
180 | _dxr = settings.value("trafo_dxr").toDouble();
|
---|
181 | _dyr = settings.value("trafo_dyr").toDouble();
|
---|
182 | _dzr = settings.value("trafo_dzr").toDouble();
|
---|
183 | _ox = settings.value("trafo_ox").toDouble();
|
---|
184 | _oy = settings.value("trafo_oy").toDouble();
|
---|
185 | _oz = settings.value("trafo_oz").toDouble();
|
---|
186 | _oxr = settings.value("trafo_oxr").toDouble();
|
---|
187 | _oyr = settings.value("trafo_oyr").toDouble();
|
---|
188 | _ozr = settings.value("trafo_ozr").toDouble();
|
---|
189 | _sc = settings.value("trafo_sc").toDouble();
|
---|
190 | _scr = settings.value("trafo_scr").toDouble();
|
---|
191 | _t0 = settings.value("trafo_t0").toDouble();
|
---|
192 | }
|
---|
193 | }
|
---|
194 |
|
---|
195 | // Destructor
|
---|
196 | ////////////////////////////////////////////////////////////////////////////
|
---|
197 | bncRtnetUploadCaster::~bncRtnetUploadCaster() {
|
---|
198 | if (isRunning()) {
|
---|
199 | wait();
|
---|
200 | }
|
---|
201 | delete _rnx;
|
---|
202 | delete _sp3;
|
---|
203 | delete _ephUser;
|
---|
204 | delete _usedEph;
|
---|
205 | }
|
---|
206 |
|
---|
207 | //
|
---|
208 | ////////////////////////////////////////////////////////////////////////////
|
---|
209 | void bncRtnetUploadCaster::decodeRtnetStream(char* buffer, int bufLen) {
|
---|
210 |
|
---|
211 | QMutexLocker locker(&_mutex);
|
---|
212 |
|
---|
213 | // Append to internal buffer
|
---|
214 | // -------------------------
|
---|
215 | _rtnetStreamBuffer.append(QByteArray(buffer, bufLen));
|
---|
216 |
|
---|
217 | // Select buffer part that contains last epoch
|
---|
218 | // -------------------------------------------
|
---|
219 | QStringList lines;
|
---|
220 | int iEpoBeg = _rtnetStreamBuffer.lastIndexOf('*'); // begin of last epoch
|
---|
221 | if (iEpoBeg == -1) {
|
---|
222 | _rtnetStreamBuffer.clear();
|
---|
223 | return;
|
---|
224 | }
|
---|
225 | int iEpoBegEarlier = _rtnetStreamBuffer.indexOf('*');
|
---|
226 | if (iEpoBegEarlier != -1 && iEpoBegEarlier < iEpoBeg) { // are there two epoch lines in buffer?
|
---|
227 | _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoBegEarlier);
|
---|
228 | }
|
---|
229 | else {
|
---|
230 | _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoBeg);
|
---|
231 | }
|
---|
232 |
|
---|
233 | int iEpoEnd = _rtnetStreamBuffer.lastIndexOf("EOE"); // end of last epoch
|
---|
234 | if (iEpoEnd == -1) {
|
---|
235 | return;
|
---|
236 | }
|
---|
237 | else {
|
---|
238 | lines = _rtnetStreamBuffer.left(iEpoEnd).split('\n',
|
---|
239 | QString::SkipEmptyParts);
|
---|
240 | _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoEnd + 3);
|
---|
241 | }
|
---|
242 |
|
---|
243 | if (lines.size() < 2) {
|
---|
244 | return;
|
---|
245 | }
|
---|
246 |
|
---|
247 | // Read first line (with epoch time)
|
---|
248 | // ---------------------------------
|
---|
249 | QTextStream in(lines[0].toAscii());
|
---|
250 | QString hlp;
|
---|
251 | int year, month, day, hour, min;
|
---|
252 | double sec;
|
---|
253 | in >> hlp >> year >> month >> day >> hour >> min >> sec;
|
---|
254 | bncTime epoTime;
|
---|
255 | epoTime.set(year, month, day, hour, min, sec);
|
---|
256 |
|
---|
257 | emit(newMessage(
|
---|
258 | "bncRtnetUploadCaster: decode " + QByteArray(epoTime.datestr().c_str())
|
---|
259 | + " " + QByteArray(epoTime.timestr().c_str()) + " "
|
---|
260 | + _casterID.toAscii(), false));
|
---|
261 |
|
---|
262 | struct ClockOrbit co;
|
---|
263 | memset(&co, 0, sizeof(co));
|
---|
264 | co.EpochTime[CLOCKORBIT_SATGPS] = static_cast<int>(epoTime.gpssec());
|
---|
265 | double gt = epoTime.gpssec() + 3 * 3600 - gnumleap(year, month, day);
|
---|
266 | co.EpochTime[CLOCKORBIT_SATGLONASS] = static_cast<int>(fmod(gt, 86400.0));
|
---|
267 | co.EpochTime[CLOCKORBIT_SATGALILEO] = static_cast<int>(epoTime.gpssec());
|
---|
268 | co.EpochTime[CLOCKORBIT_SATQZSS] = static_cast<int>(epoTime.gpssec());
|
---|
269 | co.EpochTime[CLOCKORBIT_SATSBAS] = static_cast<int>(epoTime.gpssec());
|
---|
270 | co.EpochTime[CLOCKORBIT_SATBDS] = static_cast<int>(epoTime.bdssec());
|
---|
271 | co.Supplied[COBOFS_CLOCK] = 1;
|
---|
272 | co.Supplied[COBOFS_ORBIT] = 1;
|
---|
273 | co.SatRefDatum = DATUM_ITRF;
|
---|
274 | co.SSRIOD = _IOD;
|
---|
275 | co.SSRProviderID = _PID; // 256 .. BKG, 257 ... EUREF
|
---|
276 | co.SSRSolutionID = _SID;
|
---|
277 |
|
---|
278 | struct CodeBias bias;
|
---|
279 | memset(&bias, 0, sizeof(bias));
|
---|
280 | bias.EpochTime[CLOCKORBIT_SATGPS] = co.EpochTime[CLOCKORBIT_SATGPS];
|
---|
281 | bias.EpochTime[CLOCKORBIT_SATGLONASS] = co.EpochTime[CLOCKORBIT_SATGLONASS];
|
---|
282 | bias.EpochTime[CLOCKORBIT_SATGALILEO] = co.EpochTime[CLOCKORBIT_SATGALILEO];
|
---|
283 | bias.EpochTime[CLOCKORBIT_SATQZSS] = co.EpochTime[CLOCKORBIT_SATQZSS];
|
---|
284 | bias.EpochTime[CLOCKORBIT_SATSBAS] = co.EpochTime[CLOCKORBIT_SATSBAS];
|
---|
285 | bias.EpochTime[CLOCKORBIT_SATBDS] = co.EpochTime[CLOCKORBIT_SATBDS];
|
---|
286 | bias.SSRIOD = _IOD;
|
---|
287 | bias.SSRProviderID = _PID;
|
---|
288 | bias.SSRSolutionID = _SID;
|
---|
289 |
|
---|
290 | struct PhaseBias phasebias;
|
---|
291 | memset(&phasebias, 0, sizeof(phasebias));
|
---|
292 | unsigned int dispersiveBiasConsistenyIndicator = 0;
|
---|
293 | unsigned int mwConsistencyIndicator = 0;
|
---|
294 | phasebias.EpochTime[CLOCKORBIT_SATGPS] = co.EpochTime[CLOCKORBIT_SATGPS];
|
---|
295 | phasebias.EpochTime[CLOCKORBIT_SATGLONASS] = co.EpochTime[CLOCKORBIT_SATGLONASS];
|
---|
296 | phasebias.EpochTime[CLOCKORBIT_SATGALILEO] = co.EpochTime[CLOCKORBIT_SATGALILEO];
|
---|
297 | phasebias.EpochTime[CLOCKORBIT_SATQZSS] = co.EpochTime[CLOCKORBIT_SATQZSS];
|
---|
298 | phasebias.EpochTime[CLOCKORBIT_SATSBAS] = co.EpochTime[CLOCKORBIT_SATSBAS];
|
---|
299 | phasebias.EpochTime[CLOCKORBIT_SATBDS] = co.EpochTime[CLOCKORBIT_SATBDS];
|
---|
300 | phasebias.SSRIOD = _IOD;
|
---|
301 | phasebias.SSRProviderID = _PID;
|
---|
302 | phasebias.SSRSolutionID = _SID;
|
---|
303 |
|
---|
304 | struct VTEC vtec;
|
---|
305 | memset(&vtec, 0, sizeof(vtec));
|
---|
306 | vtec.EpochTime = static_cast<int>(epoTime.gpssec());
|
---|
307 | vtec.SSRIOD = _IOD;
|
---|
308 | vtec.SSRProviderID = _PID;
|
---|
309 | vtec.SSRSolutionID = _SID;
|
---|
310 |
|
---|
311 | // Default Update Interval
|
---|
312 | // -----------------------
|
---|
313 | int clkUpdInd = 2; // 5 sec
|
---|
314 | int ephUpdInd = clkUpdInd; // default
|
---|
315 |
|
---|
316 | if (_samplRtcmClkCorr > 5.0 && _samplRtcmEphCorr <= 5.0) { // combined orb and clock
|
---|
317 | ephUpdInd = determineUpdateInd(_samplRtcmClkCorr);
|
---|
318 | }
|
---|
319 | if (_samplRtcmClkCorr > 5.0) {
|
---|
320 | clkUpdInd = determineUpdateInd(_samplRtcmClkCorr);
|
---|
321 | }
|
---|
322 | if (_samplRtcmEphCorr > 5.0) {
|
---|
323 | ephUpdInd = determineUpdateInd(_samplRtcmEphCorr);
|
---|
324 | }
|
---|
325 |
|
---|
326 | co.UpdateInterval = clkUpdInd;
|
---|
327 | bias.UpdateInterval = clkUpdInd;
|
---|
328 | phasebias.UpdateInterval = clkUpdInd;
|
---|
329 |
|
---|
330 | for (int ii = 1; ii < lines.size(); ii++) {
|
---|
331 | QString key; // prn or key VTEC, IND (phase bias indicators)
|
---|
332 | ColumnVector rtnAPC;
|
---|
333 | ColumnVector rtnVel;
|
---|
334 | ColumnVector rtnCoM;
|
---|
335 | double rtnClk;
|
---|
336 | t_prn prn;
|
---|
337 |
|
---|
338 | QTextStream in(lines[ii].toAscii());
|
---|
339 |
|
---|
340 | in >> key;
|
---|
341 |
|
---|
342 | // non-satellite specific parameters
|
---|
343 | if (key.contains("IND", Qt::CaseSensitive)) {
|
---|
344 | in >> dispersiveBiasConsistenyIndicator >> mwConsistencyIndicator;
|
---|
345 | continue;
|
---|
346 | }
|
---|
347 | // non-satellite specific parameters
|
---|
348 | if (key.contains("VTEC", Qt::CaseSensitive)) {
|
---|
349 | double ui;
|
---|
350 | in >> ui >> vtec.NumLayers;
|
---|
351 | vtec.UpdateInterval = (unsigned int) determineUpdateInd(ui);
|
---|
352 | for (unsigned ll = 0; ll < vtec.NumLayers; ll++) {
|
---|
353 | int dummy;
|
---|
354 | in >> dummy >> vtec.Layers[ll].Degree >> vtec.Layers[ll].Order
|
---|
355 | >> vtec.Layers[ll].Height;
|
---|
356 | for (unsigned iDeg = 0; iDeg <= vtec.Layers[ll].Degree; iDeg++) {
|
---|
357 | for (unsigned iOrd = 0; iOrd <= vtec.Layers[ll].Order; iOrd++) {
|
---|
358 | in >> vtec.Layers[ll].Cosinus[iDeg][iOrd];
|
---|
359 | }
|
---|
360 | }
|
---|
361 | for (unsigned iDeg = 0; iDeg <= vtec.Layers[ll].Degree; iDeg++) {
|
---|
362 | for (unsigned iOrd = 0; iOrd <= vtec.Layers[ll].Order; iOrd++) {
|
---|
363 | in >> vtec.Layers[ll].Sinus[iDeg][iOrd];
|
---|
364 | }
|
---|
365 | }
|
---|
366 | }
|
---|
367 | continue;
|
---|
368 | }
|
---|
369 | // satellite specific parameters
|
---|
370 | char sys = key.mid(0, 1).at(0).toAscii();
|
---|
371 | int number = key.mid(1, 2).toInt();
|
---|
372 | int flags = 0;
|
---|
373 | if (sys == 'E') { // I/NAV
|
---|
374 | flags = 1;
|
---|
375 | }
|
---|
376 | prn.set(sys, number, flags);
|
---|
377 | QString prnInternalStr = QString::fromStdString(prn.toInternalString());
|
---|
378 | QString prnStr = QString::fromStdString(prn.toString());
|
---|
379 |
|
---|
380 | const t_eph* ephLast = _ephUser->ephLast(prnInternalStr);
|
---|
381 | const t_eph* ephPrev = _ephUser->ephPrev(prnInternalStr);
|
---|
382 | const t_eph* eph = ephLast;
|
---|
383 | if (eph) {
|
---|
384 |
|
---|
385 | // Use previous ephemeris if the last one is too recent
|
---|
386 | // ----------------------------------------------------
|
---|
387 | const int MINAGE = 60; // seconds
|
---|
388 | if (ephPrev && eph->receptDateTime().isValid()
|
---|
389 | && eph->receptDateTime().secsTo(currentDateAndTimeGPS()) < MINAGE) {
|
---|
390 | eph = ephPrev;
|
---|
391 | }
|
---|
392 |
|
---|
393 | // Make sure the clock messages refer to same IOD as orbit messages
|
---|
394 | // ----------------------------------------------------------------
|
---|
395 | if (_usedEph) {
|
---|
396 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
397 | (*_usedEph)[prnInternalStr] = eph;
|
---|
398 | }
|
---|
399 | else {
|
---|
400 | eph = 0;
|
---|
401 | if (_usedEph->contains(prnInternalStr)) {
|
---|
402 | const t_eph* usedEph = _usedEph->value(prnInternalStr);
|
---|
403 | if (usedEph == ephLast) {
|
---|
404 | eph = ephLast;
|
---|
405 | }
|
---|
406 | else if (usedEph == ephPrev) {
|
---|
407 | eph = ephPrev;
|
---|
408 | }
|
---|
409 | }
|
---|
410 | }
|
---|
411 | }
|
---|
412 | }
|
---|
413 |
|
---|
414 | if (eph) {
|
---|
415 |
|
---|
416 | QMap<QString, double> codeBiases;
|
---|
417 | QList<phaseBiasSignal> phaseBiasList;
|
---|
418 | phaseBiasesSat pbSat;
|
---|
419 |
|
---|
420 | while (true) {
|
---|
421 | QString key;
|
---|
422 | int numVal = 0;
|
---|
423 | in >> key;
|
---|
424 | if (in.status() != QTextStream::Ok) {
|
---|
425 | break;
|
---|
426 | }
|
---|
427 | if (key == "APC") {
|
---|
428 | in >> numVal;
|
---|
429 | rtnAPC.ReSize(3);
|
---|
430 | for (int ii = 0; ii < numVal; ii++) {
|
---|
431 | in >> rtnAPC[ii];
|
---|
432 | }
|
---|
433 | }
|
---|
434 | else if (key == "Clk") {
|
---|
435 | in >> numVal;
|
---|
436 | if (numVal == 1)
|
---|
437 | in >> rtnClk;
|
---|
438 | }
|
---|
439 | else if (key == "Vel") {
|
---|
440 | rtnVel.ReSize(3);
|
---|
441 | in >> numVal;
|
---|
442 | for (int ii = 0; ii < numVal; ii++) {
|
---|
443 | in >> rtnVel[ii];
|
---|
444 | }
|
---|
445 | }
|
---|
446 | else if (key == "CoM") {
|
---|
447 | rtnCoM.ReSize(3);
|
---|
448 | in >> numVal;
|
---|
449 | for (int ii = 0; ii < numVal; ii++) {
|
---|
450 | in >> rtnCoM[ii];
|
---|
451 | }
|
---|
452 | }
|
---|
453 | else if (key == "CodeBias") {
|
---|
454 | in >> numVal;
|
---|
455 | for (int ii = 0; ii < numVal; ii++) {
|
---|
456 | QString type;
|
---|
457 | double value;
|
---|
458 | in >> type >> value;
|
---|
459 | codeBiases[type] = value;
|
---|
460 | }
|
---|
461 | }
|
---|
462 | else if (key == "YawAngle") {
|
---|
463 | in >> numVal >> pbSat.yawAngle;
|
---|
464 | if (pbSat.yawAngle < 0.0) {
|
---|
465 | pbSat.yawAngle += (2*M_PI);
|
---|
466 | }
|
---|
467 | else if (pbSat.yawAngle > 2*M_PI) {
|
---|
468 | pbSat.yawAngle -= (2*M_PI);
|
---|
469 | }
|
---|
470 | }
|
---|
471 | else if (key == "YawRate") {
|
---|
472 | in >> numVal >> pbSat.yawRate;
|
---|
473 | }
|
---|
474 | else if (key == "PhaseBias") {
|
---|
475 | in >> numVal;
|
---|
476 | for (int ii = 0; ii < numVal; ii++) {
|
---|
477 | phaseBiasSignal pb;
|
---|
478 | in >> pb.type >> pb.bias >> pb.integerIndicator
|
---|
479 | >> pb.wlIndicator >> pb.discontinuityCounter;
|
---|
480 | phaseBiasList.append(pb);
|
---|
481 | }
|
---|
482 | }
|
---|
483 | else {
|
---|
484 | in >> numVal;
|
---|
485 | for (int ii = 0; ii < numVal; ii++) {
|
---|
486 | double dummy;
|
---|
487 | in >> dummy;
|
---|
488 | }
|
---|
489 | }
|
---|
490 | }
|
---|
491 |
|
---|
492 | struct ClockOrbit::SatData* sd = 0;
|
---|
493 | if (prn.system() == 'G') {
|
---|
494 | sd = co.Sat + co.NumberOfSat[CLOCKORBIT_SATGPS];
|
---|
495 | ++co.NumberOfSat[CLOCKORBIT_SATGPS];
|
---|
496 | }
|
---|
497 | else if (prn.system() == 'R') {
|
---|
498 | sd = co.Sat + CLOCKORBIT_NUMGPS + co.NumberOfSat[CLOCKORBIT_SATGLONASS];
|
---|
499 | ++co.NumberOfSat[CLOCKORBIT_SATGLONASS];
|
---|
500 | }
|
---|
501 | else if (prn.system() == 'E') {
|
---|
502 | sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
|
---|
503 | + co.NumberOfSat[CLOCKORBIT_SATGALILEO];
|
---|
504 | ++co.NumberOfSat[CLOCKORBIT_SATGALILEO];
|
---|
505 | }
|
---|
506 | else if (prn.system() == 'J') {
|
---|
507 | sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
|
---|
508 | + CLOCKORBIT_NUMGALILEO + co.NumberOfSat[CLOCKORBIT_SATQZSS];
|
---|
509 | ++co.NumberOfSat[CLOCKORBIT_SATQZSS];
|
---|
510 | }
|
---|
511 | else if (prn.system() == 'S') {
|
---|
512 | sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
|
---|
513 | + CLOCKORBIT_NUMGALILEO + CLOCKORBIT_NUMQZSS
|
---|
514 | + co.NumberOfSat[CLOCKORBIT_SATSBAS];
|
---|
515 | ++co.NumberOfSat[CLOCKORBIT_SATSBAS];
|
---|
516 | }
|
---|
517 | else if (prn.system() == 'C') {
|
---|
518 | sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
|
---|
519 | + CLOCKORBIT_NUMGALILEO + CLOCKORBIT_NUMQZSS + CLOCKORBIT_NUMSBAS
|
---|
520 | + co.NumberOfSat[CLOCKORBIT_SATBDS];
|
---|
521 | ++co.NumberOfSat[CLOCKORBIT_SATBDS];
|
---|
522 | }
|
---|
523 | if (sd) {
|
---|
524 | QString outLine;
|
---|
525 | processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prnStr, rtnAPC,
|
---|
526 | rtnClk, rtnVel, rtnCoM, sd, outLine);
|
---|
527 | }
|
---|
528 |
|
---|
529 | // Code Biases
|
---|
530 | // -----------
|
---|
531 | struct CodeBias::BiasSat* biasSat = 0;
|
---|
532 | if (!codeBiases.isEmpty()) {
|
---|
533 | if (prn.system() == 'G') {
|
---|
534 | biasSat = bias.Sat + bias.NumberOfSat[CLOCKORBIT_SATGPS];
|
---|
535 | ++bias.NumberOfSat[CLOCKORBIT_SATGPS];
|
---|
536 | }
|
---|
537 | else if (prn.system() == 'R') {
|
---|
538 | biasSat = bias.Sat + CLOCKORBIT_NUMGPS
|
---|
539 | + bias.NumberOfSat[CLOCKORBIT_SATGLONASS];
|
---|
540 | ++bias.NumberOfSat[CLOCKORBIT_SATGLONASS];
|
---|
541 | }
|
---|
542 | else if (prn.system() == 'E') {
|
---|
543 | biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
|
---|
544 | + bias.NumberOfSat[CLOCKORBIT_SATGALILEO];
|
---|
545 | ++bias.NumberOfSat[CLOCKORBIT_SATGALILEO];
|
---|
546 | }
|
---|
547 | else if (prn.system() == 'J') {
|
---|
548 | biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
|
---|
549 | + CLOCKORBIT_NUMGALILEO + bias.NumberOfSat[CLOCKORBIT_SATQZSS];
|
---|
550 | ++bias.NumberOfSat[CLOCKORBIT_SATQZSS];
|
---|
551 | }
|
---|
552 | else if (prn.system() == 'S') {
|
---|
553 | biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
|
---|
554 | + CLOCKORBIT_NUMGALILEO + CLOCKORBIT_NUMQZSS
|
---|
555 | + bias.NumberOfSat[CLOCKORBIT_SATSBAS];
|
---|
556 | ++bias.NumberOfSat[CLOCKORBIT_SATSBAS];
|
---|
557 | }
|
---|
558 | else if (prn.system() == 'C') {
|
---|
559 | biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
|
---|
560 | + CLOCKORBIT_NUMGALILEO + CLOCKORBIT_NUMQZSS + CLOCKORBIT_NUMSBAS
|
---|
561 | + bias.NumberOfSat[CLOCKORBIT_SATBDS];
|
---|
562 | ++bias.NumberOfSat[CLOCKORBIT_SATBDS];
|
---|
563 | }
|
---|
564 | }
|
---|
565 |
|
---|
566 | if (biasSat) {
|
---|
567 | biasSat->ID = prn.number();
|
---|
568 | biasSat->NumberOfCodeBiases = 0;
|
---|
569 | if (prn.system() == 'G') {
|
---|
570 | QMapIterator<QString, double> it(codeBiases);
|
---|
571 | while (it.hasNext()) {
|
---|
572 | it.next();
|
---|
573 | if (it.key() == "1C") {
|
---|
574 | int ii = biasSat->NumberOfCodeBiases;
|
---|
575 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
576 | break;
|
---|
577 | biasSat->NumberOfCodeBiases += 1;
|
---|
578 | biasSat->Biases[ii].Type = CODETYPEGPS_L1_CA;
|
---|
579 | biasSat->Biases[ii].Bias = it.value();
|
---|
580 | }
|
---|
581 | else if (it.key() == "1S") {
|
---|
582 | int ii = biasSat->NumberOfCodeBiases;
|
---|
583 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
584 | break;
|
---|
585 | biasSat->NumberOfCodeBiases += 1;
|
---|
586 | biasSat->Biases[ii].Type = CODETYPEGPS_L1C_D;
|
---|
587 | biasSat->Biases[ii].Bias = it.value();
|
---|
588 | }
|
---|
589 | else if (it.key() == "1L") {
|
---|
590 | int ii = biasSat->NumberOfCodeBiases;
|
---|
591 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
592 | break;
|
---|
593 | biasSat->NumberOfCodeBiases += 1;
|
---|
594 | biasSat->Biases[ii].Type = CODETYPEGPS_L1C_P;
|
---|
595 | biasSat->Biases[ii].Bias = it.value();
|
---|
596 | }
|
---|
597 | else if (it.key() == "1X") {
|
---|
598 | int ii = biasSat->NumberOfCodeBiases;
|
---|
599 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
600 | break;
|
---|
601 | biasSat->NumberOfCodeBiases += 1;
|
---|
602 | biasSat->Biases[ii].Type = CODETYPEGPS_L1C_DP;
|
---|
603 | biasSat->Biases[ii].Bias = it.value();
|
---|
604 | }
|
---|
605 | else if (it.key() == "1P") {
|
---|
606 | int ii = biasSat->NumberOfCodeBiases;
|
---|
607 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
608 | break;
|
---|
609 | biasSat->NumberOfCodeBiases += 1;
|
---|
610 | biasSat->Biases[ii].Type = CODETYPEGPS_L1_P;
|
---|
611 | biasSat->Biases[ii].Bias = it.value();
|
---|
612 | }
|
---|
613 | else if (it.key() == "1W") {
|
---|
614 | int ii = biasSat->NumberOfCodeBiases;
|
---|
615 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
616 | break;
|
---|
617 | biasSat->NumberOfCodeBiases += 1;
|
---|
618 | biasSat->Biases[ii].Type = CODETYPEGPS_L1_Z;
|
---|
619 | biasSat->Biases[ii].Bias = it.value();
|
---|
620 | }
|
---|
621 | else if (it.key() == "2C") {
|
---|
622 | int ii = biasSat->NumberOfCodeBiases;
|
---|
623 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
624 | break;
|
---|
625 | biasSat->NumberOfCodeBiases += 1;
|
---|
626 | biasSat->Biases[ii].Type = CODETYPEGPS_L2_CA;
|
---|
627 | biasSat->Biases[ii].Bias = it.value();
|
---|
628 | }
|
---|
629 | else if (it.key() == "2D") {
|
---|
630 | int ii = biasSat->NumberOfCodeBiases;
|
---|
631 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
632 | break;
|
---|
633 | biasSat->NumberOfCodeBiases += 1;
|
---|
634 | biasSat->Biases[ii].Type = CODETYPEGPS_SEMI_CODELESS;
|
---|
635 | biasSat->Biases[ii].Bias = it.value();
|
---|
636 | }
|
---|
637 | else if (it.key() == "2S") {
|
---|
638 | int ii = biasSat->NumberOfCodeBiases;
|
---|
639 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
640 | break;
|
---|
641 | biasSat->NumberOfCodeBiases += 1;
|
---|
642 | biasSat->Biases[ii].Type = CODETYPEGPS_L2_CM;
|
---|
643 | biasSat->Biases[ii].Bias = it.value();
|
---|
644 | }
|
---|
645 | else if (it.key() == "2L") {
|
---|
646 | int ii = biasSat->NumberOfCodeBiases;
|
---|
647 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
648 | break;
|
---|
649 | biasSat->NumberOfCodeBiases += 1;
|
---|
650 | biasSat->Biases[ii].Type = CODETYPEGPS_L2_CL;
|
---|
651 | biasSat->Biases[ii].Bias = it.value();
|
---|
652 | }
|
---|
653 | else if (it.key() == "2X") {
|
---|
654 | int ii = biasSat->NumberOfCodeBiases;
|
---|
655 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
656 | break;
|
---|
657 | biasSat->NumberOfCodeBiases += 1;
|
---|
658 | biasSat->Biases[ii].Type = CODETYPEGPS_L2_CML;
|
---|
659 | biasSat->Biases[ii].Bias = it.value();
|
---|
660 | }
|
---|
661 | else if (it.key() == "2P") {
|
---|
662 | int ii = biasSat->NumberOfCodeBiases;
|
---|
663 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
664 | break;
|
---|
665 | biasSat->NumberOfCodeBiases += 1;
|
---|
666 | biasSat->Biases[ii].Type = CODETYPEGPS_L2_P;
|
---|
667 | biasSat->Biases[ii].Bias = it.value();
|
---|
668 | }
|
---|
669 | else if (it.key() == "2W") {
|
---|
670 | int ii = biasSat->NumberOfCodeBiases;
|
---|
671 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
672 | break;
|
---|
673 | biasSat->NumberOfCodeBiases += 1;
|
---|
674 | biasSat->Biases[ii].Type = CODETYPEGPS_L2_Z;
|
---|
675 | biasSat->Biases[ii].Bias = it.value();
|
---|
676 | }
|
---|
677 | else if (it.key() == "5I") {
|
---|
678 | int ii = biasSat->NumberOfCodeBiases;
|
---|
679 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
680 | break;
|
---|
681 | biasSat->NumberOfCodeBiases += 1;
|
---|
682 | biasSat->Biases[ii].Type = CODETYPEGPS_L5_I;
|
---|
683 | biasSat->Biases[ii].Bias = it.value();
|
---|
684 | }
|
---|
685 | else if (it.key() == "5Q") {
|
---|
686 | int ii = biasSat->NumberOfCodeBiases;
|
---|
687 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
688 | break;
|
---|
689 | biasSat->NumberOfCodeBiases += 1;
|
---|
690 | biasSat->Biases[ii].Type = CODETYPEGPS_L5_Q;
|
---|
691 | biasSat->Biases[ii].Bias = it.value();
|
---|
692 | }
|
---|
693 | else if (it.key() == "5X") {
|
---|
694 | int ii = biasSat->NumberOfCodeBiases;
|
---|
695 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
696 | break;
|
---|
697 | biasSat->NumberOfCodeBiases += 1;
|
---|
698 | biasSat->Biases[ii].Type = CODETYPEGPS_L5_IQ;
|
---|
699 | biasSat->Biases[ii].Bias = it.value();
|
---|
700 | }
|
---|
701 | }
|
---|
702 | }
|
---|
703 | else if (prn.system() == 'R') {
|
---|
704 | QMapIterator<QString, double> it(codeBiases);
|
---|
705 | while (it.hasNext()) {
|
---|
706 | it.next();
|
---|
707 | if (it.key() == "1C") {
|
---|
708 | int ii = biasSat->NumberOfCodeBiases;
|
---|
709 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
710 | break;
|
---|
711 | biasSat->NumberOfCodeBiases += 1;
|
---|
712 | biasSat->Biases[ii].Type = CODETYPEGLONASS_L1_CA;
|
---|
713 | biasSat->Biases[ii].Bias = it.value();
|
---|
714 | }
|
---|
715 | else if (it.key() == "1P") {
|
---|
716 | int ii = biasSat->NumberOfCodeBiases;
|
---|
717 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
718 | break;
|
---|
719 | biasSat->NumberOfCodeBiases += 1;
|
---|
720 | biasSat->Biases[ii].Type = CODETYPEGLONASS_L1_P;
|
---|
721 | biasSat->Biases[ii].Bias = it.value();
|
---|
722 | }
|
---|
723 | else if (it.key() == "2C") {
|
---|
724 | int ii = biasSat->NumberOfCodeBiases;
|
---|
725 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
726 | break;
|
---|
727 | biasSat->NumberOfCodeBiases += 1;
|
---|
728 | biasSat->Biases[ii].Type = CODETYPEGLONASS_L2_CA;
|
---|
729 | biasSat->Biases[ii].Bias = it.value();
|
---|
730 | }
|
---|
731 | else if (it.key() == "2P") {
|
---|
732 | int ii = biasSat->NumberOfCodeBiases;
|
---|
733 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
734 | break;
|
---|
735 | biasSat->NumberOfCodeBiases += 1;
|
---|
736 | biasSat->Biases[ii].Type = CODETYPEGLONASS_L2_P;
|
---|
737 | biasSat->Biases[ii].Bias = it.value();
|
---|
738 | }
|
---|
739 | }
|
---|
740 | }
|
---|
741 | else if (prn.system() == 'E') {
|
---|
742 | QMapIterator<QString, double> it(codeBiases);
|
---|
743 | while (it.hasNext()) {
|
---|
744 | it.next();
|
---|
745 | if (it.key() == "1A") {
|
---|
746 | int ii = biasSat->NumberOfCodeBiases;
|
---|
747 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
748 | break;
|
---|
749 | biasSat->NumberOfCodeBiases += 1;
|
---|
750 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E1_A;
|
---|
751 | biasSat->Biases[ii].Bias = it.value();
|
---|
752 | }
|
---|
753 | else if (it.key() == "1B") {
|
---|
754 | int ii = biasSat->NumberOfCodeBiases;
|
---|
755 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
756 | break;
|
---|
757 | biasSat->NumberOfCodeBiases += 1;
|
---|
758 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E1_B;
|
---|
759 | biasSat->Biases[ii].Bias = it.value();
|
---|
760 | }
|
---|
761 | else if (it.key() == "1C") {
|
---|
762 | int ii = biasSat->NumberOfCodeBiases;
|
---|
763 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
764 | break;
|
---|
765 | biasSat->NumberOfCodeBiases += 1;
|
---|
766 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E1_C;
|
---|
767 | biasSat->Biases[ii].Bias = it.value();
|
---|
768 | }
|
---|
769 | else if (it.key() == "1X") {
|
---|
770 | int ii = biasSat->NumberOfCodeBiases;
|
---|
771 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
772 | break;
|
---|
773 | biasSat->NumberOfCodeBiases += 1;
|
---|
774 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E1_BC;
|
---|
775 | biasSat->Biases[ii].Bias = it.value();
|
---|
776 | }
|
---|
777 | else if (it.key() == "1Z") {
|
---|
778 | int ii = biasSat->NumberOfCodeBiases;
|
---|
779 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
780 | break;
|
---|
781 | biasSat->NumberOfCodeBiases += 1;
|
---|
782 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E1_ABC;
|
---|
783 | biasSat->Biases[ii].Bias = it.value();
|
---|
784 | }
|
---|
785 | else if (it.key() == "5I") {
|
---|
786 | int ii = biasSat->NumberOfCodeBiases;
|
---|
787 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
788 | break;
|
---|
789 | biasSat->NumberOfCodeBiases += 1;
|
---|
790 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_I;
|
---|
791 | biasSat->Biases[ii].Bias = it.value();
|
---|
792 | }
|
---|
793 | else if (it.key() == "5Q") {
|
---|
794 | int ii = biasSat->NumberOfCodeBiases;
|
---|
795 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
796 | break;
|
---|
797 | biasSat->NumberOfCodeBiases += 1;
|
---|
798 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_Q;
|
---|
799 | biasSat->Biases[ii].Bias = it.value();
|
---|
800 | }
|
---|
801 | else if (it.key() == "5X") {
|
---|
802 | int ii = biasSat->NumberOfCodeBiases;
|
---|
803 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
804 | break;
|
---|
805 | biasSat->NumberOfCodeBiases += 1;
|
---|
806 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_IQ;
|
---|
807 | biasSat->Biases[ii].Bias = it.value();
|
---|
808 | }
|
---|
809 | else if (it.key() == "7I") {
|
---|
810 | int ii = biasSat->NumberOfCodeBiases;
|
---|
811 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
812 | break;
|
---|
813 | biasSat->NumberOfCodeBiases += 1;
|
---|
814 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_I;
|
---|
815 | biasSat->Biases[ii].Bias = it.value();
|
---|
816 | }
|
---|
817 | else if (it.key() == "7Q") {
|
---|
818 | int ii = biasSat->NumberOfCodeBiases;
|
---|
819 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
820 | break;
|
---|
821 | biasSat->NumberOfCodeBiases += 1;
|
---|
822 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_Q;
|
---|
823 | biasSat->Biases[ii].Bias = it.value();
|
---|
824 | }
|
---|
825 | else if (it.key() == "7X") {
|
---|
826 | int ii = biasSat->NumberOfCodeBiases;
|
---|
827 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
828 | break;
|
---|
829 | biasSat->NumberOfCodeBiases += 1;
|
---|
830 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_IQ;
|
---|
831 | biasSat->Biases[ii].Bias = it.value();
|
---|
832 | }
|
---|
833 | else if (it.key() == "8I") {
|
---|
834 | int ii = biasSat->NumberOfCodeBiases;
|
---|
835 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
836 | break;
|
---|
837 | biasSat->NumberOfCodeBiases += 1;
|
---|
838 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5_I;
|
---|
839 | biasSat->Biases[ii].Bias = it.value();
|
---|
840 | }
|
---|
841 | else if (it.key() == "8Q") {
|
---|
842 | int ii = biasSat->NumberOfCodeBiases;
|
---|
843 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
844 | break;
|
---|
845 | biasSat->NumberOfCodeBiases += 1;
|
---|
846 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5_Q;
|
---|
847 | biasSat->Biases[ii].Bias = it.value();
|
---|
848 | }
|
---|
849 | else if (it.key() == "8X") {
|
---|
850 | int ii = biasSat->NumberOfCodeBiases;
|
---|
851 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
852 | break;
|
---|
853 | biasSat->NumberOfCodeBiases += 1;
|
---|
854 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5_IQ;
|
---|
855 | biasSat->Biases[ii].Bias = it.value();
|
---|
856 | }
|
---|
857 | else if (it.key() == "6A") {
|
---|
858 | int ii = biasSat->NumberOfCodeBiases;
|
---|
859 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
860 | break;
|
---|
861 | biasSat->NumberOfCodeBiases += 1;
|
---|
862 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E6_A;
|
---|
863 | biasSat->Biases[ii].Bias = it.value();
|
---|
864 | }
|
---|
865 | else if (it.key() == "6B") {
|
---|
866 | int ii = biasSat->NumberOfCodeBiases;
|
---|
867 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
868 | break;
|
---|
869 | biasSat->NumberOfCodeBiases += 1;
|
---|
870 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E6_B;
|
---|
871 | biasSat->Biases[ii].Bias = it.value();
|
---|
872 | }
|
---|
873 | else if (it.key() == "6C") {
|
---|
874 | int ii = biasSat->NumberOfCodeBiases;
|
---|
875 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
876 | break;
|
---|
877 | biasSat->NumberOfCodeBiases += 1;
|
---|
878 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E6_C;
|
---|
879 | biasSat->Biases[ii].Bias = it.value();
|
---|
880 | }
|
---|
881 | else if (it.key() == "6X") {
|
---|
882 | int ii = biasSat->NumberOfCodeBiases;
|
---|
883 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
884 | break;
|
---|
885 | biasSat->NumberOfCodeBiases += 1;
|
---|
886 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E6_BC;
|
---|
887 | biasSat->Biases[ii].Bias = it.value();
|
---|
888 | }
|
---|
889 | else if (it.key() == "6Z") {
|
---|
890 | int ii = biasSat->NumberOfCodeBiases;
|
---|
891 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
892 | break;
|
---|
893 | biasSat->NumberOfCodeBiases += 1;
|
---|
894 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E6_ABC;
|
---|
895 | biasSat->Biases[ii].Bias = it.value();
|
---|
896 | }
|
---|
897 | }
|
---|
898 | }
|
---|
899 | else if (prn.system() == 'J') {
|
---|
900 | QMapIterator<QString, double> it(codeBiases);
|
---|
901 | while (it.hasNext()) {
|
---|
902 | it.next();
|
---|
903 | if (it.key() == "1C") {
|
---|
904 | int ii = biasSat->NumberOfCodeBiases;
|
---|
905 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
906 | break;
|
---|
907 | biasSat->NumberOfCodeBiases += 1;
|
---|
908 | biasSat->Biases[ii].Type = CODETYPEQZSS_L1_CA;
|
---|
909 | biasSat->Biases[ii].Bias = it.value();
|
---|
910 | }
|
---|
911 | else if (it.key() == "1S") {
|
---|
912 | int ii = biasSat->NumberOfCodeBiases;
|
---|
913 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
914 | break;
|
---|
915 | biasSat->NumberOfCodeBiases += 1;
|
---|
916 | biasSat->Biases[ii].Type = CODETYPEQZSS_L1C_D;
|
---|
917 | biasSat->Biases[ii].Bias = it.value();
|
---|
918 | }
|
---|
919 | else if (it.key() == "1L") {
|
---|
920 | int ii = biasSat->NumberOfCodeBiases;
|
---|
921 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
922 | break;
|
---|
923 | biasSat->NumberOfCodeBiases += 1;
|
---|
924 | biasSat->Biases[ii].Type = CODETYPEQZSS_L1C_P;
|
---|
925 | biasSat->Biases[ii].Bias = it.value();
|
---|
926 | }
|
---|
927 | else if (it.key() == "1X") {
|
---|
928 | int ii = biasSat->NumberOfCodeBiases;
|
---|
929 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
930 | break;
|
---|
931 | biasSat->NumberOfCodeBiases += 1;
|
---|
932 | biasSat->Biases[ii].Type = CODETYPEQZSS_L1C_DP;
|
---|
933 | biasSat->Biases[ii].Bias = it.value();
|
---|
934 | }
|
---|
935 | else if (it.key() == "2S") {
|
---|
936 | int ii = biasSat->NumberOfCodeBiases;
|
---|
937 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
938 | break;
|
---|
939 | biasSat->NumberOfCodeBiases += 1;
|
---|
940 | biasSat->Biases[ii].Type = CODETYPEQZSS_L2C_M;
|
---|
941 | biasSat->Biases[ii].Bias = it.value();
|
---|
942 | }
|
---|
943 | else if (it.key() == "2L") {
|
---|
944 | int ii = biasSat->NumberOfCodeBiases;
|
---|
945 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
946 | break;
|
---|
947 | biasSat->NumberOfCodeBiases += 1;
|
---|
948 | biasSat->Biases[ii].Type = CODETYPEQZSS_L2C_L;
|
---|
949 | biasSat->Biases[ii].Bias = it.value();
|
---|
950 | }
|
---|
951 | else if (it.key() == "2X") {
|
---|
952 | int ii = biasSat->NumberOfCodeBiases;
|
---|
953 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
954 | break;
|
---|
955 | biasSat->NumberOfCodeBiases += 1;
|
---|
956 | biasSat->Biases[ii].Type = CODETYPEQZSS_L2C_ML;
|
---|
957 | biasSat->Biases[ii].Bias = it.value();
|
---|
958 | }
|
---|
959 | else if (it.key() == "5I") {
|
---|
960 | int ii = biasSat->NumberOfCodeBiases;
|
---|
961 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
962 | break;
|
---|
963 | biasSat->NumberOfCodeBiases += 1;
|
---|
964 | biasSat->Biases[ii].Type = CODETYPEQZSS_L5_I;
|
---|
965 | biasSat->Biases[ii].Bias = it.value();
|
---|
966 | }
|
---|
967 | else if (it.key() == "5Q") {
|
---|
968 | int ii = biasSat->NumberOfCodeBiases;
|
---|
969 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
970 | break;
|
---|
971 | biasSat->NumberOfCodeBiases += 1;
|
---|
972 | biasSat->Biases[ii].Type = CODETYPEQZSS_L5_Q;
|
---|
973 | biasSat->Biases[ii].Bias = it.value();
|
---|
974 | }
|
---|
975 | else if (it.key() == "5X") {
|
---|
976 | int ii = biasSat->NumberOfCodeBiases;
|
---|
977 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
978 | break;
|
---|
979 | biasSat->NumberOfCodeBiases += 1;
|
---|
980 | biasSat->Biases[ii].Type = CODETYPEQZSS_L5_IQ;
|
---|
981 | biasSat->Biases[ii].Bias = it.value();
|
---|
982 | }
|
---|
983 | else if (it.key() == "6S") {
|
---|
984 | int ii = biasSat->NumberOfCodeBiases;
|
---|
985 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
986 | break;
|
---|
987 | biasSat->NumberOfCodeBiases += 1;
|
---|
988 | biasSat->Biases[ii].Type = CODETYPEQZSS_LEX_S;
|
---|
989 | biasSat->Biases[ii].Bias = it.value();
|
---|
990 | }
|
---|
991 | else if (it.key() == "6L") {
|
---|
992 | int ii = biasSat->NumberOfCodeBiases;
|
---|
993 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
994 | break;
|
---|
995 | biasSat->NumberOfCodeBiases += 1;
|
---|
996 | biasSat->Biases[ii].Type = CODETYPEQZSS_LEX_L;
|
---|
997 | biasSat->Biases[ii].Bias = it.value();
|
---|
998 | }
|
---|
999 | else if (it.key() == "6X") {
|
---|
1000 | int ii = biasSat->NumberOfCodeBiases;
|
---|
1001 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1002 | break;
|
---|
1003 | biasSat->NumberOfCodeBiases += 1;
|
---|
1004 | biasSat->Biases[ii].Type = CODETYPEQZSS_LEX_SL;
|
---|
1005 | biasSat->Biases[ii].Bias = it.value();
|
---|
1006 | }
|
---|
1007 | }
|
---|
1008 | }
|
---|
1009 | else if (prn.system() == 'S') {
|
---|
1010 | QMapIterator<QString, double> it(codeBiases);
|
---|
1011 | while (it.hasNext()) {
|
---|
1012 | it.next();
|
---|
1013 | if (it.key() == "1C") {
|
---|
1014 | int ii = biasSat->NumberOfCodeBiases;
|
---|
1015 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1016 | break;
|
---|
1017 | biasSat->NumberOfCodeBiases += 1;
|
---|
1018 | biasSat->Biases[ii].Type = CODETYPE_SBAS_L1_CA;
|
---|
1019 | biasSat->Biases[ii].Bias = it.value();
|
---|
1020 | }
|
---|
1021 | else if (it.key() == "5I") {
|
---|
1022 | int ii = biasSat->NumberOfCodeBiases;
|
---|
1023 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1024 | break;
|
---|
1025 | biasSat->NumberOfCodeBiases += 1;
|
---|
1026 | biasSat->Biases[ii].Type = CODETYPE_SBAS_L5_I;
|
---|
1027 | biasSat->Biases[ii].Bias = it.value();
|
---|
1028 | }
|
---|
1029 | else if (it.key() == "5Q") {
|
---|
1030 | int ii = biasSat->NumberOfCodeBiases;
|
---|
1031 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1032 | break;
|
---|
1033 | biasSat->NumberOfCodeBiases += 1;
|
---|
1034 | biasSat->Biases[ii].Type = CODETYPE_SBAS_L5_Q;
|
---|
1035 | biasSat->Biases[ii].Bias = it.value();
|
---|
1036 | }
|
---|
1037 | else if (it.key() == "5X") {
|
---|
1038 | int ii = biasSat->NumberOfCodeBiases;
|
---|
1039 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1040 | break;
|
---|
1041 | biasSat->NumberOfCodeBiases += 1;
|
---|
1042 | biasSat->Biases[ii].Type = CODETYPE_SBAS_L5_IQ;
|
---|
1043 | biasSat->Biases[ii].Bias = it.value();
|
---|
1044 | }
|
---|
1045 | }
|
---|
1046 | }
|
---|
1047 | else if (prn.system() == 'C') {
|
---|
1048 | QMapIterator<QString, double> it(codeBiases);
|
---|
1049 | while (it.hasNext()) {
|
---|
1050 | it.next();
|
---|
1051 | if (it.key() == "2I") {
|
---|
1052 | int ii = biasSat->NumberOfCodeBiases;
|
---|
1053 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1054 | break;
|
---|
1055 | biasSat->NumberOfCodeBiases += 1;
|
---|
1056 | biasSat->Biases[ii].Type = CODETYPE_BDS_B1_I;
|
---|
1057 | biasSat->Biases[ii].Bias = it.value();
|
---|
1058 | }
|
---|
1059 | else if (it.key() == "2Q") {
|
---|
1060 | int ii = biasSat->NumberOfCodeBiases;
|
---|
1061 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1062 | break;
|
---|
1063 | biasSat->NumberOfCodeBiases += 1;
|
---|
1064 | biasSat->Biases[ii].Type = CODETYPE_BDS_B1_Q;
|
---|
1065 | biasSat->Biases[ii].Bias = it.value();
|
---|
1066 | }
|
---|
1067 | else if (it.key() == "2X") {
|
---|
1068 | int ii = biasSat->NumberOfCodeBiases;
|
---|
1069 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1070 | break;
|
---|
1071 | biasSat->NumberOfCodeBiases += 1;
|
---|
1072 | biasSat->Biases[ii].Type = CODETYPE_BDS_B1_IQ;
|
---|
1073 | biasSat->Biases[ii].Bias = it.value();
|
---|
1074 | }
|
---|
1075 | else if (it.key() == "6I") {
|
---|
1076 | int ii = biasSat->NumberOfCodeBiases;
|
---|
1077 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1078 | break;
|
---|
1079 | biasSat->NumberOfCodeBiases += 1;
|
---|
1080 | biasSat->Biases[ii].Type = CODETYPE_BDS_B3_I;
|
---|
1081 | biasSat->Biases[ii].Bias = it.value();
|
---|
1082 | }
|
---|
1083 | else if (it.key() == "6Q") {
|
---|
1084 | int ii = biasSat->NumberOfCodeBiases;
|
---|
1085 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1086 | break;
|
---|
1087 | biasSat->NumberOfCodeBiases += 1;
|
---|
1088 | biasSat->Biases[ii].Type = CODETYPE_BDS_B3_Q;
|
---|
1089 | biasSat->Biases[ii].Bias = it.value();
|
---|
1090 | }
|
---|
1091 | else if (it.key() == "6X") {
|
---|
1092 | int ii = biasSat->NumberOfCodeBiases;
|
---|
1093 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1094 | break;
|
---|
1095 | biasSat->NumberOfCodeBiases += 1;
|
---|
1096 | biasSat->Biases[ii].Type = CODETYPE_BDS_B3_IQ;
|
---|
1097 | biasSat->Biases[ii].Bias = it.value();
|
---|
1098 | }
|
---|
1099 | else if (it.key() == "7I") {
|
---|
1100 | int ii = biasSat->NumberOfCodeBiases;
|
---|
1101 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1102 | break;
|
---|
1103 | biasSat->NumberOfCodeBiases += 1;
|
---|
1104 | biasSat->Biases[ii].Type = CODETYPE_BDS_B2_I;
|
---|
1105 | biasSat->Biases[ii].Bias = it.value();
|
---|
1106 | }
|
---|
1107 | else if (it.key() == "7Q") {
|
---|
1108 | int ii = biasSat->NumberOfCodeBiases;
|
---|
1109 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1110 | break;
|
---|
1111 | biasSat->NumberOfCodeBiases += 1;
|
---|
1112 | biasSat->Biases[ii].Type = CODETYPE_BDS_B2_Q;
|
---|
1113 | biasSat->Biases[ii].Bias = it.value();
|
---|
1114 | }
|
---|
1115 | else if (it.key() == "7X") {
|
---|
1116 | int ii = biasSat->NumberOfCodeBiases;
|
---|
1117 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1118 | break;
|
---|
1119 | biasSat->NumberOfCodeBiases += 1;
|
---|
1120 | biasSat->Biases[ii].Type = CODETYPE_BDS_B2_IQ;
|
---|
1121 | biasSat->Biases[ii].Bias = it.value();
|
---|
1122 | }
|
---|
1123 | }
|
---|
1124 | }
|
---|
1125 | }
|
---|
1126 | // Phase Biases
|
---|
1127 | // ------------
|
---|
1128 | struct PhaseBias::PhaseBiasSat* phasebiasSat = 0;
|
---|
1129 | if (!phaseBiasList.isEmpty()) {
|
---|
1130 | if (prn.system() == 'G') {
|
---|
1131 | phasebiasSat = phasebias.Sat
|
---|
1132 | + phasebias.NumberOfSat[CLOCKORBIT_SATGPS];
|
---|
1133 | ++phasebias.NumberOfSat[CLOCKORBIT_SATGPS];
|
---|
1134 | }
|
---|
1135 | else if (prn.system() == 'R') {
|
---|
1136 | phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS
|
---|
1137 | + phasebias.NumberOfSat[CLOCKORBIT_SATGLONASS];
|
---|
1138 | ++phasebias.NumberOfSat[CLOCKORBIT_SATGLONASS];
|
---|
1139 | }
|
---|
1140 | else if (prn.system() == 'E') {
|
---|
1141 | phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS
|
---|
1142 | + CLOCKORBIT_NUMGLONASS
|
---|
1143 | + phasebias.NumberOfSat[CLOCKORBIT_SATGALILEO];
|
---|
1144 | ++phasebias.NumberOfSat[CLOCKORBIT_SATGALILEO];
|
---|
1145 | }
|
---|
1146 | else if (prn.system() == 'J') {
|
---|
1147 | phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS
|
---|
1148 | + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
|
---|
1149 | + phasebias.NumberOfSat[CLOCKORBIT_SATQZSS];
|
---|
1150 | ++phasebias.NumberOfSat[CLOCKORBIT_SATQZSS];
|
---|
1151 | }
|
---|
1152 | else if (prn.system() == 'S') {
|
---|
1153 | phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS
|
---|
1154 | + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
|
---|
1155 | + CLOCKORBIT_NUMQZSS + phasebias.NumberOfSat[CLOCKORBIT_SATSBAS];
|
---|
1156 | ++phasebias.NumberOfSat[CLOCKORBIT_SATSBAS];
|
---|
1157 | }
|
---|
1158 | else if (prn.system() == 'C') {
|
---|
1159 | phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS
|
---|
1160 | + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
|
---|
1161 | + CLOCKORBIT_NUMQZSS + CLOCKORBIT_NUMSBAS
|
---|
1162 | + phasebias.NumberOfSat[CLOCKORBIT_SATBDS];
|
---|
1163 | ++phasebias.NumberOfSat[CLOCKORBIT_SATBDS];
|
---|
1164 | }
|
---|
1165 | }
|
---|
1166 |
|
---|
1167 | if (phasebiasSat) {
|
---|
1168 | phasebias.DispersiveBiasConsistencyIndicator = dispersiveBiasConsistenyIndicator;
|
---|
1169 | phasebias.MWConsistencyIndicator = mwConsistencyIndicator;
|
---|
1170 | phasebiasSat->ID = prn.number();
|
---|
1171 | phasebiasSat->NumberOfPhaseBiases = 0;
|
---|
1172 | phasebiasSat->YawAngle = pbSat.yawAngle;
|
---|
1173 | phasebiasSat->YawRate = pbSat.yawRate;
|
---|
1174 | if (prn.system() == 'G') {
|
---|
1175 | QListIterator<phaseBiasSignal> it(phaseBiasList);
|
---|
1176 | while (it.hasNext()) {
|
---|
1177 | const phaseBiasSignal &pbSig = it.next();
|
---|
1178 | if (pbSig.type == "1C") {
|
---|
1179 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1180 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1181 | break;
|
---|
1182 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1183 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1_CA;
|
---|
1184 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1185 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1186 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1187 | pbSig.wlIndicator;
|
---|
1188 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1189 | pbSig.discontinuityCounter;
|
---|
1190 | }
|
---|
1191 | else if (pbSig.type == "1S") {
|
---|
1192 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1193 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1194 | break;
|
---|
1195 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1196 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1C_D;
|
---|
1197 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1198 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1199 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1200 | pbSig.wlIndicator;
|
---|
1201 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1202 | pbSig.discontinuityCounter;
|
---|
1203 | }
|
---|
1204 | else if (pbSig.type == "1L") {
|
---|
1205 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1206 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1207 | break;
|
---|
1208 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1209 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1C_P;
|
---|
1210 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1211 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1212 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1213 | pbSig.wlIndicator;
|
---|
1214 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1215 | pbSig.discontinuityCounter;
|
---|
1216 | }
|
---|
1217 | else if (pbSig.type == "1X") {
|
---|
1218 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1219 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1220 | break;
|
---|
1221 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1222 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1C_P;
|
---|
1223 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1224 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1225 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1226 | pbSig.wlIndicator;
|
---|
1227 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1228 | pbSig.discontinuityCounter;
|
---|
1229 | }
|
---|
1230 | else if (pbSig.type == "1P") {
|
---|
1231 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1232 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1233 | break;
|
---|
1234 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1235 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1_P;
|
---|
1236 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1237 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1238 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1239 | pbSig.wlIndicator;
|
---|
1240 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1241 | pbSig.discontinuityCounter;
|
---|
1242 | }
|
---|
1243 | else if (pbSig.type == "1W") {
|
---|
1244 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1245 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1246 | break;
|
---|
1247 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1248 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1_Z;
|
---|
1249 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1250 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1251 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1252 | pbSig.wlIndicator;
|
---|
1253 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1254 | pbSig.discontinuityCounter;
|
---|
1255 | }
|
---|
1256 | else if (pbSig.type == "2C") {
|
---|
1257 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1258 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1259 | break;
|
---|
1260 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1261 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2_CA;
|
---|
1262 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1263 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1264 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1265 | pbSig.wlIndicator;
|
---|
1266 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1267 | pbSig.discontinuityCounter;
|
---|
1268 | }
|
---|
1269 | else if (pbSig.type == "2D") {
|
---|
1270 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1271 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1272 | break;
|
---|
1273 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1274 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_SEMI_CODELESS;
|
---|
1275 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1276 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1277 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1278 | pbSig.wlIndicator;
|
---|
1279 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1280 | pbSig.discontinuityCounter;
|
---|
1281 | }
|
---|
1282 | else if (pbSig.type == "2S") {
|
---|
1283 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1284 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1285 | break;
|
---|
1286 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1287 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2_CM;
|
---|
1288 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1289 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1290 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1291 | pbSig.wlIndicator;
|
---|
1292 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1293 | pbSig.discontinuityCounter;
|
---|
1294 | }
|
---|
1295 | else if (pbSig.type == "2L") {
|
---|
1296 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1297 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1298 | break;
|
---|
1299 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1300 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2_CL;
|
---|
1301 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1302 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1303 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1304 | pbSig.wlIndicator;
|
---|
1305 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1306 | pbSig.discontinuityCounter;
|
---|
1307 | }
|
---|
1308 | else if (pbSig.type == "2X") {
|
---|
1309 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1310 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1311 | break;
|
---|
1312 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1313 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2_CML;
|
---|
1314 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1315 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1316 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1317 | pbSig.wlIndicator;
|
---|
1318 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1319 | pbSig.discontinuityCounter;
|
---|
1320 | }
|
---|
1321 | else if (pbSig.type == "2P") {
|
---|
1322 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1323 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1324 | break;
|
---|
1325 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1326 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2_P;
|
---|
1327 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1328 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1329 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1330 | pbSig.wlIndicator;
|
---|
1331 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1332 | pbSig.discontinuityCounter;
|
---|
1333 | }
|
---|
1334 | else if (pbSig.type == "2W") {
|
---|
1335 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1336 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1337 | break;
|
---|
1338 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1339 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2_Z;
|
---|
1340 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1341 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1342 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1343 | pbSig.wlIndicator;
|
---|
1344 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1345 | pbSig.discontinuityCounter;
|
---|
1346 | }
|
---|
1347 | else if (pbSig.type == "5I") {
|
---|
1348 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1349 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1350 | break;
|
---|
1351 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1352 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L5_I;
|
---|
1353 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1354 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1355 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1356 | pbSig.wlIndicator;
|
---|
1357 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1358 | pbSig.discontinuityCounter;
|
---|
1359 | }
|
---|
1360 | else if (pbSig.type == "5Q") {
|
---|
1361 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1362 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1363 | break;
|
---|
1364 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1365 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L5_Q;
|
---|
1366 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1367 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1368 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1369 | pbSig.wlIndicator;
|
---|
1370 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1371 | pbSig.discontinuityCounter;
|
---|
1372 | }
|
---|
1373 | else if (pbSig.type == "5X") {
|
---|
1374 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1375 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1376 | break;
|
---|
1377 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1378 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L5_IQ;
|
---|
1379 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1380 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1381 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1382 | pbSig.wlIndicator;
|
---|
1383 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1384 | pbSig.discontinuityCounter;
|
---|
1385 | }
|
---|
1386 | }
|
---|
1387 | }
|
---|
1388 | if (prn.system() == 'R') {
|
---|
1389 | QListIterator<phaseBiasSignal> it(phaseBiasList);
|
---|
1390 | while (it.hasNext()) {
|
---|
1391 | const phaseBiasSignal &pbSig = it.next();
|
---|
1392 | if (pbSig.type == "1C") {
|
---|
1393 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1394 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1395 | break;
|
---|
1396 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1397 | phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L1_CA;
|
---|
1398 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1399 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1400 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1401 | pbSig.wlIndicator;
|
---|
1402 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1403 | pbSig.discontinuityCounter;
|
---|
1404 | }
|
---|
1405 | else if (pbSig.type == "1P") {
|
---|
1406 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1407 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1408 | break;
|
---|
1409 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1410 | phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L1_P;
|
---|
1411 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1412 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1413 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1414 | pbSig.wlIndicator;
|
---|
1415 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1416 | pbSig.discontinuityCounter;
|
---|
1417 | }
|
---|
1418 | else if (pbSig.type == "2C") {
|
---|
1419 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1420 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1421 | break;
|
---|
1422 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1423 | phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L2_CA;
|
---|
1424 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1425 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1426 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1427 | pbSig.wlIndicator;
|
---|
1428 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1429 | pbSig.discontinuityCounter;
|
---|
1430 | }
|
---|
1431 | else if (pbSig.type == "2P") {
|
---|
1432 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1433 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1434 | break;
|
---|
1435 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1436 | phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L2_P;
|
---|
1437 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1438 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1439 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1440 | pbSig.wlIndicator;
|
---|
1441 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1442 | pbSig.discontinuityCounter;
|
---|
1443 | }
|
---|
1444 | }
|
---|
1445 | }
|
---|
1446 | if (prn.system() == 'E') {
|
---|
1447 | QListIterator<phaseBiasSignal> it(phaseBiasList);
|
---|
1448 | while (it.hasNext()) {
|
---|
1449 | const phaseBiasSignal &pbSig = it.next();
|
---|
1450 | if (pbSig.type == "1A") {
|
---|
1451 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1452 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1453 | break;
|
---|
1454 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1455 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E1_A;
|
---|
1456 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1457 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1458 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1459 | pbSig.wlIndicator;
|
---|
1460 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1461 | pbSig.discontinuityCounter;
|
---|
1462 | }
|
---|
1463 | else if (pbSig.type == "1B") {
|
---|
1464 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1465 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1466 | break;
|
---|
1467 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1468 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E1_B;
|
---|
1469 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1470 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1471 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1472 | pbSig.wlIndicator;
|
---|
1473 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1474 | pbSig.discontinuityCounter;
|
---|
1475 | }
|
---|
1476 | else if (pbSig.type == "1C") {
|
---|
1477 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1478 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1479 | break;
|
---|
1480 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1481 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E1_C;
|
---|
1482 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1483 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1484 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1485 | pbSig.wlIndicator;
|
---|
1486 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1487 | pbSig.discontinuityCounter;
|
---|
1488 | }
|
---|
1489 | else if (pbSig.type == "1X") {
|
---|
1490 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1491 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1492 | break;
|
---|
1493 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1494 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E1_BC;
|
---|
1495 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1496 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1497 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1498 | pbSig.wlIndicator;
|
---|
1499 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1500 | pbSig.discontinuityCounter;
|
---|
1501 | }
|
---|
1502 | else if (pbSig.type == "1Z") {
|
---|
1503 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1504 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1505 | break;
|
---|
1506 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1507 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E1_ABC;
|
---|
1508 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1509 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1510 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1511 | pbSig.wlIndicator;
|
---|
1512 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1513 | pbSig.discontinuityCounter;
|
---|
1514 | }
|
---|
1515 | else if (pbSig.type == "5I") {
|
---|
1516 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1517 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1518 | break;
|
---|
1519 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1520 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_I;
|
---|
1521 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1522 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1523 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1524 | pbSig.wlIndicator;
|
---|
1525 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1526 | pbSig.discontinuityCounter;
|
---|
1527 | }
|
---|
1528 | else if (pbSig.type == "5Q") {
|
---|
1529 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1530 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1531 | break;
|
---|
1532 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1533 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_Q;
|
---|
1534 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1535 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1536 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1537 | pbSig.wlIndicator;
|
---|
1538 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1539 | pbSig.discontinuityCounter;
|
---|
1540 | }
|
---|
1541 | else if (pbSig.type == "5X") {
|
---|
1542 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1543 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1544 | break;
|
---|
1545 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1546 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_IQ;
|
---|
1547 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1548 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1549 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1550 | pbSig.wlIndicator;
|
---|
1551 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1552 | pbSig.discontinuityCounter;
|
---|
1553 | }
|
---|
1554 | else if (pbSig.type == "7I") {
|
---|
1555 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1556 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1557 | break;
|
---|
1558 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1559 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_I;
|
---|
1560 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1561 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1562 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1563 | pbSig.wlIndicator;
|
---|
1564 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1565 | pbSig.discontinuityCounter;
|
---|
1566 | }
|
---|
1567 | else if (pbSig.type == "7Q") {
|
---|
1568 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1569 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1570 | break;
|
---|
1571 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1572 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_Q;
|
---|
1573 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1574 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1575 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1576 | pbSig.wlIndicator;
|
---|
1577 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1578 | pbSig.discontinuityCounter;
|
---|
1579 | }
|
---|
1580 | else if (pbSig.type == "7X") {
|
---|
1581 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1582 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1583 | break;
|
---|
1584 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1585 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_IQ;
|
---|
1586 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1587 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1588 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1589 | pbSig.wlIndicator;
|
---|
1590 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1591 | pbSig.discontinuityCounter;
|
---|
1592 | }
|
---|
1593 | else if (pbSig.type == "8I") {
|
---|
1594 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1595 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1596 | break;
|
---|
1597 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1598 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5_I;
|
---|
1599 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1600 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1601 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1602 | pbSig.wlIndicator;
|
---|
1603 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1604 | pbSig.discontinuityCounter;
|
---|
1605 | }
|
---|
1606 | else if (pbSig.type == "8Q") {
|
---|
1607 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1608 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1609 | break;
|
---|
1610 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1611 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5_Q;
|
---|
1612 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1613 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1614 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1615 | pbSig.wlIndicator;
|
---|
1616 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1617 | pbSig.discontinuityCounter;
|
---|
1618 | }
|
---|
1619 | else if (pbSig.type == "8X") {
|
---|
1620 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1621 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1622 | break;
|
---|
1623 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1624 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5_IQ;
|
---|
1625 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1626 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1627 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1628 | pbSig.wlIndicator;
|
---|
1629 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1630 | pbSig.discontinuityCounter;
|
---|
1631 | }
|
---|
1632 | else if (pbSig.type == "6A") {
|
---|
1633 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1634 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1635 | break;
|
---|
1636 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1637 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E6_A;
|
---|
1638 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1639 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1640 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1641 | pbSig.wlIndicator;
|
---|
1642 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1643 | pbSig.discontinuityCounter;
|
---|
1644 | }
|
---|
1645 | else if (pbSig.type == "6B") {
|
---|
1646 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1647 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1648 | break;
|
---|
1649 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1650 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E6_B;
|
---|
1651 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1652 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1653 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1654 | pbSig.wlIndicator;
|
---|
1655 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1656 | pbSig.discontinuityCounter;
|
---|
1657 | }
|
---|
1658 | else if (pbSig.type == "6C") {
|
---|
1659 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1660 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1661 | break;
|
---|
1662 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1663 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E6_C;
|
---|
1664 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1665 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1666 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1667 | pbSig.wlIndicator;
|
---|
1668 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1669 | pbSig.discontinuityCounter;
|
---|
1670 | }
|
---|
1671 | else if (pbSig.type == "6X") {
|
---|
1672 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1673 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1674 | break;
|
---|
1675 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1676 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E6_BC;
|
---|
1677 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1678 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1679 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1680 | pbSig.wlIndicator;
|
---|
1681 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1682 | pbSig.discontinuityCounter;
|
---|
1683 | }
|
---|
1684 | else if (pbSig.type == "6Z") {
|
---|
1685 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1686 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1687 | break;
|
---|
1688 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1689 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E6_ABC;
|
---|
1690 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1691 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1692 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1693 | pbSig.wlIndicator;
|
---|
1694 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1695 | pbSig.discontinuityCounter;
|
---|
1696 | }
|
---|
1697 | }
|
---|
1698 | }
|
---|
1699 | if (prn.system() == 'J') {
|
---|
1700 | QListIterator<phaseBiasSignal> it(phaseBiasList);
|
---|
1701 | while (it.hasNext()) {
|
---|
1702 | const phaseBiasSignal &pbSig = it.next();
|
---|
1703 | if (pbSig.type == "1C") {
|
---|
1704 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1705 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1706 | break;
|
---|
1707 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1708 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L1_CA;
|
---|
1709 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1710 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1711 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1712 | pbSig.wlIndicator;
|
---|
1713 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1714 | pbSig.discontinuityCounter;
|
---|
1715 | }
|
---|
1716 | else if (pbSig.type == "1S") {
|
---|
1717 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1718 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1719 | break;
|
---|
1720 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1721 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L1C_D;
|
---|
1722 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1723 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1724 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1725 | pbSig.wlIndicator;
|
---|
1726 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1727 | pbSig.discontinuityCounter;
|
---|
1728 | }
|
---|
1729 | else if (pbSig.type == "1L") {
|
---|
1730 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1731 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1732 | break;
|
---|
1733 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1734 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L1C_P;
|
---|
1735 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1736 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1737 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1738 | pbSig.wlIndicator;
|
---|
1739 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1740 | pbSig.discontinuityCounter;
|
---|
1741 | }
|
---|
1742 | else if (pbSig.type == "1X") {
|
---|
1743 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1744 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1745 | break;
|
---|
1746 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1747 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L1C_DP;
|
---|
1748 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1749 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1750 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1751 | pbSig.wlIndicator;
|
---|
1752 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1753 | pbSig.discontinuityCounter;
|
---|
1754 | }
|
---|
1755 | else if (pbSig.type == "2S") {
|
---|
1756 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1757 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1758 | break;
|
---|
1759 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1760 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L2C_M;
|
---|
1761 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1762 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1763 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1764 | pbSig.wlIndicator;
|
---|
1765 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1766 | pbSig.discontinuityCounter;
|
---|
1767 | }
|
---|
1768 | else if (pbSig.type == "2L") {
|
---|
1769 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1770 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1771 | break;
|
---|
1772 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1773 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L2C_L;
|
---|
1774 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1775 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1776 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1777 | pbSig.wlIndicator;
|
---|
1778 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1779 | pbSig.discontinuityCounter;
|
---|
1780 | }
|
---|
1781 | else if (pbSig.type == "2X") {
|
---|
1782 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1783 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1784 | break;
|
---|
1785 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1786 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L2C_ML;
|
---|
1787 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1788 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1789 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1790 | pbSig.wlIndicator;
|
---|
1791 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1792 | pbSig.discontinuityCounter;
|
---|
1793 | }
|
---|
1794 | else if (pbSig.type == "5I") {
|
---|
1795 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1796 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1797 | break;
|
---|
1798 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1799 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L5_I;
|
---|
1800 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1801 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1802 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1803 | pbSig.wlIndicator;
|
---|
1804 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1805 | pbSig.discontinuityCounter;
|
---|
1806 | }
|
---|
1807 | else if (pbSig.type == "5Q") {
|
---|
1808 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1809 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1810 | break;
|
---|
1811 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1812 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L5_Q;
|
---|
1813 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1814 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1815 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1816 | pbSig.wlIndicator;
|
---|
1817 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1818 | pbSig.discontinuityCounter;
|
---|
1819 | }
|
---|
1820 | else if (pbSig.type == "5X") {
|
---|
1821 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1822 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1823 | break;
|
---|
1824 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1825 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L5_IQ;
|
---|
1826 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1827 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1828 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1829 | pbSig.wlIndicator;
|
---|
1830 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1831 | pbSig.discontinuityCounter;
|
---|
1832 | }
|
---|
1833 | else if (pbSig.type == "6S") {
|
---|
1834 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1835 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1836 | break;
|
---|
1837 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1838 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_LEX_S;
|
---|
1839 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1840 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1841 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1842 | pbSig.wlIndicator;
|
---|
1843 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1844 | pbSig.discontinuityCounter;
|
---|
1845 | }
|
---|
1846 | else if (pbSig.type == "6L") {
|
---|
1847 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1848 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1849 | break;
|
---|
1850 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1851 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_LEX_L;
|
---|
1852 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1853 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1854 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1855 | pbSig.wlIndicator;
|
---|
1856 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1857 | pbSig.discontinuityCounter;
|
---|
1858 | }
|
---|
1859 | else if (pbSig.type == "6X") {
|
---|
1860 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1861 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1862 | break;
|
---|
1863 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1864 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_LEX_SL;
|
---|
1865 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1866 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1867 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1868 | pbSig.wlIndicator;
|
---|
1869 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1870 | pbSig.discontinuityCounter;
|
---|
1871 | }
|
---|
1872 | }
|
---|
1873 | }
|
---|
1874 | if (prn.system() == 'S') {
|
---|
1875 | QListIterator<phaseBiasSignal> it(phaseBiasList);
|
---|
1876 | while (it.hasNext()) {
|
---|
1877 | const phaseBiasSignal &pbSig = it.next();
|
---|
1878 | if (pbSig.type == "1C") {
|
---|
1879 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1880 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1881 | break;
|
---|
1882 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1883 | phasebiasSat->Biases[ii].Type = CODETYPE_SBAS_L1_CA;
|
---|
1884 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1885 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1886 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1887 | pbSig.wlIndicator;
|
---|
1888 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1889 | pbSig.discontinuityCounter;
|
---|
1890 | }
|
---|
1891 | else if (pbSig.type == "5I") {
|
---|
1892 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1893 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1894 | break;
|
---|
1895 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1896 | phasebiasSat->Biases[ii].Type = CODETYPE_SBAS_L5_I;
|
---|
1897 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1898 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1899 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1900 | pbSig.wlIndicator;
|
---|
1901 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1902 | pbSig.discontinuityCounter;
|
---|
1903 | }
|
---|
1904 | else if (pbSig.type == "5Q") {
|
---|
1905 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1906 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1907 | break;
|
---|
1908 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1909 | phasebiasSat->Biases[ii].Type = CODETYPE_SBAS_L5_Q;
|
---|
1910 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1911 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1912 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1913 | pbSig.wlIndicator;
|
---|
1914 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1915 | pbSig.discontinuityCounter;
|
---|
1916 | }
|
---|
1917 | else if (pbSig.type == "5X") {
|
---|
1918 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1919 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1920 | break;
|
---|
1921 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1922 | phasebiasSat->Biases[ii].Type = CODETYPE_SBAS_L5_IQ;
|
---|
1923 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1924 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1925 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1926 | pbSig.wlIndicator;
|
---|
1927 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1928 | pbSig.discontinuityCounter;
|
---|
1929 | }
|
---|
1930 | }
|
---|
1931 | }
|
---|
1932 | if (prn.system() == 'C') {
|
---|
1933 | QListIterator<phaseBiasSignal> it(phaseBiasList);
|
---|
1934 | while (it.hasNext()) {
|
---|
1935 | const phaseBiasSignal &pbSig = it.next();
|
---|
1936 | if (pbSig.type == "2I") {
|
---|
1937 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1938 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1939 | break;
|
---|
1940 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1941 | phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1_I;
|
---|
1942 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1943 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1944 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1945 | pbSig.wlIndicator;
|
---|
1946 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1947 | pbSig.discontinuityCounter;
|
---|
1948 | }
|
---|
1949 | else if (pbSig.type == "2Q") {
|
---|
1950 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1951 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1952 | break;
|
---|
1953 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1954 | phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1_Q;
|
---|
1955 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1956 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1957 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1958 | pbSig.wlIndicator;
|
---|
1959 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1960 | pbSig.discontinuityCounter;
|
---|
1961 | }
|
---|
1962 | else if (pbSig.type == "2X") {
|
---|
1963 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1964 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1965 | break;
|
---|
1966 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1967 | phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1_IQ;
|
---|
1968 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1969 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1970 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1971 | pbSig.wlIndicator;
|
---|
1972 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1973 | pbSig.discontinuityCounter;
|
---|
1974 | }
|
---|
1975 | else if (pbSig.type == "6I") {
|
---|
1976 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1977 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1978 | break;
|
---|
1979 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1980 | phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B3_I;
|
---|
1981 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1982 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1983 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1984 | pbSig.wlIndicator;
|
---|
1985 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1986 | pbSig.discontinuityCounter;
|
---|
1987 | }
|
---|
1988 | else if (pbSig.type == "6Q") {
|
---|
1989 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
1990 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
1991 | break;
|
---|
1992 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
1993 | phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B3_Q;
|
---|
1994 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
1995 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
1996 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
1997 | pbSig.wlIndicator;
|
---|
1998 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
1999 | pbSig.discontinuityCounter;
|
---|
2000 | }
|
---|
2001 | else if (pbSig.type == "6X") {
|
---|
2002 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
2003 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
2004 | break;
|
---|
2005 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
2006 | phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B3_IQ;
|
---|
2007 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
2008 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
2009 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
2010 | pbSig.wlIndicator;
|
---|
2011 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
2012 | pbSig.discontinuityCounter;
|
---|
2013 | }
|
---|
2014 | else if (pbSig.type == "7I") {
|
---|
2015 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
2016 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
2017 | break;
|
---|
2018 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
2019 | phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B2_I;
|
---|
2020 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
2021 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
2022 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
2023 | pbSig.wlIndicator;
|
---|
2024 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
2025 | pbSig.discontinuityCounter;
|
---|
2026 | }
|
---|
2027 | else if (pbSig.type == "7Q") {
|
---|
2028 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
2029 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
2030 | break;
|
---|
2031 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
2032 | phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B2_Q;
|
---|
2033 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
2034 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
2035 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
2036 | pbSig.wlIndicator;
|
---|
2037 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
2038 | pbSig.discontinuityCounter;
|
---|
2039 | }
|
---|
2040 | else if (pbSig.type == "7X") {
|
---|
2041 | int ii = phasebiasSat->NumberOfPhaseBiases;
|
---|
2042 | if (ii >= CLOCKORBIT_NUMBIAS)
|
---|
2043 | break;
|
---|
2044 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
2045 | phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B2_IQ;
|
---|
2046 | phasebiasSat->Biases[ii].Bias = pbSig.bias;
|
---|
2047 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
|
---|
2048 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator =
|
---|
2049 | pbSig.wlIndicator;
|
---|
2050 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter =
|
---|
2051 | pbSig.discontinuityCounter;
|
---|
2052 | }
|
---|
2053 | }
|
---|
2054 | }
|
---|
2055 | }
|
---|
2056 | }
|
---|
2057 | }
|
---|
2058 |
|
---|
2059 | QByteArray hlpBufferCo;
|
---|
2060 |
|
---|
2061 | // Orbit and Clock Corrections together
|
---|
2062 | // ------------------------------------
|
---|
2063 | if (_samplRtcmEphCorr == 0.0) {
|
---|
2064 | if (co.NumberOfSat[CLOCKORBIT_SATGPS] > 0
|
---|
2065 | || co.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0
|
---|
2066 | || co.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0
|
---|
2067 | || co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0
|
---|
2068 | || co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0
|
---|
2069 | || co.NumberOfSat[CLOCKORBIT_SATBDS] > 0) {
|
---|
2070 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
2071 | int len = MakeClockOrbit(&co, COTYPE_AUTO, 0, obuffer, sizeof(obuffer));
|
---|
2072 | if (len > 0) {
|
---|
2073 | hlpBufferCo = QByteArray(obuffer, len);
|
---|
2074 | }
|
---|
2075 | }
|
---|
2076 | }
|
---|
2077 |
|
---|
2078 | // Orbit and Clock Corrections separately
|
---|
2079 | // --------------------------------------
|
---|
2080 | else {
|
---|
2081 | if (co.NumberOfSat[CLOCKORBIT_SATGPS] > 0) {
|
---|
2082 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
2083 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
2084 | co.UpdateInterval = ephUpdInd;
|
---|
2085 | int len1 = MakeClockOrbit(&co, COTYPE_GPSORBIT, 1, obuffer,
|
---|
2086 | sizeof(obuffer));
|
---|
2087 | co.UpdateInterval = clkUpdInd;
|
---|
2088 | if (len1 > 0) {
|
---|
2089 | hlpBufferCo += QByteArray(obuffer, len1);
|
---|
2090 | }
|
---|
2091 | }
|
---|
2092 | int mmsg = (co.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0) ? 1 : 0;
|
---|
2093 | int len2 = MakeClockOrbit(&co, COTYPE_GPSCLOCK, mmsg, obuffer,
|
---|
2094 | sizeof(obuffer));
|
---|
2095 | if (len2 > 0) {
|
---|
2096 | hlpBufferCo += QByteArray(obuffer, len2);
|
---|
2097 | }
|
---|
2098 | }
|
---|
2099 | if (co.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0) {
|
---|
2100 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
2101 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
2102 | co.UpdateInterval = ephUpdInd;
|
---|
2103 | int len1 = MakeClockOrbit(&co, COTYPE_GLONASSORBIT, 1, obuffer,
|
---|
2104 | sizeof(obuffer));
|
---|
2105 | co.UpdateInterval = clkUpdInd;
|
---|
2106 | if (len1 > 0) {
|
---|
2107 | hlpBufferCo += QByteArray(obuffer, len1);
|
---|
2108 | }
|
---|
2109 | }
|
---|
2110 | int mmsg = (co.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0) ? 1 : 0;
|
---|
2111 | int len2 = MakeClockOrbit(&co, COTYPE_GLONASSCLOCK, mmsg, obuffer,
|
---|
2112 | sizeof(obuffer));
|
---|
2113 | if (len2 > 0) {
|
---|
2114 | hlpBufferCo += QByteArray(obuffer, len2);
|
---|
2115 | }
|
---|
2116 | }
|
---|
2117 | if (co.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0) {
|
---|
2118 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
2119 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
2120 | co.UpdateInterval = ephUpdInd;
|
---|
2121 | int len1 = MakeClockOrbit(&co, COTYPE_GALILEOORBIT, 1, obuffer,
|
---|
2122 | sizeof(obuffer));
|
---|
2123 | co.UpdateInterval = clkUpdInd;
|
---|
2124 | if (len1 > 0) {
|
---|
2125 | hlpBufferCo += QByteArray(obuffer, len1);
|
---|
2126 | }
|
---|
2127 | }
|
---|
2128 | int mmsg = (co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0) ? 1 : 0;
|
---|
2129 | int len2 = MakeClockOrbit(&co, COTYPE_GALILEOCLOCK, mmsg, obuffer,
|
---|
2130 | sizeof(obuffer));
|
---|
2131 | if (len2 > 0) {
|
---|
2132 | hlpBufferCo += QByteArray(obuffer, len2);
|
---|
2133 | }
|
---|
2134 | }
|
---|
2135 | if (co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0) {
|
---|
2136 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
2137 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
2138 | co.UpdateInterval = ephUpdInd;
|
---|
2139 | int len1 = MakeClockOrbit(&co, COTYPE_QZSSORBIT, 1, obuffer,
|
---|
2140 | sizeof(obuffer));
|
---|
2141 | co.UpdateInterval = clkUpdInd;
|
---|
2142 | if (len1 > 0) {
|
---|
2143 | hlpBufferCo += QByteArray(obuffer, len1);
|
---|
2144 | }
|
---|
2145 | }
|
---|
2146 | int mmsg = (co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0) ? 1 : 0;
|
---|
2147 | int len2 = MakeClockOrbit(&co, COTYPE_QZSSCLOCK, mmsg, obuffer,
|
---|
2148 | sizeof(obuffer));
|
---|
2149 | if (len2 > 0) {
|
---|
2150 | hlpBufferCo += QByteArray(obuffer, len2);
|
---|
2151 | }
|
---|
2152 | }
|
---|
2153 | if (co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0) {
|
---|
2154 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
2155 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
2156 | co.UpdateInterval = ephUpdInd;
|
---|
2157 | int len1 = MakeClockOrbit(&co, COTYPE_SBASORBIT, 1, obuffer,
|
---|
2158 | sizeof(obuffer));
|
---|
2159 | co.UpdateInterval = clkUpdInd;
|
---|
2160 | if (len1 > 0) {
|
---|
2161 | hlpBufferCo += QByteArray(obuffer, len1);
|
---|
2162 | }
|
---|
2163 | }
|
---|
2164 | int mmsg = (co.NumberOfSat[CLOCKORBIT_SATBDS] > 0) ? 1 : 0;
|
---|
2165 | int len2 = MakeClockOrbit(&co, COTYPE_SBASCLOCK, mmsg, obuffer,
|
---|
2166 | sizeof(obuffer));
|
---|
2167 | if (len2 > 0) {
|
---|
2168 | hlpBufferCo += QByteArray(obuffer, len2);
|
---|
2169 | }
|
---|
2170 | }
|
---|
2171 | if (co.NumberOfSat[CLOCKORBIT_SATBDS] > 0) {
|
---|
2172 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
2173 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
2174 | co.UpdateInterval = ephUpdInd;
|
---|
2175 | int len1 = MakeClockOrbit(&co, COTYPE_BDSORBIT, 1, obuffer,
|
---|
2176 | sizeof(obuffer));
|
---|
2177 | co.UpdateInterval = clkUpdInd;
|
---|
2178 | if (len1 > 0) {
|
---|
2179 | hlpBufferCo += QByteArray(obuffer, len1);
|
---|
2180 | }
|
---|
2181 | }
|
---|
2182 | int len2 = MakeClockOrbit(&co, COTYPE_BDSCLOCK, 0, obuffer,
|
---|
2183 | sizeof(obuffer));
|
---|
2184 | if (len2 > 0) {
|
---|
2185 | hlpBufferCo += QByteArray(obuffer, len2);
|
---|
2186 | }
|
---|
2187 | }
|
---|
2188 | }
|
---|
2189 |
|
---|
2190 | // Code Biases
|
---|
2191 | // -----------
|
---|
2192 | QByteArray hlpBufferBias;
|
---|
2193 | if (bias.NumberOfSat[CLOCKORBIT_SATGPS] > 0
|
---|
2194 | || bias.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0
|
---|
2195 | || bias.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0
|
---|
2196 | || bias.NumberOfSat[CLOCKORBIT_SATQZSS] > 0
|
---|
2197 | || bias.NumberOfSat[CLOCKORBIT_SATSBAS] > 0
|
---|
2198 | || bias.NumberOfSat[CLOCKORBIT_SATBDS] > 0) {
|
---|
2199 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
2200 | int len = MakeCodeBias(&bias, BTYPE_AUTO, 0, obuffer, sizeof(obuffer));
|
---|
2201 | if (len > 0) {
|
---|
2202 | hlpBufferBias = QByteArray(obuffer, len);
|
---|
2203 | }
|
---|
2204 | }
|
---|
2205 |
|
---|
2206 | // Phase Biases
|
---|
2207 | // ------------
|
---|
2208 | QByteArray hlpBufferPhaseBias;
|
---|
2209 | if (phasebias.NumberOfSat[CLOCKORBIT_SATGPS] > 0
|
---|
2210 | || phasebias.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0
|
---|
2211 | || phasebias.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0
|
---|
2212 | || phasebias.NumberOfSat[CLOCKORBIT_SATQZSS] > 0
|
---|
2213 | || phasebias.NumberOfSat[CLOCKORBIT_SATSBAS] > 0
|
---|
2214 | || phasebias.NumberOfSat[CLOCKORBIT_SATBDS] > 0) {
|
---|
2215 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
2216 | int len = MakePhaseBias(&phasebias, PBTYPE_AUTO, 0, obuffer,
|
---|
2217 | sizeof(obuffer));
|
---|
2218 | if (len > 0) {
|
---|
2219 | hlpBufferPhaseBias = QByteArray(obuffer, len);
|
---|
2220 | }
|
---|
2221 | }
|
---|
2222 |
|
---|
2223 | // VTEC
|
---|
2224 | // ----
|
---|
2225 | QByteArray hlpBufferVtec;
|
---|
2226 | if (vtec.NumLayers > 0) {
|
---|
2227 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
2228 | int len = MakeVTEC(&vtec, 0, obuffer, sizeof(obuffer));
|
---|
2229 | if (len > 0) {
|
---|
2230 | hlpBufferVtec = QByteArray(obuffer, len);
|
---|
2231 | }
|
---|
2232 | }
|
---|
2233 |
|
---|
2234 | _outBuffer += hlpBufferCo + hlpBufferBias + hlpBufferPhaseBias
|
---|
2235 | + hlpBufferVtec;
|
---|
2236 | }
|
---|
2237 |
|
---|
2238 | //
|
---|
2239 | ////////////////////////////////////////////////////////////////////////////
|
---|
2240 | void bncRtnetUploadCaster::processSatellite(const t_eph* eph, int GPSweek,
|
---|
2241 | double GPSweeks, const QString& prn, const ColumnVector& rtnAPC,
|
---|
2242 | double rtnClk, const ColumnVector& rtnVel, const ColumnVector& rtnCoM,
|
---|
2243 | struct ClockOrbit::SatData* sd, QString& outLine) {
|
---|
2244 |
|
---|
2245 | // Broadcast Position and Velocity
|
---|
2246 | // -------------------------------
|
---|
2247 | ColumnVector xB(4);
|
---|
2248 | ColumnVector vB(3);
|
---|
2249 | eph->getCrd(bncTime(GPSweek, GPSweeks), xB, vB, false);
|
---|
2250 |
|
---|
2251 | // Precise Position
|
---|
2252 | // ----------------
|
---|
2253 | ColumnVector xP = _CoM ? rtnCoM : rtnAPC;
|
---|
2254 |
|
---|
2255 | double dc = 0.0;
|
---|
2256 | if (_crdTrafo != "IGS14") {
|
---|
2257 | crdTrafo(GPSweek, xP, dc);
|
---|
2258 | }
|
---|
2259 |
|
---|
2260 | // Difference in xyz
|
---|
2261 | // -----------------
|
---|
2262 | ColumnVector dx = xB.Rows(1, 3) - xP;
|
---|
2263 | ColumnVector dv = vB - rtnVel;
|
---|
2264 |
|
---|
2265 | // Difference in RSW
|
---|
2266 | // -----------------
|
---|
2267 | ColumnVector rsw(3);
|
---|
2268 | XYZ_to_RSW(xB.Rows(1, 3), vB, dx, rsw);
|
---|
2269 |
|
---|
2270 | ColumnVector dotRsw(3);
|
---|
2271 | XYZ_to_RSW(xB.Rows(1, 3), vB, dv, dotRsw);
|
---|
2272 |
|
---|
2273 | // Clock Correction
|
---|
2274 | // ----------------
|
---|
2275 | double dClk = rtnClk - (xB(4) - dc) * t_CST::c;
|
---|
2276 |
|
---|
2277 | if (sd) {
|
---|
2278 | sd->ID = prn.mid(1).toInt();
|
---|
2279 | sd->IOD = eph->IOD();
|
---|
2280 | sd->Clock.DeltaA0 = dClk;
|
---|
2281 | sd->Clock.DeltaA1 = 0.0; // TODO
|
---|
2282 | sd->Clock.DeltaA2 = 0.0; // TODO
|
---|
2283 | sd->Orbit.DeltaRadial = rsw(1);
|
---|
2284 | sd->Orbit.DeltaAlongTrack = rsw(2);
|
---|
2285 | sd->Orbit.DeltaCrossTrack = rsw(3);
|
---|
2286 | sd->Orbit.DotDeltaRadial = dotRsw(1);
|
---|
2287 | sd->Orbit.DotDeltaAlongTrack = dotRsw(2);
|
---|
2288 | sd->Orbit.DotDeltaCrossTrack = dotRsw(3);
|
---|
2289 | }
|
---|
2290 |
|
---|
2291 | outLine.sprintf("%d %.1f %s %u %10.3f %8.3f %8.3f %8.3f\n", GPSweek,
|
---|
2292 | GPSweeks, eph->prn().toString().c_str(), eph->IOD(), dClk, rsw(1), rsw(2),
|
---|
2293 | rsw(3));
|
---|
2294 |
|
---|
2295 | double relativity = -2.0 * DotProduct(xP, rtnVel) / t_CST::c;
|
---|
2296 | double sp3Clk = (rtnClk - relativity) / t_CST::c; // in seconds
|
---|
2297 |
|
---|
2298 | if (_rnx) {
|
---|
2299 | _rnx->write(GPSweek, GPSweeks, prn, sp3Clk);
|
---|
2300 | }
|
---|
2301 | if (_sp3) {
|
---|
2302 | _sp3->write(GPSweek, GPSweeks, prn, rtnCoM, sp3Clk);
|
---|
2303 | }
|
---|
2304 | }
|
---|
2305 |
|
---|
2306 | // Transform Coordinates
|
---|
2307 | ////////////////////////////////////////////////////////////////////////////
|
---|
2308 | void bncRtnetUploadCaster::crdTrafo(int GPSWeek, ColumnVector& xyz,
|
---|
2309 | double& dc) {
|
---|
2310 |
|
---|
2311 | // Current epoch minus 2000.0 in years
|
---|
2312 | // ------------------------------------
|
---|
2313 | double dt = (GPSWeek - (1042.0 + 6.0 / 7.0)) / 365.2422 * 7.0 + 2000.0 - _t0;
|
---|
2314 |
|
---|
2315 | ColumnVector dx(3);
|
---|
2316 |
|
---|
2317 | dx(1) = _dx + dt * _dxr;
|
---|
2318 | dx(2) = _dy + dt * _dyr;
|
---|
2319 | dx(3) = _dz + dt * _dzr;
|
---|
2320 |
|
---|
2321 | static const double arcSec = 180.0 * 3600.0 / M_PI;
|
---|
2322 |
|
---|
2323 | double ox = (_ox + dt * _oxr) / arcSec;
|
---|
2324 | double oy = (_oy + dt * _oyr) / arcSec;
|
---|
2325 | double oz = (_oz + dt * _ozr) / arcSec;
|
---|
2326 |
|
---|
2327 | double sc = 1.0 + _sc * 1e-9 + dt * _scr * 1e-9;
|
---|
2328 |
|
---|
2329 | // Specify approximate center of area
|
---|
2330 | // ----------------------------------
|
---|
2331 | ColumnVector meanSta(3);
|
---|
2332 |
|
---|
2333 | if (_crdTrafo == "ETRF2000") {
|
---|
2334 | meanSta(1) = 3661090.0;
|
---|
2335 | meanSta(2) = 845230.0;
|
---|
2336 | meanSta(3) = 5136850.0;
|
---|
2337 | }
|
---|
2338 | else if (_crdTrafo == "GDA2020") {
|
---|
2339 | meanSta(1) = -4052050.0;
|
---|
2340 | meanSta(2) = 4212840.0;
|
---|
2341 | meanSta(3) = -2545110.0;
|
---|
2342 | }
|
---|
2343 | else if (_crdTrafo == "SIRGAS2000") {
|
---|
2344 | meanSta(1) = 3740860.0;
|
---|
2345 | meanSta(2) = -4964290.0;
|
---|
2346 | meanSta(3) = -1425420.0;
|
---|
2347 | }
|
---|
2348 | else if (_crdTrafo == "DREF91") {
|
---|
2349 | meanSta(1) = 3959579.0;
|
---|
2350 | meanSta(2) = 721719.0;
|
---|
2351 | meanSta(3) = 4931539.0;
|
---|
2352 | }
|
---|
2353 | else if (_crdTrafo == "Custom") {
|
---|
2354 | meanSta(1) = 0.0; // TODO
|
---|
2355 | meanSta(2) = 0.0; // TODO
|
---|
2356 | meanSta(3) = 0.0; // TODO
|
---|
2357 | }
|
---|
2358 |
|
---|
2359 | // Clock correction proportional to topocentric distance to satellites
|
---|
2360 | // -------------------------------------------------------------------
|
---|
2361 | double rho = (xyz - meanSta).norm_Frobenius();
|
---|
2362 | dc = rho * (sc - 1.0) / sc / t_CST::c;
|
---|
2363 |
|
---|
2364 | Matrix rMat(3, 3);
|
---|
2365 | rMat(1, 1) = 1.0;
|
---|
2366 | rMat(1, 2) = -oz;
|
---|
2367 | rMat(1, 3) = oy;
|
---|
2368 | rMat(2, 1) = oz;
|
---|
2369 | rMat(2, 2) = 1.0;
|
---|
2370 | rMat(2, 3) = -ox;
|
---|
2371 | rMat(3, 1) = -oy;
|
---|
2372 | rMat(3, 2) = ox;
|
---|
2373 | rMat(3, 3) = 1.0;
|
---|
2374 |
|
---|
2375 | xyz = sc * rMat * xyz + dx;
|
---|
2376 | }
|
---|
2377 |
|
---|
2378 | int bncRtnetUploadCaster::determineUpdateInd(double samplingRate) {
|
---|
2379 |
|
---|
2380 | if (samplingRate == 10.0) {
|
---|
2381 | return 3;
|
---|
2382 | }
|
---|
2383 | else if (samplingRate == 15.0) {
|
---|
2384 | return 4;
|
---|
2385 | }
|
---|
2386 | else if (samplingRate == 30.0) {
|
---|
2387 | return 5;
|
---|
2388 | }
|
---|
2389 | else if (samplingRate == 60.0) {
|
---|
2390 | return 6;
|
---|
2391 | }
|
---|
2392 | else if (samplingRate == 120.0) {
|
---|
2393 | return 7;
|
---|
2394 | }
|
---|
2395 | else if (samplingRate == 240.0) {
|
---|
2396 | return 8;
|
---|
2397 | }
|
---|
2398 | else if (samplingRate == 300.0) {
|
---|
2399 | return 9;
|
---|
2400 | }
|
---|
2401 | else if (samplingRate == 600.0) {
|
---|
2402 | return 10;
|
---|
2403 | }
|
---|
2404 | else if (samplingRate == 900.0) {
|
---|
2405 | return 11;
|
---|
2406 | }
|
---|
2407 | else if (samplingRate == 1800.0) {
|
---|
2408 | return 12;
|
---|
2409 | }
|
---|
2410 | else if (samplingRate == 3600.0) {
|
---|
2411 | return 13;
|
---|
2412 | }
|
---|
2413 | else if (samplingRate == 7200.0) {
|
---|
2414 | return 14;
|
---|
2415 | }
|
---|
2416 | else if (samplingRate == 10800.0) {
|
---|
2417 | return 15;
|
---|
2418 | }
|
---|
2419 | return 2; // default
|
---|
2420 | }
|
---|