[847] | 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 |
|
---|
[855] | 18 | #include <math.h>
|
---|
[847] | 19 | #include <iomanip>
|
---|
| 20 |
|
---|
| 21 | #include "bnsrinex.h"
|
---|
| 22 |
|
---|
| 23 | using namespace std;
|
---|
| 24 |
|
---|
| 25 | // Constructor
|
---|
| 26 | ////////////////////////////////////////////////////////////////////////////
|
---|
[850] | 27 | bnsRinex::bnsRinex(const QString& prep, const QString& ext, const QString& path,
|
---|
| 28 | const QString& intr, int sampl)
|
---|
| 29 | : bnsoutf(prep, ext, path, intr, sampl) {
|
---|
[847] | 30 | }
|
---|
| 31 |
|
---|
| 32 | // Destructor
|
---|
| 33 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 34 | bnsRinex::~bnsRinex() {
|
---|
| 35 | }
|
---|
| 36 |
|
---|
[850] | 37 | // Write Header
|
---|
[847] | 38 | ////////////////////////////////////////////////////////////////////////////
|
---|
[850] | 39 | void bnsRinex::writeHeader(const QDateTime& datTim) {
|
---|
[855] | 40 | _out << "THIS IS A DUMMY CLOCK RINEX HEADER" << endl;
|
---|
[850] | 41 | }
|
---|
| 42 |
|
---|
| 43 | // Write One Epoch
|
---|
| 44 | ////////////////////////////////////////////////////////////////////////////
|
---|
[854] | 45 | t_irc bnsRinex::write(int GPSweek, double GPSweeks, const QString& prn,
|
---|
[850] | 46 | const ColumnVector& xx) {
|
---|
| 47 |
|
---|
[854] | 48 | if (bnsoutf::write(GPSweek, GPSweeks, prn, xx) == success) {
|
---|
[850] | 49 |
|
---|
[855] | 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 | << setw(12) << setprecision(8) << sec << " 2 "
|
---|
| 56 | << setw(20) << setprecision(12) << xx(4)
|
---|
| 57 | << setw(20) << setprecision(12) << 0.0 << endl;
|
---|
| 58 |
|
---|
[854] | 59 | return success;
|
---|
| 60 | }
|
---|
| 61 | else {
|
---|
| 62 | return failure;
|
---|
| 63 | }
|
---|
[847] | 64 | }
|
---|