source: ntrip/trunk/BNC/src/PPP/pppObsPool.cpp@ 9454

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

update regarding PPP

  • Property svn:keywords set to Author Date Id Rev URL;svn:eol-style=native
  • Property svn:mime-type set to text/plain
File size: 3.2 KB
RevLine 
[7237]1/* -------------------------------------------------------------------------
2 * BKG NTRIP Client
3 * -------------------------------------------------------------------------
4 *
5 * Class: t_pppObsPool
6 *
7 * Purpose: Buffer with observations
8 *
9 * Author: L. Mervart
10 *
11 * Created: 29-Jul-2014
12 *
[7288]13 * Changes:
[7237]14 *
15 * -----------------------------------------------------------------------*/
16
17#include "pppObsPool.h"
18
19using namespace BNC_PPP;
20using namespace std;
21
22// Constructor
23/////////////////////////////////////////////////////////////////////////////
[8905]24t_pppObsPool::t_epoch::t_epoch(const bncTime& epoTime, vector<t_pppSatObs*>& obsVector,
25 bool pseudoObsIono) {
26 _epoTime = epoTime;
27 _pseudoObsIono = pseudoObsIono;
[7237]28 for (unsigned ii = 0; ii < obsVector.size(); ii++) {
29 _obsVector.push_back(obsVector[ii]);
30 }
31 obsVector.clear();
32}
33
34// Destructor
35/////////////////////////////////////////////////////////////////////////////
36t_pppObsPool::t_epoch::~t_epoch() {
37 for (unsigned ii = 0; ii < _obsVector.size(); ii++) {
38 delete _obsVector[ii];
39 }
40}
41
42// Constructor
43/////////////////////////////////////////////////////////////////////////////
44t_pppObsPool::t_pppObsPool() {
45 for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) {
46 _satCodeBiases[ii] = 0;
47 }
[7288]48 for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) {
49 _satPhaseBiases[ii] = 0;
50 }
[7249]51 _vTec = 0;
[9386]52 _refSatChangeRequiredMap['G'] = false;
53 _refSatChangeRequiredMap['R'] = false;
54 _refSatChangeRequiredMap['E'] = false;
55 _refSatChangeRequiredMap['C'] = false;
56
[7237]57}
58
59// Destructor
60/////////////////////////////////////////////////////////////////////////////
61t_pppObsPool::~t_pppObsPool() {
62 for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) {
63 delete _satCodeBiases[ii];
64 }
[7642]65 for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) {
66 delete _satPhaseBiases[ii];
67 }
[7249]68 delete _vTec;
[7237]69 while (_epochs.size() > 0) {
70 delete _epochs.front();
71 _epochs.pop_front();
72 }
[8905]73 clearRefSatMap();
[7237]74}
75
76//
77/////////////////////////////////////////////////////////////////////////////
78void t_pppObsPool::putCodeBias(t_satCodeBias* satCodeBias) {
79 int iPrn = satCodeBias->_prn.toInt();
80 delete _satCodeBiases[iPrn];
81 _satCodeBiases[iPrn] = satCodeBias;
82}
83
84//
85/////////////////////////////////////////////////////////////////////////////
[7288]86void t_pppObsPool::putPhaseBias(t_satPhaseBias* satPhaseBias) {
87 int iPrn = satPhaseBias->_prn.toInt();
88 delete _satPhaseBiases[iPrn];
89 _satPhaseBiases[iPrn] = satPhaseBias;
90}
91
92//
93/////////////////////////////////////////////////////////////////////////////
[7249]94void t_pppObsPool::putTec(t_vTec* vTec) {
[7643]95 delete _vTec;
[7249]96 _vTec = new t_vTec(*vTec);
[7643]97 delete vTec;
[7249]98}
99
100//
101/////////////////////////////////////////////////////////////////////////////
[8905]102void t_pppObsPool::putEpoch(const bncTime& epoTime, vector<t_pppSatObs*>& obsVector,
103 bool pseudoObsIono) {
[7237]104 const unsigned MAXSIZE = 2;
[8905]105
[8956]106 _epochs.push_back(new t_epoch(epoTime, obsVector, pseudoObsIono));
107
[7237]108 if (_epochs.size() > MAXSIZE) {
109 delete _epochs.front();
110 _epochs.pop_front();
111 }
112}
[8956]113
114//
115/////////////////////////////////////////////////////////////////////////////
116void t_pppObsPool::deleteLastEpoch() {
117
118 if (!_epochs.empty()) {
119 delete _epochs.back();
120 _epochs.pop_back();
121 }
122}
Note: See TracBrowser for help on using the repository browser.