source: ntrip/trunk/BNC/src/PPP/pppClient.cpp@ 8910

Last change on this file since 8910 was 8910, checked in by stuerze, 4 years ago

minor changes

  • Property svn:keywords set to Author Date Id Rev URL;svn:eol-style=native
  • Property svn:mime-type set to text/plain
File size: 20.5 KB
Line 
1/* -------------------------------------------------------------------------
2 * BKG NTRIP Client
3 * -------------------------------------------------------------------------
4 *
5 * Class: t_pppClient
6 *
7 * Purpose: PPP Client processing starts here
8 *
9 * Author: L. Mervart
10 *
11 * Created: 29-Jul-2014
12 *
13 * Changes:
14 *
15 * -----------------------------------------------------------------------*/
16
17#include <QThreadStorage>
18
19#include <iostream>
20#include <iomanip>
21#include <cmath>
22#include <stdlib.h>
23#include <string.h>
24#include <stdexcept>
25
26#include "pppClient.h"
27#include "pppEphPool.h"
28#include "pppObsPool.h"
29#include "bncconst.h"
30#include "bncutils.h"
31#include "pppStation.h"
32#include "bncantex.h"
33#include "pppFilter.h"
34
35using namespace BNC_PPP;
36using namespace std;
37
38// Global variable holding thread-specific pointers
39//////////////////////////////////////////////////////////////////////////////
40QThreadStorage<t_pppClient*> CLIENTS;
41
42// Static function returning thread-specific pointer
43//////////////////////////////////////////////////////////////////////////////
44t_pppClient* t_pppClient::instance() {
45 return CLIENTS.localData();
46}
47
48// Constructor
49//////////////////////////////////////////////////////////////////////////////
50t_pppClient::t_pppClient(const t_pppOptions* opt) {
51 _output = 0;
52 _opt = new t_pppOptions(*opt);
53 _log = new ostringstream();
54 _ephPool = new t_pppEphPool();
55 _obsPool = new t_pppObsPool();
56 _staRover = new t_pppStation();
57 _filter = new t_pppFilter(_obsPool);
58 _tides = new t_tides();
59 _antex = 0;
60 if (!_opt->_antexFileName.empty()) {
61 _antex = new bncAntex(_opt->_antexFileName.c_str());
62 }
63 if (!_opt->_blqFileName.empty()) {
64 if (_tides->readBlqFile(_opt->_blqFileName.c_str()) == success) {
65 //_tides->printAllBlqSets();
66 }
67 }
68
69 if (_opt->_refSatRequired) {
70 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) {
71 char system = OPT->systems()[iSys];
72 _obsPool->initRefSatMapElement(system);
73 }
74 }
75 _offGG = 0.0;
76 CLIENTS.setLocalData(this); // CLIENTS takes ownership over "this"
77}
78
79// Destructor
80//////////////////////////////////////////////////////////////////////////////
81t_pppClient::~t_pppClient() {
82 delete _log;
83 delete _opt;
84 delete _filter;
85 delete _ephPool;
86 delete _obsPool;
87 delete _staRover;
88 if (_antex) {
89 delete _antex;
90 }
91 delete _tides;
92 clearObs();
93}
94
95//
96//////////////////////////////////////////////////////////////////////////////
97void t_pppClient::putEphemeris(const t_eph* eph) {
98 const t_ephGPS* ephGPS = dynamic_cast<const t_ephGPS*>(eph);
99 const t_ephGlo* ephGlo = dynamic_cast<const t_ephGlo*>(eph);
100 const t_ephGal* ephGal = dynamic_cast<const t_ephGal*>(eph);
101 const t_ephBDS* ephBDS = dynamic_cast<const t_ephBDS*>(eph);
102 if (ephGPS) {
103 _ephPool->putEphemeris(new t_ephGPS(*ephGPS));
104 }
105 else if (ephGlo) {
106 _ephPool->putEphemeris(new t_ephGlo(*ephGlo));
107 }
108 else if (ephGal) {
109 _ephPool->putEphemeris(new t_ephGal(*ephGal));
110 }
111 else if (ephBDS) {
112 _ephPool->putEphemeris(new t_ephBDS(*ephBDS));
113 }
114}
115
116//
117//////////////////////////////////////////////////////////////////////////////
118void t_pppClient::putTec(const t_vTec* vTec) {
119 _obsPool->putTec(new t_vTec(*vTec));
120}
121
122//
123//////////////////////////////////////////////////////////////////////////////
124void t_pppClient::putOrbCorrections(const vector<t_orbCorr*>& corr) {
125 for (unsigned ii = 0; ii < corr.size(); ii++) {
126 _ephPool->putOrbCorrection(new t_orbCorr(*corr[ii]));
127 }
128}
129
130//
131//////////////////////////////////////////////////////////////////////////////
132void t_pppClient::putClkCorrections(const vector<t_clkCorr*>& corr) {
133 for (unsigned ii = 0; ii < corr.size(); ii++) {
134 _ephPool->putClkCorrection(new t_clkCorr(*corr[ii]));
135 }
136}
137
138//
139//////////////////////////////////////////////////////////////////////////////
140void t_pppClient::putCodeBiases(const vector<t_satCodeBias*>& biases) {
141 for (unsigned ii = 0; ii < biases.size(); ii++) {
142 _obsPool->putCodeBias(new t_satCodeBias(*biases[ii]));
143 }
144}
145
146//
147//////////////////////////////////////////////////////////////////////////////
148void t_pppClient::putPhaseBiases(const vector<t_satPhaseBias*>& biases) {
149 for (unsigned ii = 0; ii < biases.size(); ii++) {
150 _obsPool->putPhaseBias(new t_satPhaseBias(*biases[ii]));
151 }
152}
153
154//
155//////////////////////////////////////////////////////////////////////////////
156t_irc t_pppClient::prepareObs(const vector<t_satObs*>& satObs,
157 vector<t_pppSatObs*>& obsVector, bncTime& epoTime) {
158
159 // Default
160 // -------
161 epoTime.reset();
162
163 // Create vector of valid observations
164 // -----------------------------------
165 for (unsigned ii = 0; ii < satObs.size(); ii++) {
166 char system = satObs[ii]->_prn.system();
167 if (OPT->useSystem(system)) {
168 t_pppSatObs* pppSatObs = new t_pppSatObs(*satObs[ii]);
169 if (pppSatObs->isValid()) {
170 obsVector.push_back(pppSatObs);
171 }
172 else {
173 delete pppSatObs;
174 }
175 }
176 }
177
178 // (re)set reference satellites per system if required
179 // ---------------------------------------------------
180 if (_opt->_refSatRequired) {
181 // reference satellite definition per system
182 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) {
183 char system = OPT->systems()[iSys];
184 bool refSatDefined = false;
185 t_pppRefSat* refSat = _obsPool->getRefSatMapElement(system);
186 for (unsigned ii = 0; ii < obsVector.size(); ii++) {
187 const t_pppSatObs* satObs = obsVector.at(ii);
188 // reference satellite is unchanged
189 if (!_obsPool->epoReProcessing() && refSat->prn() == satObs->prn()) {
190 refSatDefined = true;
191 obsVector[ii]->setAsReference();
192 refSat->setStatus(t_pppRefSat::unchanged);
193 }
194 // reference satellite has changed
195 else if (_obsPool->epoReProcessing() && refSat->prn() != satObs->prn()) {
196 if (satObs->prn().system() == system) {
197 refSatDefined = true;
198 obsVector[ii]->setAsReference();
199 refSat->setStatus(t_pppRefSat::changed);
200 refSat->setPrn(satObs->prn());
201 }
202 }
203 if (refSatDefined) {
204 break;
205 }
206 }
207 // reference satellite has to be initialized
208 if (!refSatDefined) {
209 for (unsigned ii = 0; ii < obsVector.size(); ii++) {
210 const t_pppSatObs* satObs = obsVector.at(ii);
211 if (satObs->prn().system() == system) {
212 obsVector[ii]->setAsReference();
213 refSat->setStatus(t_pppRefSat::initialized);
214 refSat->setPrn(satObs->prn());
215 }
216 }
217 }
218 }
219 _obsPool->setEpoReProcessing(false); //TODO: später erst nach Trafo false setzen
220 }
221
222 // Check whether data are synchronized, compute epoTime
223 // ----------------------------------------------------
224 const double MAXSYNC = 0.05; // synchronization limit
225 double meanDt = 0.0;
226 for (unsigned ii = 0; ii < obsVector.size(); ii++) {
227 const t_pppSatObs* satObs = obsVector.at(ii);
228 if (epoTime.undef()) {
229 epoTime = satObs->time();
230 }
231 else {
232 double dt = satObs->time() - epoTime;
233 if (fabs(dt) > MAXSYNC) {
234 LOG << "t_pppClient::prepareObs asynchronous observations" << endl;
235 return failure;
236 }
237 meanDt += dt;
238 }
239 }
240
241 if (obsVector.size() > 0) {
242 epoTime += meanDt / obsVector.size();
243 }
244
245 return success;
246}
247
248//
249//////////////////////////////////////////////////////////////////////////////
250bool t_pppClient::preparePseudoObs(std::vector<t_pppSatObs*>& obsVector) {
251
252 bool pseudoObsIono = false;
253
254 if (OPT->_pseudoObsIono) {
255 vector<t_pppSatObs*>::iterator it = obsVector.begin();
256 while (it != obsVector.end()) {
257 t_pppSatObs* satObs = *it;
258 char system = satObs->prn().system();
259 t_pppRefSat* refSat = _obsPool->getRefSatMapElement(system);
260 double stecRef = refSat->stecValue();
261 if (stecRef && !satObs->isReference()) {
262 pseudoObsIono = true;
263 satObs->setPseudoObsIono(t_frequency::G1, stecRef);
264 }
265 satObs->printObsMinusComputed();
266 it++;
267 }
268 }
269
270 return pseudoObsIono;
271}
272
273// Compute the Bancroft position, check for blunders
274//////////////////////////////////////////////////////////////////////////////
275t_irc t_pppClient::cmpBancroft(const bncTime& epoTime,
276 vector<t_pppSatObs*>& obsVector,
277 ColumnVector& xyzc, bool print) {
278
279 t_lc::type tLC = t_lc::dummy;
280
281 while (true) {
282 Matrix BB(obsVector.size(), 4);
283 int iObs = -1;
284 for (unsigned ii = 0; ii < obsVector.size(); ii++) {
285 const t_pppSatObs* satObs = obsVector.at(ii);
286 if (tLC == t_lc::dummy) {
287 if (satObs->isValid(t_lc::cIF)) {
288 tLC = t_lc::cIF;
289 }
290 else if (satObs->isValid(t_lc::c1)) {
291 tLC = t_lc::c1;
292 }
293 else if (satObs->isValid(t_lc::c2)) {
294 tLC = t_lc::c2;
295 }
296 }
297 if ( satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle) ) {
298 ++iObs;
299 BB[iObs][0] = satObs->xc()[0];
300 BB[iObs][1] = satObs->xc()[1];
301 BB[iObs][2] = satObs->xc()[2];
302 BB[iObs][3] = satObs->obsValue(tLC) - satObs->cmpValueForBanc(tLC);
303 }
304 }
305 if (iObs + 1 < OPT->_minObs) {
306 LOG << "t_pppClient::cmpBancroft not enough observations" << endl;
307 return failure;
308 }
309 BB = BB.Rows(1,iObs+1);
310 bancroft(BB, xyzc);
311
312 xyzc[3] /= t_CST::c;
313
314 // Check Blunders
315 // --------------
316 const double BLUNDER = 100.0;
317 double maxRes = 0.0;
318 unsigned maxResIndex = 0;
319 for (unsigned ii = 0; ii < obsVector.size(); ii++) {
320 const t_pppSatObs* satObs = obsVector.at(ii);
321 if (satObs->isValid() &&
322 satObs->prn().system() == 'G' &&
323 (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle) ) {
324 ColumnVector rr = satObs->xc().Rows(1,3) - xyzc.Rows(1,3);
325 double res = rr.NormFrobenius() - satObs->obsValue(tLC)
326 - (satObs->xc()[3] - xyzc[3]) * t_CST::c;
327 if (std::isnan(res) || fabs(res) > maxRes) {
328 std::isnan(res) ?
329 maxRes = res :
330 maxRes = fabs(res);
331 maxResIndex = ii;
332 }
333 }
334 }
335 if (!std::isnan(maxRes) && maxRes < BLUNDER) {
336 if (print) {
337 LOG.setf(ios::fixed);
338 LOG << string(epoTime) << " BANCROFT:" << ' '
339 << setw(14) << setprecision(3) << xyzc[0] << ' '
340 << setw(14) << setprecision(3) << xyzc[1] << ' '
341 << setw(14) << setprecision(3) << xyzc[2] << ' '
342 << setw(14) << setprecision(3) << xyzc[3] * t_CST::c << endl << endl;
343 }
344 break;
345 }
346 else {
347 t_pppSatObs* satObs = obsVector.at(maxResIndex);
348 LOG << "t_pppClient::cmpBancroft outlier " << satObs->prn().toString()
349 << " " << maxRes << endl;
350 delete satObs;
351 obsVector.erase(obsVector.begin() + maxResIndex);
352 }
353 }
354
355 return success;
356}
357
358// Compute A Priori GPS-Glonass Offset
359//////////////////////////////////////////////////////////////////////////////
360double t_pppClient::cmpOffGG(vector<t_pppSatObs*>& obsVector) {
361
362 t_lc::type tLC = t_lc::dummy;
363 double offGG = 0.0;
364
365 if (OPT->useSystem('R')) {
366 while (obsVector.size() > 0) {
367 offGG = 0.0;
368 double maxRes = 0.0;
369 int maxResIndex = -1;
370 t_prn maxResPrn;
371 unsigned nObs = 0;
372 for (unsigned ii = 0; ii < obsVector.size(); ii++) {
373 const t_pppSatObs* satObs = obsVector.at(ii);
374 if (satObs->prn().system() == 'R') {
375 if (tLC == t_lc::dummy) {
376 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;
377 }
378 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle)) {
379 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
380 ++nObs;
381 offGG += ll;
382 if (fabs(ll) > fabs(maxRes)) {
383 maxRes = ll;
384 maxResIndex = ii;
385 maxResPrn = satObs->prn();
386 }
387 }
388 }
389 }
390
391 if (nObs > 0) {
392 offGG = offGG / nObs;
393 }
394 else {
395 offGG = 0.0;
396 }
397
398 if (fabs(maxRes) > 1000.0) {
399 LOG << "t_pppClient::cmpOffGG outlier " << maxResPrn.toString() << " " << maxRes << endl;
400 delete obsVector.at(maxResIndex);
401 obsVector.erase(obsVector.begin() + maxResIndex);
402 }
403 else {
404 break;
405 }
406 }
407 }
408 return offGG;
409}
410
411//
412//////////////////////////////////////////////////////////////////////////////
413void t_pppClient::initOutput(t_output* output) {
414 _output = output;
415 _output->_numSat = 0;
416 _output->_hDop = 0.0;
417 _output->_error = false;
418}
419
420//
421//////////////////////////////////////////////////////////////////////////////
422void t_pppClient::clearObs() {
423 for (unsigned ii = 0; ii < _obsRover.size(); ii++) {
424 delete _obsRover.at(ii);
425 }
426 _obsRover.clear();
427}
428
429//
430//////////////////////////////////////////////////////////////////////////////
431void t_pppClient::finish(t_irc irc) {
432
433 clearObs();
434
435 _output->_epoTime = _epoTimeRover;
436
437 if (irc == success) {
438 _output->_xyzRover[0] = _staRover->xyzApr()[0] + _filter->x()[0];
439 _output->_xyzRover[1] = _staRover->xyzApr()[1] + _filter->x()[1];
440 _output->_xyzRover[2] = _staRover->xyzApr()[2] + _filter->x()[2];
441
442 xyz2neu(_staRover->ellApr().data(), _filter->x().data(), _output->_neu);
443
444 copy(&_filter->Q().data()[0], &_filter->Q().data()[6], _output->_covMatrix);
445
446 _output->_trp0 = t_tropo::delay_saast(_staRover->xyzApr(), M_PI/2.0);
447 _output->_trp = _filter->trp();
448 _output->_trpStdev = _filter->trpStdev();
449
450 _output->_numSat = _filter->numSat();
451 _output->_hDop = _filter->HDOP();
452 _output->_error = false;
453 }
454 else {
455 _output->_error = true;
456 }
457 _output->_log = _log->str();
458 delete _log; _log = new ostringstream();
459}
460
461//
462//////////////////////////////////////////////////////////////////////////////
463t_irc t_pppClient::cmpModel(t_pppStation* station, const ColumnVector& xyzc,
464 vector<t_pppSatObs*>& obsVector) {
465 bncTime time;
466 time = _epoTimeRover;
467 station->setName(OPT->_roverName);
468 station->setAntName(OPT->_antNameRover);
469 station->setEpochTime(time);
470 if (OPT->xyzAprRoverSet()) {
471 station->setXyzApr(OPT->_xyzAprRover);
472 }
473 else {
474 station->setXyzApr(xyzc.Rows(1,3));
475 }
476 station->setNeuEcc(OPT->_neuEccRover);
477
478 // Receiver Clock
479 // --------------
480 station->setDClk(xyzc[3]);
481
482 // Tides
483 // -----
484 station->setTideDsplEarth(_tides->earth(time, station->xyzApr()));
485 station->setTideDsplOcean(_tides->ocean(time, station->xyzApr(), station->name()));
486
487 // Observation model
488 // -----------------
489 vector<t_pppSatObs*>::iterator it = obsVector.begin();
490 while (it != obsVector.end()) {
491 t_pppSatObs* satObs = *it;
492 t_irc modelSetup;
493 if (satObs->isValid()) {
494 modelSetup = satObs->cmpModel(station);
495 }
496 if (satObs->isValid() &&
497 satObs->eleSat() >= OPT->_minEle &&
498 modelSetup == success) {
499 if (satObs->isReference() && OPT->_pseudoObsIono) {
500 char system = satObs->prn().system();
501 t_pppRefSat* refSat = _obsPool->getRefSatMapElement(system);
502 refSat->setStecValue(satObs->getIonoCodeDelay(t_frequency::G1));
503 }
504 ++it;
505 }
506 else {
507 delete satObs;
508 it = obsVector.erase(it);
509 }
510 }
511
512 return success;
513}
514
515//
516//////////////////////////////////////////////////////////////////////////////
517void t_pppClient::processEpoch(const vector<t_satObs*>& satObs, t_output* output) {
518
519 try {
520 initOutput(output);
521 _num = 0;
522 _obsPool->setEpoReProcessing(false); // initialize for epoch
523
524 do {
525 _num++;
526
527 // Prepare Observations of the Rover
528 // ---------------------------------
529 if (prepareObs(satObs, _obsRover, _epoTimeRover) != success) {
530 return finish(failure);
531 }
532
533 LOG << "\nPPP of Epoch ";
534 if (!_epoTimeRover.undef()) LOG << string(_epoTimeRover);
535 LOG << "\n---------------------------------------------------------------\n";
536
537 for (int iter = 1; iter <= 2; iter++) {
538 ColumnVector xyzc(4); xyzc = 0.0;
539 bool print = (iter == 2);
540 if (cmpBancroft(_epoTimeRover, _obsRover, xyzc, print) != success) {
541 return finish(failure);
542 }
543 if (cmpModel(_staRover, xyzc, _obsRover) != success) {
544 return finish(failure);
545 }
546 }
547
548 _offGG = cmpOffGG(_obsRover);
549
550 // Prepare Pseudo Observations of the Rover
551 // ----------------------------------------
552 _pseudoObsIono = preparePseudoObs(_obsRover);//qDebug() << "_pseudoObsIonoAvailable: " << _pseudoObsIono;
553
554 if (int(_obsRover.size()) < OPT->_minObs) {
555 LOG << "t_pppClient::processEpoch not enough observations" << endl;
556 return finish(failure);
557 }
558
559 if (OPT->_refSatRequired) {
560 LOG.setf(ios::fixed);
561 QMapIterator<char, t_pppRefSat*> it(_obsPool->getRefSatMap());
562 while (it.hasNext()) {
563 it.next();
564 char sys = it.key();
565 string prn = it.value()->prn().toString();
566 LOG << string(_epoTimeRover) << " REFSAT " << sys << ": " << prn << endl;
567 }
568 }
569
570 // Store last epoch of data
571 // ------------------------
572 //_obsRover.resize(2);
573 _obsPool->putEpoch(_epoTimeRover, _obsRover, _pseudoObsIono);
574
575 // Process Epoch in Filter
576 // -----------------------
577 if (_filter->processEpoch(_num) != success) {
578 return finish(failure);
579 }
580 // if num > 1 und !obsPool->epoReProcessing() => filter ->datumTransformation
581 } while (_obsPool->epoReProcessing());
582 }
583 catch (Exception& exc) {
584 LOG << exc.what() << endl;
585 return finish(failure);
586 }
587 catch (t_except msg) {
588 LOG << msg.what() << endl;
589 return finish(failure);
590 }
591 catch (const char* msg) {
592 LOG << msg << endl;
593 return finish(failure);
594 }
595 catch (...) {
596 LOG << "unknown exception" << endl;
597 return finish(failure);
598 }
599
600 return finish(success);
601}
602
603//
604////////////////////////////////////////////////////////////////////////////
605double lorentz(const ColumnVector& aa, const ColumnVector& bb) {
606 return aa[0]*bb[0] + aa[1]*bb[1] + aa[2]*bb[2] - aa[3]*bb[3];
607}
608
609//
610////////////////////////////////////////////////////////////////////////////
611void t_pppClient::bancroft(const Matrix& BBpass, ColumnVector& pos) {
612
613 if (pos.Nrows() != 4) {
614 pos.ReSize(4);
615 }
616 pos = 0.0;
617
618 for (int iter = 1; iter <= 2; iter++) {
619 Matrix BB = BBpass;
620 int mm = BB.Nrows();
621 for (int ii = 1; ii <= mm; ii++) {
622 double xx = BB(ii,1);
623 double yy = BB(ii,2);
624 double traveltime = 0.072;
625 if (iter > 1) {
626 double zz = BB(ii,3);
627 double rho = sqrt( (xx-pos(1)) * (xx-pos(1)) +
628 (yy-pos(2)) * (yy-pos(2)) +
629 (zz-pos(3)) * (zz-pos(3)) );
630 traveltime = rho / t_CST::c;
631 }
632 double angle = traveltime * t_CST::omega;
633 double cosa = cos(angle);
634 double sina = sin(angle);
635 BB(ii,1) = cosa * xx + sina * yy;
636 BB(ii,2) = -sina * xx + cosa * yy;
637 }
638
639 Matrix BBB;
640 if (mm > 4) {
641 SymmetricMatrix hlp; hlp << BB.t() * BB;
642 BBB = hlp.i() * BB.t();
643 }
644 else {
645 BBB = BB.i();
646 }
647 ColumnVector ee(mm); ee = 1.0;
648 ColumnVector alpha(mm); alpha = 0.0;
649 for (int ii = 1; ii <= mm; ii++) {
650 alpha(ii) = lorentz(BB.Row(ii).t(),BB.Row(ii).t())/2.0;
651 }
652 ColumnVector BBBe = BBB * ee;
653 ColumnVector BBBalpha = BBB * alpha;
654 double aa = lorentz(BBBe, BBBe);
655 double bb = lorentz(BBBe, BBBalpha)-1;
656 double cc = lorentz(BBBalpha, BBBalpha);
657 double root = sqrt(bb*bb-aa*cc);
658
659 Matrix hlpPos(4,2);
660 hlpPos.Column(1) = (-bb-root)/aa * BBBe + BBBalpha;
661 hlpPos.Column(2) = (-bb+root)/aa * BBBe + BBBalpha;
662
663 ColumnVector omc(2);
664 for (int pp = 1; pp <= 2; pp++) {
665 hlpPos(4,pp) = -hlpPos(4,pp);
666 omc(pp) = BB(1,4) -
667 sqrt( (BB(1,1)-hlpPos(1,pp)) * (BB(1,1)-hlpPos(1,pp)) +
668 (BB(1,2)-hlpPos(2,pp)) * (BB(1,2)-hlpPos(2,pp)) +
669 (BB(1,3)-hlpPos(3,pp)) * (BB(1,3)-hlpPos(3,pp)) ) -
670 hlpPos(4,pp);
671 }
672 if ( fabs(omc(1)) > fabs(omc(2)) ) {
673 pos = hlpPos.Column(2);
674 }
675 else {
676 pos = hlpPos.Column(1);
677 }
678 }
679}
680
681//
682//////////////////////////////////////////////////////////////////////////////
683void t_pppClient::reset() {
684
685 // to delete old orbit and clock corrections
686 delete _ephPool;
687 _ephPool = new t_pppEphPool();
688
689 // to delete old code biases
690 delete _obsPool;
691 _obsPool = new t_pppObsPool();
692
693 // to delete all parameters
694 delete _filter;
695 _filter = new t_pppFilter(_obsPool);
696
697}
Note: See TracBrowser for help on using the repository browser.