[2898] | 1 | /* -------------------------------------------------------------------------
|
---|
| 2 | * BKG NTRIP Client
|
---|
| 3 | * -------------------------------------------------------------------------
|
---|
| 4 | *
|
---|
| 5 | * Class: bncComb
|
---|
| 6 | *
|
---|
| 7 | * Purpose: Combinations of Orbit/Clock Corrections
|
---|
| 8 | *
|
---|
| 9 | * Author: L. Mervart
|
---|
| 10 | *
|
---|
| 11 | * Created: 22-Jan-2011
|
---|
| 12 | *
|
---|
[7297] | 13 | * Changes:
|
---|
[2898] | 14 | *
|
---|
| 15 | * -----------------------------------------------------------------------*/
|
---|
| 16 |
|
---|
[2933] | 17 | #include <newmatio.h>
|
---|
[2921] | 18 | #include <iomanip>
|
---|
[3214] | 19 | #include <sstream>
|
---|
[2898] | 20 |
|
---|
| 21 | #include "bnccomb.h"
|
---|
[5070] | 22 | #include "bnccore.h"
|
---|
[3201] | 23 | #include "upload/bncrtnetdecoder.h"
|
---|
[2910] | 24 | #include "bncsettings.h"
|
---|
[2988] | 25 | #include "bncutils.h"
|
---|
[3181] | 26 | #include "bncsp3.h"
|
---|
[3052] | 27 | #include "bncantex.h"
|
---|
[5742] | 28 | #include "t_prn.h"
|
---|
[2898] | 29 |
|
---|
[3455] | 30 | const double sig0_offAC = 1000.0;
|
---|
| 31 | const double sig0_offACSat = 100.0;
|
---|
[3468] | 32 | const double sigP_offACSat = 0.01;
|
---|
[3455] | 33 | const double sig0_clkSat = 100.0;
|
---|
| 34 |
|
---|
| 35 | const double sigObs = 0.05;
|
---|
| 36 |
|
---|
| 37 | using namespace std;
|
---|
| 38 |
|
---|
[2898] | 39 | // Constructor
|
---|
| 40 | ////////////////////////////////////////////////////////////////////////////
|
---|
[6155] | 41 | bncComb::cmbParam::cmbParam(parType type_, int index_, const QString& ac_, const QString& prn_) {
|
---|
[3032] | 42 |
|
---|
[3433] | 43 | type = type_;
|
---|
| 44 | index = index_;
|
---|
| 45 | AC = ac_;
|
---|
| 46 | prn = prn_;
|
---|
| 47 | xx = 0.0;
|
---|
[3455] | 48 | eph = 0;
|
---|
[3429] | 49 |
|
---|
[3485] | 50 | if (type == offACgps) {
|
---|
[3455] | 51 | epoSpec = true;
|
---|
| 52 | sig0 = sig0_offAC;
|
---|
| 53 | sigP = sig0;
|
---|
[3429] | 54 | }
|
---|
[3485] | 55 | else if (type == offACglo) {
|
---|
| 56 | epoSpec = true;
|
---|
| 57 | sig0 = sig0_offAC;
|
---|
| 58 | sigP = sig0;
|
---|
| 59 | }
|
---|
[3429] | 60 | else if (type == offACSat) {
|
---|
[3455] | 61 | epoSpec = false;
|
---|
| 62 | sig0 = sig0_offACSat;
|
---|
| 63 | sigP = sigP_offACSat;
|
---|
[3429] | 64 | }
|
---|
| 65 | else if (type == clkSat) {
|
---|
[3455] | 66 | epoSpec = true;
|
---|
| 67 | sig0 = sig0_clkSat;
|
---|
| 68 | sigP = sig0;
|
---|
[3429] | 69 | }
|
---|
[2933] | 70 | }
|
---|
| 71 |
|
---|
| 72 | // Destructor
|
---|
| 73 | ////////////////////////////////////////////////////////////////////////////
|
---|
[6155] | 74 | bncComb::cmbParam::~cmbParam() {
|
---|
[2933] | 75 | }
|
---|
| 76 |
|
---|
| 77 | // Partial
|
---|
| 78 | ////////////////////////////////////////////////////////////////////////////
|
---|
[6155] | 79 | double bncComb::cmbParam::partial(const QString& AC_, const QString& prn_) {
|
---|
[7297] | 80 |
|
---|
[3485] | 81 | if (type == offACgps) {
|
---|
| 82 | if (AC == AC_ && prn_[0] == 'G') {
|
---|
[2934] | 83 | return 1.0;
|
---|
| 84 | }
|
---|
| 85 | }
|
---|
[3485] | 86 | else if (type == offACglo) {
|
---|
| 87 | if (AC == AC_ && prn_[0] == 'R') {
|
---|
| 88 | return 1.0;
|
---|
| 89 | }
|
---|
| 90 | }
|
---|
[3429] | 91 | else if (type == offACSat) {
|
---|
| 92 | if (AC == AC_ && prn == prn_) {
|
---|
[2933] | 93 | return 1.0;
|
---|
| 94 | }
|
---|
| 95 | }
|
---|
[3429] | 96 | else if (type == clkSat) {
|
---|
| 97 | if (prn == prn_) {
|
---|
[2933] | 98 | return 1.0;
|
---|
| 99 | }
|
---|
| 100 | }
|
---|
| 101 |
|
---|
| 102 | return 0.0;
|
---|
| 103 | }
|
---|
| 104 |
|
---|
[7297] | 105 | //
|
---|
[2990] | 106 | ////////////////////////////////////////////////////////////////////////////
|
---|
[6155] | 107 | QString bncComb::cmbParam::toString() const {
|
---|
[2933] | 108 |
|
---|
[2990] | 109 | QString outStr;
|
---|
[7297] | 110 |
|
---|
[3485] | 111 | if (type == offACgps) {
|
---|
| 112 | outStr = "AC offset GPS " + AC;
|
---|
[2990] | 113 | }
|
---|
[3485] | 114 | else if (type == offACglo) {
|
---|
| 115 | outStr = "AC offset GLO " + AC;
|
---|
| 116 | }
|
---|
[3429] | 117 | else if (type == offACSat) {
|
---|
[7008] | 118 | outStr = "Sat Offset " + AC + " " + prn.mid(0,3);
|
---|
[2990] | 119 | }
|
---|
[3429] | 120 | else if (type == clkSat) {
|
---|
[7008] | 121 | outStr = "Clk Corr " + prn.mid(0,3);
|
---|
[2990] | 122 | }
|
---|
[2933] | 123 |
|
---|
[2990] | 124 | return outStr;
|
---|
| 125 | }
|
---|
| 126 |
|
---|
[7299] | 127 | // Singleton
|
---|
| 128 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 129 | bncComb* bncComb::instance() {
|
---|
| 130 | static bncComb _bncComb;
|
---|
| 131 | return &_bncComb;
|
---|
| 132 | }
|
---|
| 133 |
|
---|
[2933] | 134 | // Constructor
|
---|
| 135 | ////////////////////////////////////////////////////////////////////////////
|
---|
[6443] | 136 | bncComb::bncComb() : _ephUser(true) {
|
---|
[2910] | 137 |
|
---|
| 138 | bncSettings settings;
|
---|
| 139 |
|
---|
[7297] | 140 | QStringList cmbStreams = settings.value("cmbStreams").toStringList();
|
---|
[2918] | 141 |
|
---|
[4183] | 142 | _cmbSampl = settings.value("cmbSampl").toInt();
|
---|
| 143 | if (_cmbSampl <= 0) {
|
---|
| 144 | _cmbSampl = 10;
|
---|
| 145 | }
|
---|
| 146 |
|
---|
[3455] | 147 | _masterMissingEpochs = 0;
|
---|
| 148 |
|
---|
[7297] | 149 | if (cmbStreams.size() >= 1 && !cmbStreams[0].isEmpty()) {
|
---|
| 150 | QListIterator<QString> it(cmbStreams);
|
---|
[2910] | 151 | while (it.hasNext()) {
|
---|
| 152 | QStringList hlp = it.next().split(" ");
|
---|
[2918] | 153 | cmbAC* newAC = new cmbAC();
|
---|
| 154 | newAC->mountPoint = hlp[0];
|
---|
| 155 | newAC->name = hlp[1];
|
---|
| 156 | newAC->weight = hlp[2].toDouble();
|
---|
[3453] | 157 | if (_masterOrbitAC.isEmpty()) {
|
---|
| 158 | _masterOrbitAC = newAC->name;
|
---|
| 159 | }
|
---|
[3429] | 160 | _ACs.append(newAC);
|
---|
[2910] | 161 | }
|
---|
| 162 | }
|
---|
[2927] | 163 |
|
---|
[3211] | 164 | _rtnetDecoder = 0;
|
---|
[3201] | 165 |
|
---|
[7297] | 166 | connect(this, SIGNAL(newMessage(QByteArray,bool)),
|
---|
[5068] | 167 | BNC_CORE, SLOT(slotMessage(const QByteArray,bool)));
|
---|
[2933] | 168 |
|
---|
[5583] | 169 | connect(BNC_CORE, SIGNAL(providerIDChanged(QString)),
|
---|
[6155] | 170 | this, SLOT(slotProviderIDChanged(QString)));
|
---|
[5583] | 171 |
|
---|
[6155] | 172 | connect(BNC_CORE, SIGNAL(newOrbCorrections(QList<t_orbCorr>)),
|
---|
| 173 | this, SLOT(slotNewOrbCorrections(QList<t_orbCorr>)));
|
---|
| 174 |
|
---|
| 175 | connect(BNC_CORE, SIGNAL(newClkCorrections(QList<t_clkCorr>)),
|
---|
| 176 | this, SLOT(slotNewClkCorrections(QList<t_clkCorr>)));
|
---|
| 177 |
|
---|
[3470] | 178 | // Combination Method
|
---|
| 179 | // ------------------
|
---|
[3481] | 180 | if (settings.value("cmbMethod").toString() == "Single-Epoch") {
|
---|
| 181 | _method = singleEpoch;
|
---|
[3470] | 182 | }
|
---|
| 183 | else {
|
---|
[3481] | 184 | _method = filter;
|
---|
[3470] | 185 | }
|
---|
[3032] | 186 |
|
---|
[3484] | 187 | // Use Glonass
|
---|
| 188 | // -----------
|
---|
[6174] | 189 | if ( Qt::CheckState(settings.value("cmbUseGlonass").toInt()) == Qt::Checked) {
|
---|
[3484] | 190 | _useGlonass = true;
|
---|
| 191 | }
|
---|
| 192 | else {
|
---|
| 193 | _useGlonass = false;
|
---|
| 194 | }
|
---|
| 195 |
|
---|
[3032] | 196 | // Initialize Parameters (model: Clk_Corr = AC_Offset + Sat_Offset + Clk)
|
---|
| 197 | // ----------------------------------------------------------------------
|
---|
[3470] | 198 | if (_method == filter) {
|
---|
| 199 | int nextPar = 0;
|
---|
| 200 | QListIterator<cmbAC*> it(_ACs);
|
---|
| 201 | while (it.hasNext()) {
|
---|
| 202 | cmbAC* AC = it.next();
|
---|
[3485] | 203 | _params.push_back(new cmbParam(cmbParam::offACgps, ++nextPar, AC->name, ""));
|
---|
[5808] | 204 | for (unsigned iGps = 1; iGps <= t_prn::MAXPRN_GPS; iGps++) {
|
---|
[7008] | 205 | QString prn = QString("G%1_0").arg(iGps, 2, 10, QChar('0'));
|
---|
[7297] | 206 | _params.push_back(new cmbParam(cmbParam::offACSat, ++nextPar,
|
---|
[3470] | 207 | AC->name, prn));
|
---|
| 208 | }
|
---|
[3483] | 209 | if (_useGlonass) {
|
---|
[3485] | 210 | _params.push_back(new cmbParam(cmbParam::offACglo, ++nextPar, AC->name, ""));
|
---|
[5808] | 211 | for (unsigned iGlo = 1; iGlo <= t_prn::MAXPRN_GLONASS; iGlo++) {
|
---|
[7008] | 212 | QString prn = QString("R%1_0").arg(iGlo, 2, 10, QChar('0'));
|
---|
[7297] | 213 | _params.push_back(new cmbParam(cmbParam::offACSat, ++nextPar,
|
---|
[3483] | 214 | AC->name, prn));
|
---|
| 215 | }
|
---|
| 216 | }
|
---|
[3470] | 217 | }
|
---|
[5808] | 218 | for (unsigned iGps = 1; iGps <= t_prn::MAXPRN_GPS; iGps++) {
|
---|
[7008] | 219 | QString prn = QString("G%1_0").arg(iGps, 2, 10, QChar('0'));
|
---|
[3470] | 220 | _params.push_back(new cmbParam(cmbParam::clkSat, ++nextPar, "", prn));
|
---|
[2991] | 221 | }
|
---|
[3483] | 222 | if (_useGlonass) {
|
---|
[5808] | 223 | for (unsigned iGlo = 1; iGlo <= t_prn::MAXPRN_GLONASS; iGlo++) {
|
---|
[7008] | 224 | QString prn = QString("R%1_0").arg(iGlo, 2, 10, QChar('0'));
|
---|
[3483] | 225 | _params.push_back(new cmbParam(cmbParam::clkSat, ++nextPar, "", prn));
|
---|
| 226 | }
|
---|
| 227 | }
|
---|
[7297] | 228 |
|
---|
[3470] | 229 | // Initialize Variance-Covariance Matrix
|
---|
| 230 | // -------------------------------------
|
---|
| 231 | _QQ.ReSize(_params.size());
|
---|
| 232 | _QQ = 0.0;
|
---|
| 233 | for (int iPar = 1; iPar <= _params.size(); iPar++) {
|
---|
| 234 | cmbParam* pp = _params[iPar-1];
|
---|
| 235 | _QQ(iPar,iPar) = pp->sig0 * pp->sig0;
|
---|
| 236 | }
|
---|
[2991] | 237 | }
|
---|
[2933] | 238 |
|
---|
[3052] | 239 | // ANTEX File
|
---|
| 240 | // ----------
|
---|
| 241 | _antex = 0;
|
---|
[6667] | 242 | QString antexFileName = settings.value("uploadAntexFile").toString();
|
---|
[3052] | 243 | if (!antexFileName.isEmpty()) {
|
---|
| 244 | _antex = new bncAntex();
|
---|
| 245 | if (_antex->readFile(antexFileName) != success) {
|
---|
| 246 | emit newMessage("wrong ANTEX file", true);
|
---|
| 247 | delete _antex;
|
---|
| 248 | _antex = 0;
|
---|
| 249 | }
|
---|
| 250 | }
|
---|
[3138] | 251 |
|
---|
[3329] | 252 | // Maximal Residuum
|
---|
| 253 | // ----------------
|
---|
| 254 | _MAXRES = settings.value("cmbMaxres").toDouble();
|
---|
| 255 | if (_MAXRES <= 0.0) {
|
---|
| 256 | _MAXRES = 999.0;
|
---|
| 257 | }
|
---|
[2898] | 258 | }
|
---|
| 259 |
|
---|
| 260 | // Destructor
|
---|
| 261 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 262 | bncComb::~bncComb() {
|
---|
[3429] | 263 | QListIterator<cmbAC*> icAC(_ACs);
|
---|
| 264 | while (icAC.hasNext()) {
|
---|
| 265 | delete icAC.next();
|
---|
[2918] | 266 | }
|
---|
[3201] | 267 | delete _rtnetDecoder;
|
---|
[3052] | 268 | delete _antex;
|
---|
[3296] | 269 | for (int iPar = 1; iPar <= _params.size(); iPar++) {
|
---|
| 270 | delete _params[iPar-1];
|
---|
| 271 | }
|
---|
[3556] | 272 | QListIterator<bncTime> itTime(_buffer.keys());
|
---|
[3551] | 273 | while (itTime.hasNext()) {
|
---|
[3556] | 274 | bncTime epoTime = itTime.next();
|
---|
| 275 | _buffer.remove(epoTime);
|
---|
[3429] | 276 | }
|
---|
[2898] | 277 | }
|
---|
| 278 |
|
---|
[6155] | 279 | // Remember orbit corrections
|
---|
[2898] | 280 | ////////////////////////////////////////////////////////////////////////////
|
---|
[6155] | 281 | void bncComb::slotNewOrbCorrections(QList<t_orbCorr> orbCorrections) {
|
---|
[2906] | 282 | QMutexLocker locker(&_mutex);
|
---|
[2913] | 283 |
|
---|
[6155] | 284 | for (int ii = 0; ii < orbCorrections.size(); ii++) {
|
---|
| 285 | t_orbCorr& orbCorr = orbCorrections[ii];
|
---|
| 286 | QString staID(orbCorr._staID.c_str());
|
---|
[7008] | 287 | QString prn(orbCorr._prn.toInternalString().c_str());
|
---|
[6155] | 288 |
|
---|
| 289 | // Find/Check the AC Name
|
---|
| 290 | // ----------------------
|
---|
| 291 | QString acName;
|
---|
| 292 | QListIterator<cmbAC*> icAC(_ACs);
|
---|
| 293 | while (icAC.hasNext()) {
|
---|
| 294 | cmbAC* AC = icAC.next();
|
---|
| 295 | if (AC->mountPoint == staID) {
|
---|
| 296 | acName = AC->name;
|
---|
| 297 | break;
|
---|
| 298 | }
|
---|
[3431] | 299 | }
|
---|
[6155] | 300 | if (acName.isEmpty()) {
|
---|
| 301 | continue;
|
---|
| 302 | }
|
---|
[3431] | 303 |
|
---|
[6155] | 304 | // Store the correction
|
---|
| 305 | // --------------------
|
---|
| 306 | QMap<t_prn, t_orbCorr>& storage = _orbCorrections[acName];
|
---|
| 307 | storage[orbCorr._prn] = orbCorr;
|
---|
[2913] | 308 | }
|
---|
[6155] | 309 | }
|
---|
[2913] | 310 |
|
---|
[6155] | 311 | // Process clock corrections
|
---|
| 312 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 313 | void bncComb::slotNewClkCorrections(QList<t_clkCorr> clkCorrections) {
|
---|
| 314 | QMutexLocker locker(&_mutex);
|
---|
| 315 |
|
---|
| 316 | bncTime lastTime;
|
---|
| 317 |
|
---|
| 318 | for (int ii = 0; ii < clkCorrections.size(); ii++) {
|
---|
| 319 | t_clkCorr& clkCorr = clkCorrections[ii];
|
---|
| 320 | QString staID(clkCorr._staID.c_str());
|
---|
[6961] | 321 | QString prn(clkCorr._prn.toInternalString().c_str());
|
---|
[6155] | 322 |
|
---|
| 323 | // Set the last time
|
---|
| 324 | // -----------------
|
---|
| 325 | if (lastTime.undef() || clkCorr._time > lastTime) {
|
---|
| 326 | lastTime = clkCorr._time;
|
---|
[3483] | 327 | }
|
---|
| 328 |
|
---|
[6155] | 329 | // Find/Check the AC Name
|
---|
| 330 | // ----------------------
|
---|
| 331 | QString acName;
|
---|
| 332 | QListIterator<cmbAC*> icAC(_ACs);
|
---|
| 333 | while (icAC.hasNext()) {
|
---|
| 334 | cmbAC* AC = icAC.next();
|
---|
| 335 | if (AC->mountPoint == staID) {
|
---|
| 336 | acName = AC->name;
|
---|
| 337 | break;
|
---|
| 338 | }
|
---|
[3588] | 339 | }
|
---|
[6155] | 340 | if (acName.isEmpty()) {
|
---|
| 341 | continue;
|
---|
| 342 | }
|
---|
[3588] | 343 |
|
---|
[6155] | 344 | // Check GLONASS
|
---|
| 345 | // -------------
|
---|
| 346 | if (!_useGlonass && clkCorr._prn.system() == 'R') {
|
---|
| 347 | continue;
|
---|
[3590] | 348 | }
|
---|
| 349 |
|
---|
[8175] | 350 | if (
|
---|
| 351 | clkCorr._prn.system() == 'E' ||
|
---|
| 352 | clkCorr._prn.system() == 'C' ||
|
---|
| 353 | clkCorr._prn.system() == 'J' ||
|
---|
| 354 | clkCorr._prn.system() == 'I' ||
|
---|
| 355 | clkCorr._prn.system() == 'S' ) {
|
---|
| 356 | continue;
|
---|
| 357 | }
|
---|
[8447] | 358 |
|
---|
[6155] | 359 | // Check Modulo Time
|
---|
| 360 | // -----------------
|
---|
[8447] | 361 | int sec = int(nint(clkCorr._time.gpssec()*10));
|
---|
| 362 | if (sec % (_cmbSampl*10) != 0.0) {
|
---|
[6155] | 363 | continue;
|
---|
| 364 | }
|
---|
[3274] | 365 |
|
---|
[6155] | 366 | // Check Correction Age
|
---|
| 367 | // --------------------
|
---|
| 368 | if (_resTime.valid() && clkCorr._time <= _resTime) {
|
---|
[8204] | 369 | emit newMessage("bncComb: old correction: " + acName.toLatin1() + " " + prn.mid(0,3).toLatin1(), true);
|
---|
[6155] | 370 | continue;
|
---|
| 371 | }
|
---|
[7297] | 372 |
|
---|
[6155] | 373 | // Create new correction
|
---|
| 374 | // ---------------------
|
---|
| 375 | cmbCorr* newCorr = new cmbCorr();
|
---|
[6157] | 376 | newCorr->_prn = prn;
|
---|
[6155] | 377 | newCorr->_time = clkCorr._time;
|
---|
| 378 | newCorr->_iod = clkCorr._iod;
|
---|
| 379 | newCorr->_acName = acName;
|
---|
[6159] | 380 | newCorr->_clkCorr = clkCorr;
|
---|
[6155] | 381 |
|
---|
[6156] | 382 | // Check orbit correction
|
---|
| 383 | // ----------------------
|
---|
| 384 | if (!_orbCorrections.contains(acName)) {
|
---|
| 385 | delete newCorr;
|
---|
| 386 | continue;
|
---|
| 387 | }
|
---|
| 388 | else {
|
---|
| 389 | QMap<t_prn, t_orbCorr>& storage = _orbCorrections[acName];
|
---|
| 390 | if (!storage.contains(clkCorr._prn) || storage[clkCorr._prn]._iod != newCorr->_iod) {
|
---|
| 391 | delete newCorr;
|
---|
| 392 | continue;
|
---|
| 393 | }
|
---|
| 394 | else {
|
---|
[6159] | 395 | newCorr->_orbCorr = storage[clkCorr._prn];
|
---|
[6156] | 396 | }
|
---|
| 397 | }
|
---|
| 398 |
|
---|
[6155] | 399 | // Check the Ephemeris
|
---|
| 400 | //--------------------
|
---|
[7012] | 401 | t_eph* ephLast = _ephUser.ephLast(prn);
|
---|
| 402 | t_eph* ephPrev = _ephUser.ephPrev(prn);
|
---|
[6443] | 403 | if (ephLast == 0) {
|
---|
[8204] | 404 | emit newMessage("bncComb: eph not found " + prn.mid(0,3).toLatin1(), true);
|
---|
[6155] | 405 | delete newCorr;
|
---|
| 406 | continue;
|
---|
[2986] | 407 | }
|
---|
[3029] | 408 | else {
|
---|
[6443] | 409 | if (ephLast->IOD() == newCorr->_iod) {
|
---|
| 410 | newCorr->_eph = ephLast;
|
---|
[6155] | 411 | }
|
---|
[6443] | 412 | else if (ephPrev && ephPrev->IOD() == newCorr->_iod) {
|
---|
| 413 | newCorr->_eph = ephPrev;
|
---|
| 414 | switchToLastEph(ephLast, newCorr);
|
---|
[6155] | 415 | }
|
---|
| 416 | else {
|
---|
[8204] | 417 | emit newMessage("bncComb: eph not found " + prn.mid(0,3).toLatin1() +
|
---|
| 418 | QString(" %1").arg(newCorr->_iod).toLatin1(), true);
|
---|
[6155] | 419 | delete newCorr;
|
---|
| 420 | continue;
|
---|
| 421 | }
|
---|
[2986] | 422 | }
|
---|
[6155] | 423 |
|
---|
| 424 | // Store correction into the buffer
|
---|
| 425 | // --------------------------------
|
---|
| 426 | QVector<cmbCorr*>& corrs = _buffer[newCorr->_time].corrs;
|
---|
| 427 | corrs.push_back(newCorr);
|
---|
[2986] | 428 | }
|
---|
| 429 |
|
---|
[3435] | 430 | // Process previous Epoch(s)
|
---|
| 431 | // -------------------------
|
---|
[7392] | 432 | const double outWait = 1.0 * _cmbSampl;
|
---|
[3556] | 433 | QListIterator<bncTime> itTime(_buffer.keys());
|
---|
[3435] | 434 | while (itTime.hasNext()) {
|
---|
[3556] | 435 | bncTime epoTime = itTime.next();
|
---|
[7392] | 436 | if (epoTime < lastTime - outWait) {
|
---|
[3556] | 437 | _resTime = epoTime;
|
---|
[3435] | 438 | processEpoch();
|
---|
| 439 | }
|
---|
[2927] | 440 | }
|
---|
[2898] | 441 | }
|
---|
| 442 |
|
---|
[7297] | 443 | // Change the correction so that it refers to last received ephemeris
|
---|
[2986] | 444 | ////////////////////////////////////////////////////////////////////////////
|
---|
[7012] | 445 | void bncComb::switchToLastEph(t_eph* lastEph, cmbCorr* corr) {
|
---|
[3028] | 446 |
|
---|
[6155] | 447 | if (corr->_eph == lastEph) {
|
---|
[3429] | 448 | return;
|
---|
| 449 | }
|
---|
| 450 |
|
---|
[8483] | 451 | ColumnVector oldXC(7);
|
---|
[2987] | 452 | ColumnVector oldVV(3);
|
---|
[6155] | 453 | corr->_eph->getCrd(corr->_time, oldXC, oldVV, false);
|
---|
[2988] | 454 |
|
---|
[8483] | 455 | ColumnVector newXC(7);
|
---|
[2987] | 456 | ColumnVector newVV(3);
|
---|
[6155] | 457 | lastEph->getCrd(corr->_time, newXC, newVV, false);
|
---|
[2988] | 458 |
|
---|
| 459 | ColumnVector dX = newXC.Rows(1,3) - oldXC.Rows(1,3);
|
---|
[2989] | 460 | ColumnVector dV = newVV - oldVV;
|
---|
| 461 | double dC = newXC(4) - oldXC(4);
|
---|
| 462 |
|
---|
[2988] | 463 | ColumnVector dRAO(3);
|
---|
| 464 | XYZ_to_RSW(newXC.Rows(1,3), newVV, dX, dRAO);
|
---|
[2989] | 465 |
|
---|
| 466 | ColumnVector dDotRAO(3);
|
---|
| 467 | XYZ_to_RSW(newXC.Rows(1,3), newVV, dV, dDotRAO);
|
---|
| 468 |
|
---|
[6963] | 469 | QString msg = "switch corr " + corr->_prn.mid(0,3)
|
---|
[6155] | 470 | + QString(" %1 -> %2 %3").arg(corr->_iod,3).arg(lastEph->IOD(),3).arg(dC*t_CST::c, 8, 'f', 4);
|
---|
[3013] | 471 |
|
---|
[8204] | 472 | emit newMessage(msg.toLatin1(), false);
|
---|
[3028] | 473 |
|
---|
[6155] | 474 | corr->_iod = lastEph->IOD();
|
---|
| 475 | corr->_eph = lastEph;
|
---|
| 476 |
|
---|
[6159] | 477 | corr->_orbCorr._xr += dRAO;
|
---|
| 478 | corr->_orbCorr._dotXr += dDotRAO;
|
---|
| 479 | corr->_clkCorr._dClk -= dC;
|
---|
[2986] | 480 | }
|
---|
| 481 |
|
---|
[3429] | 482 | // Process Epoch
|
---|
[2928] | 483 | ////////////////////////////////////////////////////////////////////////////
|
---|
[3429] | 484 | void bncComb::processEpoch() {
|
---|
[2918] | 485 |
|
---|
[2990] | 486 | _log.clear();
|
---|
| 487 |
|
---|
| 488 | QTextStream out(&_log, QIODevice::WriteOnly);
|
---|
| 489 |
|
---|
[7297] | 490 | out << endl << "Combination:" << endl
|
---|
[3472] | 491 | << "------------------------------" << endl;
|
---|
[2990] | 492 |
|
---|
[3433] | 493 | // Observation Statistics
|
---|
| 494 | // ----------------------
|
---|
[3455] | 495 | bool masterPresent = false;
|
---|
[3433] | 496 | QListIterator<cmbAC*> icAC(_ACs);
|
---|
| 497 | while (icAC.hasNext()) {
|
---|
| 498 | cmbAC* AC = icAC.next();
|
---|
| 499 | AC->numObs = 0;
|
---|
[3434] | 500 | QVectorIterator<cmbCorr*> itCorr(corrs());
|
---|
[3433] | 501 | while (itCorr.hasNext()) {
|
---|
| 502 | cmbCorr* corr = itCorr.next();
|
---|
[6157] | 503 | if (corr->_acName == AC->name) {
|
---|
[3433] | 504 | AC->numObs += 1;
|
---|
[3453] | 505 | if (AC->name == _masterOrbitAC) {
|
---|
| 506 | masterPresent = true;
|
---|
| 507 | }
|
---|
[3433] | 508 | }
|
---|
| 509 | }
|
---|
[8204] | 510 | out << AC->name.toLatin1().data() << ": " << AC->numObs << endl;
|
---|
[3433] | 511 | }
|
---|
| 512 |
|
---|
[3453] | 513 | // If Master not present, switch to another one
|
---|
| 514 | // --------------------------------------------
|
---|
[4889] | 515 | const unsigned switchMasterAfterGap = 1;
|
---|
[3456] | 516 | if (masterPresent) {
|
---|
| 517 | _masterMissingEpochs = 0;
|
---|
| 518 | }
|
---|
| 519 | else {
|
---|
[3455] | 520 | ++_masterMissingEpochs;
|
---|
[4889] | 521 | if (_masterMissingEpochs < switchMasterAfterGap) {
|
---|
[3457] | 522 | out << "Missing Master, Epoch skipped" << endl;
|
---|
[3556] | 523 | _buffer.remove(_resTime);
|
---|
[3455] | 524 | emit newMessage(_log, false);
|
---|
| 525 | return;
|
---|
[3453] | 526 | }
|
---|
[3455] | 527 | else {
|
---|
| 528 | _masterMissingEpochs = 0;
|
---|
| 529 | QListIterator<cmbAC*> icAC(_ACs);
|
---|
| 530 | while (icAC.hasNext()) {
|
---|
| 531 | cmbAC* AC = icAC.next();
|
---|
| 532 | if (AC->numObs > 0) {
|
---|
| 533 | out << "Switching Master AC "
|
---|
[8204] | 534 | << _masterOrbitAC.toLatin1().data() << " --> "
|
---|
| 535 | << AC->name.toLatin1().data() << " "
|
---|
[7297] | 536 | << _resTime.datestr().c_str() << " "
|
---|
[3455] | 537 | << _resTime.timestr().c_str() << endl;
|
---|
| 538 | _masterOrbitAC = AC->name;
|
---|
| 539 | break;
|
---|
| 540 | }
|
---|
[3452] | 541 | }
|
---|
| 542 | }
|
---|
| 543 | }
|
---|
| 544 |
|
---|
[6157] | 545 | QMap<QString, cmbCorr*> resCorr;
|
---|
[3472] | 546 |
|
---|
| 547 | // Perform the actual Combination using selected Method
|
---|
| 548 | // ----------------------------------------------------
|
---|
| 549 | t_irc irc;
|
---|
[3475] | 550 | ColumnVector dx;
|
---|
[3472] | 551 | if (_method == filter) {
|
---|
[3475] | 552 | irc = processEpoch_filter(out, resCorr, dx);
|
---|
[3472] | 553 | }
|
---|
| 554 | else {
|
---|
[3475] | 555 | irc = processEpoch_singleEpoch(out, resCorr, dx);
|
---|
[3472] | 556 | }
|
---|
| 557 |
|
---|
[3475] | 558 | // Update Parameter Values, Print Results
|
---|
| 559 | // --------------------------------------
|
---|
[3472] | 560 | if (irc == success) {
|
---|
[3475] | 561 | for (int iPar = 1; iPar <= _params.size(); iPar++) {
|
---|
| 562 | cmbParam* pp = _params[iPar-1];
|
---|
| 563 | pp->xx += dx(iPar);
|
---|
| 564 | if (pp->type == cmbParam::clkSat) {
|
---|
| 565 | if (resCorr.find(pp->prn) != resCorr.end()) {
|
---|
[6160] | 566 | resCorr[pp->prn]->_dClkResult = pp->xx / t_CST::c;
|
---|
[3475] | 567 | }
|
---|
| 568 | }
|
---|
[7297] | 569 | out << _resTime.datestr().c_str() << " "
|
---|
[3475] | 570 | << _resTime.timestr().c_str() << " ";
|
---|
| 571 | out.setRealNumberNotation(QTextStream::FixedNotation);
|
---|
| 572 | out.setFieldWidth(8);
|
---|
| 573 | out.setRealNumberPrecision(4);
|
---|
| 574 | out << pp->toString() << " "
|
---|
| 575 | << pp->xx << " +- " << sqrt(_QQ(pp->index,pp->index)) << endl;
|
---|
| 576 | out.setFieldWidth(0);
|
---|
| 577 | }
|
---|
[3472] | 578 | printResults(out, resCorr);
|
---|
| 579 | dumpResults(resCorr);
|
---|
| 580 | }
|
---|
| 581 |
|
---|
| 582 | // Delete Data, emit Message
|
---|
| 583 | // -------------------------
|
---|
[3556] | 584 | _buffer.remove(_resTime);
|
---|
[3472] | 585 | emit newMessage(_log, false);
|
---|
| 586 | }
|
---|
| 587 |
|
---|
| 588 | // Process Epoch - Filter Method
|
---|
| 589 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 590 | t_irc bncComb::processEpoch_filter(QTextStream& out,
|
---|
[6157] | 591 | QMap<QString, cmbCorr*>& resCorr,
|
---|
[3475] | 592 | ColumnVector& dx) {
|
---|
[3472] | 593 |
|
---|
[3429] | 594 | // Prediction Step
|
---|
| 595 | // ---------------
|
---|
[3472] | 596 | int nPar = _params.size();
|
---|
[2933] | 597 | ColumnVector x0(nPar);
|
---|
| 598 | for (int iPar = 1; iPar <= _params.size(); iPar++) {
|
---|
[3455] | 599 | cmbParam* pp = _params[iPar-1];
|
---|
| 600 | if (pp->epoSpec) {
|
---|
[3451] | 601 | pp->xx = 0.0;
|
---|
[3455] | 602 | _QQ.Row(iPar) = 0.0;
|
---|
| 603 | _QQ.Column(iPar) = 0.0;
|
---|
| 604 | _QQ(iPar,iPar) = pp->sig0 * pp->sig0;
|
---|
[3451] | 605 | }
|
---|
[3455] | 606 | else {
|
---|
| 607 | _QQ(iPar,iPar) += pp->sigP * pp->sigP;
|
---|
| 608 | }
|
---|
[2933] | 609 | x0(iPar) = pp->xx;
|
---|
| 610 | }
|
---|
| 611 |
|
---|
[3487] | 612 | // Check Satellite Positions for Outliers
|
---|
| 613 | // --------------------------------------
|
---|
[3497] | 614 | if (checkOrbits(out) != success) {
|
---|
[3487] | 615 | return failure;
|
---|
| 616 | }
|
---|
[3441] | 617 |
|
---|
[3455] | 618 | // Update and outlier detection loop
|
---|
| 619 | // ---------------------------------
|
---|
[3487] | 620 | SymmetricMatrix QQ_sav = _QQ;
|
---|
[3455] | 621 | while (true) {
|
---|
[3135] | 622 |
|
---|
[3455] | 623 | Matrix AA;
|
---|
| 624 | ColumnVector ll;
|
---|
| 625 | DiagonalMatrix PP;
|
---|
[3429] | 626 |
|
---|
[3455] | 627 | if (createAmat(AA, ll, PP, x0, resCorr) != success) {
|
---|
[3472] | 628 | return failure;
|
---|
[3441] | 629 | }
|
---|
[2933] | 630 |
|
---|
[6169] | 631 | dx.ReSize(nPar); dx = 0.0;
|
---|
[5808] | 632 | kalman(AA, ll, PP, _QQ, dx);
|
---|
[6164] | 633 |
|
---|
[3429] | 634 | ColumnVector vv = ll - AA * dx;
|
---|
[3080] | 635 |
|
---|
[3429] | 636 | int maxResIndex;
|
---|
[7297] | 637 | double maxRes = vv.maximum_absolute_value1(maxResIndex);
|
---|
[3429] | 638 | out.setRealNumberNotation(QTextStream::FixedNotation);
|
---|
[7297] | 639 | out.setRealNumberPrecision(3);
|
---|
[3429] | 640 | out << _resTime.datestr().c_str() << " " << _resTime.timestr().c_str()
|
---|
[3432] | 641 | << " Maximum Residuum " << maxRes << ' '
|
---|
[6962] | 642 | << corrs()[maxResIndex-1]->_acName << ' ' << corrs()[maxResIndex-1]->_prn.mid(0,3);
|
---|
[3432] | 643 | if (maxRes > _MAXRES) {
|
---|
| 644 | for (int iPar = 1; iPar <= _params.size(); iPar++) {
|
---|
| 645 | cmbParam* pp = _params[iPar-1];
|
---|
[7297] | 646 | if (pp->type == cmbParam::offACSat &&
|
---|
[6157] | 647 | pp->AC == corrs()[maxResIndex-1]->_acName &&
|
---|
[6962] | 648 | pp->prn == corrs()[maxResIndex-1]->_prn.mid(0,3)) {
|
---|
[3432] | 649 | QQ_sav.Row(iPar) = 0.0;
|
---|
| 650 | QQ_sav.Column(iPar) = 0.0;
|
---|
[3455] | 651 | QQ_sav(iPar,iPar) = pp->sig0 * pp->sig0;
|
---|
[3432] | 652 | }
|
---|
| 653 | }
|
---|
| 654 |
|
---|
| 655 | out << " Outlier" << endl;
|
---|
| 656 | _QQ = QQ_sav;
|
---|
[3455] | 657 | corrs().remove(maxResIndex-1);
|
---|
[3432] | 658 | }
|
---|
| 659 | else {
|
---|
| 660 | out << " OK" << endl;
|
---|
[6330] | 661 | out.setRealNumberNotation(QTextStream::FixedNotation);
|
---|
| 662 | out.setRealNumberPrecision(4);
|
---|
| 663 | for (int ii = 0; ii < corrs().size(); ii++) {
|
---|
[8065] | 664 | const cmbCorr* corr = corrs()[ii];
|
---|
[6330] | 665 | out << _resTime.datestr().c_str() << ' '
|
---|
| 666 | << _resTime.timestr().c_str() << " "
|
---|
[6962] | 667 | << corr->_acName << ' ' << corr->_prn.mid(0,3);
|
---|
[6330] | 668 | out.setFieldWidth(10);
|
---|
| 669 | out << " res = " << vv[ii] << endl;
|
---|
| 670 | out.setFieldWidth(0);
|
---|
| 671 | }
|
---|
[3432] | 672 | break;
|
---|
| 673 | }
|
---|
| 674 | }
|
---|
| 675 |
|
---|
[3472] | 676 | return success;
|
---|
[2918] | 677 | }
|
---|
[3011] | 678 |
|
---|
[3201] | 679 | // Print results
|
---|
[3011] | 680 | ////////////////////////////////////////////////////////////////////////////
|
---|
[3429] | 681 | void bncComb::printResults(QTextStream& out,
|
---|
[6157] | 682 | const QMap<QString, cmbCorr*>& resCorr) {
|
---|
[3011] | 683 |
|
---|
[6157] | 684 | QMapIterator<QString, cmbCorr*> it(resCorr);
|
---|
[3011] | 685 | while (it.hasNext()) {
|
---|
| 686 | it.next();
|
---|
[6157] | 687 | cmbCorr* corr = it.value();
|
---|
| 688 | const t_eph* eph = corr->_eph;
|
---|
[3015] | 689 | if (eph) {
|
---|
[8483] | 690 | ColumnVector xc(7);
|
---|
[6109] | 691 | ColumnVector vv(3);
|
---|
| 692 | eph->getCrd(_resTime, xc, vv, false);
|
---|
[3015] | 693 |
|
---|
[7297] | 694 | out << _resTime.datestr().c_str() << " "
|
---|
[3429] | 695 | << _resTime.timestr().c_str() << " ";
|
---|
[3015] | 696 | out.setFieldWidth(3);
|
---|
[6962] | 697 | out << "Full Clock " << corr->_prn.mid(0,3) << " " << corr->_iod << " ";
|
---|
[3015] | 698 | out.setFieldWidth(14);
|
---|
[6160] | 699 | out << (xc(4) + corr->_dClkResult) * t_CST::c << endl;
|
---|
[3370] | 700 | out.setFieldWidth(0);
|
---|
[3015] | 701 | }
|
---|
| 702 | else {
|
---|
| 703 | out << "bncComb::printResuls bug" << endl;
|
---|
| 704 | }
|
---|
[3011] | 705 | }
|
---|
| 706 | }
|
---|
[3202] | 707 |
|
---|
| 708 | // Send results to RTNet Decoder and directly to PPP Client
|
---|
| 709 | ////////////////////////////////////////////////////////////////////////////
|
---|
[6157] | 710 | void bncComb::dumpResults(const QMap<QString, cmbCorr*>& resCorr) {
|
---|
[3202] | 711 |
|
---|
[6161] | 712 | QList<t_orbCorr> orbCorrections;
|
---|
| 713 | QList<t_clkCorr> clkCorrections;
|
---|
| 714 |
|
---|
[5337] | 715 | QString outLines;
|
---|
| 716 | QStringList corrLines;
|
---|
[3214] | 717 |
|
---|
| 718 | unsigned year, month, day, hour, minute;
|
---|
| 719 | double sec;
|
---|
[3429] | 720 | _resTime.civil_date(year, month, day);
|
---|
| 721 | _resTime.civil_time(hour, minute, sec);
|
---|
[3214] | 722 |
|
---|
[7297] | 723 | outLines.sprintf("* %4d %2d %2d %d %d %12.8f\n",
|
---|
[5337] | 724 | year, month, day, hour, minute, sec);
|
---|
[3214] | 725 |
|
---|
[6157] | 726 | QMapIterator<QString, cmbCorr*> it(resCorr);
|
---|
[3202] | 727 | while (it.hasNext()) {
|
---|
| 728 | it.next();
|
---|
[6157] | 729 | cmbCorr* corr = it.value();
|
---|
[3202] | 730 |
|
---|
[7013] | 731 | t_orbCorr orbCorr(corr->_orbCorr);
|
---|
| 732 | orbCorr._staID = "INTERNAL";
|
---|
| 733 | orbCorrections.push_back(orbCorr);
|
---|
| 734 |
|
---|
| 735 | t_clkCorr clkCorr(corr->_clkCorr);
|
---|
| 736 | clkCorr._staID = "INTERNAL";
|
---|
| 737 | clkCorr._dClk = corr->_dClkResult;
|
---|
| 738 | clkCorr._dotDClk = 0.0;
|
---|
| 739 | clkCorr._dotDotDClk = 0.0;
|
---|
| 740 | clkCorrections.push_back(clkCorr);
|
---|
| 741 |
|
---|
[8483] | 742 | ColumnVector xc(7);
|
---|
[4978] | 743 | ColumnVector vv(3);
|
---|
[7013] | 744 | corr->_eph->setClkCorr(dynamic_cast<const t_clkCorr*>(&clkCorr));
|
---|
| 745 | corr->_eph->setOrbCorr(dynamic_cast<const t_orbCorr*>(&orbCorr));
|
---|
[7012] | 746 | corr->_eph->getCrd(_resTime, xc, vv, true);
|
---|
| 747 |
|
---|
[4978] | 748 | // Correction Phase Center --> CoM
|
---|
| 749 | // -------------------------------
|
---|
| 750 | ColumnVector dx(3); dx = 0.0;
|
---|
| 751 | if (_antex) {
|
---|
| 752 | double Mjd = _resTime.mjd() + _resTime.daysec()/86400.0;
|
---|
[6157] | 753 | if (_antex->satCoMcorrection(corr->_prn, Mjd, xc.Rows(1,3), dx) != success) {
|
---|
[4992] | 754 | dx = 0;
|
---|
[8204] | 755 | _log += "antenna not found " + corr->_prn.mid(0,3).toLatin1() + '\n';
|
---|
[3214] | 756 | }
|
---|
| 757 | }
|
---|
[7012] | 758 |
|
---|
| 759 | outLines += corr->_prn.mid(0,3);
|
---|
[5337] | 760 | QString hlp;
|
---|
| 761 | hlp.sprintf(" APC 3 %15.4f %15.4f %15.4f"
|
---|
| 762 | " Clk 1 %15.4f"
|
---|
| 763 | " Vel 3 %15.4f %15.4f %15.4f"
|
---|
| 764 | " CoM 3 %15.4f %15.4f %15.4f\n",
|
---|
[7012] | 765 | xc(1), xc(2), xc(3),
|
---|
| 766 | xc(4) * t_CST::c,
|
---|
[5337] | 767 | vv(1), vv(2), vv(3),
|
---|
| 768 | xc(1)-dx(1), xc(2)-dx(2), xc(3)-dx(3));
|
---|
| 769 | outLines += hlp;
|
---|
| 770 |
|
---|
[4978] | 771 | QString line;
|
---|
[5564] | 772 | int messageType = COTYPE_GPSCOMBINED;
|
---|
| 773 | int updateInt = 0;
|
---|
[4978] | 774 | line.sprintf("%d %d %d %.1f %s"
|
---|
[7055] | 775 | " %lu"
|
---|
[4978] | 776 | " %8.3f %8.3f %8.3f %8.3f"
|
---|
| 777 | " %10.5f %10.5f %10.5f %10.5f"
|
---|
[5576] | 778 | " %10.5f INTERNAL",
|
---|
[4978] | 779 | messageType, updateInt, _resTime.gpsw(), _resTime.gpssec(),
|
---|
[8204] | 780 | corr->_prn.mid(0,3).toLatin1().data(),
|
---|
[6157] | 781 | corr->_iod,
|
---|
[6160] | 782 | corr->_dClkResult * t_CST::c,
|
---|
[6159] | 783 | corr->_orbCorr._xr[0],
|
---|
| 784 | corr->_orbCorr._xr[1],
|
---|
| 785 | corr->_orbCorr._xr[2],
|
---|
[6157] | 786 | 0.0,
|
---|
[6159] | 787 | corr->_orbCorr._dotXr[0],
|
---|
| 788 | corr->_orbCorr._dotXr[1],
|
---|
| 789 | corr->_orbCorr._dotXr[2],
|
---|
[6157] | 790 | 0.0);
|
---|
[4978] | 791 | corrLines << line;
|
---|
| 792 |
|
---|
[3214] | 793 | delete corr;
|
---|
| 794 | }
|
---|
| 795 |
|
---|
[5337] | 796 | outLines += "EOE\n"; // End Of Epoch flag
|
---|
| 797 |
|
---|
[3215] | 798 | if (!_rtnetDecoder) {
|
---|
| 799 | _rtnetDecoder = new bncRtnetDecoder();
|
---|
| 800 | }
|
---|
[3221] | 801 |
|
---|
[3215] | 802 | vector<string> errmsg;
|
---|
[8204] | 803 | _rtnetDecoder->Decode(outLines.toLatin1().data(), outLines.length(), errmsg);
|
---|
[3215] | 804 |
|
---|
[5861] | 805 | // Send new Corrections to PPP etc.
|
---|
| 806 | // --------------------------------
|
---|
[6161] | 807 | if (orbCorrections.size() > 0 && clkCorrections.size() > 0) {
|
---|
| 808 | emit newOrbCorrections(orbCorrections);
|
---|
| 809 | emit newClkCorrections(clkCorrections);
|
---|
| 810 | }
|
---|
[3202] | 811 | }
|
---|
[3455] | 812 |
|
---|
| 813 | // Create First Design Matrix and Vector of Measurements
|
---|
| 814 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 815 | t_irc bncComb::createAmat(Matrix& AA, ColumnVector& ll, DiagonalMatrix& PP,
|
---|
[7297] | 816 | const ColumnVector& x0,
|
---|
[6157] | 817 | QMap<QString, cmbCorr*>& resCorr) {
|
---|
[3455] | 818 |
|
---|
| 819 | unsigned nPar = _params.size();
|
---|
[7297] | 820 | unsigned nObs = corrs().size();
|
---|
[3455] | 821 |
|
---|
| 822 | if (nObs == 0) {
|
---|
| 823 | return failure;
|
---|
| 824 | }
|
---|
| 825 |
|
---|
[5742] | 826 | int maxSat = t_prn::MAXPRN_GPS;
|
---|
[3486] | 827 | // if (_useGlonass) {
|
---|
[5742] | 828 | // maxSat = t_prn::MAXPRN_GPS + t_prn::MAXPRN_GLONASS;
|
---|
[3486] | 829 | // }
|
---|
[3455] | 830 |
|
---|
[5742] | 831 | const int nCon = (_method == filter) ? 1 + maxSat : 0;
|
---|
[3483] | 832 |
|
---|
[3455] | 833 | AA.ReSize(nObs+nCon, nPar); AA = 0.0;
|
---|
| 834 | ll.ReSize(nObs+nCon); ll = 0.0;
|
---|
| 835 | PP.ReSize(nObs+nCon); PP = 1.0 / (sigObs * sigObs);
|
---|
| 836 |
|
---|
| 837 | int iObs = 0;
|
---|
| 838 | QVectorIterator<cmbCorr*> itCorr(corrs());
|
---|
| 839 | while (itCorr.hasNext()) {
|
---|
| 840 | cmbCorr* corr = itCorr.next();
|
---|
[6157] | 841 | QString prn = corr->_prn;
|
---|
[3487] | 842 |
|
---|
[3455] | 843 | ++iObs;
|
---|
| 844 |
|
---|
[6157] | 845 | if (corr->_acName == _masterOrbitAC && resCorr.find(prn) == resCorr.end()) {
|
---|
| 846 | resCorr[prn] = new cmbCorr(*corr);
|
---|
[3455] | 847 | }
|
---|
| 848 |
|
---|
| 849 | for (int iPar = 1; iPar <= _params.size(); iPar++) {
|
---|
| 850 | cmbParam* pp = _params[iPar-1];
|
---|
[6157] | 851 | AA(iObs, iPar) = pp->partial(corr->_acName, prn);
|
---|
[3455] | 852 | }
|
---|
| 853 |
|
---|
[6160] | 854 | ll(iObs) = corr->_clkCorr._dClk * t_CST::c - DotProduct(AA.Row(iObs), x0);
|
---|
[3455] | 855 | }
|
---|
| 856 |
|
---|
| 857 | // Regularization
|
---|
| 858 | // --------------
|
---|
[3474] | 859 | if (_method == filter) {
|
---|
| 860 | const double Ph = 1.e6;
|
---|
| 861 | PP(nObs+1) = Ph;
|
---|
[3461] | 862 | for (int iPar = 1; iPar <= _params.size(); iPar++) {
|
---|
| 863 | cmbParam* pp = _params[iPar-1];
|
---|
[3465] | 864 | if ( AA.Column(iPar).maximum_absolute_value() > 0.0 &&
|
---|
[3474] | 865 | pp->type == cmbParam::clkSat ) {
|
---|
| 866 | AA(nObs+1, iPar) = 1.0;
|
---|
[3455] | 867 | }
|
---|
| 868 | }
|
---|
[3474] | 869 | int iCond = 1;
|
---|
[5808] | 870 | for (unsigned iGps = 1; iGps <= t_prn::MAXPRN_GPS; iGps++) {
|
---|
[7132] | 871 | QString prn = QString("G%1_0").arg(iGps, 2, 10, QChar('0'));
|
---|
[3474] | 872 | ++iCond;
|
---|
| 873 | PP(nObs+iCond) = Ph;
|
---|
| 874 | for (int iPar = 1; iPar <= _params.size(); iPar++) {
|
---|
| 875 | cmbParam* pp = _params[iPar-1];
|
---|
[7299] | 876 | if ( pp &&
|
---|
| 877 | AA.Column(iPar).maximum_absolute_value() > 0.0 &&
|
---|
[7297] | 878 | pp->type == cmbParam::offACSat &&
|
---|
[3474] | 879 | pp->prn == prn) {
|
---|
| 880 | AA(nObs+iCond, iPar) = 1.0;
|
---|
| 881 | }
|
---|
| 882 | }
|
---|
| 883 | }
|
---|
[3486] | 884 | // if (_useGlonass) {
|
---|
[5742] | 885 | // for (int iGlo = 1; iGlo <= t_prn::MAXPRN_GLONASS; iGlo++) {
|
---|
[7132] | 886 | // QString prn = QString("R%1_0").arg(iGlo, 2, 10, QChar('0'));
|
---|
[3486] | 887 | // ++iCond;
|
---|
| 888 | // PP(nObs+iCond) = Ph;
|
---|
| 889 | // for (int iPar = 1; iPar <= _params.size(); iPar++) {
|
---|
| 890 | // cmbParam* pp = _params[iPar-1];
|
---|
[7299] | 891 | // if ( pp &&
|
---|
| 892 | // AA.Column(iPar).maximum_absolute_value() > 0.0 &&
|
---|
[7297] | 893 | // pp->type == cmbParam::offACSat &&
|
---|
[3486] | 894 | // pp->prn == prn) {
|
---|
| 895 | // AA(nObs+iCond, iPar) = 1.0;
|
---|
| 896 | // }
|
---|
| 897 | // }
|
---|
| 898 | // }
|
---|
| 899 | // }
|
---|
[3455] | 900 | }
|
---|
| 901 |
|
---|
| 902 | return success;
|
---|
| 903 | }
|
---|
[3470] | 904 |
|
---|
| 905 | // Process Epoch - Single-Epoch Method
|
---|
| 906 | ////////////////////////////////////////////////////////////////////////////
|
---|
[3472] | 907 | t_irc bncComb::processEpoch_singleEpoch(QTextStream& out,
|
---|
[6157] | 908 | QMap<QString, cmbCorr*>& resCorr,
|
---|
[3475] | 909 | ColumnVector& dx) {
|
---|
[3470] | 910 |
|
---|
[3487] | 911 | // Check Satellite Positions for Outliers
|
---|
| 912 | // --------------------------------------
|
---|
[3497] | 913 | if (checkOrbits(out) != success) {
|
---|
[3487] | 914 | return failure;
|
---|
| 915 | }
|
---|
| 916 |
|
---|
[3482] | 917 | // Outlier Detection Loop
|
---|
| 918 | // ----------------------
|
---|
| 919 | while (true) {
|
---|
[7297] | 920 |
|
---|
[3482] | 921 | // Remove Satellites that are not in Master
|
---|
| 922 | // ----------------------------------------
|
---|
| 923 | QMutableVectorIterator<cmbCorr*> it(corrs());
|
---|
| 924 | while (it.hasNext()) {
|
---|
| 925 | cmbCorr* corr = it.next();
|
---|
[6157] | 926 | QString prn = corr->_prn;
|
---|
[3482] | 927 | bool foundMaster = false;
|
---|
| 928 | QVectorIterator<cmbCorr*> itHlp(corrs());
|
---|
| 929 | while (itHlp.hasNext()) {
|
---|
| 930 | cmbCorr* corrHlp = itHlp.next();
|
---|
[6157] | 931 | QString prnHlp = corrHlp->_prn;
|
---|
| 932 | QString ACHlp = corrHlp->_acName;
|
---|
[3482] | 933 | if (ACHlp == _masterOrbitAC && prn == prnHlp) {
|
---|
| 934 | foundMaster = true;
|
---|
| 935 | break;
|
---|
| 936 | }
|
---|
[3476] | 937 | }
|
---|
[3482] | 938 | if (!foundMaster) {
|
---|
[3556] | 939 | delete corr;
|
---|
[3482] | 940 | it.remove();
|
---|
| 941 | }
|
---|
[3473] | 942 | }
|
---|
[7297] | 943 |
|
---|
[3482] | 944 | // Count Number of Observations per Satellite and per AC
|
---|
| 945 | // -----------------------------------------------------
|
---|
| 946 | QMap<QString, int> numObsPrn;
|
---|
| 947 | QMap<QString, int> numObsAC;
|
---|
| 948 | QVectorIterator<cmbCorr*> itCorr(corrs());
|
---|
| 949 | while (itCorr.hasNext()) {
|
---|
| 950 | cmbCorr* corr = itCorr.next();
|
---|
[6157] | 951 | QString prn = corr->_prn;
|
---|
| 952 | QString AC = corr->_acName;
|
---|
[3482] | 953 | if (numObsPrn.find(prn) == numObsPrn.end()) {
|
---|
| 954 | numObsPrn[prn] = 1;
|
---|
| 955 | }
|
---|
| 956 | else {
|
---|
| 957 | numObsPrn[prn] += 1;
|
---|
| 958 | }
|
---|
| 959 | if (numObsAC.find(AC) == numObsAC.end()) {
|
---|
| 960 | numObsAC[AC] = 1;
|
---|
| 961 | }
|
---|
| 962 | else {
|
---|
| 963 | numObsAC[AC] += 1;
|
---|
| 964 | }
|
---|
[3476] | 965 | }
|
---|
[7297] | 966 |
|
---|
[3482] | 967 | // Clean-Up the Paramters
|
---|
| 968 | // ----------------------
|
---|
| 969 | for (int iPar = 1; iPar <= _params.size(); iPar++) {
|
---|
| 970 | delete _params[iPar-1];
|
---|
[3474] | 971 | }
|
---|
[3482] | 972 | _params.clear();
|
---|
[7297] | 973 |
|
---|
[3482] | 974 | // Set new Parameters
|
---|
| 975 | // ------------------
|
---|
| 976 | int nextPar = 0;
|
---|
[7297] | 977 |
|
---|
[3482] | 978 | QMapIterator<QString, int> itAC(numObsAC);
|
---|
| 979 | while (itAC.hasNext()) {
|
---|
| 980 | itAC.next();
|
---|
| 981 | const QString& AC = itAC.key();
|
---|
| 982 | int numObs = itAC.value();
|
---|
| 983 | if (AC != _masterOrbitAC && numObs > 0) {
|
---|
[3485] | 984 | _params.push_back(new cmbParam(cmbParam::offACgps, ++nextPar, AC, ""));
|
---|
| 985 | if (_useGlonass) {
|
---|
| 986 | _params.push_back(new cmbParam(cmbParam::offACglo, ++nextPar, AC, ""));
|
---|
| 987 | }
|
---|
[3482] | 988 | }
|
---|
[7297] | 989 | }
|
---|
| 990 |
|
---|
[3482] | 991 | QMapIterator<QString, int> itPrn(numObsPrn);
|
---|
| 992 | while (itPrn.hasNext()) {
|
---|
| 993 | itPrn.next();
|
---|
| 994 | const QString& prn = itPrn.key();
|
---|
| 995 | int numObs = itPrn.value();
|
---|
| 996 | if (numObs > 0) {
|
---|
| 997 | _params.push_back(new cmbParam(cmbParam::clkSat, ++nextPar, "", prn));
|
---|
| 998 | }
|
---|
[7297] | 999 | }
|
---|
| 1000 |
|
---|
[3482] | 1001 | int nPar = _params.size();
|
---|
[7297] | 1002 | ColumnVector x0(nPar);
|
---|
[3482] | 1003 | x0 = 0.0;
|
---|
[7297] | 1004 |
|
---|
[3482] | 1005 | // Create First-Design Matrix
|
---|
| 1006 | // --------------------------
|
---|
| 1007 | Matrix AA;
|
---|
| 1008 | ColumnVector ll;
|
---|
| 1009 | DiagonalMatrix PP;
|
---|
| 1010 | if (createAmat(AA, ll, PP, x0, resCorr) != success) {
|
---|
| 1011 | return failure;
|
---|
[3476] | 1012 | }
|
---|
[7297] | 1013 |
|
---|
[3482] | 1014 | ColumnVector vv;
|
---|
| 1015 | try {
|
---|
| 1016 | Matrix ATP = AA.t() * PP;
|
---|
| 1017 | SymmetricMatrix NN; NN << ATP * AA;
|
---|
| 1018 | ColumnVector bb = ATP * ll;
|
---|
| 1019 | _QQ = NN.i();
|
---|
| 1020 | dx = _QQ * bb;
|
---|
| 1021 | vv = ll - AA * dx;
|
---|
[3476] | 1022 | }
|
---|
[3482] | 1023 | catch (Exception& exc) {
|
---|
| 1024 | out << exc.what() << endl;
|
---|
| 1025 | return failure;
|
---|
[3476] | 1026 | }
|
---|
[3474] | 1027 |
|
---|
[3482] | 1028 | int maxResIndex;
|
---|
[7297] | 1029 | double maxRes = vv.maximum_absolute_value1(maxResIndex);
|
---|
[3482] | 1030 | out.setRealNumberNotation(QTextStream::FixedNotation);
|
---|
[7297] | 1031 | out.setRealNumberPrecision(3);
|
---|
[3482] | 1032 | out << _resTime.datestr().c_str() << " " << _resTime.timestr().c_str()
|
---|
| 1033 | << " Maximum Residuum " << maxRes << ' '
|
---|
[7715] | 1034 | << corrs()[maxResIndex-1]->_acName << ' ' << corrs()[maxResIndex-1]->_prn.mid(0,3);
|
---|
[3474] | 1035 |
|
---|
[3482] | 1036 | if (maxRes > _MAXRES) {
|
---|
| 1037 | out << " Outlier" << endl;
|
---|
[3556] | 1038 | delete corrs()[maxResIndex-1];
|
---|
[3482] | 1039 | corrs().remove(maxResIndex-1);
|
---|
[3474] | 1040 | }
|
---|
[3482] | 1041 | else {
|
---|
| 1042 | out << " OK" << endl;
|
---|
| 1043 | out.setRealNumberNotation(QTextStream::FixedNotation);
|
---|
[7297] | 1044 | out.setRealNumberPrecision(3);
|
---|
[3482] | 1045 | for (int ii = 0; ii < vv.Nrows(); ii++) {
|
---|
| 1046 | const cmbCorr* corr = corrs()[ii];
|
---|
[7297] | 1047 | out << _resTime.datestr().c_str() << ' '
|
---|
[3482] | 1048 | << _resTime.timestr().c_str() << " "
|
---|
[6962] | 1049 | << corr->_acName << ' ' << corr->_prn.mid(0,3);
|
---|
[3482] | 1050 | out.setFieldWidth(6);
|
---|
[6330] | 1051 | out << " res = " << vv[ii] << endl;
|
---|
[3482] | 1052 | out.setFieldWidth(0);
|
---|
| 1053 | }
|
---|
| 1054 | return success;
|
---|
[3474] | 1055 | }
|
---|
| 1056 |
|
---|
[3473] | 1057 | }
|
---|
[3474] | 1058 |
|
---|
[3482] | 1059 | return failure;
|
---|
[3470] | 1060 | }
|
---|
[3487] | 1061 |
|
---|
| 1062 | // Check Satellite Positions for Outliers
|
---|
| 1063 | ////////////////////////////////////////////////////////////////////////////
|
---|
[3497] | 1064 | t_irc bncComb::checkOrbits(QTextStream& out) {
|
---|
[3487] | 1065 |
|
---|
[3489] | 1066 | const double MAX_DISPLACEMENT = 0.20;
|
---|
[3488] | 1067 |
|
---|
[3502] | 1068 | // Switch to last ephemeris (if possible)
|
---|
| 1069 | // --------------------------------------
|
---|
[3501] | 1070 | QMutableVectorIterator<cmbCorr*> im(corrs());
|
---|
| 1071 | while (im.hasNext()) {
|
---|
| 1072 | cmbCorr* corr = im.next();
|
---|
[6157] | 1073 | QString prn = corr->_prn;
|
---|
[6443] | 1074 |
|
---|
[7012] | 1075 | t_eph* ephLast = _ephUser.ephLast(prn);
|
---|
| 1076 | t_eph* ephPrev = _ephUser.ephPrev(prn);
|
---|
[6443] | 1077 |
|
---|
| 1078 | if (ephLast == 0) {
|
---|
[6962] | 1079 | out << "checkOrbit: missing eph (not found) " << corr->_prn.mid(0,3) << endl;
|
---|
[3556] | 1080 | delete corr;
|
---|
[3501] | 1081 | im.remove();
|
---|
| 1082 | }
|
---|
[6157] | 1083 | else if (corr->_eph == 0) {
|
---|
[6962] | 1084 | out << "checkOrbit: missing eph (zero) " << corr->_prn.mid(0,3) << endl;
|
---|
[3556] | 1085 | delete corr;
|
---|
[3503] | 1086 | im.remove();
|
---|
| 1087 | }
|
---|
[3502] | 1088 | else {
|
---|
[6443] | 1089 | if ( corr->_eph == ephLast || corr->_eph == ephPrev ) {
|
---|
| 1090 | switchToLastEph(ephLast, corr);
|
---|
[3502] | 1091 | }
|
---|
| 1092 | else {
|
---|
[6962] | 1093 | out << "checkOrbit: missing eph (deleted) " << corr->_prn.mid(0,3) << endl;
|
---|
[3556] | 1094 | delete corr;
|
---|
[3502] | 1095 | im.remove();
|
---|
| 1096 | }
|
---|
| 1097 | }
|
---|
[3501] | 1098 | }
|
---|
| 1099 |
|
---|
[3488] | 1100 | while (true) {
|
---|
| 1101 |
|
---|
| 1102 | // Compute Mean Corrections for all Satellites
|
---|
| 1103 | // -------------------------------------------
|
---|
[3489] | 1104 | QMap<QString, int> numCorr;
|
---|
[3488] | 1105 | QMap<QString, ColumnVector> meanRao;
|
---|
| 1106 | QVectorIterator<cmbCorr*> it(corrs());
|
---|
| 1107 | while (it.hasNext()) {
|
---|
| 1108 | cmbCorr* corr = it.next();
|
---|
[6157] | 1109 | QString prn = corr->_prn;
|
---|
[3488] | 1110 | if (meanRao.find(prn) == meanRao.end()) {
|
---|
| 1111 | meanRao[prn].ReSize(4);
|
---|
[6159] | 1112 | meanRao[prn].Rows(1,3) = corr->_orbCorr._xr;
|
---|
[7297] | 1113 | meanRao[prn](4) = 1;
|
---|
[3488] | 1114 | }
|
---|
| 1115 | else {
|
---|
[6159] | 1116 | meanRao[prn].Rows(1,3) += corr->_orbCorr._xr;
|
---|
[7297] | 1117 | meanRao[prn](4) += 1;
|
---|
[3488] | 1118 | }
|
---|
[3489] | 1119 | if (numCorr.find(prn) == numCorr.end()) {
|
---|
| 1120 | numCorr[prn] = 1;
|
---|
| 1121 | }
|
---|
| 1122 | else {
|
---|
| 1123 | numCorr[prn] += 1;
|
---|
| 1124 | }
|
---|
[3487] | 1125 | }
|
---|
[7297] | 1126 |
|
---|
[3488] | 1127 | // Compute Differences wrt Mean, find Maximum
|
---|
| 1128 | // ------------------------------------------
|
---|
| 1129 | QMap<QString, cmbCorr*> maxDiff;
|
---|
| 1130 | it.toFront();
|
---|
| 1131 | while (it.hasNext()) {
|
---|
| 1132 | cmbCorr* corr = it.next();
|
---|
[6157] | 1133 | QString prn = corr->_prn;
|
---|
[3488] | 1134 | if (meanRao[prn](4) != 0) {
|
---|
| 1135 | meanRao[prn] /= meanRao[prn](4);
|
---|
| 1136 | meanRao[prn](4) = 0;
|
---|
| 1137 | }
|
---|
[6159] | 1138 | corr->_diffRao = corr->_orbCorr._xr - meanRao[prn].Rows(1,3);
|
---|
[3488] | 1139 | if (maxDiff.find(prn) == maxDiff.end()) {
|
---|
| 1140 | maxDiff[prn] = corr;
|
---|
| 1141 | }
|
---|
| 1142 | else {
|
---|
[6157] | 1143 | double normMax = maxDiff[prn]->_diffRao.norm_Frobenius();
|
---|
| 1144 | double norm = corr->_diffRao.norm_Frobenius();
|
---|
[3488] | 1145 | if (norm > normMax) {
|
---|
| 1146 | maxDiff[prn] = corr;
|
---|
| 1147 | }
|
---|
[7297] | 1148 | }
|
---|
[3487] | 1149 | }
|
---|
[7297] | 1150 |
|
---|
[3655] | 1151 | if (_ACs.size() == 1) {
|
---|
| 1152 | break;
|
---|
| 1153 | }
|
---|
| 1154 |
|
---|
[3488] | 1155 | // Remove Outliers
|
---|
| 1156 | // ---------------
|
---|
| 1157 | bool removed = false;
|
---|
| 1158 | QMutableVectorIterator<cmbCorr*> im(corrs());
|
---|
| 1159 | while (im.hasNext()) {
|
---|
| 1160 | cmbCorr* corr = im.next();
|
---|
[6157] | 1161 | QString prn = corr->_prn;
|
---|
[3489] | 1162 | if (numCorr[prn] < 2) {
|
---|
[3556] | 1163 | delete corr;
|
---|
[3489] | 1164 | im.remove();
|
---|
| 1165 | }
|
---|
| 1166 | else if (corr == maxDiff[prn]) {
|
---|
[6157] | 1167 | double norm = corr->_diffRao.norm_Frobenius();
|
---|
[3488] | 1168 | if (norm > MAX_DISPLACEMENT) {
|
---|
[3497] | 1169 | out << _resTime.datestr().c_str() << " "
|
---|
| 1170 | << _resTime.timestr().c_str() << " "
|
---|
[7297] | 1171 | << "Orbit Outlier: "
|
---|
[8204] | 1172 | << corr->_acName.toLatin1().data() << " "
|
---|
| 1173 | << prn.mid(0,3).toLatin1().data() << " "
|
---|
[7297] | 1174 | << corr->_iod << " "
|
---|
[6157] | 1175 | << norm << endl;
|
---|
[3556] | 1176 | delete corr;
|
---|
[3488] | 1177 | im.remove();
|
---|
| 1178 | removed = true;
|
---|
| 1179 | }
|
---|
| 1180 | }
|
---|
[3487] | 1181 | }
|
---|
[7297] | 1182 |
|
---|
[3488] | 1183 | if (!removed) {
|
---|
| 1184 | break;
|
---|
| 1185 | }
|
---|
[3487] | 1186 | }
|
---|
| 1187 |
|
---|
| 1188 | return success;
|
---|
| 1189 | }
|
---|
[3588] | 1190 |
|
---|
[7297] | 1191 | //
|
---|
[3588] | 1192 | ////////////////////////////////////////////////////////////////////////////
|
---|
[5583] | 1193 | void bncComb::slotProviderIDChanged(QString mountPoint) {
|
---|
| 1194 | QMutexLocker locker(&_mutex);
|
---|
| 1195 |
|
---|
[8065] | 1196 | QTextStream out(&_log, QIODevice::WriteOnly);
|
---|
| 1197 |
|
---|
[5583] | 1198 | // Find the AC Name
|
---|
| 1199 | // ----------------
|
---|
| 1200 | QString acName;
|
---|
| 1201 | QListIterator<cmbAC*> icAC(_ACs);
|
---|
| 1202 | while (icAC.hasNext()) {
|
---|
| 1203 | cmbAC* AC = icAC.next();
|
---|
| 1204 | if (AC->mountPoint == mountPoint) {
|
---|
| 1205 | acName = AC->name;
|
---|
[8204] | 1206 | out << "Provider ID changed: AC " << AC->name.toLatin1().data() << " "
|
---|
[8065] | 1207 | << _resTime.datestr().c_str() << " "
|
---|
| 1208 | << _resTime.timestr().c_str() << endl;
|
---|
[5583] | 1209 | break;
|
---|
| 1210 | }
|
---|
| 1211 | }
|
---|
| 1212 | if (acName.isEmpty()) {
|
---|
| 1213 | return;
|
---|
| 1214 | }
|
---|
| 1215 |
|
---|
| 1216 | // Remove all corrections of the corresponding AC
|
---|
| 1217 | // ----------------------------------------------
|
---|
| 1218 | QListIterator<bncTime> itTime(_buffer.keys());
|
---|
| 1219 | while (itTime.hasNext()) {
|
---|
| 1220 | bncTime epoTime = itTime.next();
|
---|
| 1221 | QVector<cmbCorr*>& corrVec = _buffer[epoTime].corrs;
|
---|
[5584] | 1222 | QMutableVectorIterator<cmbCorr*> it(corrVec);
|
---|
[5583] | 1223 | while (it.hasNext()) {
|
---|
| 1224 | cmbCorr* corr = it.next();
|
---|
[6157] | 1225 | if (acName == corr->_acName) {
|
---|
[5584] | 1226 | delete corr;
|
---|
| 1227 | it.remove();
|
---|
[5583] | 1228 | }
|
---|
| 1229 | }
|
---|
| 1230 | }
|
---|
[5585] | 1231 |
|
---|
| 1232 | // Reset Satellite Offsets
|
---|
| 1233 | // -----------------------
|
---|
| 1234 | if (_method == filter) {
|
---|
| 1235 | for (int iPar = 1; iPar <= _params.size(); iPar++) {
|
---|
| 1236 | cmbParam* pp = _params[iPar-1];
|
---|
| 1237 | if (pp->AC == acName && pp->type == cmbParam::offACSat) {
|
---|
| 1238 | pp->xx = 0.0;
|
---|
| 1239 | _QQ.Row(iPar) = 0.0;
|
---|
| 1240 | _QQ.Column(iPar) = 0.0;
|
---|
| 1241 | _QQ(iPar,iPar) = pp->sig0 * pp->sig0;
|
---|
| 1242 | }
|
---|
| 1243 | }
|
---|
| 1244 | }
|
---|
[5583] | 1245 | }
|
---|