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

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

consideration of DF range 0-63 for SSR Satellite IDs as defined in DF463, DF466 (first BDS or SBAS satellite is 0)

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