Apollo 10.0
自动驾驶开放平台
enbroad_messages.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// This defines enums and structures for parsing ENS binary messages. Please
18// refer to ENS's
19// documents for details about these messages.
20
21#pragma once
22
23#include <cstdint>
24#include <limits>
25
26#include "modules/drivers/gnss/proto/config.pb.h"
27
28namespace apollo {
29namespace drivers {
30namespace gnss {
31namespace enbroad {
32
40
47
57
66
76
77enum MessageId : uint16_t {
78 BIN_NAV_DATA = 0x01AA,
79 BIN_SINS_DATA = 0x02AA,
80 BIN_IMU_DATA = 0x03AA,
81 BIN_GNSS_DATA = 0x04AA,
82};
83
84// Every binary message has 32-bit CRC performed on all data including the
85// header.
86
87#pragma pack(push, 1) // Turn off struct padding.
88
89enum class DatumId : uint32_t {
90 // We only use WGS-84.
91 WGS84 = 61,
92};
93
94enum SyncHeadByte : uint8_t {
98};
99
100enum SyncTailByte : uint8_t {
104};
105
108 uint8_t src_id;
109 uint8_t dst_id;
111 uint8_t rsp;
112 uint16_t SN;
113 uint16_t reserved;
115};
116static_assert(sizeof(FrameHeader) == 14, "Incorrect FrameHeader");
118 uint32_t gps_week; // GPS Week number.
119 uint32_t gps_millisecs; // Milliseconds of week.
120 int16_t pitch;
121 int16_t roll;
122 int16_t head;
123 int16_t gyroX;
124 int16_t gyroY;
125 int16_t gyroZ;
126 int16_t accX;
127 int16_t accY;
128 int16_t accZ;
129 int16_t magnetX;
130 int16_t magnetY;
131 int16_t magentZ;
132 int64_t lat;
133 int64_t lon;
134 int32_t alt;
135 int16_t ve;
136 int16_t vn;
137 int16_t vu;
138 uint8_t poll_type;
139 int16_t poll_frame1;
140 int16_t poll_frame2;
141 int16_t poll_frame3;
142};
143static_assert(sizeof(NAV_DATA_TypeDef) == 65, "Incorrect NAV_DATA_TypeDef");
144
146 uint32_t gps_week; // GPS Week number.
147 uint32_t gpssecond; // Milliseconds of week.
148 uint8_t navStatus;
149 uint8_t fusion; // 0:valid;1:gps;2:wheel;3:motion
150 float pitch;
151 float roll; // unit degree
152 float heading; // unit degree
153 float ve; // East velocity, unit m/s
154 float vn; // North velocity,unit m/s
155 float vu; // up velocity,unit m/s
156 double latitude; // unit degree
157 double longitude; // unit degree
158 float altitude; // unit m
159 float xigema_ve; // East velocity std unit m/s
160 float xigema_vn; // North velocity std unit m/s
161 float xigema_vu; // up velocity std unit m/s
162 float xigema_lat; // North pos std unit m
163 float xigema_lon; // East pos std unit m
164 float xigema_alt; // up pos std unit m
165 float xigema_pitch; // pitch std unit degree
166 float xigema_roll; // roll std unit degree
167 float xigema_head; // heading std unit degree
168};
169static_assert(sizeof(NAV_SINS_TypeDef) == 90, "Incorrect NAV_SINS_TypeDef");
170
172 uint32_t gps_week; // GPS Week number.
173 uint32_t gpssecond; // Milliseconds of week.
174 float sensorTemp; // unit degree
175 uint8_t gyroFlag; // gyro state,0:abnormal,1:normal
176 double gyroX; // unit degree/s
177 double gyroY; // unit degree/s
178 double gyroZ; // unit degree/s
179 uint8_t accFlag; // acc state,0:abnormal,1:normal
180 double accX; // unit m/s2
181 double accY; // unit m/s2
182 double accZ; // unit m/s2
183 uint8_t magnetFlag; // magnet state,0:abnormal,1:normal
184 double magnetX; // unit mGauss
185 double magnetY; // unit mGauss
186 double magnetZ; // unit mGauss
187};
188static_assert(sizeof(NAV_IMU_TypeDef) == 87, "Incorrect NAV_IMU_TypeDef");
189
191 uint32_t gps_week; // GPS Week number.
192 uint32_t gpssecond; // Milliseconds of week.
193 uint8_t satsNum; // num of sats
194 float age;
195 uint8_t rtkStatus; // 0:invalid;1:SPP;2:DGPS;4:FIXED;5:FLOAT
196 double latitude; // unit degree
197 double longitude; // unit degree
198 float altitude; // unit m
199 uint8_t headingStatus; // 0:invalid;4:FIXED;5:FLOAT
200 float baseline; // unit m
201 float heading; // unit degree
202 uint8_t velStatus; // 0:normal
203 float ve; // East velocity, unit m/s
204 float vn; // North velocity,unit m/s
205 float vu; // up velocity,unit m/s
206 float xigema_ve; // East velocity std unit m/s
207 float xigema_vn; // North velocity std unit m/s
208 float xigema_vu; // up velocity std unit m/s
209 float xigema_lat; // North pos std unit m
210 float xigema_lon; // East pos std unit m
211 float xigema_alt; // up pos std unit m
212};
213static_assert(sizeof(NAV_GNSS_TypeDef) == 80, "Incorrect NAV_GNSS_TypeDef");
214
215#pragma pack(pop)
216
217} // namespace enbroad
218} // namespace gnss
219} // namespace drivers
220} // namespace apollo
class register implement
Definition arena_queue.h:37