Apollo 10.0
自动驾驶开放平台
broadgnss_base_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 <string>
20
21#include "modules/common_msgs/sensor_msgs/gnss.pb.h"
22#include "modules/common_msgs/sensor_msgs/gnss_best_pose.pb.h"
23#include "modules/common_msgs/sensor_msgs/gnss_raw_observation.pb.h"
24#include "modules/common_msgs/sensor_msgs/heading.pb.h"
25#include "modules/common_msgs/sensor_msgs/imu.pb.h"
26#include "modules/common_msgs/sensor_msgs/ins.pb.h"
27
28#include "cyber/cyber.h"
33
34namespace apollo {
35namespace drivers {
36namespace gnss {
37
39 public:
41 explicit BroadGnssBaseParser(const config::Config &config);
42
43 virtual bool PrepareMessage() = 0;
44
45 virtual void GetMessages(MessageInfoVec *messages);
46
47 protected:
48 void PrepareMessageStatus(const uint8_t &solution_status,
49 const uint8_t &solution_type);
51
52 private:
53 void FillGnssBestpos();
54 void FillIns();
55 void FillInsStat();
56 void FillImu();
57 void FillHeading();
58
59 GnssBestPose bestpos_;
60 // bestpos 1hz rate control
61 RateControl bestpos_ratecontrol_{PERIOD_NS_1HZ};
62 Imu imu_;
63 Heading heading_;
64 Ins ins_;
65 InsStat ins_stat_;
66};
67
68} // namespace gnss
69} // namespace drivers
70} // namespace apollo
virtual void GetMessages(MessageInfoVec *messages)
void PrepareMessageStatus(const uint8_t &solution_status, const uint8_t &solution_type)
constexpr uint64_t PERIOD_NS_1HZ
std::vector< MessageInfo > MessageInfoVec
Definition parser.h:57
class register implement
Definition arena_queue.h:37