source: ntrip/branches/BNC_2.12/src/upload/bncrtnetuploadcaster.cpp@ 8438

Last change on this file since 8438 was 8411, checked in by stuerze, 6 years ago

updated transformation parameters for ITRF2014 => DREF91 and ITRF2014 => ETRF2000

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