source: ntrip/trunk/BNC/RTCM/GPSDecoder.cpp@ 3528

Last change on this file since 3528 was 3528, checked in by mervart, 12 years ago
File size: 2.5 KB
RevLine 
[3528]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: GPSDecoder
30 *
31 * Purpose: Decoder Base Class
32 *
33 * Author: L. Mervart
34 *
35 * Created: 16-Dec-2011
36 *
37 * Changes:
38 *
39 * -----------------------------------------------------------------------*/
40
41#include <iomanip>
42#include <cmath>
43
44#include "GPSDecoder.h"
45#include "bncsettings.h"
46
47using namespace std;
48
49// Constructor
50//////////////////////////////////////////////////////////////////////////////
51GPSDecoder::GPSDecoder() {
52 bncSettings settings;
53 if ( settings.value("rnxPath").toString().isEmpty() ) {
54 _rnx = 0;
55 }
56 else {
57// _rnx = new bncRinex(_staID, _mountPoint, _latitude, _longitude,
58// _nmea, _ntripVersion);
59 }
60}
61
62// Write RINEX Epoch
63//////////////////////////////////////////////////////////////////////////////
64void GPSDecoder::dumpRinexEpoch(const t_obs& obs, const QByteArray& format) {
65 if (_rnx) {
66 long iSec = long(floor(obs.GPSWeeks+0.5));
67 long obsTime = obs.GPSWeek * 7*24*3600 + iSec;
68 if (_rnx->samplingRate() == 0 || iSec % _rnx->samplingRate() == 0) {
69 _rnx->deepCopy(obs);
70 }
71 _rnx->dumpEpoch(format, obsTime);
72 }
73}
74
75// Set RINEX Reconnect Flag
76//////////////////////////////////////////////////////////////////////////////
77void GPSDecoder::setRinexReconnectFlag(bool flag) {
78 if (_rnx) {
79 _rnx->setReconnectFlag(flag);
80 }
81}
Note: See TracBrowser for help on using the repository browser.