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

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