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

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

log file output is extended

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