Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
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
};
51
52
// Keep lookup table of packet sizes. Used for calculating required baud rates
53
std::map<packet_id_e, int>
packetSize_
= {
54
{
packet_id_system_state
,
sizeof
(
system_state_packet_t
)},
55
{
packet_id_unix_time
,
sizeof
(
unix_time_packet_t
)},
56
{
packet_id_raw_sensors
,
sizeof
(
raw_sensors_packet_t
)},
57
{
packet_id_satellites
,
sizeof
(
satellites_packet_t
)},
58
{
packet_id_satellites_detailed
,
sizeof
(
detailed_satellites_packet_t
)},
59
{
packet_id_local_magnetics
,
sizeof
(
local_magnetics_packet_t
)},
60
{
packet_id_utm_position
,
sizeof
(
utm_fix
)},
61
{
packet_id_ecef_position
,
sizeof
(
ecef_position_packet_t
)},
62
{
packet_id_north_seeking_status
,
sizeof
(
north_seeking_status_packet_t
)},
63
{
packet_id_euler_orientation_standard_deviation
,
sizeof
(
euler_orientation_standard_deviation_packet_t
)},
64
{
packet_id_odometer_state
,
sizeof
(
odometer_state_packet_t
)},
65
{
packet_id_raw_gnss
,
sizeof
(
raw_gnss_packet_t
)},
66
};
67
68
// String names of struct types. Used for assurance we have received the correct packet
69
std::map<packet_id_e, std::string>
packetTypeStr_
= {
70
{
packet_id_system_state
,
typeid
(
system_state_packet_t
).name()},
71
{
packet_id_unix_time
,
typeid
(
unix_time_packet_t
).name()},
72
{
packet_id_raw_sensors
,
typeid
(
raw_sensors_packet_t
).name()},
73
{
packet_id_satellites
,
typeid
(
satellites_packet_t
).name()},
74
{
packet_id_satellites_detailed
,
typeid
(
detailed_satellites_packet_t
).name()},
75
{
packet_id_local_magnetics
,
typeid
(
local_magnetics_packet_t
).name()},
76
{
packet_id_utm_position
,
typeid
(
utm_fix
).name()},
77
{
packet_id_ecef_position
,
typeid
(
ecef_position_packet_t
).name()},
78
{
packet_id_north_seeking_status
,
typeid
(
north_seeking_status_packet_t
).name()},
79
{
packet_id_euler_orientation_standard_deviation
,
typeid
(
euler_orientation_standard_deviation_packet_t
).name()},
80
{
packet_id_odometer_state
,
typeid
(
odometer_state_packet_t
).name()},
81
{
packet_id_raw_gnss
,
typeid
(
raw_gnss_packet_t
).name()},
82
};
83
}
packet_id_raw_sensors
Definition:
spatial_packets.h:68
kvh_geo_fog_3d_global_vars.hpp
global variables used to store packet information.
packet_id_satellites_detailed
Definition:
spatial_packets.h:71
packet_id_north_seeking_status
Definition:
spatial_packets.h:111
raw_sensors_packet_t
Definition:
spatial_packets.h:392
raw_gnss_packet_t
Definition:
spatial_packets.h:402
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:69
kvh::supportedPackets_
std::set< packet_id_e > supportedPackets_
Set of packets containing all packet_id's we support.
Definition:
kvh_global_vars.cpp:37
local_magnetics_packet_t
Definition:
spatial_packets.h:581
packet_id_ecef_position
Definition:
spatial_packets.h:73
detailed_satellites_packet_t
Definition:
spatial_packets.h:476
odometer_state_packet_t
Definition:
spatial_packets.h:586
packet_id_satellites
Definition:
spatial_packets.h:70
satellites_packet_t
Definition:
spatial_packets.h:428
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:53
north_seeking_status_packet_t
Definition:
spatial_packets.h:744
unix_time_packet_t
Definition:
spatial_packets.h:305
packet_id_utm_position
Definition:
spatial_packets.h:74
packet_id_odometer_state
Definition:
spatial_packets.h:91
packet_id_raw_gnss
Definition:
spatial_packets.h:69
packet_id_euler_orientation_standard_deviation
Definition:
spatial_packets.h:66
ecef_position_packet_t
Definition:
spatial_packets.h:486
kvh
Definition:
kvh_geo_fog_3d_device_configuration.hpp:44
kvh::utm_fix
Definition:
kvh_geo_fog_3d_global_vars.hpp:51
euler_orientation_standard_deviation_packet_t
Definition:
spatial_packets.h:382
packet_id_system_state
Definition:
spatial_packets.h:60
packet_id_unix_time
Definition:
spatial_packets.h:61
packet_id_local_magnetics
Definition:
spatial_packets.h:90
system_state_packet_t
Definition:
spatial_packets.h:246
kvh_geo_fog_3d_driver
Author(s): Trevor Bostic
, Zach LaCelle
autogenerated on Fri Jan 24 2020 03:18:17