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

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

some further updates regarding ITRF2014

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