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

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

* empty log message *

File size: 2.8 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(bncParam::parType typeIn) {
52 type = typeIn;
53}
54
55// Destructor
56////////////////////////////////////////////////////////////////////////////
57bncParam::~bncParam() {
58}
59
60// Constructor
61////////////////////////////////////////////////////////////////////////////
62bncModel::bncModel() {
63 _xcBanc.ReSize(4); _xcBanc = 0.0;
64 _params.push_back(new bncParam(bncParam::CRD_X));
65 _params.push_back(new bncParam(bncParam::CRD_Y));
66 _params.push_back(new bncParam(bncParam::CRD_Z));
67}
68
69// Destructor
70////////////////////////////////////////////////////////////////////////////
71bncModel::~bncModel() {
72}
73
74// Bancroft Solution
75////////////////////////////////////////////////////////////////////////////
76t_irc bncModel::cmpBancroft(t_epoData* epoData) {
77
78 const unsigned MINOBS = 4;
79
80 if (epoData->size() < MINOBS) {
81 return failure;
82 }
83
84 Matrix BB(epoData->size(), 4);
85
86 QMapIterator<QString, t_satData*> it(epoData->satData);
87 int iObs = 0;
88 while (it.hasNext()) {
89 it.next();
90 QString prn = it.key();
91 t_satData* satData = it.value();
92 ++iObs;
93 BB(iObs, 1) = satData->xx(1);
94 BB(iObs, 2) = satData->xx(2);
95 BB(iObs, 3) = satData->xx(3);
96 BB(iObs, 4) = satData->P3 + satData->clk;
97 }
98
99 bancroft(BB, _xcBanc);
100
101 return success;
102}
Note: See TracBrowser for help on using the repository browser.