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

Last change on this file since 10503 was 10034, checked in by stuerze, 19 months ago
  • Property svn:keywords set to Author Date Id Rev URL;svn:eol-style=native
  • Property svn:mime-type set to text/plain
File size: 2.9 KB
Line 
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 *
13 * Changes:
14 *
15 * -----------------------------------------------------------------------*/
16
17#include "pppObsPool.h"
18
19using namespace BNC_PPP;
20using namespace std;
21
22// Constructor
23/////////////////////////////////////////////////////////////////////////////
24t_pppObsPool::t_epoch::t_epoch(const bncTime& epoTime, vector<t_pppSatObs*>& obsVector,
25 bool pseudoObsIono) {
26 _epoTime = epoTime;
27 _pseudoObsIono = pseudoObsIono;
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 }
48 for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) {
49 _satPhaseBiases[ii] = 0;
50 }
51 _vTec = 0;
52}
53
54// Destructor
55/////////////////////////////////////////////////////////////////////////////
56t_pppObsPool::~t_pppObsPool() {
57 for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) {
58 delete _satCodeBiases[ii];
59 }
60 for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) {
61 delete _satPhaseBiases[ii];
62 }
63 delete _vTec;
64 while (_epochs.size() > 0) {
65 delete _epochs.front();
66 _epochs.pop_front();
67 }
68}
69
70//
71/////////////////////////////////////////////////////////////////////////////
72void t_pppObsPool::putCodeBias(t_satCodeBias* satCodeBias) {
73 int iPrn = satCodeBias->_prn.toInt();
74 delete _satCodeBiases[iPrn];
75 _satCodeBiases[iPrn] = satCodeBias;
76}
77
78//
79/////////////////////////////////////////////////////////////////////////////
80void t_pppObsPool::putPhaseBias(t_satPhaseBias* satPhaseBias) {
81 int iPrn = satPhaseBias->_prn.toInt();
82 delete _satPhaseBiases[iPrn];
83 _satPhaseBiases[iPrn] = satPhaseBias;
84}
85
86//
87/////////////////////////////////////////////////////////////////////////////
88void t_pppObsPool::putTec(t_vTec* vTec) {
89 delete _vTec;
90 _vTec = new t_vTec(*vTec);
91 delete vTec;
92}
93
94//
95/////////////////////////////////////////////////////////////////////////////
96void t_pppObsPool::putEpoch(const bncTime& epoTime, vector<t_pppSatObs*>& obsVector,
97 bool pseudoObsIono) {
98 const unsigned MAXSIZE = 2;
99 _epochs.push_back(new t_epoch(epoTime, obsVector, pseudoObsIono));
100
101 if (_epochs.size() > MAXSIZE) {
102 delete _epochs.front();
103 _epochs.pop_front();
104 }
105}
Note: See TracBrowser for help on using the repository browser.