source: ntrip/trunk/BNS/bnssp3.cpp@ 852

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

* empty log message *

File size: 1.9 KB
Line 
1
2/* -------------------------------------------------------------------------
3 * BKG NTRIP Server
4 * -------------------------------------------------------------------------
5 *
6 * Class: bnsSP3
7 *
8 * Purpose: writes SP3 files
9 *
10 * Author: L. Mervart
11 *
12 * Created: 25-Apr-2008
13 *
14 * Changes:
15 *
16 * -----------------------------------------------------------------------*/
17
18#include <iomanip>
19#include <math.h>
20
21#include "bnssp3.h"
22#include "bnsutils.h"
23
24using namespace std;
25
26// Constructor
27////////////////////////////////////////////////////////////////////////////
28bnsSP3::bnsSP3(const QString& prep, const QString& ext, const QString& path,
29 const QString& intr, int sampl)
30 : bnsoutf(prep, ext, path, intr, sampl) {
31}
32
33// Destructor
34////////////////////////////////////////////////////////////////////////////
35bnsSP3::~bnsSP3() {
36}
37
38// Write Header
39////////////////////////////////////////////////////////////////////////////
40void bnsSP3::writeHeader(const QDateTime& datTim) {
41 _out << "THIS IS A DUMMY SP3 HEADER" << endl;
42}
43
44// Write One Epoch
45////////////////////////////////////////////////////////////////////////////
46void bnsSP3::write(int GPSweek, double GPSweeks, const QString& prn,
47 const ColumnVector& xx) {
48
49 bnsoutf::write(GPSweek, GPSweeks, prn, xx);
50
51 if (_lastGPSweek != GPSweek || _lastGPSweeks != GPSweeks) {
52 _lastGPSweek = GPSweek;
53 _lastGPSweeks = GPSweeks;
54
55 QDateTime datTim = dateAndTimeFromGPSweek(GPSweek, GPSweeks);
56 double sec = fmod(GPSweeks, 60.0);
57
58 _out << "* "
59 << datTim.toString("yyyy MM dd hh mm").toAscii().data()
60 << setw(12) << setprecision(8) << sec << endl;
61 }
62 _out << "P" << prn.toAscii().data()
63 << setw(14) << setprecision(6) << xx(1) / 1000.0
64 << setw(14) << setprecision(6) << xx(2) / 1000.0
65 << setw(14) << setprecision(6) << xx(3) / 1000.0
66 << setw(14) << setprecision(6) << xx(4) * 1e6 << endl;
67}
Note: See TracBrowser for help on using the repository browser.