25using ::apollo::drivers::canbus::Byte;
30 Lincoln *chassis_detail)
const {
31 chassis_detail->mutable_basic()->set_latitude(
latitude(bytes, length));
32 chassis_detail->mutable_basic()->set_longitude(
longitude(bytes, length));
33 chassis_detail->mutable_basic()->set_gps_valid(
is_valid(bytes, length));
37 Byte frame_0(bytes + 3);
38 int32_t value = frame_0.get_byte(0, 7);
40 Byte frame_1(bytes + 2);
41 int32_t t = frame_1.get_byte(0, 8);
45 Byte frame_2(bytes + 1);
46 t = frame_2.get_byte(0, 8);
51 t = frame_3.get_byte(0, 8);
55 if (value > 0x3FFFFFFF) {
59 return value * (1.000000 / 3.000000) * 1e-6;
63 Byte frame_0(bytes + 7);
64 int32_t value = frame_0.get_byte(0, 7);
66 Byte frame_1(bytes + 6);
67 int32_t t = frame_1.get_byte(0, 8);
71 Byte frame_2(bytes + 5);
72 t = frame_2.get_byte(0, 8);
76 Byte frame_3(bytes + 4);
77 t = frame_3.get_byte(0, 8);
81 if (value > 0x3FFFFFFF) {
85 return value * (1.000000 / 3.000000) * 1e-6;
89 Byte frame(bytes + 7);
90 return frame.is_bit_1(7);
double longitude(const std::uint8_t *bytes, int32_t length) const
get longitude from byte array config detail: {'name': 'longitude', 'offset': 0.0, 'precision': 3....
double latitude(const std::uint8_t *bytes, int32_t length) const
get latitude from byte array config detail: {'name': 'latitude', 'offset': 0.0, 'precision': 3....
virtual void Parse(const std::uint8_t *bytes, int32_t length, Lincoln *chassis_detail) const
bool is_valid(const std::uint8_t *bytes, int32_t length) const
check is_valid from byte array config detail: {'name': 'valid', 'offset': 0.0, 'precision': 1....
the class of Gps6d (for lincoln vehicle)