source: ntrip/trunk/BNC/RTCM/GPSDecoder.h@ 214

Last change on this file since 214 was 207, checked in by mervart, 18 years ago

* empty log message *

File size: 4.1 KB
Line 
1// -*- C++ -*-
2//
3// $Id: GPSDecoder.h,v 1.1.1.1 2006/05/30 11:05:27 mervart Exp $
4// 2005/04/11: include 'int iPCode' into class 'GPSDecoder' (BKG)
5#if !defined(__GPSDecoder_h__)
6#define __GPSDecoder_h__
7
8#include <list>
9#include <iostream>
10
11using namespace std;
12
13//
14// One Code/Phase - Measurement
15//
16struct Observation {
17 Observation()
18 :SVPRN(0)
19 ,GPSWeek(0)
20 ,GPSWeeks(0)
21 ,sec(0.)
22 ,C1(0.)
23 ,P2(0.)
24 ,L1(0.)
25 ,L2(0.)
26 ,SNR1(0)
27 ,SNR2(0)
28 ,pCodeIndicator(0)
29 ,cumuLossOfCont(0)
30 {StatID[0] = '\0';}
31
32 Observation( char _statID
33 ,char _svprn
34 ,short _GPSWeek
35 ,int _GPSWeeks
36 ,double _sec
37 ,double _C1
38 ,double _P2
39 ,double _L1
40 ,double _L2
41 ,short _SNR1
42 ,short _SNR2
43 ,int _pCodeIndicator
44 ,u_int _cumuLossOfCont)
45 :SVPRN(_svprn)
46 ,GPSWeek(_GPSWeek)
47 ,GPSWeeks(_GPSWeeks)
48 ,sec(_sec)
49 ,C1(_C1)
50 ,P2(_P2)
51 ,L1(_L1)
52 ,L2(_L2)
53 ,SNR1(_SNR1)
54 ,SNR2(_SNR2)
55 ,pCodeIndicator(_pCodeIndicator)
56 ,cumuLossOfCont(_cumuLossOfCont)
57 {StatID[0] = _statID; StatID[1] = '\0';}
58
59 char StatID[5+1]; //< Station ID
60 char SVPRN; //< Satellite PRN
61 short GPSWeek; //< Week of GPS-Time
62 int GPSWeeks; //< Second of Week (GPS-Time>
63 double sec;
64 double C1; //< CA-code validated raw pseudorange (meters)
65 double P2; //< P2-code validated raw pseudorange (meters)
66 double L1; //< validated raw carrier phase (meters)
67 double L2; //< validated raw carrier phase (meters)
68 short SNR1; //< signal-to noise ration (0.1 dB)
69 short SNR2; //< signal-to noise ration (0.1 dB)
70 int pCodeIndicator; // 0 ... CA Code, 1 ... P Code
71 u_int cumuLossOfCont; // 0 to 31
72} ;
73
74//
75// GPS Orbitinformation
76//
77struct Ephemeris {
78 short svprn; //< Satellite PRN
79 short wn; //< GPS - week number
80 short aodc; //< Age of data issue Clock
81 short aode; //< Age of data issue Orbit
82 double tow; //< Seconds of GPS week
83 double toc; //< Reference time, Clock (sec)
84 double toe; //< Ref.time for Orbit:(sec)
85 double tgd; //< Group delay (sec)
86 double af2; //< Clock parameter: (sec/sec^2)
87 double af1; //< Clock parameter: (sec/sec)
88 double af0; //< Clock parameter: (sec)
89 double crs; //< Sin-harmonic correction term, orbit radius:(meters)
90 double deltan; //< Mean anomaly correction:(semi-cirl/sec)
91 double m0; //< Mean anomaly @ ref.time:(semi-circle)
92 double cuc; //< Cos-harmonic correction term, argument of Latitude:(radians)
93 double e; //< Eccentricity
94 double cus; //< Sin-harmonic correction term, argument of Latitude:(radians)
95 double roota; //< Square root of semi-major axis:(m ^1/2)
96 double cic; //< Cos-harmonic correction term, angle of inclination:(radians)
97 double omega0; //< Lon. of Asc. node at weekly epoch: (semi-circle)
98 double cis; //< Sin-harmonic correction term, angle of Inclination:(radians)
99 double i0; //< Inclination angle at Ref.time: (semi-circle)
100 double crc; //< Cos-harmonic correction term, orbit radius:(meters)
101 double omega; //< Argument of Perigee:(semi-circle)
102 double omegadot; //< Rate of right ascension: (semi-circle/sec)
103 double idot; //< Rate of inclination angle: (semi-circle/sec)
104 short svaccu; //< SV accuracy (0-15)
105 short fit; //< Curve fit interval (0-1)
106 short cReserved1; //< Not used - yet
107 short health; //< 0 if healthy, else unhealthy
108 short cReserved2; //< Not used - yet
109 short SVEnable; //< Not used - yet
110} ;
111
112const double lambda1 = 0.1902936727984; // [m]
113const double lambda2 = 0.2442102134241; // [m]
114const unsigned glonass_svid = 45;
115
116class GPSDecoder {
117 public:
118 int iPCode; // pointer for CA or P code on L1
119
120 virtual void Decode(char* _ptrBuffer=NULL, int _nBufLen=0) = 0;
121 virtual ~GPSDecoder() {}
122 typedef list<Observation*> ObsList_t;
123 typedef list<Ephemeris*> EphList_t;
124
125 ObsList_t m_lObsList;
126 EphList_t m_lEphList;
127
128} ;
129
130#endif
Note: See TracBrowser for help on using the repository browser.