source: ntrip/trunk/BNS/bnsrinex.cpp@ 857

Last change on this file since 857 was 857, checked in by mervart, 16 years ago

* empty log message *

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