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

Last change on this file since 6840 was 6653, checked in by stuerze, 10 years ago

sinex tro file support added,
troposphere results in overall ppp logfile added

File size: 2.8 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 double _trp0;
34 double _trp;
35 double _trpStdev;
36 int _numSat;
37 double _pDop;
38 std::string _log;
39 bool _error;
40};
41
42class t_lc {
43 public:
44 enum type {dummy = 0, l1, l2, c1, c2, lIF, cIF, MW, CL, maxLc};
45
46 static bool includesPhase(type tt) {
47 switch (tt) {
48 case l1:
49 case l2:
50 case lIF:
51 case MW:
52 case CL:
53 return true;
54 case c1:
55 case c2:
56 case cIF:
57 return false;
58 case dummy: case maxLc: return false;
59 }
60 return false;
61 }
62
63 static bool includesCode(type tt) {
64 switch (tt) {
65 case c1:
66 case c2:
67 case cIF:
68 case MW:
69 case CL:
70 return true;
71 case l1:
72 case l2:
73 case lIF:
74 return false;
75 case dummy: case maxLc: return false;
76 }
77 return false;
78 }
79
80 static t_frequency::type toFreq(char sys, type tt) {
81 switch (tt) {
82 case l1: case c1:
83 if (sys == 'G') return t_frequency::G1;
84 else if (sys == 'R') return t_frequency::R1;
85 else if (sys == 'E') return t_frequency::E1;
86 else return t_frequency::dummy;
87 case l2: case c2:
88 if (sys == 'G') return t_frequency::G2;
89 else if (sys == 'R') return t_frequency::R2;
90 else return t_frequency::dummy;
91 case lIF: case cIF: case MW: case CL:
92 return t_frequency::dummy;
93 case dummy: case maxLc: return t_frequency::dummy;
94 }
95 return t_frequency::dummy;
96 }
97
98 static std::string toString(type tt) {
99 switch (tt) {
100 case l1: return "l1";
101 case l2: return "l2";
102 case lIF: return "lIF";
103 case MW: return "MW";
104 case CL: return "CL";
105 case c1: return "c1";
106 case c2: return "c2";
107 case cIF: return "cIF";
108 case dummy: case maxLc: return "";
109 }
110 return "";
111 }
112};
113
114class interface_pppClient {
115 public:
116 virtual ~interface_pppClient() {};
117 virtual void processEpoch(const std::vector<t_satObs*>& satObs, t_output* output) = 0;
118 virtual void putEphemeris(const t_eph* eph) = 0;
119 virtual void putOrbCorrections(const std::vector<t_orbCorr*>& corr) = 0;
120 virtual void putClkCorrections(const std::vector<t_clkCorr*>& corr) = 0;
121 virtual void putCodeBiases(const std::vector<t_satCodeBias*>& satCodeBias) = 0;
122};
123
124} // namespace BNC_PPP
125
126#endif
Note: See TracBrowser for help on using the repository browser.