[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 |
|
---|
| 25 | using namespace std;
|
---|
| 26 |
|
---|
| 27 | // Constructor
|
---|
| 28 | ////////////////////////////////////////////////////////////////////////////
|
---|
[3224] | 29 | bncRtnetUploadCaster::bncRtnetUploadCaster(const QString& mountpoint,
|
---|
[3222] | 30 | const QString& outHost, int outPort,
|
---|
[5662] | 31 | const QString& password,
|
---|
| 32 | const QString& crdTrafo, bool CoM,
|
---|
[3222] | 33 | const QString& sp3FileName,
|
---|
| 34 | const QString& rnxFileName,
|
---|
[4111] | 35 | int PID, int SID, int IOD, int iRow) :
|
---|
[3273] | 36 | bncUploadCaster(mountpoint, outHost, outPort, password, iRow, 0) {
|
---|
[3224] | 37 |
|
---|
[5130] | 38 | if (!outHost.isEmpty()) {
|
---|
| 39 | _casterID += outHost;
|
---|
| 40 | }
|
---|
| 41 | if (!crdTrafo.isEmpty()) {
|
---|
| 42 | _casterID += " " + crdTrafo;
|
---|
| 43 | }
|
---|
| 44 | if (!sp3FileName.isEmpty()) {
|
---|
| 45 | _casterID += " " + sp3FileName;
|
---|
| 46 | }
|
---|
| 47 | if (!rnxFileName.isEmpty()) {
|
---|
| 48 | _casterID += " " + rnxFileName;
|
---|
| 49 | }
|
---|
| 50 |
|
---|
[3222] | 51 | _crdTrafo = crdTrafo;
|
---|
| 52 | _CoM = CoM;
|
---|
[4111] | 53 | _PID = PID;
|
---|
| 54 | _SID = SID;
|
---|
| 55 | _IOD = IOD;
|
---|
[3222] | 56 |
|
---|
[3224] | 57 | // Member that receives the ephemeris
|
---|
| 58 | // ----------------------------------
|
---|
[6441] | 59 | _ephUser = new bncEphUser(true);
|
---|
[3222] | 60 |
|
---|
[3272] | 61 | bncSettings settings;
|
---|
| 62 | QString intr = settings.value("uploadIntr").toString();
|
---|
[6559] | 63 | QStringList hlp = settings.value("combineStreams").toStringList();
|
---|
| 64 | _samplRtcmEphCorr = settings.value("uploadSamplRtcmEphCorr").toDouble();
|
---|
| 65 | if (hlp.size() > 1) { // combination stream upload
|
---|
[6557] | 66 | _samplRtcmClkCorr = settings.value("cmbSampl").toInt();
|
---|
| 67 | } else { // single stream upload or sp3 file generation
|
---|
| 68 | _samplRtcmClkCorr = 5; // default
|
---|
| 69 | }
|
---|
| 70 | int samplClkRnx = settings.value("uploadSamplClkRnx").toInt();
|
---|
| 71 | int samplSp3 = settings.value("uploadSamplSp3").toInt() * 60;
|
---|
[4174] | 72 |
|
---|
| 73 | if (_samplRtcmEphCorr == 0.0) {
|
---|
[3753] | 74 | _usedEph = 0;
|
---|
| 75 | }
|
---|
| 76 | else {
|
---|
[6442] | 77 | _usedEph = new QMap<QString, const t_eph*>;
|
---|
[3753] | 78 | }
|
---|
[3272] | 79 |
|
---|
[3222] | 80 | // RINEX writer
|
---|
| 81 | // ------------
|
---|
| 82 | if (!rnxFileName.isEmpty()) {
|
---|
[4174] | 83 | _rnx = new bncClockRinex(rnxFileName, intr, samplClkRnx);
|
---|
[3222] | 84 | }
|
---|
| 85 | else {
|
---|
| 86 | _rnx = 0;
|
---|
| 87 | }
|
---|
| 88 |
|
---|
| 89 | // SP3 writer
|
---|
| 90 | // ----------
|
---|
| 91 | if (!sp3FileName.isEmpty()) {
|
---|
[4174] | 92 | _sp3 = new bncSP3(sp3FileName, intr, samplSp3);
|
---|
[3222] | 93 | }
|
---|
| 94 | else {
|
---|
| 95 | _sp3 = 0;
|
---|
| 96 | }
|
---|
| 97 |
|
---|
| 98 | // Set Transformation Parameters
|
---|
| 99 | // -----------------------------
|
---|
| 100 | if (_crdTrafo == "ETRF2000") {
|
---|
[3890] | 101 | _dx = 0.0521;
|
---|
| 102 | _dy = 0.0493;
|
---|
| 103 | _dz = -0.0585;
|
---|
| 104 | _dxr = 0.0001;
|
---|
[3222] | 105 | _dyr = 0.0001;
|
---|
| 106 | _dzr = -0.0018;
|
---|
| 107 | _ox = 0.000891;
|
---|
| 108 | _oy = 0.005390;
|
---|
| 109 | _oz = -0.008712;
|
---|
| 110 | _oxr = 0.000081;
|
---|
| 111 | _oyr = 0.000490;
|
---|
| 112 | _ozr = -0.000792;
|
---|
[3890] | 113 | _sc = 1.34;
|
---|
[3222] | 114 | _scr = 0.08;
|
---|
| 115 | _t0 = 2000.0;
|
---|
| 116 | }
|
---|
| 117 | else if (_crdTrafo == "NAD83") {
|
---|
[5345] | 118 | _dx = 0.99343;
|
---|
| 119 | _dy = -1.90331;
|
---|
| 120 | _dz = -0.52655;
|
---|
| 121 | _dxr = 0.00079;
|
---|
| 122 | _dyr = -0.00060;
|
---|
| 123 | _dzr = -0.00134;
|
---|
| 124 | _ox = -0.02591467;
|
---|
| 125 | _oy = -0.00942645;
|
---|
| 126 | _oz = -0.01159935;
|
---|
| 127 | _oxr = -0.00006667;
|
---|
| 128 | _oyr = 0.00075744;
|
---|
| 129 | _ozr = 0.00005133;
|
---|
| 130 | _sc = 1.71504;
|
---|
[5348] | 131 | _scr = -0.10201;
|
---|
[5345] | 132 | _t0 = 1997.0;
|
---|
[3222] | 133 | }
|
---|
| 134 | else if (_crdTrafo == "GDA94") {
|
---|
[4963] | 135 | _dx = -0.08468;
|
---|
| 136 | _dy = -0.01942;
|
---|
| 137 | _dz = 0.03201;
|
---|
| 138 | _dxr = 0.00142;
|
---|
| 139 | _dyr = 0.00134;
|
---|
| 140 | _dzr = 0.00090;
|
---|
| 141 | _ox = 0.0004254;
|
---|
| 142 | _oy = -0.0022578;
|
---|
| 143 | _oz = -0.0024015;
|
---|
| 144 | _oxr = -0.0015461;
|
---|
| 145 | _oyr = -0.0011820;
|
---|
| 146 | _ozr = -0.0011551;
|
---|
| 147 | _sc = 9.710;
|
---|
| 148 | _scr = 0.109;
|
---|
[3222] | 149 | _t0 = 1994.0;
|
---|
| 150 | }
|
---|
| 151 | else if (_crdTrafo == "SIRGAS2000") {
|
---|
[4956] | 152 | _dx = 0.0020;
|
---|
| 153 | _dy = 0.0041;
|
---|
| 154 | _dz = 0.0039;
|
---|
[3222] | 155 | _dxr = 0.0000;
|
---|
| 156 | _dyr = 0.0000;
|
---|
| 157 | _dzr = 0.0000;
|
---|
[4956] | 158 | _ox = 0.000170;
|
---|
| 159 | _oy = -0.000030;
|
---|
| 160 | _oz = 0.000070;
|
---|
[3222] | 161 | _oxr = 0.000000;
|
---|
| 162 | _oyr = 0.000000;
|
---|
| 163 | _ozr = 0.000000;
|
---|
[5662] | 164 | _sc = -1.000;
|
---|
[3222] | 165 | _scr = 0.000;
|
---|
| 166 | _t0 = 0000.0;
|
---|
| 167 | }
|
---|
| 168 | else if (_crdTrafo == "SIRGAS95") {
|
---|
| 169 | _dx = 0.0077;
|
---|
| 170 | _dy = 0.0058;
|
---|
| 171 | _dz = -0.0138;
|
---|
| 172 | _dxr = 0.0000;
|
---|
| 173 | _dyr = 0.0000;
|
---|
| 174 | _dzr = 0.0000;
|
---|
| 175 | _ox = 0.000000;
|
---|
| 176 | _oy = 0.000000;
|
---|
| 177 | _oz = -0.000030;
|
---|
| 178 | _oxr = 0.000000;
|
---|
| 179 | _oyr = 0.000000;
|
---|
| 180 | _ozr = 0.000000;
|
---|
| 181 | _sc = 1.570;
|
---|
| 182 | _scr = 0.000;
|
---|
| 183 | _t0 = 0000.0;
|
---|
| 184 | }
|
---|
[5347] | 185 | else if (_crdTrafo == "DREF91") {
|
---|
[5340] | 186 | _dx = -0.0118;
|
---|
| 187 | _dy = 0.1432;
|
---|
| 188 | _dz = -0.1117;
|
---|
| 189 | _dxr = 0.0001;
|
---|
| 190 | _dyr = 0.0001;
|
---|
| 191 | _dzr = -0.0018;
|
---|
| 192 | _ox = 0.003291;
|
---|
| 193 | _oy = 0.006190;
|
---|
| 194 | _oz = -0.011012;
|
---|
| 195 | _oxr = 0.000081;
|
---|
| 196 | _oyr = 0.000490;
|
---|
| 197 | _ozr = -0.000792;
|
---|
| 198 | _sc = 12.24;
|
---|
| 199 | _scr = 0.08;
|
---|
| 200 | _t0 = 2000.0;
|
---|
| 201 | }
|
---|
[3222] | 202 | else if (_crdTrafo == "Custom") {
|
---|
| 203 | _dx = settings.value("trafo_dx").toDouble();
|
---|
| 204 | _dy = settings.value("trafo_dy").toDouble();
|
---|
| 205 | _dz = settings.value("trafo_dz").toDouble();
|
---|
| 206 | _dxr = settings.value("trafo_dxr").toDouble();
|
---|
| 207 | _dyr = settings.value("trafo_dyr").toDouble();
|
---|
| 208 | _dzr = settings.value("trafo_dzr").toDouble();
|
---|
| 209 | _ox = settings.value("trafo_ox").toDouble();
|
---|
| 210 | _oy = settings.value("trafo_oy").toDouble();
|
---|
| 211 | _oz = settings.value("trafo_oz").toDouble();
|
---|
| 212 | _oxr = settings.value("trafo_oxr").toDouble();
|
---|
| 213 | _oyr = settings.value("trafo_oyr").toDouble();
|
---|
| 214 | _ozr = settings.value("trafo_ozr").toDouble();
|
---|
| 215 | _sc = settings.value("trafo_sc").toDouble();
|
---|
| 216 | _scr = settings.value("trafo_scr").toDouble();
|
---|
| 217 | _t0 = settings.value("trafo_t0").toDouble();
|
---|
| 218 | }
|
---|
| 219 | }
|
---|
| 220 |
|
---|
| 221 | // Destructor
|
---|
| 222 | ////////////////////////////////////////////////////////////////////////////
|
---|
[3224] | 223 | bncRtnetUploadCaster::~bncRtnetUploadCaster() {
|
---|
[3222] | 224 | if (isRunning()) {
|
---|
| 225 | wait();
|
---|
| 226 | }
|
---|
| 227 | delete _rnx;
|
---|
| 228 | delete _sp3;
|
---|
| 229 | delete _ephUser;
|
---|
[3753] | 230 | delete _usedEph;
|
---|
[3222] | 231 | }
|
---|
| 232 |
|
---|
[5662] | 233 | //
|
---|
[3222] | 234 | ////////////////////////////////////////////////////////////////////////////
|
---|
[3224] | 235 | void bncRtnetUploadCaster::decodeRtnetStream(char* buffer, int bufLen) {
|
---|
[5662] | 236 |
|
---|
[3222] | 237 | QMutexLocker locker(&_mutex);
|
---|
| 238 |
|
---|
[3230] | 239 | // Append to internal buffer
|
---|
| 240 | // -------------------------
|
---|
[3222] | 241 | _rtnetStreamBuffer.append(QByteArray(buffer, bufLen));
|
---|
[3230] | 242 |
|
---|
| 243 | // Select buffer part that contains last epoch
|
---|
| 244 | // -------------------------------------------
|
---|
| 245 | QStringList lines;
|
---|
| 246 | int iEpoBeg = _rtnetStreamBuffer.lastIndexOf('*'); // begin of last epoch
|
---|
| 247 | if (iEpoBeg == -1) {
|
---|
[3226] | 248 | _rtnetStreamBuffer.clear();
|
---|
| 249 | return;
|
---|
[3222] | 250 | }
|
---|
[3230] | 251 | _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoBeg);
|
---|
| 252 |
|
---|
| 253 | int iEpoEnd = _rtnetStreamBuffer.lastIndexOf("EOE"); // end of last epoch
|
---|
| 254 | if (iEpoEnd == -1) {
|
---|
| 255 | return;
|
---|
| 256 | }
|
---|
[3226] | 257 | else {
|
---|
[3230] | 258 | lines = _rtnetStreamBuffer.left(iEpoEnd).split('\n', QString::SkipEmptyParts);
|
---|
| 259 | _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoEnd+3);
|
---|
[3226] | 260 | }
|
---|
[3222] | 261 |
|
---|
[3226] | 262 | if (lines.size() < 2) {
|
---|
[3222] | 263 | return;
|
---|
| 264 | }
|
---|
| 265 |
|
---|
[3226] | 266 | // Keep the last unfinished line in buffer
|
---|
| 267 | // ---------------------------------------
|
---|
| 268 | int iLastEOL = _rtnetStreamBuffer.lastIndexOf('\n');
|
---|
| 269 | if (iLastEOL != -1) {
|
---|
| 270 | _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iLastEOL+1);
|
---|
| 271 | }
|
---|
| 272 |
|
---|
| 273 | // Read first line (with epoch time)
|
---|
| 274 | // ---------------------------------
|
---|
| 275 | QTextStream in(lines[0].toAscii());
|
---|
| 276 | QString hlp;
|
---|
| 277 | int year, month, day, hour, min;
|
---|
| 278 | double sec;
|
---|
| 279 | in >> hlp >> year >> month >> day >> hour >> min >> sec;
|
---|
| 280 | bncTime epoTime; epoTime.set( year, month, day, hour, min, sec);
|
---|
| 281 |
|
---|
[5662] | 282 | emit(newMessage("bncRtnetUploadCaster: decode " +
|
---|
[5131] | 283 | QByteArray(epoTime.datestr().c_str()) + " " +
|
---|
[5662] | 284 | QByteArray(epoTime.timestr().c_str()) + " " +
|
---|
[5132] | 285 | _casterID.toAscii(), false));
|
---|
[4808] | 286 |
|
---|
[3222] | 287 | struct ClockOrbit co;
|
---|
| 288 | memset(&co, 0, sizeof(co));
|
---|
[5672] | 289 | co.EpochTime[CLOCKORBIT_SATGPS] = static_cast<int>(epoTime.gpssec());
|
---|
| 290 | double gt = epoTime.gpssec() + 3 * 3600 - gnumleap(year, month, day);
|
---|
| 291 | co.EpochTime[CLOCKORBIT_SATGLONASS] = static_cast<int>(fmod(gt, 86400.0));
|
---|
[6846] | 292 | co.EpochTime[CLOCKORBIT_SATGALILEO] = static_cast<int>(epoTime.gpssec());
|
---|
| 293 | co.EpochTime[CLOCKORBIT_SATQZSS] = static_cast<int>(epoTime.gpssec());
|
---|
| 294 | co.EpochTime[CLOCKORBIT_SATSBAS] = static_cast<int>(epoTime.gpssec());
|
---|
| 295 | co.EpochTime[CLOCKORBIT_SATBDS] = static_cast<int>(epoTime.bdssec());
|
---|
[5666] | 296 | co.Supplied[COBOFS_CLOCK] = 1;
|
---|
| 297 | co.Supplied[COBOFS_ORBIT] = 1;
|
---|
[6850] | 298 | co.SatRefDatum = DATUM_ITRF;
|
---|
| 299 | co.SSRIOD = _IOD;
|
---|
| 300 | co.SSRProviderID = _PID; // 256 .. BKG, 257 ... EUREF
|
---|
| 301 | co.SSRSolutionID = _SID;
|
---|
[5662] | 302 |
|
---|
[5666] | 303 | struct CodeBias bias;
|
---|
[3222] | 304 | memset(&bias, 0, sizeof(bias));
|
---|
[5666] | 305 | bias.EpochTime[CLOCKORBIT_SATGPS] = co.EpochTime[CLOCKORBIT_SATGPS];
|
---|
| 306 | bias.EpochTime[CLOCKORBIT_SATGLONASS] = co.EpochTime[CLOCKORBIT_SATGLONASS];
|
---|
[6846] | 307 | bias.EpochTime[CLOCKORBIT_SATGALILEO] = co.EpochTime[CLOCKORBIT_SATGALILEO];
|
---|
| 308 | bias.EpochTime[CLOCKORBIT_SATQZSS] = co.EpochTime[CLOCKORBIT_SATQZSS];
|
---|
| 309 | bias.EpochTime[CLOCKORBIT_SATSBAS] = co.EpochTime[CLOCKORBIT_SATSBAS];
|
---|
| 310 | bias.EpochTime[CLOCKORBIT_SATBDS] = co.EpochTime[CLOCKORBIT_SATBDS];
|
---|
[6850] | 311 | bias.SSRIOD = _IOD;
|
---|
| 312 | bias.SSRProviderID = _PID;
|
---|
| 313 | bias.SSRSolutionID = _SID;
|
---|
[5662] | 314 |
|
---|
[6850] | 315 | struct PhaseBias phasebias;
|
---|
| 316 | memset(&phasebias, 0, sizeof(phasebias));
|
---|
| 317 | phasebias.EpochTime[CLOCKORBIT_SATGPS] = co.EpochTime[CLOCKORBIT_SATGPS];
|
---|
| 318 | phasebias.EpochTime[CLOCKORBIT_SATGLONASS] = co.EpochTime[CLOCKORBIT_SATGLONASS];
|
---|
| 319 | phasebias.EpochTime[CLOCKORBIT_SATGALILEO] = co.EpochTime[CLOCKORBIT_SATGALILEO];
|
---|
| 320 | phasebias.EpochTime[CLOCKORBIT_SATQZSS] = co.EpochTime[CLOCKORBIT_SATQZSS];
|
---|
| 321 | phasebias.EpochTime[CLOCKORBIT_SATSBAS] = co.EpochTime[CLOCKORBIT_SATSBAS];
|
---|
| 322 | phasebias.EpochTime[CLOCKORBIT_SATBDS] = co.EpochTime[CLOCKORBIT_SATBDS];
|
---|
| 323 | phasebias.SSRIOD = _IOD;
|
---|
| 324 | phasebias.SSRProviderID = _PID;
|
---|
| 325 | phasebias.SSRSolutionID = _SID;
|
---|
| 326 |
|
---|
[4753] | 327 | // Default Update Interval
|
---|
| 328 | // -----------------------
|
---|
[4754] | 329 | int clkUpdInd = 2; // 5 sec
|
---|
| 330 | int ephUpdInd = clkUpdInd; // default
|
---|
[6557] | 331 |
|
---|
[6559] | 332 | if (_samplRtcmClkCorr > 5.0 && _samplRtcmEphCorr <= 5.0) { // combined orb and clock
|
---|
| 333 | ephUpdInd = determineUpdateInd(_samplRtcmClkCorr);
|
---|
[4754] | 334 | }
|
---|
[6559] | 335 | if (_samplRtcmClkCorr > 5.0) {
|
---|
[6557] | 336 | clkUpdInd = determineUpdateInd(_samplRtcmClkCorr);
|
---|
[4754] | 337 | }
|
---|
[6559] | 338 | if (_samplRtcmEphCorr > 5.0) {
|
---|
| 339 | ephUpdInd = determineUpdateInd(_samplRtcmEphCorr);
|
---|
| 340 | }
|
---|
[4753] | 341 |
|
---|
[4754] | 342 | co.UpdateInterval = clkUpdInd;
|
---|
| 343 | bias.UpdateInterval = clkUpdInd;
|
---|
[6850] | 344 | phasebias.UpdateInterval = clkUpdInd;
|
---|
[4753] | 345 |
|
---|
[3226] | 346 | for (int ii = 1; ii < lines.size(); ii++) {
|
---|
[5662] | 347 |
|
---|
[3222] | 348 | QString prn;
|
---|
[4991] | 349 | ColumnVector rtnAPC;
|
---|
| 350 | ColumnVector rtnVel;
|
---|
| 351 | ColumnVector rtnCoM;
|
---|
| 352 | double rtnClk;
|
---|
[5662] | 353 |
|
---|
[3222] | 354 | QTextStream in(lines[ii].toAscii());
|
---|
| 355 |
|
---|
| 356 | in >> prn;
|
---|
| 357 |
|
---|
[6442] | 358 | const t_eph* ephLast = _ephUser->ephLast(prn);
|
---|
| 359 | const t_eph* ephPrev = _ephUser->ephPrev(prn);
|
---|
| 360 | const t_eph* eph = ephLast;
|
---|
[3222] | 361 |
|
---|
[6442] | 362 | if (eph) {
|
---|
[3754] | 363 |
|
---|
[4098] | 364 | // Use previous ephemeris if the last one is too recent
|
---|
| 365 | // ----------------------------------------------------
|
---|
| 366 | const int MINAGE = 60; // seconds
|
---|
[6442] | 367 | if (ephPrev && eph->receptDateTime().isValid() &&
|
---|
[4098] | 368 | eph->receptDateTime().secsTo(currentDateAndTimeGPS()) < MINAGE) {
|
---|
[6442] | 369 | eph = ephPrev;
|
---|
[4098] | 370 | }
|
---|
[3754] | 371 |
|
---|
[3753] | 372 | // Make sure the clock messages refer to same IOD as orbit messages
|
---|
| 373 | // ----------------------------------------------------------------
|
---|
| 374 | if (_usedEph) {
|
---|
[4174] | 375 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
[3753] | 376 | (*_usedEph)[prn] = eph;
|
---|
| 377 | }
|
---|
| 378 | else {
|
---|
| 379 | eph = 0;
|
---|
| 380 | if (_usedEph->contains(prn)) {
|
---|
[6442] | 381 | const t_eph* usedEph = _usedEph->value(prn);
|
---|
| 382 | if (usedEph == ephLast) {
|
---|
| 383 | eph = ephLast;
|
---|
[3753] | 384 | }
|
---|
[6442] | 385 | else if (usedEph == ephPrev) {
|
---|
| 386 | eph = ephPrev;
|
---|
[3753] | 387 | }
|
---|
| 388 | }
|
---|
| 389 | }
|
---|
| 390 | }
|
---|
| 391 | }
|
---|
| 392 |
|
---|
| 393 | if (eph) {
|
---|
| 394 |
|
---|
[5503] | 395 | QMap<QString, double> codeBiases;
|
---|
| 396 |
|
---|
[6850] | 397 | QVector<phaseBiasSignal*> pbSig(0);
|
---|
| 398 |
|
---|
[4991] | 399 | while (true) {
|
---|
| 400 | QString key;
|
---|
| 401 | int numVal = 0;
|
---|
[6850] | 402 | in >> key;
|
---|
[4991] | 403 | if (in.status() != QTextStream::Ok) {
|
---|
| 404 | break;
|
---|
| 405 | }
|
---|
| 406 | if (key == "APC") {
|
---|
[6850] | 407 | in >> numVal;
|
---|
[4991] | 408 | rtnAPC.ReSize(3);
|
---|
[6850] | 409 | for (int ii = 0; ii < numVal; ii++) {
|
---|
| 410 | in >> rtnAPC[ii];
|
---|
| 411 | }
|
---|
[4991] | 412 | }
|
---|
| 413 | else if (key == "Clk") {
|
---|
[6850] | 414 | in >> numVal;
|
---|
| 415 | if (numVal ==1)
|
---|
| 416 | in >> rtnClk;
|
---|
[4991] | 417 | }
|
---|
| 418 | else if (key == "Vel") {
|
---|
| 419 | rtnVel.ReSize(3);
|
---|
[6850] | 420 | in >> numVal;
|
---|
| 421 | for (int ii = 0; ii < numVal; ii++) {
|
---|
| 422 | in >> rtnVel[ii];
|
---|
| 423 | }
|
---|
[4991] | 424 | }
|
---|
| 425 | else if (key == "CoM") {
|
---|
| 426 | rtnCoM.ReSize(3);
|
---|
[6850] | 427 | in >> numVal;
|
---|
| 428 | for (int ii = 0; ii < numVal; ii++) {
|
---|
| 429 | in >> rtnCoM[ii];
|
---|
| 430 | }
|
---|
[4991] | 431 | }
|
---|
[5503] | 432 | else if (key == "CodeBias") {
|
---|
[6850] | 433 | in >> numVal;
|
---|
[5503] | 434 | for (int ii = 0; ii < numVal; ii++) {
|
---|
| 435 | QString type;
|
---|
| 436 | double value;
|
---|
| 437 | in >> type >> value;
|
---|
| 438 | codeBiases[type] = value;
|
---|
| 439 | }
|
---|
| 440 | }
|
---|
[6850] | 441 | else if (key == "PhaseBias") {
|
---|
| 442 | phaseBiasesSat pbSat;
|
---|
| 443 | in >> pbSat.yA >> pbSat.yR >> pbSat.dispInd >> pbSat.MWInd;
|
---|
| 444 | in >> numVal;
|
---|
| 445 | pbSig.resize(numVal);
|
---|
| 446 | for (int ii = 0; ii < numVal; ii++) {
|
---|
| 447 | in >> pbSig[ii]->type >> pbSig[ii]->bias >> pbSig[ii]->intInd
|
---|
| 448 | >> pbSig[ii]->WLInd >> pbSig[ii]->discCount;
|
---|
| 449 | }
|
---|
| 450 | }
|
---|
[4991] | 451 | else {
|
---|
| 452 | for (int ii = 0; ii < numVal; ii++) {
|
---|
| 453 | double dummy;
|
---|
| 454 | in >> dummy;
|
---|
| 455 | }
|
---|
| 456 | }
|
---|
[5662] | 457 | }
|
---|
[6850] | 458 |
|
---|
[3222] | 459 | struct ClockOrbit::SatData* sd = 0;
|
---|
| 460 | if (prn[0] == 'G') {
|
---|
[5666] | 461 | sd = co.Sat + co.NumberOfSat[CLOCKORBIT_SATGPS];
|
---|
| 462 | ++co.NumberOfSat[CLOCKORBIT_SATGPS];
|
---|
[3222] | 463 | }
|
---|
| 464 | else if (prn[0] == 'R') {
|
---|
[6844] | 465 | sd = co.Sat + CLOCKORBIT_NUMGPS
|
---|
| 466 | + co.NumberOfSat[CLOCKORBIT_SATGLONASS];
|
---|
[5666] | 467 | ++co.NumberOfSat[CLOCKORBIT_SATGLONASS];
|
---|
[3222] | 468 | }
|
---|
[6844] | 469 | else if (prn[0] == 'E') {
|
---|
| 470 | sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
|
---|
| 471 | + co.NumberOfSat[CLOCKORBIT_SATGALILEO];
|
---|
| 472 | ++co.NumberOfSat[CLOCKORBIT_SATGALILEO];
|
---|
| 473 | }
|
---|
| 474 | else if (prn[0] == 'J') {
|
---|
| 475 | sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
|
---|
| 476 | + co.NumberOfSat[CLOCKORBIT_SATQZSS];
|
---|
| 477 | ++co.NumberOfSat[CLOCKORBIT_SATQZSS];
|
---|
| 478 | }
|
---|
| 479 | else if (prn[0] == 'S') {
|
---|
| 480 | sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
|
---|
| 481 | + CLOCKORBIT_NUMQZSS
|
---|
| 482 | + co.NumberOfSat[CLOCKORBIT_SATSBAS];
|
---|
| 483 | ++co.NumberOfSat[CLOCKORBIT_SATSBAS];
|
---|
| 484 | }
|
---|
| 485 | else if (prn[0] == 'C') {
|
---|
| 486 | sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
|
---|
| 487 | + CLOCKORBIT_NUMQZSS + CLOCKORBIT_NUMSBAS
|
---|
| 488 | + co.NumberOfSat[CLOCKORBIT_SATBDS];
|
---|
| 489 | ++co.NumberOfSat[CLOCKORBIT_SATBDS];
|
---|
| 490 | }
|
---|
[3222] | 491 | if (sd) {
|
---|
| 492 | QString outLine;
|
---|
[5662] | 493 | processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prn,
|
---|
[4991] | 494 | rtnAPC, rtnClk, rtnVel, rtnCoM, sd, outLine);
|
---|
[3222] | 495 | }
|
---|
[5662] | 496 |
|
---|
[6850] | 497 | // Code Biases
|
---|
| 498 | // -----------
|
---|
[5666] | 499 | struct CodeBias::BiasSat* biasSat = 0;
|
---|
[3222] | 500 | if (prn[0] == 'G') {
|
---|
[5666] | 501 | biasSat = bias.Sat + bias.NumberOfSat[CLOCKORBIT_SATGPS];
|
---|
| 502 | ++bias.NumberOfSat[CLOCKORBIT_SATGPS];
|
---|
[3222] | 503 | }
|
---|
| 504 | else if (prn[0] == 'R') {
|
---|
[6844] | 505 | biasSat = bias.Sat + CLOCKORBIT_NUMGPS
|
---|
| 506 | + bias.NumberOfSat[CLOCKORBIT_SATGLONASS];
|
---|
[5666] | 507 | ++bias.NumberOfSat[CLOCKORBIT_SATGLONASS];
|
---|
[3222] | 508 | }
|
---|
[6844] | 509 | else if (prn[0] == 'E') {
|
---|
| 510 | biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
|
---|
| 511 | + bias.NumberOfSat[CLOCKORBIT_SATGALILEO];
|
---|
| 512 | ++bias.NumberOfSat[CLOCKORBIT_SATGALILEO];
|
---|
| 513 | }
|
---|
| 514 | else if (prn[0] == 'J') {
|
---|
| 515 | biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
|
---|
| 516 | + bias.NumberOfSat[CLOCKORBIT_SATQZSS];
|
---|
| 517 | ++bias.NumberOfSat[CLOCKORBIT_SATQZSS];
|
---|
| 518 | }
|
---|
| 519 | else if (prn[0] == 'S') {
|
---|
| 520 | biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
|
---|
| 521 | + CLOCKORBIT_NUMQZSS
|
---|
| 522 | + bias.NumberOfSat[CLOCKORBIT_SATSBAS];
|
---|
| 523 | ++bias.NumberOfSat[CLOCKORBIT_SATSBAS];
|
---|
| 524 | }
|
---|
| 525 | else if (prn[0] == 'C') {
|
---|
| 526 | biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
|
---|
| 527 | + CLOCKORBIT_NUMQZSS + CLOCKORBIT_NUMSBAS
|
---|
| 528 | + bias.NumberOfSat[CLOCKORBIT_SATBDS];
|
---|
| 529 | ++bias.NumberOfSat[CLOCKORBIT_SATBDS];
|
---|
| 530 | }
|
---|
[5662] | 531 |
|
---|
[3222] | 532 | if (biasSat) {
|
---|
| 533 | biasSat->ID = prn.mid(1).toInt();
|
---|
[5503] | 534 | biasSat->NumberOfCodeBiases = 0;
|
---|
[3222] | 535 | if (prn[0] == 'G') {
|
---|
[5503] | 536 | QMapIterator<QString, double> it(codeBiases);
|
---|
| 537 | while (it.hasNext()) {
|
---|
| 538 | it.next();
|
---|
[5504] | 539 | if (it.key() == "1C") {
|
---|
[5503] | 540 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 541 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 542 | biasSat->Biases[ii].Type = CODETYPEGPS_L1_CA;
|
---|
| 543 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 544 | }
|
---|
[5504] | 545 | else if (it.key() == "1P") {
|
---|
[5503] | 546 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 547 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 548 | biasSat->Biases[ii].Type = CODETYPEGPS_L1_P;
|
---|
| 549 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 550 | }
|
---|
[5504] | 551 | else if (it.key() == "1W") {
|
---|
[5503] | 552 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 553 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 554 | biasSat->Biases[ii].Type = CODETYPEGPS_L1_Z;
|
---|
| 555 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 556 | }
|
---|
[5504] | 557 | else if (it.key() == "2C") {
|
---|
[5503] | 558 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 559 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 560 | biasSat->Biases[ii].Type = CODETYPEGPS_L2_CA;
|
---|
| 561 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 562 | }
|
---|
[5504] | 563 | else if (it.key() == "2D") {
|
---|
[5503] | 564 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 565 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 566 | biasSat->Biases[ii].Type = CODETYPEGPS_SEMI_CODELESS;
|
---|
| 567 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 568 | }
|
---|
[5504] | 569 | else if (it.key() == "2S") {
|
---|
[5503] | 570 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 571 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 572 | biasSat->Biases[ii].Type = CODETYPEGPS_L2_CM;
|
---|
| 573 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 574 | }
|
---|
[5504] | 575 | else if (it.key() == "2L") {
|
---|
[5503] | 576 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 577 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 578 | biasSat->Biases[ii].Type = CODETYPEGPS_L2_CL;
|
---|
| 579 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 580 | }
|
---|
[5504] | 581 | else if (it.key() == "2X") {
|
---|
[5503] | 582 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 583 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 584 | biasSat->Biases[ii].Type = CODETYPEGPS_L2_CML;
|
---|
| 585 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 586 | }
|
---|
[5504] | 587 | else if (it.key() == "2P") {
|
---|
[5503] | 588 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 589 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 590 | biasSat->Biases[ii].Type = CODETYPEGPS_L2_P;
|
---|
| 591 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 592 | }
|
---|
[5510] | 593 | else if (it.key() == "2W") {
|
---|
[5503] | 594 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 595 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 596 | biasSat->Biases[ii].Type = CODETYPEGPS_L2_Z;
|
---|
| 597 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 598 | }
|
---|
[5504] | 599 | else if (it.key() == "5I") {
|
---|
[5503] | 600 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 601 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 602 | biasSat->Biases[ii].Type = CODETYPEGPS_L5_I;
|
---|
| 603 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 604 | }
|
---|
[5504] | 605 | else if (it.key() == "5Q") {
|
---|
[5503] | 606 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 607 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 608 | biasSat->Biases[ii].Type = CODETYPEGPS_L5_Q;
|
---|
| 609 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 610 | }
|
---|
[6844] | 611 | else if (it.key() == "5X") {
|
---|
| 612 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 613 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 614 | biasSat->Biases[ii].Type = CODETYPEGPS_L5_IQ;
|
---|
| 615 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 616 | }
|
---|
[5503] | 617 | }
|
---|
[3222] | 618 | }
|
---|
| 619 | else if (prn[0] == 'R') {
|
---|
[5503] | 620 | QMapIterator<QString, double> it(codeBiases);
|
---|
| 621 | while (it.hasNext()) {
|
---|
| 622 | it.next();
|
---|
[5504] | 623 | if (it.key() == "1C") {
|
---|
[5503] | 624 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 625 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 626 | biasSat->Biases[ii].Type = CODETYPEGLONASS_L1_CA;
|
---|
| 627 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 628 | }
|
---|
[5504] | 629 | else if (it.key() == "1P") {
|
---|
[5503] | 630 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 631 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 632 | biasSat->Biases[ii].Type = CODETYPEGLONASS_L1_P;
|
---|
| 633 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 634 | }
|
---|
[5504] | 635 | else if (it.key() == "2C") {
|
---|
[5503] | 636 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 637 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 638 | biasSat->Biases[ii].Type = CODETYPEGLONASS_L2_CA;
|
---|
| 639 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 640 | }
|
---|
[5504] | 641 | else if (it.key() == "2P") {
|
---|
[5503] | 642 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 643 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 644 | biasSat->Biases[ii].Type = CODETYPEGLONASS_L2_P;
|
---|
| 645 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 646 | }
|
---|
| 647 | }
|
---|
[3222] | 648 | }
|
---|
[6844] | 649 | else if (prn[0] == 'E') {
|
---|
| 650 | QMapIterator<QString, double> it(codeBiases);
|
---|
| 651 | while (it.hasNext()) {
|
---|
| 652 | it.next();
|
---|
| 653 | if (it.key() == "1A") {
|
---|
| 654 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 655 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 656 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E1_A;
|
---|
| 657 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 658 | }
|
---|
| 659 | else if (it.key() == "1B") {
|
---|
| 660 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 661 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 662 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E1_B;
|
---|
| 663 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 664 | }
|
---|
| 665 | else if (it.key() == "1C") {
|
---|
| 666 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 667 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 668 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E1_C;
|
---|
| 669 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 670 | }
|
---|
| 671 | else if (it.key() == "5I") {
|
---|
| 672 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 673 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 674 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_I;
|
---|
| 675 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 676 | }
|
---|
| 677 | else if (it.key() == "5Q") {
|
---|
| 678 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 679 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 680 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_Q;
|
---|
| 681 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 682 | }
|
---|
| 683 | else if (it.key() == "7I") {
|
---|
| 684 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 685 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 686 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_I;
|
---|
| 687 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 688 | }
|
---|
| 689 | else if (it.key() == "7Q") {
|
---|
| 690 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 691 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 692 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_Q;
|
---|
| 693 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 694 | }
|
---|
| 695 | else if (it.key() == "8I") {
|
---|
| 696 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 697 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 698 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5_I;
|
---|
| 699 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 700 | }
|
---|
| 701 | else if (it.key() == "8Q") {
|
---|
| 702 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 703 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 704 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5_Q;
|
---|
| 705 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 706 | }
|
---|
| 707 | else if (it.key() == "6A") {
|
---|
| 708 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 709 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 710 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E6_A;
|
---|
| 711 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 712 | }
|
---|
| 713 | else if (it.key() == "6B") {
|
---|
| 714 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 715 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 716 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E6_B;
|
---|
| 717 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 718 | }
|
---|
| 719 | else if (it.key() == "6C") {
|
---|
| 720 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 721 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 722 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E6_C;
|
---|
| 723 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 724 | }
|
---|
| 725 | }
|
---|
| 726 | }
|
---|
| 727 | else if (prn[0] == 'J') {
|
---|
| 728 | QMapIterator<QString, double> it(codeBiases);
|
---|
| 729 | while (it.hasNext()) {
|
---|
| 730 | it.next();
|
---|
| 731 | if (it.key() == "1C") {
|
---|
| 732 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 733 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 734 | biasSat->Biases[ii].Type = CODETYPEQZSS_L1_CA;
|
---|
| 735 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 736 | }
|
---|
| 737 | else if (it.key() == "1S") {
|
---|
| 738 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 739 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 740 | biasSat->Biases[ii].Type = CODETYPEQZSS_L1C_D;
|
---|
| 741 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 742 | }
|
---|
| 743 | else if (it.key() == "1L") {
|
---|
| 744 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 745 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 746 | biasSat->Biases[ii].Type = CODETYPEQZSS_L1C_P;
|
---|
| 747 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 748 | }
|
---|
| 749 | else if (it.key() == "1X") {
|
---|
| 750 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 751 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 752 | biasSat->Biases[ii].Type = CODETYPEQZSS_L1C_DP;
|
---|
| 753 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 754 | }
|
---|
| 755 | else if (it.key() == "2S") {
|
---|
| 756 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 757 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 758 | biasSat->Biases[ii].Type = CODETYPEQZSS_L2_CM;
|
---|
| 759 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 760 | }
|
---|
| 761 | else if (it.key() == "2L") {
|
---|
| 762 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 763 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 764 | biasSat->Biases[ii].Type = CODETYPEQZSS_L2_CL;
|
---|
| 765 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 766 | }
|
---|
| 767 | else if (it.key() == "2X") {
|
---|
| 768 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 769 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 770 | biasSat->Biases[ii].Type = CODETYPEQZSS_L2_CML;
|
---|
| 771 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 772 | }
|
---|
| 773 | else if (it.key() == "5I") {
|
---|
| 774 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 775 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 776 | biasSat->Biases[ii].Type = CODETYPEQZSS_L5_I;
|
---|
| 777 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 778 | }
|
---|
| 779 | else if (it.key() == "5Q") {
|
---|
| 780 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 781 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 782 | biasSat->Biases[ii].Type = CODETYPEQZSS_L5_Q;
|
---|
| 783 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 784 | }
|
---|
| 785 | else if (it.key() == "5X") {
|
---|
| 786 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 787 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 788 | biasSat->Biases[ii].Type = CODETYPEQZSS_L5_IQ;
|
---|
| 789 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 790 | }
|
---|
| 791 | else if (it.key() == "6S") {
|
---|
| 792 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 793 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 794 | biasSat->Biases[ii].Type = CODETYPEQZSS_LEX_S;
|
---|
| 795 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 796 | }
|
---|
| 797 | else if (it.key() == "6L") {
|
---|
| 798 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 799 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 800 | biasSat->Biases[ii].Type = CODETYPEQZSS_LEX_L;
|
---|
| 801 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 802 | }
|
---|
| 803 | else if (it.key() == "6X") {
|
---|
| 804 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 805 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 806 | biasSat->Biases[ii].Type = CODETYPEQZSS_LEX_SL;
|
---|
| 807 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 808 | }
|
---|
| 809 | }
|
---|
| 810 | }
|
---|
| 811 | else if (prn[0] == 'S') {
|
---|
| 812 | QMapIterator<QString, double> it(codeBiases);
|
---|
| 813 | while (it.hasNext()) {
|
---|
| 814 | it.next();
|
---|
| 815 | if (it.key() == "1C") {
|
---|
| 816 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 817 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 818 | biasSat->Biases[ii].Type = CODETYPE_SBAS_L1_CA;
|
---|
| 819 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 820 | }
|
---|
| 821 | else if (it.key() == "5I") {
|
---|
| 822 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 823 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 824 | biasSat->Biases[ii].Type = CODETYPE_SBAS_L5_I;
|
---|
| 825 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 826 | }
|
---|
| 827 | else if (it.key() == "5Q") {
|
---|
| 828 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 829 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 830 | biasSat->Biases[ii].Type = CODETYPE_SBAS_L5_Q;
|
---|
| 831 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 832 | }
|
---|
| 833 | else if (it.key() == "5X") {
|
---|
| 834 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 835 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 836 | biasSat->Biases[ii].Type = CODETYPE_SBAS_L5_IQ;
|
---|
| 837 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 838 | }
|
---|
| 839 | }
|
---|
| 840 | }
|
---|
| 841 | else if (prn[0] == 'C') {
|
---|
| 842 | QMapIterator<QString, double> it(codeBiases);
|
---|
| 843 | while (it.hasNext()) {
|
---|
| 844 | it.next();
|
---|
| 845 | if (it.key() == "2I") {
|
---|
| 846 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 847 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 848 | biasSat->Biases[ii].Type = CODETYPE_BDS_B1_I;
|
---|
| 849 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 850 | }
|
---|
| 851 | else if (it.key() == "2Q") {
|
---|
| 852 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 853 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 854 | biasSat->Biases[ii].Type = CODETYPE_BDS_B1_Q;
|
---|
| 855 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 856 | }
|
---|
| 857 | else if (it.key() == "2X") {
|
---|
| 858 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 859 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 860 | biasSat->Biases[ii].Type = CODETYPE_BDS_B1_IQ;
|
---|
| 861 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 862 | }
|
---|
| 863 | else if (it.key() == "6I") {
|
---|
| 864 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 865 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 866 | biasSat->Biases[ii].Type = CODETYPE_BDS_B3_I;
|
---|
| 867 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 868 | }
|
---|
| 869 | else if (it.key() == "6Q") {
|
---|
| 870 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 871 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 872 | biasSat->Biases[ii].Type = CODETYPE_BDS_B3_Q;
|
---|
| 873 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 874 | }
|
---|
| 875 | else if (it.key() == "6X") {
|
---|
| 876 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 877 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 878 | biasSat->Biases[ii].Type = CODETYPE_BDS_B3_IQ;
|
---|
| 879 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 880 | }
|
---|
| 881 | else if (it.key() == "7I") {
|
---|
| 882 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 883 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 884 | biasSat->Biases[ii].Type = CODETYPE_BDS_B2_I;
|
---|
| 885 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 886 | }
|
---|
| 887 | else if (it.key() == "7Q") {
|
---|
| 888 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 889 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 890 | biasSat->Biases[ii].Type = CODETYPE_BDS_B2_Q;
|
---|
| 891 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 892 | }
|
---|
| 893 | else if (it.key() == "7X") {
|
---|
| 894 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 895 | biasSat->NumberOfCodeBiases += 1;
|
---|
| 896 | biasSat->Biases[ii].Type = CODETYPE_BDS_B2_IQ;
|
---|
| 897 | biasSat->Biases[ii].Bias = it.value();
|
---|
| 898 | }
|
---|
| 899 | }
|
---|
| 900 | }
|
---|
[3222] | 901 | }
|
---|
[6850] | 902 | // Phase Biases
|
---|
| 903 | // ------------
|
---|
| 904 | struct PhaseBias::PhaseBiasSat* phasebiasSat = 0;
|
---|
| 905 | if (prn[0] == 'G') {
|
---|
| 906 | phasebiasSat = phasebias.Sat + phasebias.NumberOfSat[CLOCKORBIT_SATGPS];
|
---|
| 907 | ++phasebias.NumberOfSat[CLOCKORBIT_SATGPS];
|
---|
| 908 | }
|
---|
| 909 | else if (prn[0] == 'R') {
|
---|
| 910 | phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS
|
---|
| 911 | + phasebias.NumberOfSat[CLOCKORBIT_SATGLONASS];
|
---|
| 912 | ++phasebias.NumberOfSat[CLOCKORBIT_SATGLONASS];
|
---|
| 913 | }
|
---|
| 914 | else if (prn[0] == 'E') {
|
---|
| 915 | phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
|
---|
| 916 | + phasebias.NumberOfSat[CLOCKORBIT_SATGALILEO];
|
---|
| 917 | ++phasebias.NumberOfSat[CLOCKORBIT_SATGALILEO];
|
---|
| 918 | }
|
---|
| 919 | else if (prn[0] == 'J') {
|
---|
| 920 | phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
|
---|
| 921 | + phasebias.NumberOfSat[CLOCKORBIT_SATQZSS];
|
---|
| 922 | ++phasebias.NumberOfSat[CLOCKORBIT_SATQZSS];
|
---|
| 923 | }
|
---|
| 924 | else if (prn[0] == 'S') {
|
---|
| 925 | phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
|
---|
| 926 | + CLOCKORBIT_NUMQZSS
|
---|
| 927 | + phasebias.NumberOfSat[CLOCKORBIT_SATSBAS];
|
---|
| 928 | ++phasebias.NumberOfSat[CLOCKORBIT_SATSBAS];
|
---|
| 929 | }
|
---|
| 930 | else if (prn[0] == 'C') {
|
---|
| 931 | phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
|
---|
| 932 | + CLOCKORBIT_NUMQZSS + CLOCKORBIT_NUMSBAS
|
---|
| 933 | + phasebias.NumberOfSat[CLOCKORBIT_SATBDS];
|
---|
| 934 | ++phasebias.NumberOfSat[CLOCKORBIT_SATBDS];
|
---|
| 935 | }
|
---|
| 936 |
|
---|
| 937 | if (phasebiasSat) {
|
---|
| 938 | phasebiasSat->ID = prn.mid(1).toInt();
|
---|
| 939 | phasebiasSat->NumberOfPhaseBiases = 0;
|
---|
| 940 | if (prn[0] == 'G') {
|
---|
| 941 | QMutableVectorIterator<phaseBiasSignal*> it(pbSig);
|
---|
| 942 | while (it.hasNext()) {
|
---|
| 943 | phaseBiasSignal *pbsig = it.next();
|
---|
| 944 | if (pbsig->type == "1C") {
|
---|
| 945 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 946 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 947 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1_CA;
|
---|
| 948 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 949 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 950 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 951 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 952 | }
|
---|
| 953 | else if (pbsig->type == "1P") {
|
---|
| 954 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 955 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 956 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1_P;
|
---|
| 957 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 958 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 959 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 960 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 961 | }
|
---|
| 962 | else if (pbsig->type == "1W") {
|
---|
| 963 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 964 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 965 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1_Z;
|
---|
| 966 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 967 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 968 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 969 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 970 | }
|
---|
| 971 | else if (pbsig->type == "2C") {
|
---|
| 972 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 973 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 974 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2_CA;
|
---|
| 975 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 976 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 977 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 978 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 979 | }
|
---|
| 980 | else if (pbsig->type == "2D") {
|
---|
| 981 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 982 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 983 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_SEMI_CODELESS;
|
---|
| 984 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 985 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 986 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 987 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 988 | }
|
---|
| 989 | else if (pbsig->type == "2S") {
|
---|
| 990 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 991 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 992 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2_CM;
|
---|
| 993 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 994 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 995 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 996 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 997 | }
|
---|
| 998 | else if (pbsig->type == "2L") {
|
---|
| 999 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1000 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1001 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2_CL;
|
---|
| 1002 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1003 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1004 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1005 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1006 | }
|
---|
| 1007 | else if (pbsig->type == "2X") {
|
---|
| 1008 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1009 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1010 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2_CML;
|
---|
| 1011 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1012 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1013 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1014 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1015 | }
|
---|
| 1016 | else if (pbsig->type == "2P") {
|
---|
| 1017 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1018 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1019 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2_P;
|
---|
| 1020 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1021 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1022 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1023 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1024 | }
|
---|
| 1025 | else if (pbsig->type == "2W") {
|
---|
| 1026 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1027 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1028 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2_Z;
|
---|
| 1029 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1030 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1031 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1032 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1033 | }
|
---|
| 1034 | else if (pbsig->type == "5I") {
|
---|
| 1035 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1036 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1037 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L5_I;
|
---|
| 1038 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1039 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1040 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1041 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1042 | }
|
---|
| 1043 | else if (pbsig->type == "5Q") {
|
---|
| 1044 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1045 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1046 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L5_Q;
|
---|
| 1047 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1048 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1049 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1050 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1051 | }
|
---|
| 1052 | else if (pbsig->type == "5X") {
|
---|
| 1053 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1054 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1055 | phasebiasSat->Biases[ii].Type = CODETYPEGPS_L5_IQ;
|
---|
| 1056 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1057 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1058 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1059 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1060 | }
|
---|
| 1061 | }
|
---|
| 1062 | }
|
---|
| 1063 | if (prn[0] == 'R') {
|
---|
| 1064 | QMutableVectorIterator<phaseBiasSignal*> it(pbSig);
|
---|
| 1065 | while (it.hasNext()) {
|
---|
| 1066 | phaseBiasSignal *pbsig = it.next();
|
---|
| 1067 | if (pbsig->type == "1C") {
|
---|
| 1068 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1069 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1070 | phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L1_CA;
|
---|
| 1071 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1072 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1073 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1074 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1075 | }
|
---|
| 1076 | else if (pbsig->type == "1P") {
|
---|
| 1077 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1078 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1079 | phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L1_P;
|
---|
| 1080 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1081 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1082 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1083 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1084 | }
|
---|
| 1085 | else if (pbsig->type == "2C") {
|
---|
| 1086 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1087 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1088 | phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L2_CA;
|
---|
| 1089 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1090 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1091 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1092 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1093 | }
|
---|
| 1094 | else if (pbsig->type == "2P") {
|
---|
| 1095 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1096 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1097 | phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L2_P;
|
---|
| 1098 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1099 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1100 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1101 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1102 | }
|
---|
| 1103 | }
|
---|
| 1104 | }
|
---|
| 1105 | if (prn[0] == 'E') {
|
---|
| 1106 | QMutableVectorIterator<phaseBiasSignal*> it(pbSig);
|
---|
| 1107 | while (it.hasNext()) {
|
---|
| 1108 | phaseBiasSignal *pbsig = it.next();
|
---|
| 1109 | if (pbsig->type == "1A") {
|
---|
| 1110 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1111 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1112 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E1_A;
|
---|
| 1113 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1114 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1115 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1116 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1117 | }
|
---|
| 1118 | else if (pbsig->type == "1B") {
|
---|
| 1119 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1120 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1121 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E1_B;
|
---|
| 1122 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1123 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1124 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1125 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1126 | }
|
---|
| 1127 | else if (pbsig->type == "1C") {
|
---|
| 1128 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1129 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1130 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E1_C;
|
---|
| 1131 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1132 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1133 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1134 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1135 | }
|
---|
| 1136 | else if (pbsig->type == "5I") {
|
---|
| 1137 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1138 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1139 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_I;
|
---|
| 1140 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1141 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1142 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1143 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1144 | }
|
---|
| 1145 | else if (pbsig->type == "5Q") {
|
---|
| 1146 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1147 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1148 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_Q;
|
---|
| 1149 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1150 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1151 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1152 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1153 | }
|
---|
| 1154 | else if (pbsig->type == "7I") {
|
---|
| 1155 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1156 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1157 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_I;
|
---|
| 1158 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1159 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1160 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1161 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1162 | }
|
---|
| 1163 | else if (pbsig->type == "7Q") {
|
---|
| 1164 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1165 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1166 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_Q;
|
---|
| 1167 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1168 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1169 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1170 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1171 | }
|
---|
| 1172 | else if (pbsig->type == "8I") {
|
---|
| 1173 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1174 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1175 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5_I;
|
---|
| 1176 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1177 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1178 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1179 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1180 | }
|
---|
| 1181 | else if (pbsig->type == "8Q") {
|
---|
| 1182 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1183 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1184 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5_Q;
|
---|
| 1185 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1186 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1187 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1188 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1189 | }
|
---|
| 1190 | else if (pbsig->type == "6A") {
|
---|
| 1191 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1192 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1193 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E6_A;
|
---|
| 1194 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1195 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1196 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1197 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1198 | }
|
---|
| 1199 | else if (pbsig->type == "6B") {
|
---|
| 1200 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1201 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1202 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E6_B;
|
---|
| 1203 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1204 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1205 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1206 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1207 | }
|
---|
| 1208 | else if (pbsig->type == "6C") {
|
---|
| 1209 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1210 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1211 | phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E6_C;
|
---|
| 1212 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1213 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1214 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1215 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1216 | }
|
---|
| 1217 | }
|
---|
| 1218 | }
|
---|
| 1219 | if (prn[0] == 'J') {
|
---|
| 1220 | QMutableVectorIterator<phaseBiasSignal*> it(pbSig);
|
---|
| 1221 | while (it.hasNext()) {
|
---|
| 1222 | phaseBiasSignal *pbsig = it.next();
|
---|
| 1223 | if (pbsig->type == "1C") {
|
---|
| 1224 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1225 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1226 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L1_CA;
|
---|
| 1227 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1228 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1229 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1230 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1231 | }
|
---|
| 1232 | else if (pbsig->type == "1S") {
|
---|
| 1233 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1234 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1235 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L1C_D;
|
---|
| 1236 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1237 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1238 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1239 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1240 | }
|
---|
| 1241 | else if (pbsig->type == "1L") {
|
---|
| 1242 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1243 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1244 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L1C_P;
|
---|
| 1245 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1246 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1247 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1248 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1249 | }
|
---|
| 1250 | else if (pbsig->type == "1X") {
|
---|
| 1251 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1252 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1253 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L1C_DP;
|
---|
| 1254 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1255 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1256 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1257 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1258 | }
|
---|
| 1259 | else if (pbsig->type == "2S") {
|
---|
| 1260 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1261 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1262 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L2_CM;
|
---|
| 1263 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1264 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1265 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1266 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1267 | }
|
---|
| 1268 | else if (pbsig->type == "2L") {
|
---|
| 1269 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1270 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1271 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L2_CL;
|
---|
| 1272 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1273 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1274 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1275 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1276 | }
|
---|
| 1277 | else if (pbsig->type == "2X") {
|
---|
| 1278 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1279 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1280 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L2_CML;
|
---|
| 1281 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1282 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1283 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1284 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1285 | }
|
---|
| 1286 | else if (pbsig->type == "5I") {
|
---|
| 1287 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1288 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1289 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L5_I;
|
---|
| 1290 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1291 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1292 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1293 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1294 | }
|
---|
| 1295 | else if (pbsig->type == "5Q") {
|
---|
| 1296 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1297 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1298 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L5_Q;
|
---|
| 1299 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1300 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1301 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1302 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1303 | }
|
---|
| 1304 | else if (pbsig->type == "5X") {
|
---|
| 1305 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1306 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1307 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L5_IQ;
|
---|
| 1308 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1309 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1310 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1311 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1312 | }
|
---|
| 1313 | else if (pbsig->type == "6S") {
|
---|
| 1314 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1315 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1316 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_LEX_S;
|
---|
| 1317 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1318 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1319 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1320 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1321 | }
|
---|
| 1322 | else if (pbsig->type == "6L") {
|
---|
| 1323 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1324 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1325 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_LEX_L;
|
---|
| 1326 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1327 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1328 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1329 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1330 | }
|
---|
| 1331 | else if (pbsig->type == "6X") {
|
---|
| 1332 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1333 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1334 | phasebiasSat->Biases[ii].Type = CODETYPEQZSS_LEX_SL;
|
---|
| 1335 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1336 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1337 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1338 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1339 | }
|
---|
| 1340 | }
|
---|
| 1341 | }
|
---|
| 1342 | if (prn[0] == 'S') {
|
---|
| 1343 | QMutableVectorIterator<phaseBiasSignal*> it(pbSig);
|
---|
| 1344 | while (it.hasNext()) {
|
---|
| 1345 | phaseBiasSignal *pbsig = it.next();
|
---|
| 1346 | if (pbsig->type == "1C") {
|
---|
| 1347 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1348 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1349 | phasebiasSat->Biases[ii].Type = CODETYPE_SBAS_L1_CA;
|
---|
| 1350 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1351 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1352 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1353 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1354 | }
|
---|
| 1355 | else if (pbsig->type == "5I") {
|
---|
| 1356 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1357 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1358 | phasebiasSat->Biases[ii].Type = CODETYPE_SBAS_L5_I;
|
---|
| 1359 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1360 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1361 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1362 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1363 | }
|
---|
| 1364 | else if (pbsig->type == "5Q") {
|
---|
| 1365 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1366 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1367 | phasebiasSat->Biases[ii].Type = CODETYPE_SBAS_L5_Q;
|
---|
| 1368 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1369 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1370 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1371 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1372 | }
|
---|
| 1373 | else if (pbsig->type == "5X") {
|
---|
| 1374 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1375 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1376 | phasebiasSat->Biases[ii].Type = CODETYPE_SBAS_L5_IQ;
|
---|
| 1377 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1378 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1379 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1380 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1381 | }
|
---|
| 1382 | }
|
---|
| 1383 | }
|
---|
| 1384 | if (prn[0] == 'C') {
|
---|
| 1385 | QMutableVectorIterator<phaseBiasSignal*> it(pbSig);
|
---|
| 1386 | while (it.hasNext()) {
|
---|
| 1387 | phaseBiasSignal *pbsig = it.next();
|
---|
| 1388 | if (pbsig->type == "2I") {
|
---|
| 1389 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1390 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1391 | phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1_I;
|
---|
| 1392 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1393 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1394 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1395 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1396 | }
|
---|
| 1397 | else if (pbsig->type == "2Q") {
|
---|
| 1398 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1399 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1400 | phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1_Q;
|
---|
| 1401 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1402 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1403 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1404 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1405 | }
|
---|
| 1406 | else if (pbsig->type == "2X") {
|
---|
| 1407 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1408 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1409 | phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1_IQ;
|
---|
| 1410 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1411 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1412 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1413 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1414 | }
|
---|
| 1415 | else if (pbsig->type == "6I") {
|
---|
| 1416 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1417 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1418 | phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B2_Q;
|
---|
| 1419 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1420 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1421 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1422 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1423 | }
|
---|
| 1424 | else if (pbsig->type == "6Q") {
|
---|
| 1425 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1426 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1427 | phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B2_I;
|
---|
| 1428 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1429 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1430 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1431 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1432 | }
|
---|
| 1433 | else if (pbsig->type == "6X") {
|
---|
| 1434 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1435 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1436 | phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B2_IQ;
|
---|
| 1437 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1438 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1439 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1440 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1441 | }
|
---|
| 1442 | else if (pbsig->type == "7I") {
|
---|
| 1443 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1444 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1445 | phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B3_Q;
|
---|
| 1446 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1447 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1448 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1449 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1450 | }
|
---|
| 1451 | else if (pbsig->type == "7Q") {
|
---|
| 1452 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1453 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1454 | phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B3_I;
|
---|
| 1455 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1456 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1457 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1458 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1459 | }
|
---|
| 1460 | else if (pbsig->type == "7X") {
|
---|
| 1461 | int ii = phasebiasSat->NumberOfPhaseBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
| 1462 | phasebiasSat->NumberOfPhaseBiases += 1;
|
---|
| 1463 | phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B3_IQ;
|
---|
| 1464 | phasebiasSat->Biases[ii].Bias = pbsig->bias;
|
---|
| 1465 | phasebiasSat->Biases[ii].SignalIntegerIndicator = pbsig->intInd;
|
---|
| 1466 | phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbsig->WLInd;
|
---|
| 1467 | phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbsig->discCount;
|
---|
| 1468 | }
|
---|
| 1469 | }
|
---|
| 1470 | }
|
---|
| 1471 | }
|
---|
[3222] | 1472 | }
|
---|
| 1473 | }
|
---|
[3227] | 1474 |
|
---|
[6850] | 1475 |
|
---|
[5662] | 1476 | QByteArray hlpBufferCo;
|
---|
[3493] | 1477 |
|
---|
| 1478 | // Orbit and Clock Corrections together
|
---|
| 1479 | // ------------------------------------
|
---|
[4174] | 1480 | if (_samplRtcmEphCorr == 0.0) {
|
---|
[6844] | 1481 | if (co.NumberOfSat[CLOCKORBIT_SATGPS] > 0 ||
|
---|
| 1482 | co.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0 ||
|
---|
| 1483 | co.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0 ||
|
---|
| 1484 | co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0 ||
|
---|
| 1485 | co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0 ||
|
---|
| 1486 | co.NumberOfSat[CLOCKORBIT_SATBDS] > 0) {
|
---|
[3493] | 1487 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
| 1488 | int len = MakeClockOrbit(&co, COTYPE_AUTO, 0, obuffer, sizeof(obuffer));
|
---|
| 1489 | if (len > 0) {
|
---|
| 1490 | hlpBufferCo = QByteArray(obuffer, len);
|
---|
| 1491 | }
|
---|
[3222] | 1492 | }
|
---|
| 1493 | }
|
---|
[3493] | 1494 |
|
---|
| 1495 | // Orbit and Clock Corrections separately
|
---|
| 1496 | // --------------------------------------
|
---|
| 1497 | else {
|
---|
[5666] | 1498 | if (co.NumberOfSat[CLOCKORBIT_SATGPS] > 0) {
|
---|
[3493] | 1499 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
[4174] | 1500 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
[4754] | 1501 | co.UpdateInterval = ephUpdInd;
|
---|
[3591] | 1502 | int len1 = MakeClockOrbit(&co, COTYPE_GPSORBIT, 1, obuffer, sizeof(obuffer));
|
---|
[4754] | 1503 | co.UpdateInterval = clkUpdInd;
|
---|
[3493] | 1504 | if (len1 > 0) {
|
---|
| 1505 | hlpBufferCo += QByteArray(obuffer, len1);
|
---|
| 1506 | }
|
---|
| 1507 | }
|
---|
[5666] | 1508 | int mmsg = (co.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0) ? 1 : 0;
|
---|
[3591] | 1509 | int len2 = MakeClockOrbit(&co, COTYPE_GPSCLOCK, mmsg, obuffer, sizeof(obuffer));
|
---|
[3493] | 1510 | if (len2 > 0) {
|
---|
| 1511 | hlpBufferCo += QByteArray(obuffer, len2);
|
---|
| 1512 | }
|
---|
| 1513 | }
|
---|
[5666] | 1514 | if (co.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0) {
|
---|
[3493] | 1515 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
[4174] | 1516 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
[4754] | 1517 | co.UpdateInterval = ephUpdInd;
|
---|
[3591] | 1518 | int len1 = MakeClockOrbit(&co, COTYPE_GLONASSORBIT, 1, obuffer, sizeof(obuffer));
|
---|
[4754] | 1519 | co.UpdateInterval = clkUpdInd;
|
---|
[3493] | 1520 | if (len1 > 0) {
|
---|
| 1521 | hlpBufferCo += QByteArray(obuffer, len1);
|
---|
| 1522 | }
|
---|
| 1523 | }
|
---|
[6844] | 1524 | int mmsg = (co.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0) ? 1 : 0;
|
---|
| 1525 | int len2 = MakeClockOrbit(&co, COTYPE_GLONASSCLOCK, mmsg, obuffer, sizeof(obuffer));
|
---|
[3493] | 1526 | if (len2 > 0) {
|
---|
| 1527 | hlpBufferCo += QByteArray(obuffer, len2);
|
---|
| 1528 | }
|
---|
| 1529 | }
|
---|
[6844] | 1530 | if (co.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0) {
|
---|
| 1531 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
| 1532 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
| 1533 | co.UpdateInterval = ephUpdInd;
|
---|
| 1534 | int len1 = MakeClockOrbit(&co, COTYPE_GALILEOORBIT, 1, obuffer, sizeof(obuffer));
|
---|
| 1535 | co.UpdateInterval = clkUpdInd;
|
---|
| 1536 | if (len1 > 0) {
|
---|
| 1537 | hlpBufferCo += QByteArray(obuffer, len1);
|
---|
| 1538 | }
|
---|
| 1539 | }
|
---|
| 1540 | int mmsg = (co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0) ? 1 : 0;
|
---|
| 1541 | int len2 = MakeClockOrbit(&co, COTYPE_GALILEOCLOCK, mmsg, obuffer, sizeof(obuffer));
|
---|
| 1542 | if (len2 > 0) {
|
---|
| 1543 | hlpBufferCo += QByteArray(obuffer, len2);
|
---|
| 1544 | }
|
---|
| 1545 | }
|
---|
| 1546 | if (co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0) {
|
---|
| 1547 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
| 1548 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
| 1549 | co.UpdateInterval = ephUpdInd;
|
---|
| 1550 | int len1 = MakeClockOrbit(&co, COTYPE_QZSSORBIT, 1, obuffer, sizeof(obuffer));
|
---|
| 1551 | co.UpdateInterval = clkUpdInd;
|
---|
| 1552 | if (len1 > 0) {
|
---|
| 1553 | hlpBufferCo += QByteArray(obuffer, len1);
|
---|
| 1554 | }
|
---|
| 1555 | }
|
---|
| 1556 | int mmsg = (co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0) ? 1 : 0;
|
---|
| 1557 | int len2 = MakeClockOrbit(&co, COTYPE_QZSSCLOCK, mmsg, obuffer, sizeof(obuffer));
|
---|
| 1558 | if (len2 > 0) {
|
---|
| 1559 | hlpBufferCo += QByteArray(obuffer, len2);
|
---|
| 1560 | }
|
---|
| 1561 | }
|
---|
| 1562 | if (co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0) {
|
---|
| 1563 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
| 1564 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
| 1565 | co.UpdateInterval = ephUpdInd;
|
---|
| 1566 | int len1 = MakeClockOrbit(&co, COTYPE_SBASORBIT, 1, obuffer, sizeof(obuffer));
|
---|
| 1567 | co.UpdateInterval = clkUpdInd;
|
---|
| 1568 | if (len1 > 0) {
|
---|
| 1569 | hlpBufferCo += QByteArray(obuffer, len1);
|
---|
| 1570 | }
|
---|
| 1571 | }
|
---|
| 1572 | int mmsg = (co.NumberOfSat[CLOCKORBIT_SATBDS] > 0) ? 1 : 0;
|
---|
| 1573 | int len2 = MakeClockOrbit(&co, COTYPE_SBASCLOCK, mmsg, obuffer, sizeof(obuffer));
|
---|
| 1574 | if (len2 > 0) {
|
---|
| 1575 | hlpBufferCo += QByteArray(obuffer, len2);
|
---|
| 1576 | }
|
---|
| 1577 | }
|
---|
| 1578 | if (co.NumberOfSat[CLOCKORBIT_SATBDS] > 0) {
|
---|
| 1579 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
| 1580 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
| 1581 | co.UpdateInterval = ephUpdInd;
|
---|
| 1582 | int len1 = MakeClockOrbit(&co, COTYPE_BDSORBIT, 1, obuffer, sizeof(obuffer));
|
---|
| 1583 | co.UpdateInterval = clkUpdInd;
|
---|
| 1584 | if (len1 > 0) {
|
---|
| 1585 | hlpBufferCo += QByteArray(obuffer, len1);
|
---|
| 1586 | }
|
---|
| 1587 | }
|
---|
| 1588 | int len2 = MakeClockOrbit(&co, COTYPE_BDSCLOCK, 0, obuffer, sizeof(obuffer));
|
---|
| 1589 | if (len2 > 0) {
|
---|
| 1590 | hlpBufferCo += QByteArray(obuffer, len2);
|
---|
| 1591 | }
|
---|
| 1592 | }
|
---|
[3493] | 1593 | }
|
---|
[5662] | 1594 |
|
---|
[6850] | 1595 | // Code Biases
|
---|
| 1596 | // -----------
|
---|
[5662] | 1597 | QByteArray hlpBufferBias;
|
---|
[6844] | 1598 | if (bias.NumberOfSat[CLOCKORBIT_SATGPS] > 0 ||
|
---|
| 1599 | bias.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0 ||
|
---|
| 1600 | bias.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0 ||
|
---|
| 1601 | bias.NumberOfSat[CLOCKORBIT_SATQZSS] > 0 ||
|
---|
| 1602 | bias.NumberOfSat[CLOCKORBIT_SATSBAS] > 0 ||
|
---|
| 1603 | bias.NumberOfSat[CLOCKORBIT_SATBDS] > 0 ) {
|
---|
[3222] | 1604 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
[5666] | 1605 | int len = MakeCodeBias(&bias, BTYPE_AUTO, 0, obuffer, sizeof(obuffer));
|
---|
[3222] | 1606 | if (len > 0) {
|
---|
[3227] | 1607 | hlpBufferBias = QByteArray(obuffer, len);
|
---|
[3222] | 1608 | }
|
---|
| 1609 | }
|
---|
[3227] | 1610 |
|
---|
[6850] | 1611 | // Phase Biases
|
---|
| 1612 | // ------------
|
---|
| 1613 | QByteArray hlpBufferPhaseBias;
|
---|
| 1614 | if (phasebias.NumberOfSat[CLOCKORBIT_SATGPS] > 0 ||
|
---|
| 1615 | phasebias.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0 ||
|
---|
| 1616 | phasebias.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0 ||
|
---|
| 1617 | phasebias.NumberOfSat[CLOCKORBIT_SATQZSS] > 0 ||
|
---|
| 1618 | phasebias.NumberOfSat[CLOCKORBIT_SATSBAS] > 0 ||
|
---|
| 1619 | phasebias.NumberOfSat[CLOCKORBIT_SATBDS] > 0 ) {
|
---|
| 1620 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
| 1621 | int len = MakePhaseBias(&phasebias, PBTYPE_AUTO, 0, obuffer, sizeof(obuffer));
|
---|
| 1622 | if (len > 0) {
|
---|
| 1623 | hlpBufferPhaseBias = QByteArray(obuffer, len);
|
---|
| 1624 | }
|
---|
| 1625 | }
|
---|
| 1626 |
|
---|
| 1627 | // VTEC
|
---|
| 1628 | // ----
|
---|
| 1629 | QByteArray hlpBufferVtec;
|
---|
| 1630 |
|
---|
| 1631 | _outBuffer += hlpBufferCo + hlpBufferBias + hlpBufferPhaseBias;
|
---|
[3222] | 1632 | }
|
---|
| 1633 |
|
---|
[5662] | 1634 | //
|
---|
[3222] | 1635 | ////////////////////////////////////////////////////////////////////////////
|
---|
[6442] | 1636 | void bncRtnetUploadCaster::processSatellite(const t_eph* eph, int GPSweek,
|
---|
[4991] | 1637 | double GPSweeks, const QString& prn,
|
---|
| 1638 | const ColumnVector& rtnAPC,
|
---|
| 1639 | double rtnClk,
|
---|
| 1640 | const ColumnVector& rtnVel,
|
---|
| 1641 | const ColumnVector& rtnCoM,
|
---|
| 1642 | struct ClockOrbit::SatData* sd,
|
---|
| 1643 | QString& outLine) {
|
---|
[3222] | 1644 |
|
---|
[4930] | 1645 | // Broadcast Position and Velocity
|
---|
| 1646 | // -------------------------------
|
---|
| 1647 | ColumnVector xB(4);
|
---|
| 1648 | ColumnVector vB(3);
|
---|
[6109] | 1649 | eph->getCrd(bncTime(GPSweek, GPSweeks), xB, vB, false);
|
---|
[5662] | 1650 |
|
---|
[4991] | 1651 | // Precise Position
|
---|
| 1652 | // ----------------
|
---|
| 1653 | ColumnVector xP = _CoM ? rtnCoM : rtnAPC;
|
---|
[3222] | 1654 |
|
---|
[5662] | 1655 | double dc = 0.0;
|
---|
[4930] | 1656 | if (_crdTrafo != "IGS08") {
|
---|
| 1657 | crdTrafo(GPSweek, xP, dc);
|
---|
| 1658 | }
|
---|
[5662] | 1659 |
|
---|
[4930] | 1660 | // Difference in xyz
|
---|
| 1661 | // -----------------
|
---|
| 1662 | ColumnVector dx = xB.Rows(1,3) - xP;
|
---|
[4991] | 1663 | ColumnVector dv = vB - rtnVel;
|
---|
[5662] | 1664 |
|
---|
[4930] | 1665 | // Difference in RSW
|
---|
| 1666 | // -----------------
|
---|
[3222] | 1667 | ColumnVector rsw(3);
|
---|
[4930] | 1668 | XYZ_to_RSW(xB.Rows(1,3), vB, dx, rsw);
|
---|
[3222] | 1669 |
|
---|
[4930] | 1670 | ColumnVector dotRsw(3);
|
---|
| 1671 | XYZ_to_RSW(xB.Rows(1,3), vB, dv, dotRsw);
|
---|
[3222] | 1672 |
|
---|
[4930] | 1673 | // Clock Correction
|
---|
| 1674 | // ----------------
|
---|
[4991] | 1675 | double dClk = rtnClk - (xB(4) - dc) * t_CST::c;
|
---|
[3222] | 1676 |
|
---|
| 1677 | if (sd) {
|
---|
[4930] | 1678 | sd->ID = prn.mid(1).toInt();
|
---|
| 1679 | sd->IOD = eph->IOD();
|
---|
| 1680 | sd->Clock.DeltaA0 = dClk;
|
---|
[5655] | 1681 | sd->Clock.DeltaA1 = 0.0; // TODO
|
---|
| 1682 | sd->Clock.DeltaA2 = 0.0; // TODO
|
---|
[4930] | 1683 | sd->Orbit.DeltaRadial = rsw(1);
|
---|
| 1684 | sd->Orbit.DeltaAlongTrack = rsw(2);
|
---|
| 1685 | sd->Orbit.DeltaCrossTrack = rsw(3);
|
---|
| 1686 | sd->Orbit.DotDeltaRadial = dotRsw(1);
|
---|
| 1687 | sd->Orbit.DotDeltaAlongTrack = dotRsw(2);
|
---|
| 1688 | sd->Orbit.DotDeltaCrossTrack = dotRsw(3);
|
---|
[3222] | 1689 | }
|
---|
| 1690 |
|
---|
[5662] | 1691 | outLine.sprintf("%d %.1f %s %3d %10.3f %8.3f %8.3f %8.3f\n",
|
---|
[5776] | 1692 | GPSweek, GPSweeks, eph->prn().toString().c_str(),
|
---|
[3222] | 1693 | eph->IOD(), dClk, rsw(1), rsw(2), rsw(3));
|
---|
| 1694 |
|
---|
[4991] | 1695 | double relativity = -2.0 * DotProduct(xP, rtnVel) / t_CST::c;
|
---|
| 1696 | double sp3Clk = (rtnClk - relativity) / t_CST::c; // in seconds
|
---|
| 1697 |
|
---|
[3222] | 1698 | if (_rnx) {
|
---|
[4991] | 1699 | _rnx->write(GPSweek, GPSweeks, prn, sp3Clk);
|
---|
[3222] | 1700 | }
|
---|
| 1701 | if (_sp3) {
|
---|
[4991] | 1702 | _sp3->write(GPSweek, GPSweeks, prn, rtnCoM, sp3Clk);
|
---|
[3222] | 1703 | }
|
---|
| 1704 | }
|
---|
| 1705 |
|
---|
| 1706 | // Transform Coordinates
|
---|
| 1707 | ////////////////////////////////////////////////////////////////////////////
|
---|
[5662] | 1708 | void bncRtnetUploadCaster::crdTrafo(int GPSWeek, ColumnVector& xyz,
|
---|
[4803] | 1709 | double& dc) {
|
---|
[3222] | 1710 |
|
---|
| 1711 | // Current epoch minus 2000.0 in years
|
---|
| 1712 | // ------------------------------------
|
---|
| 1713 | double dt = (GPSWeek - (1042.0+6.0/7.0)) / 365.2422 * 7.0 + 2000.0 - _t0;
|
---|
| 1714 |
|
---|
| 1715 | ColumnVector dx(3);
|
---|
| 1716 |
|
---|
| 1717 | dx(1) = _dx + dt * _dxr;
|
---|
| 1718 | dx(2) = _dy + dt * _dyr;
|
---|
| 1719 | dx(3) = _dz + dt * _dzr;
|
---|
| 1720 |
|
---|
| 1721 | static const double arcSec = 180.0 * 3600.0 / M_PI;
|
---|
| 1722 |
|
---|
| 1723 | double ox = (_ox + dt * _oxr) / arcSec;
|
---|
| 1724 | double oy = (_oy + dt * _oyr) / arcSec;
|
---|
| 1725 | double oz = (_oz + dt * _ozr) / arcSec;
|
---|
| 1726 |
|
---|
| 1727 | double sc = 1.0 + _sc * 1e-9 + dt * _scr * 1e-9;
|
---|
| 1728 |
|
---|
[4912] | 1729 | // Specify approximate center of area
|
---|
| 1730 | // ----------------------------------
|
---|
| 1731 | ColumnVector meanSta(3);
|
---|
| 1732 |
|
---|
| 1733 | if (_crdTrafo == "ETRF2000") {
|
---|
[4973] | 1734 | meanSta(1) = 3661090.0;
|
---|
| 1735 | meanSta(2) = 845230.0;
|
---|
| 1736 | meanSta(3) = 5136850.0;
|
---|
[4908] | 1737 | }
|
---|
[4912] | 1738 | else if (_crdTrafo == "NAD83") {
|
---|
[4973] | 1739 | meanSta(1) = -1092950.0;
|
---|
| 1740 | meanSta(2) = -4383600.0;
|
---|
| 1741 | meanSta(3) = 4487420.0;
|
---|
[4912] | 1742 | }
|
---|
| 1743 | else if (_crdTrafo == "GDA94") {
|
---|
[4973] | 1744 | meanSta(1) = -4052050.0;
|
---|
| 1745 | meanSta(2) = 4212840.0;
|
---|
| 1746 | meanSta(3) = -2545110.0;
|
---|
[4912] | 1747 | }
|
---|
| 1748 | else if (_crdTrafo == "SIRGAS2000") {
|
---|
[4973] | 1749 | meanSta(1) = 3740860.0;
|
---|
| 1750 | meanSta(2) = -4964290.0;
|
---|
| 1751 | meanSta(3) = -1425420.0;
|
---|
[4912] | 1752 | }
|
---|
| 1753 | else if (_crdTrafo == "SIRGAS95") {
|
---|
[4973] | 1754 | meanSta(1) = 3135390.0;
|
---|
| 1755 | meanSta(2) = -5017670.0;
|
---|
| 1756 | meanSta(3) = -2374440.0;
|
---|
[4912] | 1757 | }
|
---|
[5343] | 1758 | else if (_crdTrafo == "DREF91") {
|
---|
| 1759 | meanSta(1) = 3959579.0;
|
---|
| 1760 | meanSta(2) = 721719.0;
|
---|
| 1761 | meanSta(3) = 4931539.0;
|
---|
| 1762 | }
|
---|
[4912] | 1763 | else if (_crdTrafo == "Custom") {
|
---|
| 1764 | meanSta(1) = 0.0; // TODO
|
---|
| 1765 | meanSta(2) = 0.0; // TODO
|
---|
| 1766 | meanSta(3) = 0.0; // TODO
|
---|
| 1767 | }
|
---|
[4908] | 1768 |
|
---|
[4912] | 1769 | // Clock correction proportional to topocentric distance to satellites
|
---|
| 1770 | // -------------------------------------------------------------------
|
---|
| 1771 | double rho = (xyz - meanSta).norm_Frobenius();
|
---|
[4913] | 1772 | dc = rho * (sc - 1.0) / sc / t_CST::c;
|
---|
[4908] | 1773 |
|
---|
[3222] | 1774 | Matrix rMat(3,3);
|
---|
| 1775 | rMat(1,1) = 1.0;
|
---|
| 1776 | rMat(1,2) = -oz;
|
---|
| 1777 | rMat(1,3) = oy;
|
---|
| 1778 | rMat(2,1) = oz;
|
---|
| 1779 | rMat(2,2) = 1.0;
|
---|
| 1780 | rMat(2,3) = -ox;
|
---|
| 1781 | rMat(3,1) = -oy;
|
---|
| 1782 | rMat(3,2) = ox;
|
---|
| 1783 | rMat(3,3) = 1.0;
|
---|
| 1784 |
|
---|
| 1785 | xyz = sc * rMat * xyz + dx;
|
---|
| 1786 | }
|
---|
| 1787 |
|
---|
[6557] | 1788 | int bncRtnetUploadCaster::determineUpdateInd(double samplingRate) {
|
---|
| 1789 |
|
---|
| 1790 | if (samplingRate == 10.0) {
|
---|
| 1791 | return 3;
|
---|
| 1792 | }
|
---|
| 1793 | else if (samplingRate == 15.0) {
|
---|
| 1794 | return 4;
|
---|
| 1795 | }
|
---|
| 1796 | else if (samplingRate == 30.0) {
|
---|
| 1797 | return 5;
|
---|
| 1798 | }
|
---|
| 1799 | else if (samplingRate == 60.0) {
|
---|
| 1800 | return 6;
|
---|
| 1801 | }
|
---|
| 1802 | else if (samplingRate == 120.0) {
|
---|
| 1803 | return 7;
|
---|
| 1804 | }
|
---|
| 1805 | else if (samplingRate == 240.0) {
|
---|
| 1806 | return 8;
|
---|
| 1807 | }
|
---|
| 1808 | else if (samplingRate == 300.0) {
|
---|
| 1809 | return 9;
|
---|
| 1810 | }
|
---|
| 1811 | else if (samplingRate == 600.0) {
|
---|
| 1812 | return 10;
|
---|
| 1813 | }
|
---|
| 1814 | else if (samplingRate == 900.0) {
|
---|
| 1815 | return 11;
|
---|
| 1816 | }
|
---|
| 1817 | else if (samplingRate == 1800.0) {
|
---|
| 1818 | return 12;
|
---|
| 1819 | }
|
---|
| 1820 | else if (samplingRate == 3600.0) {
|
---|
| 1821 | return 13;
|
---|
| 1822 | }
|
---|
| 1823 | else if (samplingRate == 7200.0) {
|
---|
| 1824 | return 14;
|
---|
| 1825 | }
|
---|
| 1826 | else if (samplingRate == 10800.0) {
|
---|
| 1827 | return 15;
|
---|
| 1828 | }
|
---|
| 1829 | return 2;// default
|
---|
| 1830 | }
|
---|