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

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

phase biases 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.6 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 for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) {
47 _satPhaseBiases[ii] = 0;
48 }
49 _vTec = 0;
50}
51
52// Destructor
53/////////////////////////////////////////////////////////////////////////////
54t_pppObsPool::~t_pppObsPool() {
55 for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) {
56 delete _satCodeBiases[ii];
57 }
58 delete _vTec;
59 while (_epochs.size() > 0) {
60 delete _epochs.front();
61 _epochs.pop_front();
62 }
63}
64
65//
66/////////////////////////////////////////////////////////////////////////////
67void t_pppObsPool::putCodeBias(t_satCodeBias* satCodeBias) {
68 int iPrn = satCodeBias->_prn.toInt();
69 delete _satCodeBiases[iPrn];
70 _satCodeBiases[iPrn] = satCodeBias;
71}
72
73//
74/////////////////////////////////////////////////////////////////////////////
75void t_pppObsPool::putPhaseBias(t_satPhaseBias* satPhaseBias) {
76 int iPrn = satPhaseBias->_prn.toInt();
77 delete _satPhaseBiases[iPrn];
78 _satPhaseBiases[iPrn] = satPhaseBias;
79}
80
81//
82/////////////////////////////////////////////////////////////////////////////
83void t_pppObsPool::putTec(t_vTec* vTec) {
84 delete _vTec;
85 _vTec = new t_vTec(*vTec);
86}
87
88//
89/////////////////////////////////////////////////////////////////////////////
90void t_pppObsPool::putEpoch(const bncTime& epoTime, vector<t_pppSatObs*>& obsVector) {
91 const unsigned MAXSIZE = 2;
92 _epochs.push_back(new t_epoch(epoTime, obsVector));
93 if (_epochs.size() > MAXSIZE) {
94 delete _epochs.front();
95 _epochs.pop_front();
96 }
97}
Note: See TracBrowser for help on using the repository browser.