Last change
on this file since 10076 was 7629, checked in by stuerze, 9 years ago |
some value initialization in constructor is added
|
File size:
1.9 KB
|
Line | |
---|
1 | #include <iostream>
|
---|
2 | #include <map>
|
---|
3 | #include "RTCM2.h"
|
---|
4 |
|
---|
5 | namespace rtcm2 {
|
---|
6 |
|
---|
7 | class RTCM2_2021 {
|
---|
8 |
|
---|
9 | public:
|
---|
10 | RTCM2_2021() {// Constructor
|
---|
11 | tt_ = 0.0;
|
---|
12 | valid_ = false;
|
---|
13 | }
|
---|
14 |
|
---|
15 | void extract(const RTCM2packet& P); // Packet handler
|
---|
16 | void clear(); // Initialization
|
---|
17 | bool valid() const { return valid_; } // Check for complete obs block
|
---|
18 |
|
---|
19 | double resolvedPhase_L1(int i) const; // L1 & L2 carrier phase of i-th sat
|
---|
20 | double resolvedPhase_L2(int i) const; // with resolved 2^24 cy ambiguity
|
---|
21 | // (based on rng_C1)
|
---|
22 |
|
---|
23 | struct HiResCorr {
|
---|
24 |
|
---|
25 | HiResCorr();
|
---|
26 | void reset();
|
---|
27 |
|
---|
28 | unsigned PRN;
|
---|
29 | double tt;
|
---|
30 | double phase1;
|
---|
31 | double phase2;
|
---|
32 | unsigned lock1;
|
---|
33 | unsigned lock2;
|
---|
34 | bool slip1;
|
---|
35 | bool slip2;
|
---|
36 | unsigned IODp1;
|
---|
37 | unsigned IODp2;
|
---|
38 |
|
---|
39 | double range1;
|
---|
40 | double range2;
|
---|
41 | double drange1;
|
---|
42 | double drange2;
|
---|
43 | bool Pind1;
|
---|
44 | bool Pind2;
|
---|
45 | unsigned IODr1;
|
---|
46 | unsigned IODr2;
|
---|
47 |
|
---|
48 | friend std::ostream& operator << (std::ostream& out, const HiResCorr& cc);
|
---|
49 | };
|
---|
50 |
|
---|
51 | double hoursec() const { return tt_; }
|
---|
52 | std::map<unsigned, const HiResCorr*> data;
|
---|
53 |
|
---|
54 | typedef std::map<unsigned, const HiResCorr*>::const_iterator c_data_iterator;
|
---|
55 | typedef std::map<unsigned, const HiResCorr*>::iterator data_iterator;
|
---|
56 |
|
---|
57 | private:
|
---|
58 | const HiResCorr* find (unsigned PRN);
|
---|
59 | HiResCorr* find_i(unsigned PRN);
|
---|
60 |
|
---|
61 | std::map<unsigned, HiResCorr> data_i_;
|
---|
62 | double tt_;
|
---|
63 | bool valid_;
|
---|
64 | };
|
---|
65 |
|
---|
66 | class RTCM2_22 {
|
---|
67 | public:
|
---|
68 | RTCM2_22() {
|
---|
69 | validMsg = false;
|
---|
70 | for (unsigned ii = 0; ii < 3; ii++){
|
---|
71 | dL1[ii] = 0.0;
|
---|
72 | dL2[ii] = 0.0;
|
---|
73 | }
|
---|
74 | }
|
---|
75 |
|
---|
76 | void extract(const RTCM2packet& P);
|
---|
77 |
|
---|
78 | bool validMsg;
|
---|
79 | double dL1[3];
|
---|
80 | double dL2[3];
|
---|
81 | };
|
---|
82 |
|
---|
83 | }; // end of namespace rtcm2
|
---|
84 |
|
---|
85 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.