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

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

the latest changes regarding SSR Satellite ID for BDS and SBAS are reverted because it is planned to prevent zero for these SSR Satellite IDs

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