19#include "glog/logging.h"
28namespace conti_radar {
37 auto obs = conti_radar->add_contiobs();
38 obs->set_clusterortrack(
true);
39 obs->set_obstacle_id(obstacle_id(bytes, length));
40 obs->set_longitude_dist(longitude_dist(bytes, length));
41 obs->set_lateral_dist(lateral_dist(bytes, length));
42 obs->set_longitude_vel(longitude_vel(bytes, length));
43 obs->set_lateral_vel(lateral_vel(bytes, length));
44 obs->set_rcs(rcs(bytes, length));
45 obs->set_dynprop(dynprop(bytes, length));
47 auto header = obs->mutable_header();
48 header->CopyFrom(conti_radar->
header());
49 header->set_timestamp_sec(timestamp);
52int ClusterGeneralInfo701::obstacle_id(
const std::uint8_t* bytes,
53 int32_t length)
const {
55 uint32_t x = t0.get_byte(0, 8);
61double ClusterGeneralInfo701::longitude_dist(
const std::uint8_t* bytes,
62 int32_t length)
const {
64 uint32_t x = t0.get_byte(0, 8);
67 uint32_t t = t1.get_byte(3, 5);
74double ClusterGeneralInfo701::lateral_dist(
const std::uint8_t* bytes,
75 int32_t length)
const {
77 uint32_t x = t0.get_byte(0, 2);
80 uint32_t t = t1.get_byte(0, 8);
87double ClusterGeneralInfo701::longitude_vel(
const std::uint8_t* bytes,
88 int32_t length)
const {
90 uint32_t x = t0.get_byte(0, 8);
93 uint32_t t = t1.get_byte(6, 2);
100double ClusterGeneralInfo701::lateral_vel(
const std::uint8_t* bytes,
101 int32_t length)
const {
103 uint32_t x = t0.get_byte(0, 6);
106 uint32_t t = t1.get_byte(5, 3);
113double ClusterGeneralInfo701::rcs(
const std::uint8_t* bytes,
114 int32_t length)
const {
116 uint32_t x = t0.get_byte(0, 8);
121int ClusterGeneralInfo701::dynprop(
const std::uint8_t* bytes,
122 int32_t length)
const {
124 uint32_t x = t0.get_byte(0, 3);
static Time Now()
get the current time.
double ToSecond() const
convert time to second.
The class of one byte, which is 8 bits.
void Parse(const std::uint8_t *bytes, int32_t length, ContiRadar *conti_radar) const override
const double CLUSTER_DIST_LAT_MIN
const double CLUSTER_VREL_LONG_MIN
const double CLUSTER_RCS_RES
const double CLUSTER_DIST_LONG_MIN
const double CLUSTER_VREL_LAT_MIN
const double CLUSTER_VREL_RES
const double CLUSTER_DIST_RES
optional apollo::common::Header header