src
kvh_driver
kvh_global_vars.cpp
Go to the documentation of this file.
1
/*********************************************************************
2
* Software License Agreement (Apache 2.0)
3
*
4
* Copyright (c) 2019, The MITRE Corporation.
5
* All rights reserved.
6
*
7
* Licensed under the Apache License, Version 2.0 (the "License");
8
* you may not use this file except in compliance with the License.
9
* You may obtain a copy of the License at
10
*
11
* https://www.apache.org/licenses/LICENSE-2.0
12
*
13
* Unless required by applicable law or agreed to in writing, software
14
* distributed under the License is distributed on an "AS IS" BASIS,
15
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
* See the License for the specific language governing permissions and
17
* limitations under the License.
18
*
19
* Sections of this project contains content developed by The MITRE Corporation.
20
* If this code is used in a deployment or embedded within another project,
21
* it is requested that you send an email to opensource@mitre.org in order to
22
* let us know where this software is being used.
23
*********************************************************************/
24
31
#include "
kvh_geo_fog_3d_global_vars.hpp
"
32
#include <typeinfo>
33
34
namespace
kvh
35
{
36
// Keep a list of supported packets using KVH's packet id enum
37
std::set<packet_id_e>
supportedPackets_
= {
38
packet_id_system_state
,
39
packet_id_unix_time
,
40
packet_id_raw_sensors
,
41
packet_id_satellites
,
42
packet_id_satellites_detailed
,
43
packet_id_local_magnetics
,
44
packet_id_utm_position
,
45
packet_id_ecef_position
,
46
packet_id_north_seeking_status
,
47
packet_id_euler_orientation_standard_deviation
,
48
packet_id_odometer_state
,
49
packet_id_raw_gnss
,
50
packet_id_body_velocity
,
51
packet_id_velocity_standard_deviation
,
52
packet_id_odometer_configuration
,
53
};
54
55
// Keep lookup table of packet sizes. Used for calculating required baud rates
56
std::map<packet_id_e, int>
packetSize_
= {
57
{
packet_id_system_state
,
sizeof
(
system_state_packet_t
)},
58
{
packet_id_unix_time
,
sizeof
(
unix_time_packet_t
)},
59
{
packet_id_raw_sensors
,
sizeof
(
raw_sensors_packet_t
)},
60
{
packet_id_satellites
,
sizeof
(
satellites_packet_t
)},
61
{
packet_id_satellites_detailed
,
sizeof
(
detailed_satellites_packet_t
)},
62
{
packet_id_local_magnetics
,
sizeof
(
local_magnetics_packet_t
)},
63
{
packet_id_utm_position
,
sizeof
(
utm_fix
)},
64
{
packet_id_ecef_position
,
sizeof
(
ecef_position_packet_t
)},
65
{
packet_id_north_seeking_status
,
sizeof
(
north_seeking_status_packet_t
)},
66
{
packet_id_euler_orientation_standard_deviation
,
sizeof
(
euler_orientation_standard_deviation_packet_t
)},
67
{
packet_id_odometer_state
,
sizeof
(
odometer_state_packet_t
)},
68
{
packet_id_raw_gnss
,
sizeof
(
raw_gnss_packet_t
)},
69
{
packet_id_body_velocity
,
sizeof
(
body_velocity_packet_t
)},
70
{
packet_id_velocity_standard_deviation
,
sizeof
(
velocity_standard_deviation_packet_t
)},
71
{
packet_id_odometer_configuration
,
sizeof
(
odometer_configuration_packet_t
)},
72
};
73
74
std::map<packet_id_e, std::string>
packetTypeStr_
= {
75
{
packet_id_system_state
,
typeid
(
system_state_packet_t
).name()},
76
{
packet_id_unix_time
,
typeid
(
unix_time_packet_t
).name()},
77
{
packet_id_raw_sensors
,
typeid
(
raw_sensors_packet_t
).name()},
78
{
packet_id_satellites
,
typeid
(
satellites_packet_t
).name()},
79
{
packet_id_satellites_detailed
,
typeid
(
detailed_satellites_packet_t
).name()},
80
{
packet_id_local_magnetics
,
typeid
(
local_magnetics_packet_t
).name()},
81
{
packet_id_utm_position
,
typeid
(
utm_fix
).name()},
82
{
packet_id_ecef_position
,
typeid
(
ecef_position_packet_t
).name()},
83
{
packet_id_north_seeking_status
,
typeid
(
north_seeking_status_packet_t
).name()},
84
{
packet_id_euler_orientation_standard_deviation
,
typeid
(
euler_orientation_standard_deviation_packet_t
).name()},
85
{
packet_id_odometer_state
,
typeid
(
odometer_state_packet_t
).name()},
86
{
packet_id_raw_gnss
,
typeid
(
raw_gnss_packet_t
).name()},
87
{
packet_id_body_velocity
,
typeid
(
body_velocity_packet_t
).name()},
88
{
packet_id_velocity_standard_deviation
,
typeid
(
velocity_standard_deviation_packet_t
).name()},
89
{
packet_id_odometer_configuration
,
typeid
(
odometer_configuration_packet_t
).name()},
90
};
91
}
velocity_standard_deviation_packet_t
Definition:
spatial_packets.h:377
satellites_packet_t
Definition:
spatial_packets.h:428
north_seeking_status_packet_t
Definition:
spatial_packets.h:744
packet_id_satellites_detailed
@ packet_id_satellites_detailed
Definition:
spatial_packets.h:71
detailed_satellites_packet_t
Definition:
spatial_packets.h:476
kvh
Definition:
kvh_geo_fog_3d_device_configuration.hpp:44
raw_gnss_packet_t
Definition:
spatial_packets.h:402
packet_id_north_seeking_status
@ packet_id_north_seeking_status
Definition:
spatial_packets.h:111
kvh_geo_fog_3d_global_vars.hpp
global variables used to store packet information.
odometer_state_packet_t
Definition:
spatial_packets.h:586
unix_time_packet_t
Definition:
spatial_packets.h:305
body_velocity_packet_t
Definition:
spatial_packets.h:502
euler_orientation_standard_deviation_packet_t
Definition:
spatial_packets.h:382
packet_id_utm_position
@ packet_id_utm_position
Definition:
spatial_packets.h:74
packet_id_euler_orientation_standard_deviation
@ packet_id_euler_orientation_standard_deviation
Definition:
spatial_packets.h:66
packet_id_satellites
@ packet_id_satellites
Definition:
spatial_packets.h:70
kvh::utm_fix
Definition:
kvh_geo_fog_3d_global_vars.hpp:51
packet_id_odometer_state
@ packet_id_odometer_state
Definition:
spatial_packets.h:91
packet_id_raw_gnss
@ packet_id_raw_gnss
Definition:
spatial_packets.h:69
packet_id_ecef_position
@ packet_id_ecef_position
Definition:
spatial_packets.h:73
ecef_position_packet_t
Definition:
spatial_packets.h:486
packet_id_system_state
@ packet_id_system_state
Definition:
spatial_packets.h:60
local_magnetics_packet_t
Definition:
spatial_packets.h:581
kvh::packetTypeStr_
std::map< packet_id_e, std::string > packetTypeStr_
Holds the string value for the different types of structs.
Definition:
kvh_global_vars.cpp:74
packet_id_local_magnetics
@ packet_id_local_magnetics
Definition:
spatial_packets.h:90
packet_id_odometer_configuration
@ packet_id_odometer_configuration
Definition:
spatial_packets.h:126
packet_id_unix_time
@ packet_id_unix_time
Definition:
spatial_packets.h:61
odometer_configuration_packet_t
Definition:
spatial_packets.h:889
packet_id_body_velocity
@ packet_id_body_velocity
Definition:
spatial_packets.h:76
kvh::packetSize_
std::map< packet_id_e, int > packetSize_
Map relating packet id's to the associated struct size. Used for baudrate calculation.
Definition:
kvh_global_vars.cpp:56
packet_id_velocity_standard_deviation
@ packet_id_velocity_standard_deviation
Definition:
spatial_packets.h:65
kvh::supportedPackets_
std::set< packet_id_e > supportedPackets_
Set of packets containing all packet_id's we support.
Definition:
kvh_global_vars.cpp:37
system_state_packet_t
Definition:
spatial_packets.h:246
raw_sensors_packet_t
Definition:
spatial_packets.h:392
packet_id_raw_sensors
@ packet_id_raw_sensors
Definition:
spatial_packets.h:68
kvh_geo_fog_3d_driver
Author(s): Trevor Bostic
, Zach LaCelle
autogenerated on Wed Mar 2 2022 00:28:57