source: ntrip/trunk/BNC/src/satObs.cpp@ 6462

Last change on this file since 6462 was 6462, checked in by mervart, 9 years ago
File size: 2.8 KB
Line 
1#include <iostream>
2#include <iomanip>
3#include <sstream>
4
5#include "satObs.h"
6
7using namespace std;
8
9//
10////////////////////////////////////////////////////////////////////////////
11void t_clkCorr::reset() {
12 _prn.set(' ', 0);
13 _time.reset();
14 _iod = 0;
15 _dClk = 0.0;
16 _dotDClk = 0.0;
17 _dotDotDClk = 0.0;
18}
19
20//
21////////////////////////////////////////////////////////////////////////////
22void t_clkCorr::writeEpoch(std::ostream* out, const QList<t_clkCorr>& corrList) {
23 if (!out || corrList.size() == 0) {
24 return;
25 }
26 out->setf(ios::fixed);
27 bncTime epoTime;
28 QListIterator<t_clkCorr> it(corrList);
29 while (it.hasNext()) {
30 const t_clkCorr& corr = it.next();
31 if (!epoTime.valid()) {
32 epoTime = corr._time;
33 *out << "> CLOCK " << epoTime.datestr(' ') << ' ' << epoTime.timestr(1,' ') << " "
34 << corrList.size() << ' ' << corr._staID << endl;
35 }
36 *out << corr._prn.toString() << ' ' << setw(3) << corr._iod << ' '
37 << setw(10) << setprecision(4) << corr._dClk * t_CST::c << ' '
38 << setw(10) << setprecision(4) << corr._dotDClk * t_CST::c << ' '
39 << setw(10) << setprecision(4) << corr._dotDotDClk * t_CST::c << endl;
40 }
41 out->flush();
42}
43
44//
45////////////////////////////////////////////////////////////////////////////
46void t_clkCorr::readEpoch(std::istream* in, QList<t_clkCorr>& corrList) {
47}
48
49//
50////////////////////////////////////////////////////////////////////////////
51void t_orbCorr::reset() {
52 _prn.set(' ', 0);
53 _time.reset();
54 _xr.ReSize(3); _xr = 0.0;
55 _dotXr.ReSize(3); _dotXr = 0.0;
56 _iod = 0;
57 _system = 'R';
58}
59
60//
61////////////////////////////////////////////////////////////////////////////
62void t_orbCorr::writeEpoch(std::ostream* out, const QList<t_orbCorr>& corrList) {
63 if (!out || corrList.size() == 0) {
64 return;
65 }
66 out->setf(ios::fixed);
67 bncTime epoTime;
68 QListIterator<t_orbCorr> it(corrList);
69 while (it.hasNext()) {
70 const t_orbCorr& corr = it.next();
71 if (!epoTime.valid()) {
72 epoTime = corr._time;
73 *out << "> ORBIT " << epoTime.datestr(' ') << ' ' << epoTime.timestr(1,' ') << " "
74 << corrList.size() << ' ' << corr._staID << endl;
75 }
76 *out << corr._prn.toString() << ' ' << setw(3) << corr._iod << ' '
77 << setw(10) << setprecision(4) << corr._xr[0] << ' '
78 << setw(10) << setprecision(4) << corr._xr[1] << ' '
79 << setw(10) << setprecision(4) << corr._xr[2] << " "
80 << setw(10) << setprecision(4) << corr._dotXr[0] << ' '
81 << setw(10) << setprecision(4) << corr._dotXr[1] << ' '
82 << setw(10) << setprecision(4) << corr._dotXr[2] << endl;
83 }
84 out->flush();
85}
86
87//
88////////////////////////////////////////////////////////////////////////////
89void t_orbCorr::readEpoch(std::istream* in, QList<t_orbCorr>& corrList) {
90}
Note: See TracBrowser for help on using the repository browser.