source: ntrip/trunk/BNC/src/upload/bncrtnetuploadcaster.cpp@ 8403

Last change on this file since 8403 was 8361, checked in by stuerze, 7 years ago

log file output is extended

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