20 #include "modules/drivers/gnss/proto/gnss_raw_observation.pb.h" 26 static inline int baud_obs_num(
int type) {
55 static inline bool gnss_sys(
int message_type,
56 apollo::drivers::gnss::GnssType* gnss_type) {
57 switch (message_type) {
59 *gnss_type = apollo::drivers::gnss::GnssType::GPS_SYS;
63 *gnss_type = apollo::drivers::gnss::GnssType::GLO_SYS;
67 *gnss_type = apollo::drivers::gnss::GnssType::GAL_SYS;
71 *gnss_type = apollo::drivers::gnss::GnssType::BDS_SYS;
81 static inline bool gnss_sys_type(
int sys_id,
82 apollo::drivers::gnss::GnssType* gnss_type) {
85 *gnss_type = apollo::drivers::gnss::GnssType::GPS_SYS;
89 *gnss_type = apollo::drivers::gnss::GnssType::BDS_SYS;
93 *gnss_type = apollo::drivers::gnss::GnssType::GLO_SYS;
97 *gnss_type = apollo::drivers::gnss::GnssType::GAL_SYS;
101 AINFO <<
"Not support sys id: " << sys_id;
107 static inline bool gnss_baud_id(apollo::drivers::gnss::GnssType sys_type,
109 apollo::drivers::gnss::GnssBandID* baud_id) {
111 case apollo::drivers::gnss::GnssType::GPS_SYS:
113 *baud_id = apollo::drivers::gnss::GnssBandID::GPS_L1;
114 }
else if (seq == 1) {
115 *baud_id = apollo::drivers::gnss::GnssBandID::GPS_L2;
116 }
else if (seq == 2) {
117 *baud_id = apollo::drivers::gnss::GnssBandID::GPS_L5;
119 AINFO <<
"Not support gps baud seq : " << seq;
124 case apollo::drivers::gnss::GnssType::BDS_SYS:
126 *baud_id = apollo::drivers::gnss::GnssBandID::BDS_B1;
127 }
else if (seq == 1) {
128 *baud_id = apollo::drivers::gnss::GnssBandID::BDS_B2;
129 }
else if (seq == 2) {
130 *baud_id = apollo::drivers::gnss::GnssBandID::BDS_B3;
132 AINFO <<
"Not support beidou baud seq : " << seq;
137 case apollo::drivers::gnss::GnssType::GLO_SYS:
139 *baud_id = apollo::drivers::gnss::GnssBandID::GLO_G1;
140 }
else if (seq == 1) {
141 *baud_id = apollo::drivers::gnss::GnssBandID::GLO_G2;
143 AINFO <<
"Not support beidou glonass seq : " << seq;
149 AINFO <<
"Not support sys " <<
static_cast<int>(sys_type) <<
", seq " 156 static inline bool gnss_time_type(
157 apollo::drivers::gnss::GnssType sys_type,
158 apollo::drivers::gnss::GnssTimeType* time_type) {
160 case apollo::drivers::gnss::GnssType::GPS_SYS:
161 *time_type = apollo::drivers::gnss::GnssTimeType::GPS_TIME;
164 case apollo::drivers::gnss::GnssType::BDS_SYS:
165 *time_type = apollo::drivers::gnss::GnssTimeType::BDS_TIME;
168 case apollo::drivers::gnss::GnssType::GLO_SYS:
169 *time_type = apollo::drivers::gnss::GnssTimeType::GLO_TIME;
172 case apollo::drivers::gnss::GnssType::GAL_SYS:
173 *time_type = apollo::drivers::gnss::GnssTimeType::GAL_TIME;
177 AINFO <<
"Not support sys " <<
static_cast<int>(sys_type);
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
#define AINFO
Definition: log.h:42