Apollo 11.0
自动驾驶开放平台
asensing_base_parser.cc
浏览该文件的文档.
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 *****************************************************************************/
17
18#include <cmath>
19#include <iostream>
20#include <limits>
21#include <memory>
22#include <vector>
23
24namespace apollo {
25namespace drivers {
26namespace gnss {
27
29 : auto_fill_gps_msg_(config.auto_fill_gps_msg()) {}
30
32 if (data_ == nullptr) {
33 return;
34 }
35 if (!PrepareMessage()) {
36 return;
37 }
38
40 FillImu();
42 FillIns();
44
46 messages->push_back(MessageInfo{MessageType::BEST_GNSS_POS,
47 reinterpret_cast<MessagePtr>(&bestpos_)});
48 }
49 messages->push_back(
50 MessageInfo{MessageType::IMU, reinterpret_cast<MessagePtr>(&imu_)});
51 messages->push_back(MessageInfo{MessageType::HEADING,
52 reinterpret_cast<MessagePtr>(&heading_)});
53 messages->push_back(
54 MessageInfo{MessageType::INS, reinterpret_cast<MessagePtr>(&ins_)});
55 messages->push_back(MessageInfo{MessageType::INS_STAT,
56 reinterpret_cast<MessagePtr>(&ins_stat_)});
57}
58
59} // namespace gnss
60} // namespace drivers
61} // namespace apollo
virtual void GetMessages(MessageInfoVec *messages)
const uint8_t * data_
Definition parser.h:145
::google::protobuf::Message * MessagePtr
Definition parser.h:34
std::vector< MessageInfo > MessageInfoVec
Definition parser.h:57
class register implement
Definition arena_queue.h:37