-
Notifications
You must be signed in to change notification settings - Fork 53
/
rtcm.hh
59 lines (54 loc) · 974 Bytes
/
rtcm.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#pragma once
#include <string>
#include <stdio.h>
#include "navmon.hh"
#include <vector>
#include "galileo.hh"
#include <map>
struct RTCMFrame
{
std::string payload;
};
class RTCMReader
{
public:
explicit RTCMReader(int fd) : d_fp(fdopen(fd, "r")) {}
bool get(RTCMFrame& rf);
private:
FILE* d_fp;
};
struct RTCMMessage
{
void parse(const std::string& str);
int type;
int sow;
int udi;
bool mmi;
bool reference;
int ssrIOD, ssrProvider, ssrSolution;
struct EphemerisDelta
{
SatID id;
// in millimeters
double radial, along, cross; // mm
double dradial, dalong, dcross; // mm/s
int iod;
int sow;
int udi;
};
struct ClockDelta
{
SatID id;
double dclock0; // in meters
double dclock1;
double dclock2;
int sow;
int udi;
int iod{-1};
};
std::vector<EphemerisDelta> d_ephs;
std::vector<ClockDelta> d_clocks;
std::map<SatID, double> d_dcbs;
GalileoMessage d_gm;
int d_sv;
};