| 1 | // Part of BNC, a utility for retrieving decoding and
|
|---|
| 2 | // converting GNSS data streams from NTRIP broadcasters.
|
|---|
| 3 | //
|
|---|
| 4 | // Copyright (C) 2007
|
|---|
| 5 | // German Federal Agency for Cartography and Geodesy (BKG)
|
|---|
| 6 | // http://www.bkg.bund.de
|
|---|
| 7 | // Czech Technical University Prague, Department of Geodesy
|
|---|
| 8 | // http://www.fsv.cvut.cz
|
|---|
| 9 | //
|
|---|
| 10 | // Email: euref-ip@bkg.bund.de
|
|---|
| 11 | //
|
|---|
| 12 | // This program is free software; you can redistribute it and/or
|
|---|
| 13 | // modify it under the terms of the GNU General Public License
|
|---|
| 14 | // as published by the Free Software Foundation, version 2.
|
|---|
| 15 | //
|
|---|
| 16 | // This program is distributed in the hope that it will be useful,
|
|---|
| 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 19 | // GNU General Public License for more details.
|
|---|
| 20 | //
|
|---|
| 21 | // You should have received a copy of the GNU General Public License
|
|---|
| 22 | // along with this program; if not, write to the Free Software
|
|---|
| 23 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|---|
| 24 |
|
|---|
| 25 | /* -------------------------------------------------------------------------
|
|---|
| 26 | * BKG NTRIP Client
|
|---|
| 27 | * -------------------------------------------------------------------------
|
|---|
| 28 | *
|
|---|
| 29 | * Class: bncParam, bncModel
|
|---|
| 30 | *
|
|---|
| 31 | * Purpose: Model for PPP
|
|---|
| 32 | *
|
|---|
| 33 | * Author: L. Mervart
|
|---|
| 34 | *
|
|---|
| 35 | * Created: 01-Dec-2009
|
|---|
| 36 | *
|
|---|
| 37 | * Changes:
|
|---|
| 38 | *
|
|---|
| 39 | * -----------------------------------------------------------------------*/
|
|---|
| 40 |
|
|---|
| 41 | #include <iomanip>
|
|---|
| 42 | #include <cmath>
|
|---|
| 43 | #include <newmatio.h>
|
|---|
| 44 | #include <sstream>
|
|---|
| 45 |
|
|---|
| 46 | #include "bncmodel.h"
|
|---|
| 47 | #include "bncapp.h"
|
|---|
| 48 | #include "bncpppclient.h"
|
|---|
| 49 | #include "bancroft.h"
|
|---|
| 50 | #include "bncutils.h"
|
|---|
| 51 | #include "bncsettings.h"
|
|---|
| 52 | #include "bnctides.h"
|
|---|
| 53 |
|
|---|
| 54 | using namespace std;
|
|---|
| 55 |
|
|---|
| 56 | const unsigned MINOBS = 4;
|
|---|
| 57 | const double MINELE_GPS = 10.0 * M_PI / 180.0;
|
|---|
| 58 | const double MINELE_GLO = 10.0 * M_PI / 180.0;
|
|---|
| 59 | const double MINELE_GAL = 10.0 * M_PI / 180.0;
|
|---|
| 60 | const double MAXRES_CODE_GPS = 10.0;
|
|---|
| 61 | const double MAXRES_PHASE_GPS = 0.10;
|
|---|
| 62 | const double MAXRES_PHASE_GLO = 0.05;
|
|---|
| 63 | const double MAXRES_CODE_GAL = 10.0;
|
|---|
| 64 | const double MAXRES_PHASE_GAL = 0.10;
|
|---|
| 65 |
|
|---|
| 66 | // Constructor
|
|---|
| 67 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 68 | bncParam::bncParam(bncParam::parType typeIn, int indexIn,
|
|---|
| 69 | const QString& prnIn) {
|
|---|
| 70 | type = typeIn;
|
|---|
| 71 | index = indexIn;
|
|---|
| 72 | prn = prnIn;
|
|---|
| 73 | index_old = 0;
|
|---|
| 74 | xx = 0.0;
|
|---|
| 75 |
|
|---|
| 76 | }
|
|---|
| 77 |
|
|---|
| 78 | // Destructor
|
|---|
| 79 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 80 | bncParam::~bncParam() {
|
|---|
| 81 | }
|
|---|
| 82 |
|
|---|
| 83 | // Partial
|
|---|
| 84 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 85 | double bncParam::partial(t_satData* satData, bool phase) {
|
|---|
| 86 |
|
|---|
| 87 | // Coordinates
|
|---|
| 88 | // -----------
|
|---|
| 89 | if (type == CRD_X) {
|
|---|
| 90 | return (xx - satData->xx(1)) / satData->rho;
|
|---|
| 91 | }
|
|---|
| 92 | else if (type == CRD_Y) {
|
|---|
| 93 | return (xx - satData->xx(2)) / satData->rho;
|
|---|
| 94 | }
|
|---|
| 95 | else if (type == CRD_Z) {
|
|---|
| 96 | return (xx - satData->xx(3)) / satData->rho;
|
|---|
| 97 | }
|
|---|
| 98 |
|
|---|
| 99 | // Receiver Clocks
|
|---|
| 100 | // ---------------
|
|---|
| 101 | else if (type == RECCLK) {
|
|---|
| 102 | return 1.0;
|
|---|
| 103 | }
|
|---|
| 104 |
|
|---|
| 105 | // Troposphere
|
|---|
| 106 | // -----------
|
|---|
| 107 | else if (type == TROPO) {
|
|---|
| 108 | return 1.0 / sin(satData->eleSat);
|
|---|
| 109 | }
|
|---|
| 110 |
|
|---|
| 111 | // Galileo Offset
|
|---|
| 112 | // --------------
|
|---|
| 113 | else if (type == GALILEO_OFFSET) {
|
|---|
| 114 | if (satData->prn[0] == 'E') {
|
|---|
| 115 | return 1.0;
|
|---|
| 116 | }
|
|---|
| 117 | else {
|
|---|
| 118 | return 0.0;
|
|---|
| 119 | }
|
|---|
| 120 | }
|
|---|
| 121 |
|
|---|
| 122 | // Ambiguities
|
|---|
| 123 | // -----------
|
|---|
| 124 | else if (type == AMB_L3) {
|
|---|
| 125 | if (phase && satData->prn == prn) {
|
|---|
| 126 | return 1.0;
|
|---|
| 127 | }
|
|---|
| 128 | else {
|
|---|
| 129 | return 0.0;
|
|---|
| 130 | }
|
|---|
| 131 | }
|
|---|
| 132 |
|
|---|
| 133 | // Default return
|
|---|
| 134 | // --------------
|
|---|
| 135 | return 0.0;
|
|---|
| 136 | }
|
|---|
| 137 |
|
|---|
| 138 | // Constructor
|
|---|
| 139 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 140 | bncModel::bncModel(QByteArray staID) {
|
|---|
| 141 |
|
|---|
| 142 | _staID = staID;
|
|---|
| 143 |
|
|---|
| 144 | bncSettings settings;
|
|---|
| 145 |
|
|---|
| 146 | // Observation Sigmas
|
|---|
| 147 | // ------------------
|
|---|
| 148 | _sigP3 = 5.0;
|
|---|
| 149 | if (!settings.value("pppSigmaCode").toString().isEmpty()) {
|
|---|
| 150 | _sigP3 = settings.value("pppSigmaCode").toDouble();
|
|---|
| 151 | }
|
|---|
| 152 | _sigL3 = 0.02;
|
|---|
| 153 | if (!settings.value("pppSigmaPhase").toString().isEmpty()) {
|
|---|
| 154 | _sigL3 = settings.value("pppSigmaPhase").toDouble();
|
|---|
| 155 | }
|
|---|
| 156 |
|
|---|
| 157 | // Parameter Sigmas
|
|---|
| 158 | // ----------------
|
|---|
| 159 | _sigCrd0 = 100.0;
|
|---|
| 160 | if (!settings.value("pppSigCrd0").toString().isEmpty()) {
|
|---|
| 161 | _sigCrd0 = settings.value("pppSigCrd0").toDouble();
|
|---|
| 162 | }
|
|---|
| 163 | _sigCrdP = 100.0;
|
|---|
| 164 | if (!settings.value("pppSigCrdP").toString().isEmpty()) {
|
|---|
| 165 | _sigCrdP = settings.value("pppSigCrdP").toDouble();
|
|---|
| 166 | }
|
|---|
| 167 | _sigTrp0 = 0.1;
|
|---|
| 168 | if (!settings.value("pppSigTrp0").toString().isEmpty()) {
|
|---|
| 169 | _sigTrp0 = settings.value("pppSigTrp0").toDouble();
|
|---|
| 170 | }
|
|---|
| 171 | _sigTrpP = 1e-6;
|
|---|
| 172 | if (!settings.value("pppSigTrpP").toString().isEmpty()) {
|
|---|
| 173 | _sigTrpP = settings.value("pppSigTrpP").toDouble();
|
|---|
| 174 | }
|
|---|
| 175 | _sigClk0 = 1000.0;
|
|---|
| 176 | _sigAmb0 = 1000.0;
|
|---|
| 177 | _sigGalileoOffset0 = 1000.0;
|
|---|
| 178 | _sigGalileoOffsetP = 0.0;
|
|---|
| 179 |
|
|---|
| 180 | // Quick-Start Mode
|
|---|
| 181 | // ----------------
|
|---|
| 182 | _quickStart = 0;
|
|---|
| 183 | if (settings.value("pppRefCrdX").toString() != "" &&
|
|---|
| 184 | settings.value("pppRefCrdY").toString() != "" &&
|
|---|
| 185 | settings.value("pppRefCrdZ").toString() != "" &&
|
|---|
| 186 | !settings.value("pppQuickStart").toString().isEmpty()) {
|
|---|
| 187 | _quickStart = settings.value("pppQuickStart").toDouble();
|
|---|
| 188 | }
|
|---|
| 189 |
|
|---|
| 190 | connect(this, SIGNAL(newMessage(QByteArray,bool)),
|
|---|
| 191 | ((bncApp*)qApp), SLOT(slotMessage(const QByteArray,bool)));
|
|---|
| 192 |
|
|---|
| 193 | _usePhase = false;
|
|---|
| 194 | if ( Qt::CheckState(settings.value("pppUsePhase").toInt()) == Qt::Checked) {
|
|---|
| 195 | _usePhase = true;
|
|---|
| 196 | }
|
|---|
| 197 |
|
|---|
| 198 | _estTropo = false;
|
|---|
| 199 | if ( Qt::CheckState(settings.value("pppEstTropo").toInt()) == Qt::Checked) {
|
|---|
| 200 | _estTropo = true;
|
|---|
| 201 | }
|
|---|
| 202 |
|
|---|
| 203 | _xcBanc.ReSize(4); _xcBanc = 0.0;
|
|---|
| 204 | _ellBanc.ReSize(3); _ellBanc = 0.0;
|
|---|
| 205 |
|
|---|
| 206 | int nextPar = 0;
|
|---|
| 207 | _params.push_back(new bncParam(bncParam::CRD_X, ++nextPar, ""));
|
|---|
| 208 | _params.push_back(new bncParam(bncParam::CRD_Y, ++nextPar, ""));
|
|---|
| 209 | _params.push_back(new bncParam(bncParam::CRD_Z, ++nextPar, ""));
|
|---|
| 210 | _params.push_back(new bncParam(bncParam::RECCLK, ++nextPar, ""));
|
|---|
| 211 | if (_estTropo) {
|
|---|
| 212 | _params.push_back(new bncParam(bncParam::TROPO, ++nextPar, ""));
|
|---|
| 213 | }
|
|---|
| 214 | if ( Qt::CheckState(settings.value("pppGalileo").toInt()) == Qt::Checked) {
|
|---|
| 215 | _params.push_back(new bncParam(bncParam::GALILEO_OFFSET, ++nextPar, ""));
|
|---|
| 216 | }
|
|---|
| 217 |
|
|---|
| 218 | unsigned nPar = _params.size();
|
|---|
| 219 |
|
|---|
| 220 | _QQ.ReSize(nPar);
|
|---|
| 221 |
|
|---|
| 222 | _QQ = 0.0;
|
|---|
| 223 |
|
|---|
| 224 | for (int iPar = 1; iPar <= _params.size(); iPar++) {
|
|---|
| 225 | bncParam* pp = _params[iPar-1];
|
|---|
| 226 | if (pp->isCrd()) {
|
|---|
| 227 | _QQ(iPar,iPar) = _sigCrd0 * _sigCrd0;
|
|---|
| 228 | }
|
|---|
| 229 | else if (pp->type == bncParam::RECCLK) {
|
|---|
| 230 | _QQ(iPar,iPar) = _sigClk0 * _sigClk0;
|
|---|
| 231 | }
|
|---|
| 232 | else if (pp->type == bncParam::TROPO) {
|
|---|
| 233 | _QQ(iPar,iPar) = _sigTrp0 * _sigTrp0;
|
|---|
| 234 | }
|
|---|
| 235 | else if (pp->type == bncParam::GALILEO_OFFSET) {
|
|---|
| 236 | _QQ(iPar,iPar) = _sigGalileoOffset0 * _sigGalileoOffset0;
|
|---|
| 237 | }
|
|---|
| 238 | }
|
|---|
| 239 |
|
|---|
| 240 | // NMEA Output
|
|---|
| 241 | // -----------
|
|---|
| 242 | QString nmeaFileName = settings.value("nmeaFile").toString();
|
|---|
| 243 | if (nmeaFileName.isEmpty()) {
|
|---|
| 244 | _nmeaFile = 0;
|
|---|
| 245 | _nmeaStream = 0;
|
|---|
| 246 | }
|
|---|
| 247 | else {
|
|---|
| 248 | expandEnvVar(nmeaFileName);
|
|---|
| 249 | _nmeaFile = new QFile(nmeaFileName);
|
|---|
| 250 | if ( Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked) {
|
|---|
| 251 | _nmeaFile->open(QIODevice::WriteOnly | QIODevice::Append);
|
|---|
| 252 | }
|
|---|
| 253 | else {
|
|---|
| 254 | _nmeaFile->open(QIODevice::WriteOnly);
|
|---|
| 255 | }
|
|---|
| 256 | _nmeaStream = new QTextStream();
|
|---|
| 257 | _nmeaStream->setDevice(_nmeaFile);
|
|---|
| 258 | }
|
|---|
| 259 | }
|
|---|
| 260 |
|
|---|
| 261 | // Destructor
|
|---|
| 262 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 263 | bncModel::~bncModel() {
|
|---|
| 264 | delete _nmeaStream;
|
|---|
| 265 | delete _nmeaFile;
|
|---|
| 266 | for (int ii = 0; ii < _posAverage.size(); ++ii) {
|
|---|
| 267 | delete _posAverage[ii];
|
|---|
| 268 | }
|
|---|
| 269 | }
|
|---|
| 270 |
|
|---|
| 271 | // Bancroft Solution
|
|---|
| 272 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 273 | t_irc bncModel::cmpBancroft(t_epoData* epoData) {
|
|---|
| 274 |
|
|---|
| 275 | if (epoData->sizeGPS() < MINOBS) {
|
|---|
| 276 | _log += "bncModel::cmpBancroft: not enough data\n";
|
|---|
| 277 | return failure;
|
|---|
| 278 | }
|
|---|
| 279 |
|
|---|
| 280 | Matrix BB(epoData->sizeGPS(), 4);
|
|---|
| 281 |
|
|---|
| 282 | QMapIterator<QString, t_satData*> it(epoData->satDataGPS);
|
|---|
| 283 | int iObsBanc = 0;
|
|---|
| 284 | while (it.hasNext()) {
|
|---|
| 285 | ++iObsBanc;
|
|---|
| 286 | it.next();
|
|---|
| 287 | QString prn = it.key();
|
|---|
| 288 | t_satData* satData = it.value();
|
|---|
| 289 | BB(iObsBanc, 1) = satData->xx(1);
|
|---|
| 290 | BB(iObsBanc, 2) = satData->xx(2);
|
|---|
| 291 | BB(iObsBanc, 3) = satData->xx(3);
|
|---|
| 292 | BB(iObsBanc, 4) = satData->P3 + satData->clk;
|
|---|
| 293 | }
|
|---|
| 294 |
|
|---|
| 295 | bancroft(BB, _xcBanc);
|
|---|
| 296 |
|
|---|
| 297 | // Ellipsoidal Coordinates
|
|---|
| 298 | // ------------------------
|
|---|
| 299 | xyz2ell(_xcBanc.data(), _ellBanc.data());
|
|---|
| 300 |
|
|---|
| 301 | // Compute Satellite Elevations
|
|---|
| 302 | // ----------------------------
|
|---|
| 303 | QMutableMapIterator<QString, t_satData*> iGPS(epoData->satDataGPS);
|
|---|
| 304 | while (iGPS.hasNext()) {
|
|---|
| 305 | iGPS.next();
|
|---|
| 306 | t_satData* satData = iGPS.value();
|
|---|
| 307 | cmpEle(satData);
|
|---|
| 308 | if (satData->eleSat < MINELE_GPS) {
|
|---|
| 309 | delete satData;
|
|---|
| 310 | iGPS.remove();
|
|---|
| 311 | }
|
|---|
| 312 | }
|
|---|
| 313 |
|
|---|
| 314 | QMutableMapIterator<QString, t_satData*> iGlo(epoData->satDataGlo);
|
|---|
| 315 | while (iGlo.hasNext()) {
|
|---|
| 316 | iGlo.next();
|
|---|
| 317 | t_satData* satData = iGlo.value();
|
|---|
| 318 | cmpEle(satData);
|
|---|
| 319 | if (satData->eleSat < MINELE_GLO) {
|
|---|
| 320 | delete satData;
|
|---|
| 321 | iGlo.remove();
|
|---|
| 322 | }
|
|---|
| 323 | }
|
|---|
| 324 |
|
|---|
| 325 | QMutableMapIterator<QString, t_satData*> iGal(epoData->satDataGal);
|
|---|
| 326 | while (iGal.hasNext()) {
|
|---|
| 327 | iGal.next();
|
|---|
| 328 | t_satData* satData = iGal.value();
|
|---|
| 329 | cmpEle(satData);
|
|---|
| 330 | if (satData->eleSat < MINELE_GAL) {
|
|---|
| 331 | delete satData;
|
|---|
| 332 | iGal.remove();
|
|---|
| 333 | }
|
|---|
| 334 | }
|
|---|
| 335 |
|
|---|
| 336 | return success;
|
|---|
| 337 | }
|
|---|
| 338 |
|
|---|
| 339 | // Computed Value
|
|---|
| 340 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 341 | double bncModel::cmpValue(t_satData* satData, bool phase) {
|
|---|
| 342 |
|
|---|
| 343 | ColumnVector xRec(3);
|
|---|
| 344 | xRec(1) = x();
|
|---|
| 345 | xRec(2) = y();
|
|---|
| 346 | xRec(3) = z();
|
|---|
| 347 |
|
|---|
| 348 | double rho0 = (satData->xx - xRec).norm_Frobenius();
|
|---|
| 349 | double dPhi = t_CST::omega * rho0 / t_CST::c;
|
|---|
| 350 |
|
|---|
| 351 | xRec(1) = x() * cos(dPhi) - y() * sin(dPhi);
|
|---|
| 352 | xRec(2) = y() * cos(dPhi) + x() * sin(dPhi);
|
|---|
| 353 | xRec(3) = z();
|
|---|
| 354 |
|
|---|
| 355 | tides(_time, xRec);
|
|---|
| 356 |
|
|---|
| 357 | satData->rho = (satData->xx - xRec).norm_Frobenius();
|
|---|
| 358 |
|
|---|
| 359 | double tropDelay = delay_saast(satData->eleSat) +
|
|---|
| 360 | trp() / sin(satData->eleSat);
|
|---|
| 361 |
|
|---|
| 362 | double wind = 0.0;
|
|---|
| 363 | if (phase) {
|
|---|
| 364 | wind = windUp(satData->prn, satData->xx, xRec) * satData->lambda3;
|
|---|
| 365 | }
|
|---|
| 366 |
|
|---|
| 367 | double offset = 0.0;
|
|---|
| 368 | if (satData->prn[0] == 'E') {
|
|---|
| 369 | offset = Galileo_offset();
|
|---|
| 370 | }
|
|---|
| 371 |
|
|---|
| 372 | return satData->rho + clk() + offset - satData->clk + tropDelay + wind;
|
|---|
| 373 | }
|
|---|
| 374 |
|
|---|
| 375 | // Tropospheric Model (Saastamoinen)
|
|---|
| 376 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 377 | double bncModel::delay_saast(double Ele) {
|
|---|
| 378 |
|
|---|
| 379 | double xyz[3];
|
|---|
| 380 | xyz[0] = x();
|
|---|
| 381 | xyz[1] = y();
|
|---|
| 382 | xyz[2] = z();
|
|---|
| 383 | double ell[3];
|
|---|
| 384 | xyz2ell(xyz, ell);
|
|---|
| 385 | double height = ell[2];
|
|---|
| 386 |
|
|---|
| 387 | double pp = 1013.25 * pow(1.0 - 2.26e-5 * height, 5.225);
|
|---|
| 388 | double TT = 18.0 - height * 0.0065 + 273.15;
|
|---|
| 389 | double hh = 50.0 * exp(-6.396e-4 * height);
|
|---|
| 390 | double ee = hh / 100.0 * exp(-37.2465 + 0.213166*TT - 0.000256908*TT*TT);
|
|---|
| 391 |
|
|---|
| 392 | double h_km = height / 1000.0;
|
|---|
| 393 |
|
|---|
| 394 | if (h_km < 0.0) h_km = 0.0;
|
|---|
| 395 | if (h_km > 5.0) h_km = 5.0;
|
|---|
| 396 | int ii = int(h_km + 1);
|
|---|
| 397 | double href = ii - 1;
|
|---|
| 398 |
|
|---|
| 399 | double bCor[6];
|
|---|
| 400 | bCor[0] = 1.156;
|
|---|
| 401 | bCor[1] = 1.006;
|
|---|
| 402 | bCor[2] = 0.874;
|
|---|
| 403 | bCor[3] = 0.757;
|
|---|
| 404 | bCor[4] = 0.654;
|
|---|
| 405 | bCor[5] = 0.563;
|
|---|
| 406 |
|
|---|
| 407 | double BB = bCor[ii-1] + (bCor[ii]-bCor[ii-1]) * (h_km - href);
|
|---|
| 408 |
|
|---|
| 409 | double zen = M_PI/2.0 - Ele;
|
|---|
| 410 |
|
|---|
| 411 | return (0.002277/cos(zen)) * (pp + ((1255.0/TT)+0.05)*ee - BB*(tan(zen)*tan(zen)));
|
|---|
| 412 | }
|
|---|
| 413 |
|
|---|
| 414 | // Prediction Step of the Filter
|
|---|
| 415 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 416 | void bncModel::predict(t_epoData* epoData) {
|
|---|
| 417 |
|
|---|
| 418 | bncSettings settings;
|
|---|
| 419 |
|
|---|
| 420 | bool firstCrd = false;
|
|---|
| 421 | if (x() == 0.0 && y() == 0.0 && z() == 0.0) {
|
|---|
| 422 | firstCrd = true;
|
|---|
| 423 | _startTime = QDateTime::currentDateTime();
|
|---|
| 424 | }
|
|---|
| 425 |
|
|---|
| 426 | // Use different white noise for Quick-Start mode
|
|---|
| 427 | // ----------------------------------------------
|
|---|
| 428 | double sigCrdP_used = _sigCrdP;
|
|---|
| 429 | if ( _quickStart > 0.0 &&
|
|---|
| 430 | _quickStart > _startTime.secsTo(QDateTime::currentDateTime()) ) {
|
|---|
| 431 | sigCrdP_used = 0.0;
|
|---|
| 432 | }
|
|---|
| 433 |
|
|---|
| 434 | // Predict Parameter values, add white noise
|
|---|
| 435 | // -----------------------------------------
|
|---|
| 436 | for (int iPar = 1; iPar <= _params.size(); iPar++) {
|
|---|
| 437 | bncParam* pp = _params[iPar-1];
|
|---|
| 438 |
|
|---|
| 439 | // Coordinates
|
|---|
| 440 | // -----------
|
|---|
| 441 | if (pp->type == bncParam::CRD_X) {
|
|---|
| 442 | if (firstCrd) {
|
|---|
| 443 | if (settings.value("pppRefCrdX").toString() != "" &&
|
|---|
| 444 | settings.value("pppRefCrdY").toString() != "" &&
|
|---|
| 445 | settings.value("pppRefCrdZ").toString() != "") {
|
|---|
| 446 | pp->xx = settings.value("pppRefCrdX").toDouble();
|
|---|
| 447 | }
|
|---|
| 448 | else {
|
|---|
| 449 | pp->xx = _xcBanc(1);
|
|---|
| 450 | }
|
|---|
| 451 | }
|
|---|
| 452 | _QQ(iPar,iPar) += sigCrdP_used * sigCrdP_used;
|
|---|
| 453 | }
|
|---|
| 454 | else if (pp->type == bncParam::CRD_Y) {
|
|---|
| 455 | if (firstCrd) {
|
|---|
| 456 | if (settings.value("pppRefCrdX").toString() != "" &&
|
|---|
| 457 | settings.value("pppRefCrdY").toString() != "" &&
|
|---|
| 458 | settings.value("pppRefCrdZ").toString() != "") {
|
|---|
| 459 | pp->xx = settings.value("pppRefCrdY").toDouble();
|
|---|
| 460 | }
|
|---|
| 461 | else {
|
|---|
| 462 | pp->xx = _xcBanc(2);
|
|---|
| 463 | }
|
|---|
| 464 | }
|
|---|
| 465 | _QQ(iPar,iPar) += sigCrdP_used * sigCrdP_used;
|
|---|
| 466 | }
|
|---|
| 467 | else if (pp->type == bncParam::CRD_Z) {
|
|---|
| 468 | if (firstCrd) {
|
|---|
| 469 | if (settings.value("pppRefCrdX").toString() != "" &&
|
|---|
| 470 | settings.value("pppRefCrdY").toString() != "" &&
|
|---|
| 471 | settings.value("pppRefCrdZ").toString() != "") {
|
|---|
| 472 | pp->xx = settings.value("pppRefCrdZ").toDouble();
|
|---|
| 473 | }
|
|---|
| 474 | else {
|
|---|
| 475 | pp->xx = _xcBanc(3);
|
|---|
| 476 | }
|
|---|
| 477 | }
|
|---|
| 478 | _QQ(iPar,iPar) += sigCrdP_used * sigCrdP_used;
|
|---|
| 479 | }
|
|---|
| 480 |
|
|---|
| 481 | // Receiver Clocks
|
|---|
| 482 | // ---------------
|
|---|
| 483 | else if (pp->type == bncParam::RECCLK) {
|
|---|
| 484 | pp->xx = _xcBanc(4);
|
|---|
| 485 | for (int jj = 1; jj <= _params.size(); jj++) {
|
|---|
| 486 | _QQ(iPar, jj) = 0.0;
|
|---|
| 487 | }
|
|---|
| 488 | _QQ(iPar,iPar) = _sigClk0 * _sigClk0;
|
|---|
| 489 | }
|
|---|
| 490 |
|
|---|
| 491 | // Tropospheric Delay
|
|---|
| 492 | // ------------------
|
|---|
| 493 | else if (pp->type == bncParam::TROPO) {
|
|---|
| 494 | _QQ(iPar,iPar) += _sigTrpP * _sigTrpP;
|
|---|
| 495 | }
|
|---|
| 496 |
|
|---|
| 497 | // Galileo Offset
|
|---|
| 498 | // --------------
|
|---|
| 499 | else if (pp->type == bncParam::GALILEO_OFFSET) {
|
|---|
| 500 | _QQ(iPar,iPar) += _sigGalileoOffsetP * _sigGalileoOffsetP;
|
|---|
| 501 | }
|
|---|
| 502 | }
|
|---|
| 503 |
|
|---|
| 504 | // Add New Ambiguities if necessary
|
|---|
| 505 | // --------------------------------
|
|---|
| 506 | if (_usePhase) {
|
|---|
| 507 |
|
|---|
| 508 | // Make a copy of QQ and xx, set parameter indices
|
|---|
| 509 | // -----------------------------------------------
|
|---|
| 510 | SymmetricMatrix QQ_old = _QQ;
|
|---|
| 511 |
|
|---|
| 512 | for (int iPar = 1; iPar <= _params.size(); iPar++) {
|
|---|
| 513 | _params[iPar-1]->index_old = _params[iPar-1]->index;
|
|---|
| 514 | _params[iPar-1]->index = 0;
|
|---|
| 515 | }
|
|---|
| 516 |
|
|---|
| 517 | // Remove Ambiguity Parameters without observations
|
|---|
| 518 | // ------------------------------------------------
|
|---|
| 519 | int iPar = 0;
|
|---|
| 520 | QMutableVectorIterator<bncParam*> it(_params);
|
|---|
| 521 | while (it.hasNext()) {
|
|---|
| 522 | bncParam* par = it.next();
|
|---|
| 523 | bool removed = false;
|
|---|
| 524 | if (par->type == bncParam::AMB_L3) {
|
|---|
| 525 | if (epoData->satDataGPS.find(par->prn) == epoData->satDataGPS.end() &&
|
|---|
| 526 | epoData->satDataGlo.find(par->prn) == epoData->satDataGlo.end() &&
|
|---|
| 527 | epoData->satDataGal.find(par->prn) == epoData->satDataGal.end() ) {
|
|---|
| 528 | removed = true;
|
|---|
| 529 | delete par;
|
|---|
| 530 | it.remove();
|
|---|
| 531 | }
|
|---|
| 532 | }
|
|---|
| 533 | if (! removed) {
|
|---|
| 534 | ++iPar;
|
|---|
| 535 | par->index = iPar;
|
|---|
| 536 | }
|
|---|
| 537 | }
|
|---|
| 538 |
|
|---|
| 539 | // Add new ambiguity parameters
|
|---|
| 540 | // ----------------------------
|
|---|
| 541 | QMapIterator<QString, t_satData*> iGPS(epoData->satDataGPS);
|
|---|
| 542 | while (iGPS.hasNext()) {
|
|---|
| 543 | iGPS.next();
|
|---|
| 544 | t_satData* satData = iGPS.value();
|
|---|
| 545 | addAmb(satData);
|
|---|
| 546 | }
|
|---|
| 547 |
|
|---|
| 548 | QMapIterator<QString, t_satData*> iGlo(epoData->satDataGlo);
|
|---|
| 549 | while (iGlo.hasNext()) {
|
|---|
| 550 | iGlo.next();
|
|---|
| 551 | t_satData* satData = iGlo.value();
|
|---|
| 552 | addAmb(satData);
|
|---|
| 553 | }
|
|---|
| 554 |
|
|---|
| 555 | QMapIterator<QString, t_satData*> iGal(epoData->satDataGal);
|
|---|
| 556 | while (iGal.hasNext()) {
|
|---|
| 557 | iGal.next();
|
|---|
| 558 | t_satData* satData = iGal.value();
|
|---|
| 559 | addAmb(satData);
|
|---|
| 560 | }
|
|---|
| 561 |
|
|---|
| 562 | int nPar = _params.size();
|
|---|
| 563 | _QQ.ReSize(nPar); _QQ = 0.0;
|
|---|
| 564 | for (int i1 = 1; i1 <= nPar; i1++) {
|
|---|
| 565 | bncParam* p1 = _params[i1-1];
|
|---|
| 566 | if (p1->index_old != 0) {
|
|---|
| 567 | _QQ(p1->index, p1->index) = QQ_old(p1->index_old, p1->index_old);
|
|---|
| 568 | for (int i2 = 1; i2 <= nPar; i2++) {
|
|---|
| 569 | bncParam* p2 = _params[i2-1];
|
|---|
| 570 | if (p2->index_old != 0) {
|
|---|
| 571 | _QQ(p1->index, p2->index) = QQ_old(p1->index_old, p2->index_old);
|
|---|
| 572 | }
|
|---|
| 573 | }
|
|---|
| 574 | }
|
|---|
| 575 | }
|
|---|
| 576 |
|
|---|
| 577 | for (int ii = 1; ii <= nPar; ii++) {
|
|---|
| 578 | bncParam* par = _params[ii-1];
|
|---|
| 579 | if (par->index_old == 0) {
|
|---|
| 580 | _QQ(par->index, par->index) = _sigAmb0 * _sigAmb0;
|
|---|
| 581 | }
|
|---|
| 582 | par->index_old = par->index;
|
|---|
| 583 | }
|
|---|
| 584 | }
|
|---|
| 585 | }
|
|---|
| 586 |
|
|---|
| 587 | // Update Step of the Filter (currently just a single-epoch solution)
|
|---|
| 588 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 589 | t_irc bncModel::update(t_epoData* epoData) {
|
|---|
| 590 |
|
|---|
| 591 | bncSettings settings;
|
|---|
| 592 |
|
|---|
| 593 | _log.clear();
|
|---|
| 594 |
|
|---|
| 595 | _time = epoData->tt;
|
|---|
| 596 |
|
|---|
| 597 | _log += "Single Point Positioning of Epoch "
|
|---|
| 598 | + QByteArray(_time.timestr(1).c_str()) +
|
|---|
| 599 | "\n--------------------------------------------------------------\n";
|
|---|
| 600 |
|
|---|
| 601 | SymmetricMatrix QQsav;
|
|---|
| 602 | ColumnVector dx;
|
|---|
| 603 | ColumnVector vv;
|
|---|
| 604 |
|
|---|
| 605 | // Loop over all outliers
|
|---|
| 606 | // ----------------------
|
|---|
| 607 | do {
|
|---|
| 608 |
|
|---|
| 609 | // Bancroft Solution
|
|---|
| 610 | // -----------------
|
|---|
| 611 | if (cmpBancroft(epoData) != success) {
|
|---|
| 612 | emit newMessage(_log, false);
|
|---|
| 613 | return failure;
|
|---|
| 614 | }
|
|---|
| 615 |
|
|---|
| 616 | // Status Prediction
|
|---|
| 617 | // -----------------
|
|---|
| 618 | predict(epoData);
|
|---|
| 619 |
|
|---|
| 620 | // Create First-Design Matrix
|
|---|
| 621 | // --------------------------
|
|---|
| 622 | unsigned nPar = _params.size();
|
|---|
| 623 | unsigned nObs = 0;
|
|---|
| 624 | if (_usePhase) {
|
|---|
| 625 | nObs = 2 * (epoData->sizeGPS() + epoData->sizeGal()) + epoData->sizeGlo();
|
|---|
| 626 | }
|
|---|
| 627 | else {
|
|---|
| 628 | nObs = epoData->sizeGPS() + epoData->sizeGal(); // Glonass code not used
|
|---|
| 629 | }
|
|---|
| 630 |
|
|---|
| 631 | if (nObs < nPar) {
|
|---|
| 632 | _log += "bncModel::update: nObs < nPar\n";
|
|---|
| 633 | emit newMessage(_log, false);
|
|---|
| 634 | return failure;
|
|---|
| 635 | }
|
|---|
| 636 |
|
|---|
| 637 | Matrix AA(nObs, nPar); // first design matrix
|
|---|
| 638 | ColumnVector ll(nObs); // tems observed-computed
|
|---|
| 639 | DiagonalMatrix PP(nObs); PP = 0.0;
|
|---|
| 640 |
|
|---|
| 641 | unsigned iObs = 0;
|
|---|
| 642 |
|
|---|
| 643 | // GPS code and (optionally) phase observations
|
|---|
| 644 | // --------------------------------------------
|
|---|
| 645 | QMapIterator<QString, t_satData*> itGPS(epoData->satDataGPS);
|
|---|
| 646 | while (itGPS.hasNext()) {
|
|---|
| 647 | itGPS.next();
|
|---|
| 648 | t_satData* satData = itGPS.value();
|
|---|
| 649 | addObs(iObs, satData, AA, ll, PP);
|
|---|
| 650 | }
|
|---|
| 651 |
|
|---|
| 652 | // Glonass phase observations
|
|---|
| 653 | // --------------------------
|
|---|
| 654 | QMapIterator<QString, t_satData*> itGlo(epoData->satDataGlo);
|
|---|
| 655 | while (itGlo.hasNext()) {
|
|---|
| 656 | itGlo.next();
|
|---|
| 657 | t_satData* satData = itGlo.value();
|
|---|
| 658 | addObs(iObs, satData, AA, ll, PP);
|
|---|
| 659 | }
|
|---|
| 660 |
|
|---|
| 661 | // Galileo code and (optionally) phase observations
|
|---|
| 662 | // ------------------------------------------------
|
|---|
| 663 | QMapIterator<QString, t_satData*> itGal(epoData->satDataGal);
|
|---|
| 664 | while (itGal.hasNext()) {
|
|---|
| 665 | itGal.next();
|
|---|
| 666 | t_satData* satData = itGal.value();
|
|---|
| 667 | addObs(iObs, satData, AA, ll, PP);
|
|---|
| 668 | }
|
|---|
| 669 |
|
|---|
| 670 | // Compute Filter Update
|
|---|
| 671 | // ---------------------
|
|---|
| 672 | QQsav = _QQ;
|
|---|
| 673 |
|
|---|
| 674 | kalman(AA, ll, PP, _QQ, dx);
|
|---|
| 675 |
|
|---|
| 676 | vv = ll - AA * dx;
|
|---|
| 677 |
|
|---|
| 678 | // Print Residuals
|
|---|
| 679 | // ---------------
|
|---|
| 680 | if (true) {
|
|---|
| 681 | ostringstream str;
|
|---|
| 682 | str.setf(ios::fixed);
|
|---|
| 683 |
|
|---|
| 684 | QMapIterator<QString, t_satData*> itGPS(epoData->satDataGPS);
|
|---|
| 685 | while (itGPS.hasNext()) {
|
|---|
| 686 | itGPS.next();
|
|---|
| 687 | t_satData* satData = itGPS.value();
|
|---|
| 688 | printRes(vv, str, satData);
|
|---|
| 689 | }
|
|---|
| 690 | QMapIterator<QString, t_satData*> itGlo(epoData->satDataGlo);
|
|---|
| 691 | while (itGlo.hasNext()) {
|
|---|
| 692 | itGlo.next();
|
|---|
| 693 | t_satData* satData = itGlo.value();
|
|---|
| 694 | printRes(vv, str, satData);
|
|---|
| 695 | }
|
|---|
| 696 | QMapIterator<QString, t_satData*> itGal(epoData->satDataGal);
|
|---|
| 697 | while (itGal.hasNext()) {
|
|---|
| 698 | itGal.next();
|
|---|
| 699 | t_satData* satData = itGal.value();
|
|---|
| 700 | printRes(vv, str, satData);
|
|---|
| 701 | }
|
|---|
| 702 | _log += str.str().c_str();
|
|---|
| 703 | }
|
|---|
| 704 |
|
|---|
| 705 | } while (outlierDetection(QQsav, vv, epoData->satDataGPS,
|
|---|
| 706 | epoData->satDataGlo, epoData->satDataGal) != 0);
|
|---|
| 707 |
|
|---|
| 708 | // Remember the Epoch-specific Results for the computation of means
|
|---|
| 709 | // ----------------------------------------------------------------
|
|---|
| 710 | pppPos* newPos = new pppPos;
|
|---|
| 711 | newPos->time = epoData->tt;
|
|---|
| 712 |
|
|---|
| 713 | // Set Solution Vector
|
|---|
| 714 | // -------------------
|
|---|
| 715 | ostringstream strB;
|
|---|
| 716 | strB.setf(ios::fixed);
|
|---|
| 717 | QVectorIterator<bncParam*> itPar(_params);
|
|---|
| 718 | while (itPar.hasNext()) {
|
|---|
| 719 | bncParam* par = itPar.next();
|
|---|
| 720 | par->xx += dx(par->index);
|
|---|
| 721 |
|
|---|
| 722 | if (par->type == bncParam::RECCLK) {
|
|---|
| 723 | strB << "\n clk = " << setw(10) << setprecision(3) << par->xx
|
|---|
| 724 | << " +- " << setw(6) << setprecision(3)
|
|---|
| 725 | << sqrt(_QQ(par->index,par->index));
|
|---|
| 726 | }
|
|---|
| 727 | else if (par->type == bncParam::AMB_L3) {
|
|---|
| 728 | strB << "\n amb " << par->prn.toAscii().data() << " = "
|
|---|
| 729 | << setw(10) << setprecision(3) << par->xx
|
|---|
| 730 | << " +- " << setw(6) << setprecision(3)
|
|---|
| 731 | << sqrt(_QQ(par->index,par->index));
|
|---|
| 732 | }
|
|---|
| 733 | else if (par->type == bncParam::TROPO) {
|
|---|
| 734 | double aprTrp = delay_saast(M_PI/2.0);
|
|---|
| 735 | strB << "\n trp = " << par->prn.toAscii().data()
|
|---|
| 736 | << setw(7) << setprecision(3) << aprTrp << " "
|
|---|
| 737 | << setw(6) << setprecision(3) << showpos << par->xx << noshowpos
|
|---|
| 738 | << " +- " << setw(6) << setprecision(3)
|
|---|
| 739 | << sqrt(_QQ(par->index,par->index));
|
|---|
| 740 | newPos->xnt[6] = aprTrp + par->xx;
|
|---|
| 741 | }
|
|---|
| 742 | else if (par->type == bncParam::GALILEO_OFFSET) {
|
|---|
| 743 | strB << "\n offset = " << setw(10) << setprecision(3) << par->xx
|
|---|
| 744 | << " +- " << setw(6) << setprecision(3)
|
|---|
| 745 | << sqrt(_QQ(par->index,par->index));
|
|---|
| 746 | }
|
|---|
| 747 | }
|
|---|
| 748 | strB << '\n';
|
|---|
| 749 | _log += strB.str().c_str();
|
|---|
| 750 | emit newMessage(_log, false);
|
|---|
| 751 |
|
|---|
| 752 | // Final Message (both log file and screen)
|
|---|
| 753 | // ----------------------------------------
|
|---|
| 754 | ostringstream strC;
|
|---|
| 755 | strC.setf(ios::fixed);
|
|---|
| 756 | strC << _staID.data() << " PPP "
|
|---|
| 757 | << epoData->tt.timestr(1) << " " << epoData->sizeAll() << " "
|
|---|
| 758 | << setw(14) << setprecision(3) << x() << " +- "
|
|---|
| 759 | << setw(6) << setprecision(3) << sqrt(_QQ(1,1)) << " "
|
|---|
| 760 | << setw(14) << setprecision(3) << y() << " +- "
|
|---|
| 761 | << setw(6) << setprecision(3) << sqrt(_QQ(2,2)) << " "
|
|---|
| 762 | << setw(14) << setprecision(3) << z() << " +- "
|
|---|
| 763 | << setw(6) << setprecision(3) << sqrt(_QQ(3,3));
|
|---|
| 764 |
|
|---|
| 765 | // NEU Output
|
|---|
| 766 | // ----------
|
|---|
| 767 | if (settings.value("pppRefCrdX").toString() != "" &&
|
|---|
| 768 | settings.value("pppRefCrdY").toString() != "" &&
|
|---|
| 769 | settings.value("pppRefCrdZ").toString() != "") {
|
|---|
| 770 |
|
|---|
| 771 | double xyzRef[3];
|
|---|
| 772 | xyzRef[0] = settings.value("pppRefCrdX").toDouble();
|
|---|
| 773 | xyzRef[1] = settings.value("pppRefCrdY").toDouble();
|
|---|
| 774 | xyzRef[2] = settings.value("pppRefCrdZ").toDouble();
|
|---|
| 775 |
|
|---|
| 776 | newPos->xnt[0] = x() - xyzRef[0];
|
|---|
| 777 | newPos->xnt[1] = y() - xyzRef[1];
|
|---|
| 778 | newPos->xnt[2] = z() - xyzRef[2];
|
|---|
| 779 |
|
|---|
| 780 | double ellRef[3];
|
|---|
| 781 | xyz2ell(xyzRef, ellRef);
|
|---|
| 782 | xyz2neu(ellRef, newPos->xnt, &newPos->xnt[3]);
|
|---|
| 783 |
|
|---|
| 784 | strC << " NEU "
|
|---|
| 785 | << setw(8) << setprecision(3) << newPos->xnt[3] << " "
|
|---|
| 786 | << setw(8) << setprecision(3) << newPos->xnt[4] << " "
|
|---|
| 787 | << setw(8) << setprecision(3) << newPos->xnt[5] << endl;
|
|---|
| 788 |
|
|---|
| 789 | }
|
|---|
| 790 |
|
|---|
| 791 | emit newMessage(QByteArray(strC.str().c_str()), true);
|
|---|
| 792 |
|
|---|
| 793 | if (settings.value("pppAverage").toString() == "") {
|
|---|
| 794 | delete newPos;
|
|---|
| 795 | }
|
|---|
| 796 | else {
|
|---|
| 797 |
|
|---|
| 798 | _posAverage.push_back(newPos);
|
|---|
| 799 |
|
|---|
| 800 | // Time Span for Average Computation
|
|---|
| 801 | // ---------------------------------
|
|---|
| 802 | double tRangeAverage = settings.value("pppAverage").toDouble() * 60.;
|
|---|
| 803 | if (tRangeAverage < 0) {
|
|---|
| 804 | tRangeAverage = 0;
|
|---|
| 805 | }
|
|---|
| 806 | if (tRangeAverage > 86400) {
|
|---|
| 807 | tRangeAverage = 86400;
|
|---|
| 808 | }
|
|---|
| 809 |
|
|---|
| 810 | // Compute the Mean
|
|---|
| 811 | // ----------------
|
|---|
| 812 | ColumnVector mean(7); mean = 0.0;
|
|---|
| 813 |
|
|---|
| 814 | QMutableVectorIterator<pppPos*> it(_posAverage);
|
|---|
| 815 | while (it.hasNext()) {
|
|---|
| 816 | pppPos* pp = it.next();
|
|---|
| 817 | if ( (epoData->tt - pp->time) >= tRangeAverage ) {
|
|---|
| 818 | delete pp;
|
|---|
| 819 | it.remove();
|
|---|
| 820 | }
|
|---|
| 821 | else {
|
|---|
| 822 | for (int ii = 0; ii < 7; ++ii) {
|
|---|
| 823 | mean[ii] += pp->xnt[ii];
|
|---|
| 824 | }
|
|---|
| 825 | }
|
|---|
| 826 | }
|
|---|
| 827 |
|
|---|
| 828 | int nn = _posAverage.size();
|
|---|
| 829 |
|
|---|
| 830 | if (nn > 0) {
|
|---|
| 831 |
|
|---|
| 832 | mean /= nn;
|
|---|
| 833 |
|
|---|
| 834 | // Compute the Deviation
|
|---|
| 835 | // ---------------------
|
|---|
| 836 | ColumnVector std(7); std = 0.0;
|
|---|
| 837 | QVectorIterator<pppPos*> it2(_posAverage);
|
|---|
| 838 | while (it2.hasNext()) {
|
|---|
| 839 | pppPos* pp = it2.next();
|
|---|
| 840 | for (int ii = 0; ii < 7; ++ii) {
|
|---|
| 841 | std[ii] += (pp->xnt[ii] - mean[ii]) * (pp->xnt[ii] - mean[ii]);
|
|---|
| 842 | }
|
|---|
| 843 | }
|
|---|
| 844 | for (int ii = 0; ii < 7; ++ii) {
|
|---|
| 845 | std[ii] = sqrt(std[ii] / nn);
|
|---|
| 846 | }
|
|---|
| 847 |
|
|---|
| 848 | ostringstream strD; strD.setf(ios::fixed);
|
|---|
| 849 | strD << _staID.data() << " AVE-XYZ "
|
|---|
| 850 | << epoData->tt.timestr(1) << " "
|
|---|
| 851 | << setw(13) << setprecision(3) << mean[0] << " +- "
|
|---|
| 852 | << setw(6) << setprecision(3) << std[0] << " "
|
|---|
| 853 | << setw(14) << setprecision(3) << mean[1] << " +- "
|
|---|
| 854 | << setw(6) << setprecision(3) << std[1] << " "
|
|---|
| 855 | << setw(14) << setprecision(3) << mean[2] << " +- "
|
|---|
| 856 | << setw(6) << setprecision(3) << std[2];
|
|---|
| 857 | emit newMessage(QByteArray(strD.str().c_str()), true);
|
|---|
| 858 |
|
|---|
| 859 | ostringstream strE; strE.setf(ios::fixed);
|
|---|
| 860 | strE << _staID.data() << " AVE-NEU "
|
|---|
| 861 | << epoData->tt.timestr(1) << " "
|
|---|
| 862 | << setw(13) << setprecision(3) << mean[3] << " +- "
|
|---|
| 863 | << setw(6) << setprecision(3) << std[3] << " "
|
|---|
| 864 | << setw(14) << setprecision(3) << mean[4] << " +- "
|
|---|
| 865 | << setw(6) << setprecision(3) << std[4] << " "
|
|---|
| 866 | << setw(14) << setprecision(3) << mean[5] << " +- "
|
|---|
| 867 | << setw(6) << setprecision(3) << std[5];
|
|---|
| 868 |
|
|---|
| 869 | emit newMessage(QByteArray(strE.str().c_str()), true);
|
|---|
| 870 |
|
|---|
| 871 | if ( Qt::CheckState(settings.value("pppEstTropo").toInt()) == Qt::Checked) {
|
|---|
| 872 | ostringstream strF; strF.setf(ios::fixed);
|
|---|
| 873 | strF << _staID.data() << " AVE-TRP "
|
|---|
| 874 | << epoData->tt.timestr(1) << " "
|
|---|
| 875 | << setw(13) << setprecision(3) << mean[6] << " +- "
|
|---|
| 876 | << setw(6) << setprecision(3) << std[6] << endl;
|
|---|
| 877 | emit newMessage(QByteArray(strF.str().c_str()), true);
|
|---|
| 878 | }
|
|---|
| 879 | }
|
|---|
| 880 | }
|
|---|
| 881 |
|
|---|
| 882 | // NMEA Output
|
|---|
| 883 | // -----------
|
|---|
| 884 | double xyz[3];
|
|---|
| 885 | xyz[0] = x();
|
|---|
| 886 | xyz[1] = y();
|
|---|
| 887 | xyz[2] = z();
|
|---|
| 888 | double ell[3];
|
|---|
| 889 | xyz2ell(xyz, ell);
|
|---|
| 890 | double phiDeg = ell[0] * 180 / M_PI;
|
|---|
| 891 | double lamDeg = ell[1] * 180 / M_PI;
|
|---|
| 892 |
|
|---|
| 893 | char phiCh = 'N';
|
|---|
| 894 | if (phiDeg < 0) {
|
|---|
| 895 | phiDeg = -phiDeg;
|
|---|
| 896 | phiCh = 'S';
|
|---|
| 897 | }
|
|---|
| 898 | char lamCh = 'E';
|
|---|
| 899 | if (lamDeg < 0) {
|
|---|
| 900 | lamDeg = -lamDeg;
|
|---|
| 901 | lamCh = 'W';
|
|---|
| 902 | }
|
|---|
| 903 |
|
|---|
| 904 | string datestr = epoData->tt.datestr(0); // yyyymmdd
|
|---|
| 905 | ostringstream strRMC;
|
|---|
| 906 | strRMC.setf(ios::fixed);
|
|---|
| 907 | strRMC << "GPRMC,"
|
|---|
| 908 | << epoData->tt.timestr(0,0) << ",A,"
|
|---|
| 909 | << setw(2) << setfill('0') << int(phiDeg)
|
|---|
| 910 | << setw(6) << setprecision(3) << setfill('0')
|
|---|
| 911 | << fmod(60*phiDeg,60) << ',' << phiCh << ','
|
|---|
| 912 | << setw(3) << setfill('0') << int(lamDeg)
|
|---|
| 913 | << setw(6) << setprecision(3) << setfill('0')
|
|---|
| 914 | << fmod(60*lamDeg,60) << ',' << lamCh << ",,,"
|
|---|
| 915 | << datestr[6] << datestr[7] << datestr[4] << datestr[5]
|
|---|
| 916 | << datestr[2] << datestr[3] << ",,";
|
|---|
| 917 |
|
|---|
| 918 | writeNMEAstr(QString(strRMC.str().c_str()));
|
|---|
| 919 |
|
|---|
| 920 | double dop = 2.0; // TODO
|
|---|
| 921 |
|
|---|
| 922 | ostringstream strGGA;
|
|---|
| 923 | strGGA.setf(ios::fixed);
|
|---|
| 924 | strGGA << "GPGGA,"
|
|---|
| 925 | << epoData->tt.timestr(0,0) << ','
|
|---|
| 926 | << setw(2) << setfill('0') << int(phiDeg)
|
|---|
| 927 | << setw(10) << setprecision(7) << setfill('0')
|
|---|
| 928 | << fmod(60*phiDeg,60) << ',' << phiCh << ','
|
|---|
| 929 | << setw(3) << setfill('0') << int(lamDeg)
|
|---|
| 930 | << setw(10) << setprecision(7) << setfill('0')
|
|---|
| 931 | << fmod(60*lamDeg,60) << ',' << lamCh
|
|---|
| 932 | << ",1," << setw(2) << setfill('0') << epoData->sizeAll() << ','
|
|---|
| 933 | << setw(3) << setprecision(1) << dop << ','
|
|---|
| 934 | << setprecision(3) << ell[2] << ",M,0.0,M,,";
|
|---|
| 935 |
|
|---|
| 936 | writeNMEAstr(QString(strGGA.str().c_str()));
|
|---|
| 937 |
|
|---|
| 938 | return success;
|
|---|
| 939 | }
|
|---|
| 940 |
|
|---|
| 941 | // Outlier Detection
|
|---|
| 942 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 943 | int bncModel::outlierDetection(const SymmetricMatrix& QQsav,
|
|---|
| 944 | const ColumnVector& vv,
|
|---|
| 945 | QMap<QString, t_satData*>& satDataGPS,
|
|---|
| 946 | QMap<QString, t_satData*>& satDataGlo,
|
|---|
| 947 | QMap<QString, t_satData*>& satDataGal) {
|
|---|
| 948 |
|
|---|
| 949 | QString prnCode;
|
|---|
| 950 | QString prnPhase;
|
|---|
| 951 | double maxResCode = 0.0;
|
|---|
| 952 | double maxResPhase = 0.0;
|
|---|
| 953 |
|
|---|
| 954 | QString prnRemoved;
|
|---|
| 955 | double maxRes;
|
|---|
| 956 |
|
|---|
| 957 | int irc = 0;
|
|---|
| 958 |
|
|---|
| 959 | // Check Glonass
|
|---|
| 960 | // -------------
|
|---|
| 961 | if (irc == 0) {
|
|---|
| 962 | findMaxRes(vv,satDataGlo, prnCode, maxResCode, prnPhase, maxResPhase);
|
|---|
| 963 | if (maxResPhase > MAXRES_PHASE_GLO) {
|
|---|
| 964 | satDataGlo.remove(prnPhase);
|
|---|
| 965 | prnRemoved = prnPhase;
|
|---|
| 966 | maxRes = maxResPhase;
|
|---|
| 967 | irc = 1;
|
|---|
| 968 | }
|
|---|
| 969 | }
|
|---|
| 970 |
|
|---|
| 971 | // Check Galileo
|
|---|
| 972 | // -------------
|
|---|
| 973 | if (irc == 0) {
|
|---|
| 974 | findMaxRes(vv,satDataGal, prnCode, maxResCode, prnPhase, maxResPhase);
|
|---|
| 975 | if (maxResPhase > MAXRES_PHASE_GAL) {
|
|---|
| 976 | satDataGal.remove(prnPhase);
|
|---|
| 977 | prnRemoved = prnPhase;
|
|---|
| 978 | maxRes = maxResPhase;
|
|---|
| 979 | irc = 1;
|
|---|
| 980 | }
|
|---|
| 981 | else if (maxResCode > MAXRES_CODE_GAL) {
|
|---|
| 982 | satDataGal.remove(prnCode);
|
|---|
| 983 | prnRemoved = prnCode;
|
|---|
| 984 | maxRes = maxResCode;
|
|---|
| 985 | irc = 1;
|
|---|
| 986 | }
|
|---|
| 987 | }
|
|---|
| 988 |
|
|---|
| 989 | // Check GPS
|
|---|
| 990 | // ---------
|
|---|
| 991 | if (irc == 0) {
|
|---|
| 992 | findMaxRes(vv,satDataGPS, prnCode, maxResCode, prnPhase, maxResPhase);
|
|---|
| 993 | if (maxResPhase > MAXRES_PHASE_GPS) {
|
|---|
| 994 | satDataGPS.remove(prnPhase);
|
|---|
| 995 | prnRemoved = prnPhase;
|
|---|
| 996 | maxRes = maxResPhase;
|
|---|
| 997 | irc = 1;
|
|---|
| 998 | }
|
|---|
| 999 | else if (maxResCode > MAXRES_CODE_GPS) {
|
|---|
| 1000 | satDataGPS.remove(prnCode);
|
|---|
| 1001 | prnRemoved = prnCode;
|
|---|
| 1002 | maxRes = maxResCode;
|
|---|
| 1003 | irc = 1;
|
|---|
| 1004 | }
|
|---|
| 1005 | }
|
|---|
| 1006 |
|
|---|
| 1007 | if (irc != 0) {
|
|---|
| 1008 | _log += "Outlier " + prnRemoved.toAscii() + " "
|
|---|
| 1009 | + QByteArray::number(maxRes, 'f', 3) + "\n";
|
|---|
| 1010 | _QQ = QQsav;
|
|---|
| 1011 | }
|
|---|
| 1012 |
|
|---|
| 1013 | return irc;
|
|---|
| 1014 | }
|
|---|
| 1015 |
|
|---|
| 1016 | //
|
|---|
| 1017 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 1018 | void bncModel::writeNMEAstr(const QString& nmStr) {
|
|---|
| 1019 |
|
|---|
| 1020 | unsigned char XOR = 0;
|
|---|
| 1021 | for (int ii = 0; ii < nmStr.length(); ii++) {
|
|---|
| 1022 | XOR ^= (unsigned char) nmStr[ii].toAscii();
|
|---|
| 1023 | }
|
|---|
| 1024 |
|
|---|
| 1025 | QString outStr = '$' + nmStr
|
|---|
| 1026 | + QString("*%1\n").arg(int(XOR), 0, 16).toUpper();
|
|---|
| 1027 |
|
|---|
| 1028 | if (_nmeaStream) {
|
|---|
| 1029 | *_nmeaStream << outStr;
|
|---|
| 1030 | _nmeaStream->flush();
|
|---|
| 1031 | }
|
|---|
| 1032 |
|
|---|
| 1033 | emit newNMEAstr(outStr.toAscii());
|
|---|
| 1034 | }
|
|---|
| 1035 |
|
|---|
| 1036 | ////
|
|---|
| 1037 | //////////////////////////////////////////////////////////////////////////////
|
|---|
| 1038 | void bncModel::kalman(const Matrix& AA, const ColumnVector& ll,
|
|---|
| 1039 | const DiagonalMatrix& PP,
|
|---|
| 1040 | SymmetricMatrix& QQ, ColumnVector& dx) {
|
|---|
| 1041 |
|
|---|
| 1042 | int nObs = AA.Nrows();
|
|---|
| 1043 | int nPar = AA.Ncols();
|
|---|
| 1044 |
|
|---|
| 1045 | UpperTriangularMatrix SS = Cholesky(QQ).t();
|
|---|
| 1046 |
|
|---|
| 1047 | Matrix SA = SS*AA.t();
|
|---|
| 1048 | Matrix SRF(nObs+nPar, nObs+nPar); SRF = 0;
|
|---|
| 1049 | for (int ii = 1; ii <= nObs; ++ii) {
|
|---|
| 1050 | SRF(ii,ii) = 1.0 / sqrt(PP(ii,ii));
|
|---|
| 1051 | }
|
|---|
| 1052 |
|
|---|
| 1053 | SRF.SubMatrix (nObs+1, nObs+nPar, 1, nObs) = SA;
|
|---|
| 1054 | SRF.SymSubMatrix(nObs+1, nObs+nPar) = SS;
|
|---|
| 1055 |
|
|---|
| 1056 | UpperTriangularMatrix UU;
|
|---|
| 1057 | QRZ(SRF, UU);
|
|---|
| 1058 |
|
|---|
| 1059 | SS = UU.SymSubMatrix(nObs+1, nObs+nPar);
|
|---|
| 1060 | UpperTriangularMatrix SH_rt = UU.SymSubMatrix(1, nObs);
|
|---|
| 1061 | Matrix YY = UU.SubMatrix(1, nObs, nObs+1, nObs+nPar);
|
|---|
| 1062 |
|
|---|
| 1063 | UpperTriangularMatrix SHi = SH_rt.i();
|
|---|
| 1064 |
|
|---|
| 1065 | Matrix KT = SHi * YY;
|
|---|
| 1066 | SymmetricMatrix Hi; Hi << SHi * SHi.t();
|
|---|
| 1067 |
|
|---|
| 1068 | dx = KT.t() * ll;
|
|---|
| 1069 | QQ << (SS.t() * SS);
|
|---|
| 1070 | }
|
|---|
| 1071 |
|
|---|
| 1072 | // Phase Wind-Up Correction
|
|---|
| 1073 | ///////////////////////////////////////////////////////////////////////////
|
|---|
| 1074 | double bncModel::windUp(const QString& prn, const ColumnVector& rSat,
|
|---|
| 1075 | const ColumnVector& rRec) {
|
|---|
| 1076 |
|
|---|
| 1077 | double Mjd = _time.mjd() + _time.daysec() / 86400.0;
|
|---|
| 1078 |
|
|---|
| 1079 | // First time - initialize to zero
|
|---|
| 1080 | // -------------------------------
|
|---|
| 1081 | if (!_windUpTime.contains(prn)) {
|
|---|
| 1082 | _windUpTime[prn] = Mjd;
|
|---|
| 1083 | _windUpSum[prn] = 0.0;
|
|---|
| 1084 | }
|
|---|
| 1085 |
|
|---|
| 1086 | // Compute the correction for new time
|
|---|
| 1087 | // -----------------------------------
|
|---|
| 1088 | else if (_windUpTime[prn] != Mjd) {
|
|---|
| 1089 | _windUpTime[prn] = Mjd;
|
|---|
| 1090 |
|
|---|
| 1091 | // Unit Vector GPS Satellite --> Receiver
|
|---|
| 1092 | // --------------------------------------
|
|---|
| 1093 | ColumnVector rho = rRec - rSat;
|
|---|
| 1094 | rho /= rho.norm_Frobenius();
|
|---|
| 1095 |
|
|---|
| 1096 | // GPS Satellite unit Vectors sz, sy, sx
|
|---|
| 1097 | // -------------------------------------
|
|---|
| 1098 | ColumnVector sz = -rSat / rSat.norm_Frobenius();
|
|---|
| 1099 |
|
|---|
| 1100 | ColumnVector xSun = Sun(Mjd);
|
|---|
| 1101 | xSun /= xSun.norm_Frobenius();
|
|---|
| 1102 |
|
|---|
| 1103 | ColumnVector sy = crossproduct(sz, xSun);
|
|---|
| 1104 | ColumnVector sx = crossproduct(sy, sz);
|
|---|
| 1105 |
|
|---|
| 1106 | // Effective Dipole of the GPS Satellite Antenna
|
|---|
| 1107 | // ---------------------------------------------
|
|---|
| 1108 | ColumnVector dipSat = sx - rho * DotProduct(rho,sx)
|
|---|
| 1109 | - crossproduct(rho, sy);
|
|---|
| 1110 |
|
|---|
| 1111 | // Receiver unit Vectors rx, ry
|
|---|
| 1112 | // ----------------------------
|
|---|
| 1113 | ColumnVector rx(3);
|
|---|
| 1114 | ColumnVector ry(3);
|
|---|
| 1115 |
|
|---|
| 1116 | double recEll[3]; xyz2ell(rRec.data(), recEll) ;
|
|---|
| 1117 | double neu[3];
|
|---|
| 1118 |
|
|---|
| 1119 | neu[0] = 1.0;
|
|---|
| 1120 | neu[1] = 0.0;
|
|---|
| 1121 | neu[2] = 0.0;
|
|---|
| 1122 | neu2xyz(recEll, neu, rx.data());
|
|---|
| 1123 |
|
|---|
| 1124 | neu[0] = 0.0;
|
|---|
| 1125 | neu[1] = -1.0;
|
|---|
| 1126 | neu[2] = 0.0;
|
|---|
| 1127 | neu2xyz(recEll, neu, ry.data());
|
|---|
| 1128 |
|
|---|
| 1129 | // Effective Dipole of the Receiver Antenna
|
|---|
| 1130 | // ----------------------------------------
|
|---|
| 1131 | ColumnVector dipRec = rx - rho * DotProduct(rho,rx)
|
|---|
| 1132 | + crossproduct(rho, ry);
|
|---|
| 1133 |
|
|---|
| 1134 | // Resulting Effect
|
|---|
| 1135 | // ----------------
|
|---|
| 1136 | double alpha = DotProduct(dipSat,dipRec) /
|
|---|
| 1137 | (dipSat.norm_Frobenius() * dipRec.norm_Frobenius());
|
|---|
| 1138 |
|
|---|
| 1139 | if (alpha > 1.0) alpha = 1.0;
|
|---|
| 1140 | if (alpha < -1.0) alpha = -1.0;
|
|---|
| 1141 |
|
|---|
| 1142 | double dphi = acos(alpha) / 2.0 / M_PI; // in cycles
|
|---|
| 1143 |
|
|---|
| 1144 | if ( DotProduct(rho, crossproduct(dipSat, dipRec)) < 0.0 ) {
|
|---|
| 1145 | dphi = -dphi;
|
|---|
| 1146 | }
|
|---|
| 1147 |
|
|---|
| 1148 | _windUpSum[prn] = floor(_windUpSum[prn] - dphi + 0.5) + dphi;
|
|---|
| 1149 | }
|
|---|
| 1150 |
|
|---|
| 1151 | return _windUpSum[prn];
|
|---|
| 1152 | }
|
|---|
| 1153 |
|
|---|
| 1154 | //
|
|---|
| 1155 | ///////////////////////////////////////////////////////////////////////////
|
|---|
| 1156 | void bncModel::cmpEle(t_satData* satData) {
|
|---|
| 1157 | ColumnVector rr = satData->xx - _xcBanc.Rows(1,3);
|
|---|
| 1158 | double rho = rr.norm_Frobenius();
|
|---|
| 1159 |
|
|---|
| 1160 | double neu[3];
|
|---|
| 1161 | xyz2neu(_ellBanc.data(), rr.data(), neu);
|
|---|
| 1162 |
|
|---|
| 1163 | satData->eleSat = acos( sqrt(neu[0]*neu[0] + neu[1]*neu[1]) / rho );
|
|---|
| 1164 | if (neu[2] < 0) {
|
|---|
| 1165 | satData->eleSat *= -1.0;
|
|---|
| 1166 | }
|
|---|
| 1167 | satData->azSat = atan2(neu[1], neu[0]);
|
|---|
| 1168 | }
|
|---|
| 1169 |
|
|---|
| 1170 | //
|
|---|
| 1171 | ///////////////////////////////////////////////////////////////////////////
|
|---|
| 1172 | void bncModel::addAmb(t_satData* satData) {
|
|---|
| 1173 | bool found = false;
|
|---|
| 1174 | for (int iPar = 1; iPar <= _params.size(); iPar++) {
|
|---|
| 1175 | if (_params[iPar-1]->type == bncParam::AMB_L3 &&
|
|---|
| 1176 | _params[iPar-1]->prn == satData->prn) {
|
|---|
| 1177 | found = true;
|
|---|
| 1178 | break;
|
|---|
| 1179 | }
|
|---|
| 1180 | }
|
|---|
| 1181 | if (!found) {
|
|---|
| 1182 | bncParam* par = new bncParam(bncParam::AMB_L3,
|
|---|
| 1183 | _params.size()+1, satData->prn);
|
|---|
| 1184 | _params.push_back(par);
|
|---|
| 1185 | par->xx = satData->L3 - cmpValue(satData, true);
|
|---|
| 1186 | }
|
|---|
| 1187 | }
|
|---|
| 1188 |
|
|---|
| 1189 | //
|
|---|
| 1190 | ///////////////////////////////////////////////////////////////////////////
|
|---|
| 1191 | void bncModel::addObs(unsigned& iObs, t_satData* satData,
|
|---|
| 1192 | Matrix& AA, ColumnVector& ll, DiagonalMatrix& PP) {
|
|---|
| 1193 |
|
|---|
| 1194 | // Code Observations
|
|---|
| 1195 | // -----------------
|
|---|
| 1196 | if (satData->system() != 'R') {
|
|---|
| 1197 | ++iObs;
|
|---|
| 1198 | ll(iObs) = satData->P3 - cmpValue(satData, false);
|
|---|
| 1199 | PP(iObs,iObs) = 1.0 / (_sigP3 * _sigP3);
|
|---|
| 1200 | for (int iPar = 1; iPar <= _params.size(); iPar++) {
|
|---|
| 1201 | AA(iObs, iPar) = _params[iPar-1]->partial(satData, false);
|
|---|
| 1202 | }
|
|---|
| 1203 | satData->indexCode = iObs;
|
|---|
| 1204 | }
|
|---|
| 1205 |
|
|---|
| 1206 | // Phase Observations
|
|---|
| 1207 | // ------------------
|
|---|
| 1208 | if (_usePhase) {
|
|---|
| 1209 | ++iObs;
|
|---|
| 1210 | ll(iObs) = satData->L3 - cmpValue(satData, true);
|
|---|
| 1211 | PP(iObs,iObs) = 1.0 / (_sigL3 * _sigL3);
|
|---|
| 1212 | for (int iPar = 1; iPar <= _params.size(); iPar++) {
|
|---|
| 1213 | if (_params[iPar-1]->type == bncParam::AMB_L3 &&
|
|---|
| 1214 | _params[iPar-1]->prn == satData->prn) {
|
|---|
| 1215 | ll(iObs) -= _params[iPar-1]->xx;
|
|---|
| 1216 | }
|
|---|
| 1217 | AA(iObs, iPar) = _params[iPar-1]->partial(satData, true);
|
|---|
| 1218 | }
|
|---|
| 1219 | satData->indexPhase = iObs;
|
|---|
| 1220 | }
|
|---|
| 1221 | }
|
|---|
| 1222 |
|
|---|
| 1223 | //
|
|---|
| 1224 | ///////////////////////////////////////////////////////////////////////////
|
|---|
| 1225 | void bncModel::printRes(const ColumnVector& vv,
|
|---|
| 1226 | ostringstream& str, t_satData* satData) {
|
|---|
| 1227 | if (satData->indexPhase) {
|
|---|
| 1228 | str << _time.timestr(1)
|
|---|
| 1229 | << " RES " << satData->prn.toAscii().data() << " L3 "
|
|---|
| 1230 | << setw(9) << setprecision(4) << vv(satData->indexPhase);
|
|---|
| 1231 | if (satData->indexCode) {
|
|---|
| 1232 | str << " P3 " << setw(9) << setprecision(4) << vv(satData->indexCode);
|
|---|
| 1233 | }
|
|---|
| 1234 | str << endl;
|
|---|
| 1235 | }
|
|---|
| 1236 | }
|
|---|
| 1237 |
|
|---|
| 1238 | //
|
|---|
| 1239 | ///////////////////////////////////////////////////////////////////////////
|
|---|
| 1240 | void bncModel::findMaxRes(const ColumnVector& vv,
|
|---|
| 1241 | const QMap<QString, t_satData*>& satData,
|
|---|
| 1242 | QString& prnCode, double& maxResCode,
|
|---|
| 1243 | QString& prnPhase, double& maxResPhase) {
|
|---|
| 1244 | maxResCode = 0.0;
|
|---|
| 1245 | maxResPhase = 0.0;
|
|---|
| 1246 |
|
|---|
| 1247 | QMapIterator<QString, t_satData*> it(satData);
|
|---|
| 1248 | while (it.hasNext()) {
|
|---|
| 1249 | it.next();
|
|---|
| 1250 | t_satData* satData = it.value();
|
|---|
| 1251 | if (satData->indexCode) {
|
|---|
| 1252 | if (fabs(vv(satData->indexCode)) > maxResCode) {
|
|---|
| 1253 | maxResCode = fabs(vv(satData->indexCode));
|
|---|
| 1254 | prnCode = satData->prn;
|
|---|
| 1255 | }
|
|---|
| 1256 | }
|
|---|
| 1257 | if (satData->indexPhase) {
|
|---|
| 1258 | if (fabs(vv(satData->indexPhase)) > maxResPhase) {
|
|---|
| 1259 | maxResPhase = fabs(vv(satData->indexPhase));
|
|---|
| 1260 | prnPhase = satData->prn;
|
|---|
| 1261 | }
|
|---|
| 1262 | }
|
|---|
| 1263 | }
|
|---|
| 1264 | }
|
|---|
| 1265 |
|
|---|