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

Last change on this file since 6180 was 6180, checked in by mervart, 10 years ago
File size: 2.0 KB
Line 
1#include <iostream>
2#include <iomanip>
3#include <sstream>
4
5#include "satObs.h"
6
7using namespace std;
8
9//
10////////////////////////////////////////////////////////////////////////////
11t_clkCorr::t_clkCorr(const string& line) {
12 reset();
13 istringstream in(line);
14}
15
16//
17////////////////////////////////////////////////////////////////////////////
18void t_clkCorr::reset() {
19 _iod = 0;
20 _dClk = 0.0;
21 _dotDClk = 0.0;
22 _dotDotDClk = 0.0;
23 _clkPartial = 0.0;
24}
25
26//
27////////////////////////////////////////////////////////////////////////////
28string t_clkCorr::toLine() const {
29 ostringstream str;
30 str.setf(ios::showpoint | ios::fixed);
31 str << "C " << _time.gpsw() << ' ' << setprecision(2) << _time.gpssec() << ' '
32 << _prn.toString() << ' ' << setw(3) << _iod << ' '
33 << setw(10) << setprecision(4) << _dClk * t_CST::c << ' '
34 << setw(10) << setprecision(4) << _dotDClk * t_CST::c << ' '
35 << setw(10) << setprecision(4) << _dotDotDClk * t_CST::c << endl;
36 return str.str();
37}
38
39//
40////////////////////////////////////////////////////////////////////////////
41t_orbCorr::t_orbCorr(const string& line) {
42 reset();
43 istringstream in(line);
44}
45
46//
47////////////////////////////////////////////////////////////////////////////
48void t_orbCorr::reset() {
49 _xr.ReSize(3); _xr = 0.0;
50 _dotXr.ReSize(3); _dotXr = 0.0;
51 _iod = 0;
52 _system = 'R';
53}
54
55//
56////////////////////////////////////////////////////////////////////////////
57string t_orbCorr::toLine() const {
58 ostringstream str;
59 str.setf(ios::showpoint | ios::fixed);
60 str << "O " << _time.gpsw() << ' ' << setprecision(2) << _time.gpssec() << ' '
61 << _prn.toString() << ' ' << setw(3) << _iod << ' '
62 << setw(10) << setprecision(4) << _xr[0] << ' '
63 << setw(10) << setprecision(4) << _xr[1] << ' '
64 << setw(10) << setprecision(4) << _xr[2] << " "
65 << setw(10) << setprecision(4) << _dotXr[0] << ' '
66 << setw(10) << setprecision(4) << _dotXr[1] << ' '
67 << setw(10) << setprecision(4) << _dotXr[2] << endl;
68 return str.str();
69}
70
Note: See TracBrowser for help on using the repository browser.