25using ::apollo::drivers::canbus::Byte;
30 Lincoln *chassis_detail)
const {
31 chassis_detail->mutable_basic()->set_altitude(
altitude(bytes, length));
32 chassis_detail->mutable_basic()->set_heading(
heading(bytes, length));
34 chassis_detail->mutable_basic()->set_gps_speed(
speed(bytes, length) *
36 chassis_detail->mutable_basic()->set_hdop(
hdop(bytes, length));
37 chassis_detail->mutable_basic()->set_vdop(
vdop(bytes, length));
40 chassis_detail->mutable_basic()->set_quality(
FIX_NO);
43 chassis_detail->mutable_basic()->set_quality(
FIX_2D);
46 chassis_detail->mutable_basic()->set_quality(
FIX_3D);
49 chassis_detail->mutable_basic()->set_quality(
FIX_INVALID);
52 chassis_detail->mutable_basic()->set_num_satellites(
57 Byte high_frame(bytes + 1);
58 int32_t high = high_frame.get_byte(0, 8);
59 Byte low_frame(bytes + 0);
60 int32_t low = low_frame.get_byte(0, 8);
61 int32_t value = (high << 8) | low;
65 return value * 0.250000;
69 Byte high_frame(bytes + 3);
70 int32_t high = high_frame.get_byte(0, 8);
71 Byte low_frame(bytes + 2);
72 int32_t low = low_frame.get_byte(0, 8);
73 int32_t value = (high << 8) | low;
74 return value * 0.010000;
77int32_t
Gps6f::speed(
const std::uint8_t *bytes, int32_t length)
const {
78 Byte frame(bytes + 4);
79 int32_t x = frame.get_byte(0, 8);
83double Gps6f::hdop(
const std::uint8_t *bytes, int32_t length)
const {
84 Byte frame(bytes + 5);
85 int32_t x = frame.get_byte(0, 5);
89double Gps6f::vdop(
const std::uint8_t *bytes, int32_t length)
const {
90 Byte frame(bytes + 6);
91 int32_t x = frame.get_byte(0, 5);
96 Byte frame(bytes + 7);
97 int32_t x = frame.get_byte(0, 3);
102 Byte frame(bytes + 7);
103 int32_t x = frame.get_byte(3, 5);
double vdop(const std::uint8_t *bytes, int32_t length) const
get vdop from byte array config detail: {'name': 'vdop', 'offset': 0.0, 'precision': 0....
int32_t num_satellites(const std::uint8_t *bytes, int32_t length) const
get number of satellites from byte array config detail: {'name': 'numsat', 'offset': 0....
int32_t speed(const std::uint8_t *bytes, int32_t length) const
get speed from byte array config detail: {'name': 'speed', 'offset': 0.0, 'precision': 1....
double hdop(const std::uint8_t *bytes, int32_t length) const
get hdop from byte array config detail: {'name': 'hdop', 'offset': 0.0, 'precision': 0....
virtual void Parse(const std::uint8_t *bytes, int32_t length, Lincoln *chassis_detail) const
int32_t fix_quality(const std::uint8_t *bytes, int32_t length) const
get fix quality from byte array config detail: {'name': 'quality', 'offset': 0.0, 'precision': 1....
double altitude(const std::uint8_t *bytes, int32_t length) const
get altitude from byte array config detail: {'name': 'altitude', 'offset': 0.0, 'precision': 0....
double heading(const std::uint8_t *bytes, int32_t length) const
get heading from byte array config detail: {'name': 'heading', 'offset': 0.0, 'precision': 0....
the class of Gps6f (for lincoln vehicle)