source: ntrip/trunk/BNC/src/pppInclude.h@ 6305

Last change on this file since 6305 was 6141, checked in by mervart, 10 years ago
File size: 2.7 KB
Line 
1#ifndef PPP_H
2#define PPP_H
3
4#include <string>
5#include <vector>
6#include <newmat.h>
7
8#include "bncconst.h"
9#include "bnctime.h"
10#include "ephemeris.h"
11#include "t_prn.h"
12#include "satObs.h"
13
14namespace BNC_PPP {
15
16class t_except {
17 public:
18 t_except(const char* msg) {
19 _msg = msg;
20 }
21 ~t_except() {}
22 std::string what() {return _msg;}
23 private:
24 std::string _msg;
25};
26
27class t_output {
28 public:
29 bncTime _epoTime;
30 double _xyzRover[3];
31 double _covMatrix[6];
32 double _neu[3];
33 int _numSat;
34 double _pDop;
35 std::string _log;
36 bool _error;
37};
38
39class t_lc {
40 public:
41 enum type {dummy = 0, l1, l2, c1, c2, lIF, cIF, MW, CL, maxLc};
42
43 static bool includesPhase(type tt) {
44 switch (tt) {
45 case l1:
46 case l2:
47 case lIF:
48 case MW:
49 case CL:
50 return true;
51 case c1:
52 case c2:
53 case cIF:
54 return false;
55 case dummy: case maxLc: return false;
56 }
57 return false;
58 }
59
60 static bool includesCode(type tt) {
61 switch (tt) {
62 case c1:
63 case c2:
64 case cIF:
65 case MW:
66 case CL:
67 return true;
68 case l1:
69 case l2:
70 case lIF:
71 return false;
72 case dummy: case maxLc: return false;
73 }
74 return false;
75 }
76
77 static t_frequency::type toFreq(char sys, type tt) {
78 switch (tt) {
79 case l1: case c1:
80 if (sys == 'G') return t_frequency::G1;
81 else if (sys == 'R') return t_frequency::R1;
82 else if (sys == 'E') return t_frequency::E1;
83 else return t_frequency::dummy;
84 case l2: case c2:
85 if (sys == 'G') return t_frequency::G2;
86 else if (sys == 'R') return t_frequency::R2;
87 else return t_frequency::dummy;
88 case lIF: case cIF: case MW: case CL:
89 return t_frequency::dummy;
90 case dummy: case maxLc: return t_frequency::dummy;
91 }
92 return t_frequency::dummy;
93 }
94
95 static std::string toString(type tt) {
96 switch (tt) {
97 case l1: return "l1";
98 case l2: return "l2";
99 case lIF: return "lIF";
100 case MW: return "MW";
101 case CL: return "CL";
102 case c1: return "c1";
103 case c2: return "c2";
104 case cIF: return "cIF";
105 case dummy: case maxLc: return "";
106 }
107 return "";
108 }
109};
110
111class interface_pppClient {
112 public:
113 virtual ~interface_pppClient() {};
114 virtual void processEpoch(const std::vector<t_satObs*>& satObs, t_output* output) = 0;
115 virtual void putEphemeris(const t_eph* eph) = 0;
116 virtual void putOrbCorrections(const std::vector<t_orbCorr*>& corr) = 0;
117 virtual void putClkCorrections(const std::vector<t_clkCorr*>& corr) = 0;
118 virtual void putBiases(const std::vector<t_satBias*>& satBias) = 0;
119};
120
121} // namespace BNC_PPP
122
123#endif
Note: See TracBrowser for help on using the repository browser.