[7237] | 1 | /* -------------------------------------------------------------------------
|
---|
| 2 | * BKG NTRIP Client
|
---|
| 3 | * -------------------------------------------------------------------------
|
---|
| 4 | *
|
---|
| 5 | * Class: t_pppParlist
|
---|
| 6 | *
|
---|
| 7 | * Purpose: List of estimated parameters
|
---|
| 8 | *
|
---|
| 9 | * Author: L. Mervart
|
---|
| 10 | *
|
---|
| 11 | * Created: 29-Jul-2014
|
---|
| 12 | *
|
---|
| 13 | * Changes:
|
---|
| 14 | *
|
---|
| 15 | * -----------------------------------------------------------------------*/
|
---|
| 16 |
|
---|
| 17 | #include <cmath>
|
---|
| 18 | #include <iostream>
|
---|
| 19 | #include <sstream>
|
---|
| 20 | #include <iomanip>
|
---|
| 21 | #include <algorithm>
|
---|
| 22 | #include <newmatio.h>
|
---|
| 23 |
|
---|
| 24 | #include "pppParlist.h"
|
---|
| 25 | #include "pppSatObs.h"
|
---|
| 26 | #include "pppStation.h"
|
---|
| 27 | #include "bncutils.h"
|
---|
| 28 | #include "bncconst.h"
|
---|
| 29 | #include "pppClient.h"
|
---|
| 30 |
|
---|
| 31 | using namespace BNC_PPP;
|
---|
| 32 | using namespace std;
|
---|
| 33 |
|
---|
| 34 | // Constructor
|
---|
| 35 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 36 | t_pppParam::t_pppParam(e_type type, const t_prn& prn, t_lc::type tLC,
|
---|
[9504] | 37 | const vector<t_pppSatObs*>* obsVector) {
|
---|
[7237] | 38 |
|
---|
| 39 | _type = type;
|
---|
| 40 | _prn = prn;
|
---|
| 41 | _tLC = tLC;
|
---|
| 42 | _x0 = 0.0;
|
---|
| 43 | _indexOld = -1;
|
---|
| 44 | _indexNew = -1;
|
---|
| 45 | _noise = 0.0;
|
---|
| 46 | _ambInfo = 0;
|
---|
| 47 |
|
---|
| 48 | switch (_type) {
|
---|
| 49 | case crdX:
|
---|
| 50 | _epoSpec = false;
|
---|
| 51 | _sigma0 = OPT->_aprSigCrd[0];
|
---|
| 52 | _noise = OPT->_noiseCrd[0];
|
---|
| 53 | break;
|
---|
| 54 | case crdY:
|
---|
| 55 | _epoSpec = false;
|
---|
| 56 | _sigma0 = OPT->_aprSigCrd[1];
|
---|
| 57 | _noise = OPT->_noiseCrd[1];
|
---|
| 58 | break;
|
---|
| 59 | case crdZ:
|
---|
| 60 | _epoSpec = false;
|
---|
| 61 | _sigma0 = OPT->_aprSigCrd[2];
|
---|
| 62 | _noise = OPT->_noiseCrd[2];
|
---|
| 63 | break;
|
---|
[10002] | 64 | case clkR:
|
---|
[7237] | 65 | _epoSpec = true;
|
---|
[9303] | 66 | _sigma0 = OPT->_aprSigClk;
|
---|
[7237] | 67 | break;
|
---|
| 68 | case amb:
|
---|
| 69 | _epoSpec = false;
|
---|
| 70 | _sigma0 = OPT->_aprSigAmb;
|
---|
| 71 | _ambInfo = new t_ambInfo();
|
---|
| 72 | if (obsVector) {
|
---|
| 73 | for (unsigned ii = 0; ii < obsVector->size(); ii++) {
|
---|
| 74 | const t_pppSatObs* obs = obsVector->at(ii);
|
---|
| 75 | if (obs->prn() == _prn) {
|
---|
[10003] | 76 | double offGlo = 0;
|
---|
[10002] | 77 | if (_prn.system() == 'R' && tLC != t_lc::MW) {
|
---|
[10003] | 78 | offGlo = PPP_CLIENT->offGlo();
|
---|
[10002] | 79 | }
|
---|
[10003] | 80 | double offGal = 0;
|
---|
| 81 | if (_prn.system() == 'E' && tLC != t_lc::MW) {
|
---|
| 82 | offGal = PPP_CLIENT->offGal();
|
---|
| 83 | }
|
---|
| 84 | double offBds = 0;
|
---|
| 85 | if (_prn.system() == 'C' && tLC != t_lc::MW) {
|
---|
| 86 | offBds = PPP_CLIENT->offBds();
|
---|
| 87 | }
|
---|
| 88 | _x0 = floor((obs->obsValue(tLC) - offGlo - offGal - offBds - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);
|
---|
[7237] | 89 | break;
|
---|
| 90 | }
|
---|
| 91 | }
|
---|
| 92 | }
|
---|
| 93 | break;
|
---|
[10003] | 94 | case offGlo:
|
---|
[10002] | 95 | _epoSpec = true;
|
---|
| 96 | _sigma0 = OPT->_aprSigClk;
|
---|
[10003] | 97 | _x0 = PPP_CLIENT->offGlo();
|
---|
| 98 | break;
|
---|
| 99 | case offGal:
|
---|
| 100 | _epoSpec = true;
|
---|
| 101 | _sigma0 = OPT->_aprSigClk;
|
---|
| 102 | _x0 = PPP_CLIENT->offGal();
|
---|
| 103 | break;
|
---|
| 104 | case offBds:
|
---|
| 105 | _epoSpec = true;
|
---|
| 106 | _sigma0 = OPT->_aprSigClk;
|
---|
| 107 | _x0 = PPP_CLIENT->offBds();
|
---|
| 108 | break;
|
---|
[7237] | 109 | case trp:
|
---|
| 110 | _epoSpec = false;
|
---|
| 111 | _sigma0 = OPT->_aprSigTrp;
|
---|
| 112 | _noise = OPT->_noiseTrp;
|
---|
| 113 | break;
|
---|
[8905] | 114 | case ion:
|
---|
[9439] | 115 | _epoSpec = false;
|
---|
[9386] | 116 | _sigma0 = OPT->_aprSigIon;
|
---|
[9439] | 117 | _noise = OPT->_noiseIon;
|
---|
[8905] | 118 | break;
|
---|
[9644] | 119 | case cBiasG1: case cBiasR1: case cBiasE1: case cBiasC1:
|
---|
| 120 | case cBiasG2: case cBiasR2: case cBiasE2: case cBiasC2:
|
---|
| 121 | _epoSpec = false;
|
---|
| 122 | _sigma0 = OPT->_aprSigCodeBias;
|
---|
| 123 | _noise = OPT->_noiseCodeBias;
|
---|
| 124 | break;
|
---|
| 125 | case pBiasG1: case pBiasR1: case pBiasE1: case pBiasC1:
|
---|
| 126 | case pBiasG2: case pBiasR2: case pBiasE2: case pBiasC2:
|
---|
| 127 | _epoSpec = false;
|
---|
| 128 | _sigma0 = OPT->_aprSigPhaseBias;
|
---|
| 129 | _noise = OPT->_noisePhaseBias;
|
---|
| 130 | break;
|
---|
[7237] | 131 | }
|
---|
| 132 | }
|
---|
| 133 |
|
---|
[9504] | 134 | //
|
---|
| 135 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 136 | t_pppParam::t_pppParam(const t_pppParam* old) {
|
---|
| 137 | _type = old->type();
|
---|
| 138 | _prn = old->prn();
|
---|
| 139 | _tLC = old->tLC();
|
---|
| 140 | _indexOld = old->indexOld();
|
---|
| 141 | _indexNew = old->indexNew();
|
---|
| 142 | _noise = old->noise();
|
---|
| 143 | _sigma0 = old->sigma0();
|
---|
| 144 | _epoSpec = old->epoSpec();
|
---|
[9508] | 145 | _x0 = old->x0();
|
---|
| 146 | setFirstObsTime(old->firstObsTime());
|
---|
| 147 | setLastObsTime(old->lastObsTime());
|
---|
[9504] | 148 | _ambInfo = 0;
|
---|
| 149 | if (_type == t_pppParam::amb) {
|
---|
| 150 | _ambInfo = new t_ambInfo();
|
---|
| 151 | _ambInfo->_resetCandidate = old->_ambInfo->_resetCandidate;
|
---|
| 152 | _ambInfo->_eleSat = old->_ambInfo->_eleSat;
|
---|
| 153 | _ambInfo->_numEpo = old->_ambInfo->_numEpo;
|
---|
| 154 | }
|
---|
| 155 | }
|
---|
| 156 |
|
---|
[7237] | 157 | // Destructor
|
---|
| 158 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 159 | t_pppParam::~t_pppParam() {
|
---|
[9504] | 160 | if (_ambInfo) {
|
---|
| 161 | delete _ambInfo;
|
---|
| 162 | }
|
---|
[7237] | 163 | }
|
---|
| 164 | //
|
---|
| 165 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 166 | double t_pppParam::partial(const bncTime& /* epoTime */, const t_pppSatObs* obs,
|
---|
[8956] | 167 | const t_lc::type& tLC, const t_prn refPrn) const {
|
---|
[7237] | 168 |
|
---|
| 169 | // Special Case - Melbourne-Wuebbena
|
---|
| 170 | // ---------------------------------
|
---|
| 171 | if (tLC == t_lc::MW && _type != amb) {
|
---|
| 172 | return 0.0;
|
---|
| 173 | }
|
---|
| 174 |
|
---|
| 175 | const t_pppStation* sta = PPP_CLIENT->staRover();
|
---|
[8905] | 176 | ColumnVector rhoV = sta->xyzApr() - obs->xc().Rows(1,3);
|
---|
[7237] | 177 |
|
---|
[8905] | 178 | map<t_frequency::type, double> codeCoeff;
|
---|
| 179 | map<t_frequency::type, double> phaseCoeff;
|
---|
| 180 | map<t_frequency::type, double> ionoCoeff;
|
---|
| 181 | obs->lcCoeff(tLC, codeCoeff, phaseCoeff, ionoCoeff);
|
---|
| 182 |
|
---|
[7237] | 183 | switch (_type) {
|
---|
| 184 | case crdX:
|
---|
[9548] | 185 | if (tLC == t_lc::GIM) {return 0.0;}
|
---|
[8905] | 186 | return (sta->xyzApr()[0] - obs->xc()[0]) / rhoV.NormFrobenius();
|
---|
[7237] | 187 | case crdY:
|
---|
[9548] | 188 | if (tLC == t_lc::GIM) {return 0.0;}
|
---|
[8905] | 189 | return (sta->xyzApr()[1] - obs->xc()[1]) / rhoV.NormFrobenius();
|
---|
[7237] | 190 | case crdZ:
|
---|
[9548] | 191 | if (tLC == t_lc::GIM) {return 0.0;}
|
---|
[8905] | 192 | return (sta->xyzApr()[2] - obs->xc()[2]) / rhoV.NormFrobenius();
|
---|
[10002] | 193 | case clkR:
|
---|
[9548] | 194 | if (tLC == t_lc::GIM) {return 0.0;}
|
---|
[10002] | 195 | return 1.0;
|
---|
[10003] | 196 | case offGlo:
|
---|
[9548] | 197 | if (tLC == t_lc::GIM) {return 0.0;}
|
---|
[7237] | 198 | return (obs->prn().system() == 'R') ? 1.0 : 0.0;
|
---|
[10003] | 199 | case offGal:
|
---|
| 200 | if (tLC == t_lc::GIM) {return 0.0;}
|
---|
| 201 | return (obs->prn().system() == 'E') ? 1.0 : 0.0;
|
---|
| 202 | case offBds:
|
---|
| 203 | if (tLC == t_lc::GIM) {return 0.0;}
|
---|
| 204 | return (obs->prn().system() == 'C') ? 1.0 : 0.0;
|
---|
[7237] | 205 | case amb:
|
---|
[9548] | 206 | if (tLC == t_lc::GIM) {return 0.0;}
|
---|
[8905] | 207 | else if ((OPT->_obsModelType == OPT->IF) ||
|
---|
| 208 | (OPT->_obsModelType == OPT->PPPRTK) ||
|
---|
| 209 | (OPT->_obsModelType == OPT->UncombPPP) ||
|
---|
| 210 | (OPT->_obsModelType == OPT->DCMcodeBias && !obs->isReference()) ||
|
---|
| 211 | (OPT->_obsModelType == OPT->DCMphaseBias && !obs->isReference()) ) {
|
---|
[9386] | 212 |
|
---|
[8905] | 213 | if (obs->prn() == _prn) {
|
---|
| 214 | if (tLC == _tLC) {
|
---|
| 215 | return (obs->lambda(tLC));
|
---|
| 216 | }
|
---|
| 217 | else if (tLC == t_lc::lIF && _tLC == t_lc::MW) {
|
---|
| 218 | return obs->lambda(t_lc::lIF) * obs->lambda(t_lc::MW) / obs->lambda(t_lc::l2);
|
---|
| 219 | }
|
---|
| 220 | else {
|
---|
| 221 | if (_tLC == t_lc::l1) {
|
---|
| 222 | return obs->lambda(t_lc::l1) * phaseCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l1)];
|
---|
| 223 | }
|
---|
| 224 | else if (_tLC == t_lc::l2) {
|
---|
| 225 | return obs->lambda(t_lc::l2) * phaseCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l2)];
|
---|
| 226 | }
|
---|
| 227 | }
|
---|
| 228 | }
|
---|
| 229 | }
|
---|
| 230 | break;
|
---|
| 231 | case trp:
|
---|
[8961] | 232 | if (tLC == t_lc::GIM) {
|
---|
| 233 | return 0.0;
|
---|
| 234 | }
|
---|
| 235 | else {
|
---|
| 236 | return 1.0 / sin(obs->eleSat());
|
---|
| 237 | }
|
---|
[8905] | 238 | case ion:
|
---|
[7237] | 239 | if (obs->prn() == _prn) {
|
---|
[8905] | 240 | if (tLC == t_lc::c1) {
|
---|
| 241 | return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::c1)];
|
---|
[7237] | 242 | }
|
---|
[8905] | 243 | else if (tLC == t_lc::c2) {
|
---|
| 244 | return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::c2)];
|
---|
[7237] | 245 | }
|
---|
[8905] | 246 | else if (tLC == t_lc::l1) {
|
---|
| 247 | return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l1)];
|
---|
[7237] | 248 | }
|
---|
[8905] | 249 | else if (tLC == t_lc::l2) {
|
---|
| 250 | return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l2)];
|
---|
| 251 | }
|
---|
| 252 | else if (tLC == t_lc::GIM) {
|
---|
| 253 | return -1.0;
|
---|
| 254 | }
|
---|
[7237] | 255 | }
|
---|
[8956] | 256 | if (tLC == t_lc::GIM && _prn == refPrn) {
|
---|
[8961] | 257 | return 1.0;
|
---|
[8905] | 258 | }
|
---|
| 259 | break;
|
---|
[9386] | 260 | case cBiasG1:
|
---|
| 261 | if ((obs->prn().system() == 'G') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;}
|
---|
[8905] | 262 | break;
|
---|
[9561] | 263 | case cBiasR1:
|
---|
| 264 | if ((obs->prn().system() == 'R') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;}
|
---|
| 265 | break;
|
---|
[9386] | 266 | case cBiasE1:
|
---|
| 267 | if ((obs->prn().system() == 'E') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;}
|
---|
[8905] | 268 | break;
|
---|
[9386] | 269 | case cBiasC1:
|
---|
| 270 | if ((obs->prn().system() == 'C') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;}
|
---|
| 271 | break;
|
---|
| 272 | case cBiasG2:
|
---|
| 273 | if ((obs->prn().system() == 'G') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;}
|
---|
| 274 | break;
|
---|
[9561] | 275 | case cBiasR2:
|
---|
| 276 | if ((obs->prn().system() == 'R') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;}
|
---|
| 277 | break;
|
---|
[9386] | 278 | case cBiasE2:
|
---|
| 279 | if ((obs->prn().system() == 'E') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;}
|
---|
| 280 | break;
|
---|
| 281 | case cBiasC2:
|
---|
| 282 | if ((obs->prn().system() == 'C') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;}
|
---|
| 283 | break;
|
---|
| 284 | case pBiasG1:
|
---|
| 285 | if ((obs->prn().system() == 'G') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;}
|
---|
| 286 | break;
|
---|
[9561] | 287 | case pBiasR1:
|
---|
| 288 | if ((obs->prn().system() == 'R') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;}
|
---|
| 289 | break;
|
---|
[9386] | 290 | case pBiasE1:
|
---|
| 291 | if ((obs->prn().system() == 'E') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;}
|
---|
| 292 | break;
|
---|
| 293 | case pBiasC1:
|
---|
| 294 | if ((obs->prn().system() == 'C') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;}
|
---|
| 295 | break;
|
---|
| 296 | case pBiasG2:
|
---|
| 297 | if ((obs->prn().system() == 'G') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;}
|
---|
| 298 | break;
|
---|
[9561] | 299 | case pBiasR2:
|
---|
| 300 | if ((obs->prn().system() == 'R') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;}
|
---|
| 301 | break;
|
---|
[9386] | 302 | case pBiasE2:
|
---|
| 303 | if ((obs->prn().system() == 'E') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;}
|
---|
| 304 | break;
|
---|
| 305 | case pBiasC2:
|
---|
| 306 | if ((obs->prn().system() == 'C') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;}
|
---|
| 307 | break;
|
---|
| 308 |
|
---|
[7237] | 309 | }
|
---|
| 310 | return 0.0;
|
---|
| 311 | }
|
---|
| 312 |
|
---|
| 313 | //
|
---|
| 314 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 315 | string t_pppParam::toString() const {
|
---|
| 316 | stringstream ss;
|
---|
| 317 | switch (_type) {
|
---|
| 318 | case crdX:
|
---|
| 319 | ss << "CRD_X";
|
---|
| 320 | break;
|
---|
| 321 | case crdY:
|
---|
| 322 | ss << "CRD_Y";
|
---|
| 323 | break;
|
---|
| 324 | case crdZ:
|
---|
| 325 | ss << "CRD_Z";
|
---|
| 326 | break;
|
---|
[10002] | 327 | case clkR:
|
---|
| 328 | ss << "REC_CLK ";
|
---|
[7237] | 329 | break;
|
---|
[10003] | 330 | case offGlo:
|
---|
| 331 | ss << "OFF_GLO ";
|
---|
[7237] | 332 | break;
|
---|
[10003] | 333 | case offGal:
|
---|
[10004] | 334 | ss << "OFF_GAL ";
|
---|
[10003] | 335 | break;
|
---|
| 336 | case offBds:
|
---|
| 337 | ss << "OFF_BDS ";
|
---|
| 338 | break;
|
---|
[7237] | 339 | case trp:
|
---|
[9386] | 340 | ss << "TRP ";
|
---|
[7237] | 341 | break;
|
---|
[8905] | 342 | case amb:
|
---|
| 343 | ss << "AMB " << left << setw(3) << t_lc::toString(_tLC) << right << ' ' << _prn.toString();
|
---|
| 344 | break;
|
---|
| 345 | case ion:
|
---|
| 346 | ss << "ION " << left << setw(3) << t_lc::toString(_tLC) << right << ' ' << _prn.toString();
|
---|
| 347 | break;
|
---|
[9386] | 348 | case cBiasG1: case pBiasG1:
|
---|
| 349 | case cBiasG2: case pBiasG2:
|
---|
| 350 | ss << "BIA " << left << setw(3) << t_lc::toString(_tLC) << right << " G ";
|
---|
[8905] | 351 | break;
|
---|
[9561] | 352 | case cBiasR1: case pBiasR1:
|
---|
| 353 | case cBiasR2: case pBiasR2:
|
---|
| 354 | ss << "BIA " << left << setw(3) << t_lc::toString(_tLC) << right << " R ";
|
---|
| 355 | break;
|
---|
[9386] | 356 | case cBiasE1: case pBiasE1:
|
---|
| 357 | case cBiasE2: case pBiasE2:
|
---|
| 358 | ss << "BIA " << left << setw(3) << t_lc::toString(_tLC) << right << " E ";
|
---|
| 359 | break;
|
---|
| 360 | case cBiasC1: case pBiasC1:
|
---|
| 361 | case cBiasC2: case pBiasC2:
|
---|
| 362 | ss << "BIA " << left << setw(3) << t_lc::toString(_tLC) << right << " C ";
|
---|
| 363 | break;
|
---|
[7237] | 364 | }
|
---|
| 365 | return ss.str();
|
---|
| 366 | }
|
---|
| 367 |
|
---|
| 368 | // Constructor
|
---|
| 369 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 370 | t_pppParlist::t_pppParlist() {
|
---|
| 371 | }
|
---|
| 372 |
|
---|
| 373 | // Destructor
|
---|
| 374 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 375 | t_pppParlist::~t_pppParlist() {
|
---|
[9504] | 376 | _usedSystems.clear();
|
---|
| 377 |
|
---|
| 378 | vector<t_pppParam*>::iterator it = _params.begin();
|
---|
| 379 | while (it != _params.end()) {
|
---|
| 380 | t_pppParam* par = *it;
|
---|
| 381 | delete par;
|
---|
| 382 | it = _params.erase(it);
|
---|
[7237] | 383 | }
|
---|
| 384 | }
|
---|
| 385 |
|
---|
| 386 | //
|
---|
| 387 | ////////////////////////////////////////////////////////////////////////////
|
---|
[9504] | 388 | t_pppParlist::t_pppParlist(const t_pppParlist& old) {
|
---|
| 389 |
|
---|
| 390 | _usedSystems = old._usedSystems;
|
---|
| 391 |
|
---|
| 392 | vector<t_pppParam*>::const_iterator it = old.params().begin();
|
---|
| 393 | while (it != old.params().end()) {
|
---|
| 394 | const t_pppParam* oldParam = *it;
|
---|
| 395 | _params.push_back(new t_pppParam(oldParam));
|
---|
| 396 | }
|
---|
| 397 | }
|
---|
| 398 |
|
---|
| 399 | //
|
---|
| 400 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 401 | const t_pppParlist& t_pppParlist::operator= (const t_pppParlist& p) {
|
---|
| 402 |
|
---|
| 403 | _usedSystems.clear();
|
---|
| 404 |
|
---|
| 405 | _usedSystems = p._usedSystems;
|
---|
| 406 |
|
---|
| 407 | vector<t_pppParam*>::iterator it = _params.begin();
|
---|
| 408 | while (it != _params.end()) {
|
---|
| 409 | t_pppParam* par = *it;
|
---|
| 410 | delete par;
|
---|
| 411 | it = _params.erase(it);
|
---|
| 412 | }
|
---|
| 413 |
|
---|
| 414 | for (unsigned jj = 0; jj < p.params().size(); jj++) {
|
---|
| 415 | t_pppParam* parFrom = p.params()[jj];
|
---|
| 416 | _params.push_back(new t_pppParam(parFrom));
|
---|
| 417 | }
|
---|
| 418 | return *this;
|
---|
| 419 | }
|
---|
| 420 |
|
---|
| 421 | //
|
---|
| 422 | ////////////////////////////////////////////////////////////////////////////
|
---|
[9419] | 423 | t_irc t_pppParlist::set(const bncTime& epoTime, const std::vector<t_pppSatObs*>& obsVector,
|
---|
[8956] | 424 | const QMap<char, t_pppRefSat*>& refSatMap) {
|
---|
[7237] | 425 |
|
---|
| 426 | // Remove some Parameters
|
---|
| 427 | // ----------------------
|
---|
| 428 | vector<t_pppParam*>::iterator it = _params.begin();
|
---|
| 429 | while (it != _params.end()) {
|
---|
| 430 | t_pppParam* par = *it;
|
---|
| 431 |
|
---|
| 432 | bool remove = false;
|
---|
| 433 |
|
---|
| 434 | if (par->epoSpec()) {
|
---|
| 435 | remove = true;
|
---|
| 436 | }
|
---|
| 437 |
|
---|
[8956] | 438 | else if (par->type() == t_pppParam::crdX ||
|
---|
[7988] | 439 | par->type() == t_pppParam::crdY ||
|
---|
| 440 | par->type() == t_pppParam::crdZ) {
|
---|
[7973] | 441 | if (par->lastObsTime().valid() && (epoTime - par->lastObsTime() > 60.0)) {
|
---|
[7237] | 442 | remove = true;
|
---|
| 443 | }
|
---|
| 444 | }
|
---|
[9419] | 445 |
|
---|
[8956] | 446 | else if (par->type() == t_pppParam::amb) {
|
---|
[9545] | 447 | if (par->lastObsTime().valid() && (epoTime - par->lastObsTime() > 60.0)) {
|
---|
| 448 | remove = true;
|
---|
| 449 | }
|
---|
[9494] | 450 | if (OPT->_obsModelType == OPT->DCMcodeBias ||
|
---|
| 451 | OPT->_obsModelType == OPT->DCMphaseBias) {
|
---|
[9508] | 452 | char sys = par->prn().system();
|
---|
| 453 | t_prn refPrn = (refSatMap[sys])->prn();
|
---|
[9527] | 454 | if (par->lastObsTime().valid() && par->prn() == refPrn) {
|
---|
[9419] | 455 | remove = true;
|
---|
| 456 | }
|
---|
[8956] | 457 | }
|
---|
| 458 | }
|
---|
[7237] | 459 |
|
---|
[9447] | 460 | else if (par->type() == t_pppParam::ion) {
|
---|
[9527] | 461 | if (par->lastObsTime().valid() && (epoTime - par->lastObsTime() > 60.0)) {
|
---|
| 462 | remove = true;
|
---|
[9447] | 463 | }
|
---|
| 464 | }
|
---|
[7237] | 465 | if (remove) {
|
---|
[9508] | 466 | #ifdef BNC_DEBUG_PPP
|
---|
[9527] | 467 | LOG << "remove0 " << par->toString() << std::endl;
|
---|
[9508] | 468 | #endif
|
---|
[7237] | 469 | delete par;
|
---|
| 470 | it = _params.erase(it);
|
---|
| 471 | }
|
---|
| 472 | else {
|
---|
| 473 | ++it;
|
---|
| 474 | }
|
---|
| 475 | }
|
---|
| 476 |
|
---|
[9532] | 477 | // check which systems have observations
|
---|
| 478 | // -------------------------------------
|
---|
| 479 | _usedSystems.clear();
|
---|
| 480 | for (unsigned jj = 0; jj < obsVector.size(); jj++) {
|
---|
| 481 | const t_pppSatObs* satObs = obsVector[jj];
|
---|
[9533] | 482 | char sys = satObs->prn().system();
|
---|
[9532] | 483 | if (!_usedSystems.contains(sys)) {
|
---|
| 484 | _usedSystems.append(sys);
|
---|
| 485 | }
|
---|
| 486 | }
|
---|
| 487 |
|
---|
[7237] | 488 | // Check whether parameters have observations
|
---|
| 489 | // ------------------------------------------
|
---|
| 490 | for (unsigned ii = 0; ii < _params.size(); ii++) {
|
---|
| 491 | t_pppParam* par = _params[ii];
|
---|
| 492 | if (par->prn() == 0) {
|
---|
| 493 | par->setLastObsTime(epoTime);
|
---|
| 494 | if (par->firstObsTime().undef()) {
|
---|
| 495 | par->setFirstObsTime(epoTime);
|
---|
| 496 | }
|
---|
| 497 | }
|
---|
| 498 | else {
|
---|
| 499 | for (unsigned jj = 0; jj < obsVector.size(); jj++) {
|
---|
| 500 | const t_pppSatObs* satObs = obsVector[jj];
|
---|
| 501 | if (satObs->prn() == par->prn()) {
|
---|
| 502 | par->setLastObsTime(epoTime);
|
---|
| 503 | if (par->firstObsTime().undef()) {
|
---|
| 504 | par->setFirstObsTime(epoTime);
|
---|
| 505 | }
|
---|
| 506 | break;
|
---|
| 507 | }
|
---|
| 508 | }
|
---|
| 509 | }
|
---|
| 510 | }
|
---|
| 511 |
|
---|
[9419] | 512 | if (OPT->_obsModelType == OPT->DCMcodeBias ||
|
---|
| 513 | OPT->_obsModelType == OPT->DCMphaseBias) {
|
---|
[9527] | 514 | // Check if ambiguity parameters have observations
|
---|
| 515 | // -----------------------------------------------
|
---|
[9419] | 516 | vector<t_pppParam*>::iterator it = _params.begin();
|
---|
[9527] | 517 | QList<t_prn> lostSats;
|
---|
[9419] | 518 | while (it != _params.end()) {
|
---|
| 519 | t_pppParam* par = *it;
|
---|
[9527] | 520 | if ((par->type() == t_pppParam::amb) &&
|
---|
[9528] | 521 | (!par->lastObsTime().valid() || (epoTime - par->lastObsTime() > 0.0))) {
|
---|
[9534] | 522 | #ifdef BNC_DEBUG_PPP
|
---|
[9527] | 523 | LOG << "remove1 " << par->toString() << std::endl;
|
---|
[9534] | 524 | #endif
|
---|
[9527] | 525 | lostSats.append(par->prn());
|
---|
[9419] | 526 | delete par;
|
---|
| 527 | it = _params.erase(it);
|
---|
| 528 | }
|
---|
[9532] | 529 | // Check if systems have to be presented per biases
|
---|
[9535] | 530 | // ----------------------------------------------
|
---|
[9532] | 531 | else if ((par->type() == t_pppParam::cBiasG1 ||
|
---|
| 532 | par->type() == t_pppParam::cBiasG2 ||
|
---|
| 533 | par->type() == t_pppParam::pBiasG1 ||
|
---|
| 534 | par->type() == t_pppParam::pBiasG2) && !usedSystems().contains('G')) {
|
---|
[9534] | 535 | #ifdef BNC_DEBUG_PPP
|
---|
| 536 | LOG << "remove1 " << par->toString() << std::endl;
|
---|
| 537 | #endif
|
---|
[9548] | 538 | delete par;
|
---|
| 539 | it = _params.erase(it);
|
---|
[9532] | 540 | }
|
---|
[9561] | 541 | else if ((par->type() == t_pppParam::cBiasR1 ||
|
---|
| 542 | par->type() == t_pppParam::cBiasR2 ||
|
---|
| 543 | par->type() == t_pppParam::pBiasR1 ||
|
---|
| 544 | par->type() == t_pppParam::pBiasR2) && !usedSystems().contains('R')) {
|
---|
| 545 | #ifdef BNC_DEBUG_PPP
|
---|
| 546 | LOG << "remove1 " << par->toString() << std::endl;
|
---|
| 547 | #endif
|
---|
| 548 | delete par;
|
---|
| 549 | it = _params.erase(it);
|
---|
| 550 | }
|
---|
[9532] | 551 | else if ((par->type() == t_pppParam::cBiasE1 ||
|
---|
| 552 | par->type() == t_pppParam::cBiasE2 ||
|
---|
| 553 | par->type() == t_pppParam::pBiasE1 ||
|
---|
| 554 | par->type() == t_pppParam::pBiasE2) && !usedSystems().contains('E')) {
|
---|
[9534] | 555 | #ifdef BNC_DEBUG_PPP
|
---|
| 556 | LOG << "remove1 " << par->toString() << std::endl;
|
---|
| 557 | #endif
|
---|
[9548] | 558 | delete par;
|
---|
| 559 | it = _params.erase(it);
|
---|
[9532] | 560 | }
|
---|
| 561 | else if ((par->type() == t_pppParam::cBiasC1 ||
|
---|
| 562 | par->type() == t_pppParam::cBiasC2 ||
|
---|
| 563 | par->type() == t_pppParam::pBiasC1 ||
|
---|
[9548] | 564 | par->type() == t_pppParam::pBiasC2) && !usedSystems().contains('C')) {
|
---|
[9534] | 565 | #ifdef BNC_DEBUG_PPP
|
---|
| 566 | LOG << "remove1 " << par->toString() << std::endl;
|
---|
| 567 | #endif
|
---|
[9548] | 568 | delete par;
|
---|
| 569 | it = _params.erase(it);
|
---|
[9532] | 570 | }
|
---|
[9419] | 571 | else {
|
---|
| 572 | ++it;
|
---|
| 573 | }
|
---|
| 574 | }
|
---|
[9527] | 575 | // remove respective iono parameters
|
---|
| 576 | // ---------------------------------
|
---|
| 577 | it = _params.begin();
|
---|
| 578 | while (it != _params.end()) {
|
---|
| 579 | t_pppParam* par = *it;
|
---|
| 580 | if ((par->type() == t_pppParam::ion) &&
|
---|
[9528] | 581 | (lostSats.contains(par->prn()) || (epoTime - par->lastObsTime() > 0.0))) {
|
---|
[9549] | 582 | #ifdef BNC_DEBUG_PPP
|
---|
[9527] | 583 | LOG << "remove1 " << par->toString() << std::endl;
|
---|
[9549] | 584 | #endif
|
---|
[9527] | 585 | delete par;
|
---|
| 586 | it = _params.erase(it);
|
---|
| 587 | }
|
---|
| 588 | else {
|
---|
| 589 | ++it;
|
---|
| 590 | }
|
---|
| 591 | }
|
---|
[9419] | 592 | }
|
---|
| 593 |
|
---|
| 594 |
|
---|
[7237] | 595 | // Required Set of Parameters
|
---|
| 596 | // --------------------------
|
---|
| 597 | vector<t_pppParam*> required;
|
---|
| 598 |
|
---|
| 599 | // Coordinates
|
---|
| 600 | // -----------
|
---|
| 601 | required.push_back(new t_pppParam(t_pppParam::crdX, t_prn(), t_lc::dummy));
|
---|
| 602 | required.push_back(new t_pppParam(t_pppParam::crdY, t_prn(), t_lc::dummy));
|
---|
| 603 | required.push_back(new t_pppParam(t_pppParam::crdZ, t_prn(), t_lc::dummy));
|
---|
| 604 |
|
---|
[9386] | 605 | // Receiver Code Biases
|
---|
| 606 | // --------------------
|
---|
| 607 | if (OPT->_obsModelType == OPT->DCMcodeBias) {
|
---|
[9494] | 608 | std::vector<t_lc::type> lc;
|
---|
[9419] | 609 | if (_usedSystems.contains('G')) {
|
---|
[9494] | 610 | lc = OPT->LCs('G');
|
---|
| 611 | if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) {
|
---|
| 612 | required.push_back(new t_pppParam(t_pppParam::cBiasG1, t_prn(), t_lc::c1));
|
---|
| 613 | }
|
---|
| 614 | if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) {
|
---|
| 615 | required.push_back(new t_pppParam(t_pppParam::cBiasG2, t_prn(), t_lc::c2));
|
---|
| 616 | }
|
---|
[9663] | 617 | }
|
---|
[9561] | 618 | if (_usedSystems.contains('R')) {
|
---|
| 619 | lc = OPT->LCs('R');
|
---|
| 620 | if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) {
|
---|
| 621 | required.push_back(new t_pppParam(t_pppParam::cBiasR1, t_prn(), t_lc::c1));
|
---|
| 622 | }
|
---|
| 623 | if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) {
|
---|
| 624 | required.push_back(new t_pppParam(t_pppParam::cBiasR2, t_prn(), t_lc::c2));
|
---|
| 625 | }
|
---|
[9663] | 626 | }
|
---|
[9419] | 627 | if (_usedSystems.contains('E')) {
|
---|
[9494] | 628 | lc = OPT->LCs('E');
|
---|
| 629 | if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) {
|
---|
| 630 | required.push_back(new t_pppParam(t_pppParam::cBiasE1, t_prn(), t_lc::c1));
|
---|
| 631 | }
|
---|
| 632 | if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) {
|
---|
| 633 | required.push_back(new t_pppParam(t_pppParam::cBiasE2, t_prn(), t_lc::c2));
|
---|
| 634 | }
|
---|
[9386] | 635 | }
|
---|
[9419] | 636 | if (_usedSystems.contains('C')) {
|
---|
[9494] | 637 | lc = OPT->LCs('C');
|
---|
| 638 | if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) {
|
---|
| 639 | required.push_back(new t_pppParam(t_pppParam::cBiasC1, t_prn(), t_lc::c1));
|
---|
| 640 | }
|
---|
| 641 | if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) {
|
---|
| 642 | required.push_back(new t_pppParam(t_pppParam::cBiasC2, t_prn(), t_lc::c2));
|
---|
| 643 | }
|
---|
[9386] | 644 | }
|
---|
| 645 | }
|
---|
| 646 |
|
---|
| 647 | // Receiver Phase Biases
|
---|
| 648 | // ---------------------
|
---|
| 649 | if ((OPT->_obsModelType == OPT->DCMphaseBias) ||
|
---|
| 650 | (OPT->_obsModelType == OPT->PPPRTK) ) {
|
---|
[9494] | 651 | std::vector<t_lc::type> lc;
|
---|
[9419] | 652 | if (_usedSystems.contains('G')) {
|
---|
[9494] | 653 | lc = OPT->LCs('G');
|
---|
| 654 | if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) {
|
---|
| 655 | required.push_back(new t_pppParam(t_pppParam::pBiasG1, t_prn(), t_lc::l1));
|
---|
| 656 | }
|
---|
| 657 | if (std::find(lc.begin(), lc.end(), t_lc::l2) != lc.end()) {
|
---|
| 658 | required.push_back(new t_pppParam(t_pppParam::pBiasG2, t_prn(), t_lc::l2));
|
---|
| 659 | }
|
---|
[9663] | 660 | }
|
---|
[9561] | 661 | if (_usedSystems.contains('R')) {
|
---|
| 662 | lc = OPT->LCs('R');
|
---|
| 663 | if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) {
|
---|
| 664 | required.push_back(new t_pppParam(t_pppParam::pBiasR1, t_prn(), t_lc::l1));
|
---|
| 665 | }
|
---|
| 666 | if (std::find(lc.begin(), lc.end(), t_lc::l2) != lc.end()) {
|
---|
| 667 | required.push_back(new t_pppParam(t_pppParam::pBiasR2, t_prn(), t_lc::l2));
|
---|
| 668 | }
|
---|
[9663] | 669 | }
|
---|
[9419] | 670 | if (_usedSystems.contains('E')) {
|
---|
[9494] | 671 | lc = OPT->LCs('E');
|
---|
| 672 | if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) {
|
---|
| 673 | required.push_back(new t_pppParam(t_pppParam::pBiasE1, t_prn(), t_lc::l1));
|
---|
| 674 | }
|
---|
| 675 | if (std::find(lc.begin(), lc.end(), t_lc::l2) != lc.end()) {
|
---|
| 676 | required.push_back(new t_pppParam(t_pppParam::pBiasE2, t_prn(), t_lc::l2));
|
---|
| 677 | }
|
---|
[9386] | 678 | }
|
---|
[9419] | 679 | if (_usedSystems.contains('C')) {
|
---|
[9494] | 680 | lc = OPT->LCs('C');
|
---|
| 681 | if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) {
|
---|
| 682 | required.push_back(new t_pppParam(t_pppParam::pBiasC1, t_prn(), t_lc::l1));
|
---|
| 683 | }
|
---|
| 684 | if (std::find(lc.begin(), lc.end(), t_lc::l2) != lc.end()) {
|
---|
| 685 | required.push_back(new t_pppParam(t_pppParam::pBiasC2, t_prn(), t_lc::l2));
|
---|
| 686 | }
|
---|
[9386] | 687 | }
|
---|
| 688 | }
|
---|
[9419] | 689 |
|
---|
[10002] | 690 | // Receiver Clock
|
---|
| 691 | // --------------
|
---|
| 692 | required.push_back(new t_pppParam(t_pppParam::clkR, t_prn(), t_lc::dummy));
|
---|
[7237] | 693 |
|
---|
[10009] | 694 | // GLONASS Clock Offset
|
---|
[10003] | 695 | // --------------------
|
---|
[10009] | 696 | if ( _usedSystems.contains('R') &&
|
---|
| 697 | (_usedSystems.contains('G') || _usedSystems.contains('E') || _usedSystems.contains('C'))) {
|
---|
[10003] | 698 | required.push_back(new t_pppParam(t_pppParam::offGlo, t_prn(), t_lc::dummy));
|
---|
[9569] | 699 | }
|
---|
[7237] | 700 |
|
---|
[10003] | 701 | // Galileo Clock Offset
|
---|
| 702 | // --------------------
|
---|
| 703 | if (_usedSystems.contains('E') && _usedSystems.contains('G')) {
|
---|
| 704 | required.push_back(new t_pppParam(t_pppParam::offGal, t_prn(), t_lc::dummy));
|
---|
| 705 | }
|
---|
| 706 |
|
---|
| 707 | // BDS Clock Offset
|
---|
| 708 | // ----------------
|
---|
| 709 | if (_usedSystems.contains('C') && (_usedSystems.contains('G') || _usedSystems.contains('E'))) {
|
---|
| 710 | required.push_back(new t_pppParam(t_pppParam::offBds, t_prn(), t_lc::dummy));
|
---|
| 711 | }
|
---|
| 712 |
|
---|
[7237] | 713 | // Troposphere
|
---|
| 714 | // -----------
|
---|
| 715 | if (OPT->estTrp()) {
|
---|
| 716 | required.push_back(new t_pppParam(t_pppParam::trp, t_prn(), t_lc::dummy));
|
---|
| 717 | }
|
---|
| 718 |
|
---|
[8905] | 719 | // Ionosphere
|
---|
| 720 | // ----------
|
---|
| 721 | if (OPT->_obsModelType == OPT->UncombPPP ||
|
---|
| 722 | OPT->_obsModelType == OPT->DCMcodeBias ||
|
---|
| 723 | OPT->_obsModelType == OPT->DCMphaseBias ) {
|
---|
| 724 | for (unsigned jj = 0; jj < obsVector.size(); jj++) {
|
---|
[9386] | 725 | const t_pppSatObs* satObs = obsVector[jj];
|
---|
[8905] | 726 | required.push_back(new t_pppParam(t_pppParam::ion, satObs->prn(), t_lc::dummy));
|
---|
| 727 | }
|
---|
| 728 | }
|
---|
[7237] | 729 | // Ambiguities
|
---|
| 730 | // -----------
|
---|
| 731 | for (unsigned jj = 0; jj < obsVector.size(); jj++) {
|
---|
[9419] | 732 | const t_pppSatObs* satObs = obsVector[jj];
|
---|
[8905] | 733 | if ((OPT->_obsModelType == OPT->IF) ||
|
---|
| 734 | (OPT->_obsModelType == OPT->PPPRTK) ||
|
---|
| 735 | (OPT->_obsModelType == OPT->UncombPPP) ||
|
---|
| 736 | (OPT->_obsModelType == OPT->DCMcodeBias && !satObs->isReference()) ||
|
---|
| 737 | (OPT->_obsModelType == OPT->DCMphaseBias && !satObs->isReference()) ) {
|
---|
| 738 | const vector<t_lc::type>& ambLCs = OPT->ambLCs(satObs->prn().system());
|
---|
| 739 | for (unsigned ii = 0; ii < ambLCs.size(); ii++) {
|
---|
| 740 | required.push_back(new t_pppParam(t_pppParam::amb, satObs->prn(), ambLCs[ii], &obsVector));
|
---|
| 741 | }
|
---|
[7237] | 742 | }
|
---|
| 743 | }
|
---|
| 744 |
|
---|
| 745 | // Check if all required parameters are present
|
---|
| 746 | // --------------------------------------------
|
---|
| 747 | for (unsigned ii = 0; ii < required.size(); ii++) {
|
---|
| 748 | t_pppParam* parReq = required[ii];
|
---|
| 749 |
|
---|
| 750 | bool found = false;
|
---|
| 751 | for (unsigned jj = 0; jj < _params.size(); jj++) {
|
---|
| 752 | t_pppParam* parOld = _params[jj];
|
---|
| 753 | if (parOld->isEqual(parReq)) {
|
---|
| 754 | found = true;
|
---|
| 755 | break;
|
---|
| 756 | }
|
---|
| 757 | }
|
---|
| 758 | if (found) {
|
---|
| 759 | delete parReq;
|
---|
| 760 | }
|
---|
| 761 | else {
|
---|
[9508] | 762 | #ifdef BNC_DEBUG_PPP
|
---|
| 763 | LOG << "push_back parReq " << parReq->toString() << std::endl;
|
---|
| 764 | #endif
|
---|
[7237] | 765 | _params.push_back(parReq);
|
---|
| 766 | }
|
---|
| 767 | }
|
---|
| 768 |
|
---|
| 769 | // Set Parameter Indices
|
---|
| 770 | // ---------------------
|
---|
| 771 | sort(_params.begin(), _params.end(), t_pppParam::sortFunction);
|
---|
| 772 |
|
---|
| 773 | for (unsigned ii = 0; ii < _params.size(); ii++) {
|
---|
| 774 | t_pppParam* par = _params[ii];
|
---|
| 775 | par->setIndex(ii);
|
---|
| 776 | for (unsigned jj = 0; jj < obsVector.size(); jj++) {
|
---|
| 777 | const t_pppSatObs* satObs = obsVector[jj];
|
---|
| 778 | if (satObs->prn() == par->prn()) {
|
---|
| 779 | par->setAmbEleSat(satObs->eleSat());
|
---|
| 780 | par->stepAmbNumEpo();
|
---|
| 781 | }
|
---|
| 782 | }
|
---|
| 783 | }
|
---|
| 784 |
|
---|
| 785 | return success;
|
---|
| 786 | }
|
---|
| 787 |
|
---|
| 788 | //
|
---|
| 789 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 790 | void t_pppParlist::printResult(const bncTime& epoTime, const SymmetricMatrix& QQ,
|
---|
| 791 | const ColumnVector& xx) const {
|
---|
| 792 |
|
---|
| 793 | string epoTimeStr = string(epoTime);
|
---|
| 794 | const t_pppStation* sta = PPP_CLIENT->staRover();
|
---|
| 795 |
|
---|
| 796 | LOG << endl;
|
---|
| 797 |
|
---|
| 798 | t_pppParam* parX = 0;
|
---|
| 799 | t_pppParam* parY = 0;
|
---|
| 800 | t_pppParam* parZ = 0;
|
---|
[9504] | 801 | vector<t_pppParam*>::const_iterator it = _params.begin();
|
---|
| 802 | while (it != _params.end()) {
|
---|
| 803 | t_pppParam* par = *it;
|
---|
[7237] | 804 | if (par->type() == t_pppParam::crdX) {
|
---|
| 805 | parX = par;
|
---|
| 806 | }
|
---|
| 807 | else if (par->type() == t_pppParam::crdY) {
|
---|
| 808 | parY = par;
|
---|
| 809 | }
|
---|
| 810 | else if (par->type() == t_pppParam::crdZ) {
|
---|
| 811 | parZ = par;
|
---|
| 812 | }
|
---|
| 813 | else {
|
---|
| 814 | int ind = par->indexNew();
|
---|
| 815 | double apr = (par->type() == t_pppParam::trp) ?
|
---|
| 816 | t_tropo::delay_saast(sta->xyzApr(), M_PI/2.0) : par->x0();
|
---|
| 817 | LOG << epoTimeStr << ' ' << par->toString() << ' '
|
---|
| 818 | << setw(10) << setprecision(4) << apr << ' '
|
---|
| 819 | << showpos << setw(10) << setprecision(4) << xx[ind] << noshowpos << " +- "
|
---|
| 820 | << setw(8) << setprecision(4) << sqrt(QQ[ind][ind]);
|
---|
| 821 | if (par->type() == t_pppParam::amb) {
|
---|
| 822 | LOG << " el = " << setw(6) << setprecision(2) << par->ambEleSat() * 180.0 / M_PI
|
---|
| 823 | << " epo = " << setw(4) << par->ambNumEpo();
|
---|
| 824 | }
|
---|
| 825 | LOG << endl;
|
---|
| 826 | }
|
---|
[9504] | 827 | ++it;
|
---|
[7237] | 828 | }
|
---|
| 829 |
|
---|
| 830 | if (parX && parY && parZ) {
|
---|
| 831 |
|
---|
| 832 | ColumnVector xyz(3);
|
---|
| 833 | xyz[0] = xx[parX->indexNew()];
|
---|
| 834 | xyz[1] = xx[parY->indexNew()];
|
---|
| 835 | xyz[2] = xx[parZ->indexNew()];
|
---|
| 836 |
|
---|
| 837 | ColumnVector neu(3);
|
---|
| 838 | xyz2neu(sta->ellApr().data(), xyz.data(), neu.data());
|
---|
| 839 |
|
---|
| 840 | SymmetricMatrix QQxyz = QQ.SymSubMatrix(1,3);
|
---|
| 841 |
|
---|
| 842 | SymmetricMatrix QQneu(3);
|
---|
| 843 | covariXYZ_NEU(QQxyz, sta->ellApr().data(), QQneu);
|
---|
| 844 |
|
---|
| 845 | LOG << epoTimeStr << ' ' << sta->name()
|
---|
| 846 | << " X = " << setprecision(4) << sta->xyzApr()[0] + xyz[0] << " +- "
|
---|
| 847 | << setprecision(4) << sqrt(QQxyz[0][0])
|
---|
| 848 |
|
---|
| 849 | << " Y = " << setprecision(4) << sta->xyzApr()[1] + xyz[1] << " +- "
|
---|
| 850 | << setprecision(4) << sqrt(QQxyz[1][1])
|
---|
| 851 |
|
---|
| 852 | << " Z = " << setprecision(4) << sta->xyzApr()[2] + xyz[2] << " +- "
|
---|
| 853 | << setprecision(4) << sqrt(QQxyz[2][2])
|
---|
| 854 |
|
---|
| 855 | << " dN = " << setprecision(4) << neu[0] << " +- "
|
---|
| 856 | << setprecision(4) << sqrt(QQneu[0][0])
|
---|
| 857 |
|
---|
| 858 | << " dE = " << setprecision(4) << neu[1] << " +- "
|
---|
| 859 | << setprecision(4) << sqrt(QQneu[1][1])
|
---|
| 860 |
|
---|
| 861 | << " dU = " << setprecision(4) << neu[2] << " +- "
|
---|
| 862 | << setprecision(4) << sqrt(QQneu[2][2])
|
---|
| 863 |
|
---|
| 864 | << endl;
|
---|
| 865 | }
|
---|
[9545] | 866 | return;
|
---|
[7237] | 867 | }
|
---|
| 868 |
|
---|
[9525] | 869 | //
|
---|
| 870 | ////////////////////////////////////////////////////////////////////////////
|
---|
[9527] | 871 | void t_pppParlist::printParams(const bncTime& epoTime) {
|
---|
[9526] | 872 |
|
---|
| 873 | for (unsigned iPar = 0; iPar < _params.size(); iPar++) {
|
---|
[9527] | 874 | LOG << _params[iPar]->toString()
|
---|
| 875 | << "\t lastObsTime().valid() \t" << _params[iPar]->lastObsTime().valid()
|
---|
| 876 | << "\t epoTime - par->lastObsTime() \t" << (epoTime - _params[iPar]->lastObsTime())
|
---|
| 877 | << endl;
|
---|
[9525] | 878 | }
|
---|
| 879 | }
|
---|
| 880 |
|
---|