19#include "glog/logging.h"
28namespace racobit_radar {
37 int obj_id = object_id(bytes, length);
38 auto racobit_obs = racobit_radar->add_contiobs();
39 racobit_obs->set_clusterortrack(
false);
40 racobit_obs->set_obstacle_id(obj_id);
41 racobit_obs->set_longitude_dist(longitude_dist(bytes, length));
42 racobit_obs->set_lateral_dist(lateral_dist(bytes, length));
43 racobit_obs->set_longitude_vel(longitude_vel(bytes, length));
44 racobit_obs->set_lateral_vel(lateral_vel(bytes, length));
45 racobit_obs->set_rcs(rcs(bytes, length));
46 racobit_obs->set_dynprop(dynprop(bytes, length));
48 auto header = racobit_obs->mutable_header();
49 header->CopyFrom(racobit_radar->
header());
50 header->set_timestamp_sec(timestamp);
53int ObjectGeneralInfo60B::object_id(
const std::uint8_t* bytes,
54 int32_t length)
const {
56 int32_t x = t0.get_byte(0, 8);
62double ObjectGeneralInfo60B::longitude_dist(
const std::uint8_t* bytes,
63 int32_t length)
const {
65 int32_t x = t0.get_byte(0, 8);
68 int32_t t = t1.get_byte(3, 5);
77double ObjectGeneralInfo60B::lateral_dist(
const std::uint8_t* bytes,
78 int32_t length)
const {
80 int32_t x = t0.get_byte(0, 3);
83 int32_t t = t1.get_byte(0, 8);
92double ObjectGeneralInfo60B::longitude_vel(
const std::uint8_t* bytes,
93 int32_t length)
const {
95 int32_t x = t0.get_byte(0, 8);
97 int32_t t = t1.get_byte(6, 2);
105double ObjectGeneralInfo60B::lateral_vel(
const std::uint8_t* bytes,
106 int32_t length)
const {
108 int32_t x = t0.get_byte(0, 6);
111 int32_t t = t1.get_byte(5, 3);
120double ObjectGeneralInfo60B::rcs(
const std::uint8_t* bytes,
121 int32_t length)
const {
123 int32_t x = t0.get_byte(0, 8);
129int ObjectGeneralInfo60B::dynprop(
const std::uint8_t* bytes,
130 int32_t length)
const {
132 int32_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, RacobitRadar *racobit_radar) const override
const double OBJECT_RCS_MIN
const double OBJECT_VREL_LONG_MIN
const double OBJECT_VREL_LAT_MIN
const double OBJECT_VREL_RES
const double OBJECT_DIST_RES
const double OBJECT_DIST_LONG_MIN
const double OBJECT_DIST_LAT_MIN
const double OBJECT_RCS_RES
optional apollo::common::Header header