source: ntrip/trunk/BNC/RTCM3/ephemeris.h@ 1873

Last change on this file since 1873 was 1807, checked in by zdenek, 16 years ago

ZL: FEATURE: changes for decoding of message 1003 from RTCM 3.0 streams

File size: 2.6 KB
Line 
1#ifndef EPHEMERIS_H
2#define EPHEMERIS_H
3
4#include <stdio.h>
5#include <string>
6extern "C" {
7#include "RTCM3/rtcm3torinex.h"
8}
9
10class t_eph {
11 public:
12 virtual ~t_eph() {};
13
14 bool isNewerThan(const t_eph* eph) const;
15 std::string prn() const {return _prn;}
16
17 int GPSweek() const { return _GPSweek; }
18 double GPSweeks() const { return _GPSweeks; }
19
20 virtual void position(int GPSweek, double GPSweeks,
21 double* xc,
22 double* vv) const = 0;
23
24 void position(int GPSweek, double GPSweeks,
25 double& xx, double& yy, double& zz, double& cc) const {
26 double tmp_xx[4];
27 double tmp_vv[4];
28
29 position(GPSweek, GPSweeks, tmp_xx, tmp_vv);
30
31 xx = tmp_xx[0];
32 yy = tmp_xx[1];
33 zz = tmp_xx[2];
34 cc = tmp_xx[3];
35 }
36
37 virtual int IOD() const = 0;
38
39 virtual void print(std::ostream& out) const = 0;
40
41 protected:
42 std::string _prn;
43 int _GPSweek;
44 double _GPSweeks;
45};
46
47
48class t_ephGPS : public t_eph {
49 public:
50 t_ephGPS() { }
51 ~t_ephGPS() {}
52
53 void set(const gpsephemeris* ee);
54
55 void set(int prn,
56 int GPSWeek,
57 double toc, double toe, double tot,
58 double IODE, double IODC,
59 double clock_bias, double clock_drift, double clock_driftrate,
60 double OMEGA0, double OMEGADOT,
61 double i0, double IDOT,
62 double omega,
63 double M0, double Delta_n,
64 double sqrt_A,
65 double e,
66 double Crc, double Crs,
67 double Cic, double Cis,
68 double Cuc, double Cus,
69 double TGD,
70 int health);
71
72 void position(int GPSweek, double GPSweeks,
73 double* xc,
74 double* vv) const;
75
76 int IOD() const { return static_cast<int>(_IODC); }
77
78 void print(std::ostream& out) const;
79
80 private:
81 double _TOW; // [s]
82 double _TOC; // [s]
83 double _TOE; // [s]
84 double _IODE;
85 double _IODC;
86
87 double _clock_bias; // [s]
88 double _clock_drift; // [s/s]
89 double _clock_driftrate; // [s/s^2]
90
91 double _Crs; // [m]
92 double _Delta_n; // [rad/s]
93 double _M0; // [rad]
94 double _Cuc; // [rad]
95 double _e; //
96 double _Cus; // [rad]
97 double _sqrt_A; // [m^0.5]
98 double _Cic; // [rad]
99 double _OMEGA0; // [rad]
100 double _Cis; // [rad]
101 double _i0; // [rad]
102 double _Crc; // [m]
103 double _omega; // [rad]
104 double _OMEGADOT; // [rad/s]
105 double _IDOT; // [rad/s]
106
107 double _TGD; // [s]
108};
109
110#endif
Note: See TracBrowser for help on using the repository browser.