source: ntrip/trunk/BNC/bncmodel.cpp@ 2058

Last change on this file since 2058 was 2058, checked in by mervart, 14 years ago

* empty log message *

File size: 2.6 KB
Line 
1// Part of BNC, a utility for retrieving decoding and
2// converting GNSS data streams from NTRIP broadcasters.
3//
4// Copyright (C) 2007
5// German Federal Agency for Cartography and Geodesy (BKG)
6// http://www.bkg.bund.de
7// Czech Technical University Prague, Department of Geodesy
8// http://www.fsv.cvut.cz
9//
10// Email: euref-ip@bkg.bund.de
11//
12// This program is free software; you can redistribute it and/or
13// modify it under the terms of the GNU General Public License
14// as published by the Free Software Foundation, version 2.
15//
16// This program is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this program; if not, write to the Free Software
23// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24
25/* -------------------------------------------------------------------------
26 * BKG NTRIP Client
27 * -------------------------------------------------------------------------
28 *
29 * Class: bncParam, bncModel
30 *
31 * Purpose: Model for PPP
32 *
33 * Author: L. Mervart
34 *
35 * Created: 01-Dec-2009
36 *
37 * Changes:
38 *
39 * -----------------------------------------------------------------------*/
40
41#include <iomanip>
42
43#include "bncmodel.h"
44#include "bncpppclient.h"
45#include "bancroft.h"
46
47using namespace std;
48
49// Constructor
50////////////////////////////////////////////////////////////////////////////
51bncParam::bncParam() {
52}
53
54// Destructor
55////////////////////////////////////////////////////////////////////////////
56bncParam::~bncParam() {
57}
58
59// Constructor
60////////////////////////////////////////////////////////////////////////////
61bncModel::bncModel() {
62 _xcBanc.ReSize(4);
63}
64
65// Destructor
66////////////////////////////////////////////////////////////////////////////
67bncModel::~bncModel() {
68}
69
70// Bancroft Solution
71////////////////////////////////////////////////////////////////////////////
72t_irc bncModel::cmpBancroft(t_epoData* epoData) {
73
74 const unsigned MINOBS = 4;
75
76 if (epoData->size() < MINOBS) {
77 return failure;
78 }
79
80 Matrix BB(epoData->size(), 4);
81
82 QMapIterator<QString, t_satData*> it(epoData->satData);
83 int iObs = 0;
84 while (it.hasNext()) {
85 it.next();
86 QString prn = it.key();
87 t_satData* satData = it.value();
88 ++iObs;
89 BB(iObs, 1) = satData->xx(1);
90 BB(iObs, 2) = satData->xx(2);
91 BB(iObs, 3) = satData->xx(3);
92 BB(iObs, 4) = satData->P3 + satData->clk;
93 }
94
95 bancroft(BB, _xcBanc);
96
97 return success;
98}
Note: See TracBrowser for help on using the repository browser.