Apollo
10.0
自动驾驶开放平台
rtcm3_parser.h
浏览该文件的文档.
1
/******************************************************************************
2
* Copyright 2017 The Apollo Authors. All Rights Reserved.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*****************************************************************************/
16
17
#pragma once
18
19
#include <cmath>
20
#include <iostream>
21
#include <limits>
22
#include <map>
23
#include <memory>
24
#include <vector>
25
26
#include "modules/common_msgs/sensor_msgs/gnss_raw_observation.pb.h"
27
28
#include "
cyber/cyber.h
"
29
30
#include "
modules/drivers/gnss/parser/parser.h
"
31
#include "
modules/drivers/gnss/parser/rtcm_decode.h
"
32
33
namespace
apollo
{
34
namespace
drivers {
35
namespace
gnss {
36
37
class
Rtcm3Parser
:
public
Parser
{
38
public
:
39
explicit
Rtcm3Parser
(
bool
is_base_satation);
40
virtual
MessageType
GetMessage
(
MessagePtr
*message_ptr);
41
42
private
:
43
void
SetObservationTime();
44
bool
SetStationPosition();
45
void
FillKepplerOrbit(
const
eph_t &eph,
46
apollo::drivers::gnss::KepplerOrbit
*keppler_orbit);
47
void
FillGlonassOrbit(
const
geph_t &eph,
48
apollo::drivers::gnss::GlonassOrbit
*keppler_orbit);
49
bool
ProcessObservation();
50
bool
ProcessEphemerides();
51
bool
ProcessStationParameters();
52
bool
init_flag_;
53
54
std::vector<uint8_t> buffer_;
55
56
rtcm_t rtcm_;
57
bool
is_base_station_ =
false
;
58
59
apollo::drivers::gnss::GnssEphemeris
ephemeris_;
60
apollo::drivers::gnss::EpochObservation
observation_;
61
62
struct
Point3D {
63
double
x;
64
double
y;
65
double
z;
66
};
67
std::map<int, Point3D> station_location_;
68
};
69
70
}
// namespace gnss
71
}
// namespace drivers
72
}
// namespace apollo
apollo::drivers::gnss::Parser
Definition
parser.h:78
apollo::drivers::gnss::Rtcm3Parser
Definition
rtcm3_parser.h:37
apollo::drivers::gnss::Rtcm3Parser::GetMessage
virtual MessageType GetMessage(MessagePtr *message_ptr)
Definition
rtcm3_parser.cc:155
cyber.h
apollo::drivers::gnss::MessagePtr
::google::protobuf::Message * MessagePtr
Definition
parser.h:34
apollo::drivers::gnss::MessageType
MessageType
Definition
parser.h:35
apollo
class register implement
Definition
arena_queue.h:37
parser.h
rtcm_decode.h
apollo::drivers::gnss::EpochObservation
Definition
gnss_raw_observation.proto:72
apollo::drivers::gnss::GlonassOrbit
Definition
gnss_raw_observation.proto:140
apollo::drivers::gnss::GnssEphemeris
Definition
gnss_raw_observation.proto:184
apollo::drivers::gnss::KepplerOrbit
Definition
gnss_raw_observation.proto:96
modules
drivers
gnss
parser
rtcm3_parser.h