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