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

Last change on this file since 6483 was 6482, checked in by mervart, 10 years ago
File size: 4.5 KB
Line 
1#include <iostream>
2#include <iomanip>
3#include <sstream>
4
5#include "satObs.h"
6
7using namespace std;
8
9// Constructor
10////////////////////////////////////////////////////////////////////////////
11t_clkCorr::t_clkCorr() {
12 _iod = 0;
13 _dClk = 0.0;
14 _dotDClk = 0.0;
15 _dotDotDClk = 0.0;
16}
17
18//
19////////////////////////////////////////////////////////////////////////////
20void t_clkCorr::writeEpoch(std::ostream* out, const QList<t_clkCorr>& corrList) {
21 if (!out || corrList.size() == 0) {
22 return;
23 }
24 out->setf(ios::fixed);
25 bncTime epoTime;
26 QListIterator<t_clkCorr> it(corrList);
27 while (it.hasNext()) {
28 const t_clkCorr& corr = it.next();
29 if (!epoTime.valid()) {
30 epoTime = corr._time;
31 *out << "> CLOCK " << epoTime.datestr(' ') << ' ' << epoTime.timestr(1,' ') << " "
32 << corrList.size() << ' ' << corr._staID << endl;
33 }
34 *out << corr._prn.toString() << ' ' << setw(3) << corr._iod << ' '
35 << setw(10) << setprecision(4) << corr._dClk * t_CST::c << ' '
36 << setw(10) << setprecision(4) << corr._dotDClk * t_CST::c << ' '
37 << setw(10) << setprecision(4) << corr._dotDotDClk * t_CST::c << endl;
38 }
39 out->flush();
40}
41
42//
43////////////////////////////////////////////////////////////////////////////
44void t_clkCorr::readEpoch(const QStringList& lines, QList<t_clkCorr>& corrList) {
45}
46
47// Constructor
48////////////////////////////////////////////////////////////////////////////
49t_orbCorr::t_orbCorr() {
50 _iod = 0;
51 _system = 'R';
52 _xr.ReSize(3); _xr = 0.0;
53 _dotXr.ReSize(3); _dotXr = 0.0;
54}
55
56//
57////////////////////////////////////////////////////////////////////////////
58void t_orbCorr::writeEpoch(std::ostream* out, const QList<t_orbCorr>& corrList) {
59 if (!out || corrList.size() == 0) {
60 return;
61 }
62 out->setf(ios::fixed);
63 bncTime epoTime;
64 QListIterator<t_orbCorr> it(corrList);
65 while (it.hasNext()) {
66 const t_orbCorr& corr = it.next();
67 if (!epoTime.valid()) {
68 epoTime = corr._time;
69 *out << "> ORBIT " << epoTime.datestr(' ') << ' ' << epoTime.timestr(1,' ') << " "
70 << corrList.size() << ' ' << corr._staID << endl;
71 }
72 *out << corr._prn.toString() << ' ' << setw(3) << corr._iod << ' '
73 << setw(10) << setprecision(4) << corr._xr[0] << ' '
74 << setw(10) << setprecision(4) << corr._xr[1] << ' '
75 << setw(10) << setprecision(4) << corr._xr[2] << " "
76 << setw(10) << setprecision(4) << corr._dotXr[0] << ' '
77 << setw(10) << setprecision(4) << corr._dotXr[1] << ' '
78 << setw(10) << setprecision(4) << corr._dotXr[2] << endl;
79 }
80 out->flush();
81}
82
83//
84////////////////////////////////////////////////////////////////////////////
85void t_orbCorr::readEpoch(const QStringList& lines, QList<t_orbCorr>& corrList) {
86}
87
88//
89////////////////////////////////////////////////////////////////////////////
90void t_satCodeBias::writeEpoch(std::ostream* out, const QList<t_satCodeBias>& biasList) {
91 if (!out || biasList.size() == 0) {
92 return;
93 }
94 out->setf(ios::fixed);
95 bncTime epoTime;
96 QListIterator<t_satCodeBias> it(biasList);
97 while (it.hasNext()) {
98 const t_satCodeBias& satCodeBias = it.next();
99 if (!epoTime.valid()) {
100 epoTime = satCodeBias._time;
101 *out << "> CODE_BIAS " << epoTime.datestr(' ') << ' ' << epoTime.timestr(1,' ') << " "
102 << biasList.size() << ' ' << satCodeBias._staID << endl;
103 }
104 *out << satCodeBias._prn.toString();
105 for (unsigned ii = 0; ii < satCodeBias._bias.size(); ii++) {
106 const t_frqCodeBias& frqCodeBias = satCodeBias._bias[ii];
107 *out << " " << frqCodeBias._rnxType2ch << ' '
108 << setw(10) << setprecision(4) << frqCodeBias._value;
109 }
110 *out << endl;
111 }
112 out->flush();
113}
114
115//
116////////////////////////////////////////////////////////////////////////////
117void t_satCodeBias::readEpoch(const QStringList& lines, QList<t_satCodeBias>& biasList) {
118}
119
120//
121////////////////////////////////////////////////////////////////////////////
122void t_satPhaseBias::writeEpoch(std::ostream* out, const QList<t_satPhaseBias>& biasList) {
123
124}
125
126//
127////////////////////////////////////////////////////////////////////////////
128void t_satPhaseBias::readEpoch(const QStringList& lines, QList<t_satPhaseBias>& biasList) {
129}
130
131//
132////////////////////////////////////////////////////////////////////////////
133void t_vTec::write(std::ostream* out, const t_vTec& vTec) {
134
135}
136
137//
138////////////////////////////////////////////////////////////////////////////
139void t_vTec::read(const QStringList& lines, t_vTec& vTec) {
140}
Note: See TracBrowser for help on using the repository browser.