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

Last change on this file since 8204 was 8204, checked in by wiese, 6 years ago

CHANGE: #105 toAscii deprecated

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