Apollo  6.0
Open source self driving car software
gps_6f.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2017 The Apollo Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *****************************************************************************/
16 
22 #pragma once
23 
24 #include "modules/canbus/proto/chassis_detail.pb.h"
26 
31 namespace apollo {
32 namespace canbus {
33 namespace lincoln {
34 
41  ::apollo::canbus::ChassisDetail> {
42  public:
43  static const int32_t ID;
44 
45  /*
46  * @brief parse received data
47  * @param bytes a pointer to the input bytes
48  * @param length the length of the input bytes
49  * @param timestamp the timestamp of input data
50  * @param chassis_detail the parsed chassis_detail
51  */
52  virtual void Parse(const std::uint8_t *bytes, int32_t length,
53  ChassisDetail *chassis_detail) const;
54 
65  double altitude(const std::uint8_t *bytes, int32_t length) const;
66 
77  double heading(const std::uint8_t *bytes, int32_t length) const;
78 
88  int32_t speed(const std::uint8_t *bytes, int32_t length) const;
89 
99  double hdop(const std::uint8_t *bytes, int32_t length) const;
100 
110  double vdop(const std::uint8_t *bytes, int32_t length) const;
111 
121  int32_t fix_quality(const std::uint8_t *bytes, int32_t length) const;
122 
132  int32_t num_satellites(const std::uint8_t *bytes, int32_t length) const;
133 };
134 
135 } // namespace lincoln
136 } // namespace canbus
137 } // namespace apollo
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...
static const int32_t ID
Definition: gps_6f.h:43
one of the protocol data of lincoln vehicle
Definition: gps_6f.h:40
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...
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
This is the base class of protocol data.
Definition: protocol_data.h:44
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...
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...
virtual void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *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...
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...
The class of ProtocolData.