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

Last change on this file since 7249 was 7249, checked in by stuerze, 9 years ago

vtec data are added

  • 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.3 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 _epoTime = epoTime;
26 for (unsigned ii = 0; ii < obsVector.size(); ii++) {
27 _obsVector.push_back(obsVector[ii]);
28 }
29 obsVector.clear();
30}
31
32// Destructor
33/////////////////////////////////////////////////////////////////////////////
34t_pppObsPool::t_epoch::~t_epoch() {
35 for (unsigned ii = 0; ii < _obsVector.size(); ii++) {
36 delete _obsVector[ii];
37 }
38}
39
40// Constructor
41/////////////////////////////////////////////////////////////////////////////
42t_pppObsPool::t_pppObsPool() {
43 for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) {
44 _satCodeBiases[ii] = 0;
45 }
46 _vTec = 0;
47}
48
49// Destructor
50/////////////////////////////////////////////////////////////////////////////
51t_pppObsPool::~t_pppObsPool() {
52 for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) {
53 delete _satCodeBiases[ii];
54 }
55 delete _vTec;
56 while (_epochs.size() > 0) {
57 delete _epochs.front();
58 _epochs.pop_front();
59 }
60}
61
62//
63/////////////////////////////////////////////////////////////////////////////
64void t_pppObsPool::putCodeBias(t_satCodeBias* satCodeBias) {
65 int iPrn = satCodeBias->_prn.toInt();
66 delete _satCodeBiases[iPrn];
67 _satCodeBiases[iPrn] = satCodeBias;
68}
69
70//
71/////////////////////////////////////////////////////////////////////////////
72void t_pppObsPool::putTec(t_vTec* vTec) {
73 delete _vTec;
74 _vTec = new t_vTec(*vTec);
75}
76
77//
78/////////////////////////////////////////////////////////////////////////////
79void t_pppObsPool::putEpoch(const bncTime& epoTime, vector<t_pppSatObs*>& obsVector) {
80 const unsigned MAXSIZE = 2;
81 _epochs.push_back(new t_epoch(epoTime, obsVector));
82 if (_epochs.size() > MAXSIZE) {
83 delete _epochs.front();
84 _epochs.pop_front();
85 }
86}
Note: See TracBrowser for help on using the repository browser.