etsi_its_messages
v3.5.0
Toggle main menu visibility
Loading...
Searching...
No Matches
cam_getters.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
// Copyright Institute for Automotive Engineering (ika), RWTH Aachen University
3
8
9
#pragma once
10
11
namespace
etsi_its_cam_msgs::access {
12
#include <
etsi_its_msgs_utils/impl/cdd/cdd_v1-3-1_getters.h
>
13
20
inline
double
getLongitudinalAcceleration
(
const
LongitudinalAcceleration& longitudinal_acceleration) {
21
return
((
double
)longitudinal_acceleration.longitudinal_acceleration_value.value) * 1e-1;
22
}
23
30
inline
double
getLongitudinalAccelerationConfidence
(
const
LongitudinalAcceleration& longitudinal_acceleration) {
31
return
((
double
)longitudinal_acceleration.longitudinal_acceleration_confidence.value) * 1e-1 / etsi_its_msgs::ONE_D_GAUSSIAN_FACTOR;
32
}
33
40
inline
double
getLateralAcceleration
(
const
LateralAcceleration& lateral_acceleration) {
41
return
((
double
)lateral_acceleration.lateral_acceleration_value.value) * 1e-1;
42
}
43
46
48
* @return double standard deviation of the lateral acceleration in m/s^2 as decimal number
49
*/
50
inline
double
getLateralAccelerationConfidence
(
const
LateralAcceleration& lateral_acceleration) {
51
return
((
double
)lateral_acceleration.lateral_acceleration_confidence.value) * 1e-1 / etsi_its_msgs::ONE_D_GAUSSIAN_FACTOR;
52
}
53
54
#include <
etsi_its_msgs_utils/impl/cam/cam_getters_common.h
>
55
62
* @param cam The CAM message to get the reference position from
63
* @return const std::array<double, 4> the covariance matrix, as specified above
64
*/
65
inline
const
std::array<double, 4>
getRefPosConfidence
(
const
CAM& cam) {
66
double
object_heading =
getHeading
(cam) * M_PI / 180.0;
67
return
getPosConfidenceEllipse
(cam.cam.cam_parameters.basic_container.reference_position.position_confidence_ellipse, object_heading);
68
}
69
72
72
*
73
* The covariance matrix will have the entries cov_xx, cov_xy, cov_yx, cov_yy
74
* where x is WGS84 North and y is East
75
*
76
* @param cam The CAM message to get the reference position from
77
* @return const std::array<double, 4> the covariance matrix, as specified above
78
*/
79
inline
const
std::array<double, 4>
getWGSRefPosConfidence
(
const
CAM& cam) {
80
return
getWGSPosConfidenceEllipse
(cam.cam.cam_parameters.basic_container.reference_position.position_confidence_ellipse);
81
}
82
83
}
// namespace etsi_its_cam_msgs::access
etsi_its_cam_msgs::access::getLongitudinalAccelerationConfidence
double getLongitudinalAccelerationConfidence(const LongitudinalAcceleration &longitudinal_acceleration)
Get the Longitudinal Acceleration Confidence.
Definition
cam_getters.h:30
etsi_its_cam_msgs::access::getRefPosConfidence
const std::array< double, 4 > getRefPosConfidence(const CAM &cam)
Get the confidence ellipse of the reference position as Covariance matrix.
Definition
cam_getters.h:65
etsi_its_cam_msgs::access::getWGSPosConfidenceEllipse
std::array< double, 4 > getWGSPosConfidenceEllipse(const PosConfidenceEllipse &position_confidence_ellipse)
Get the covariance matrix of the position confidence ellipse.
Definition
cam_getters.h:276
etsi_its_cam_msgs::access::getLateralAcceleration
double getLateralAcceleration(const LateralAcceleration &lateral_acceleration)
Get the lateral acceleration.
Definition
cam_getters.h:40
etsi_its_cam_msgs::access::getWGSRefPosConfidence
const std::array< double, 4 > getWGSRefPosConfidence(const CAM &cam)
Get the confidence ellipse of the reference position as Covariance matrix.
Definition
cam_getters.h:79
etsi_its_cam_msgs::access::getLateralAccelerationConfidence
double getLateralAccelerationConfidence(const LateralAcceleration &lateral_acceleration)
Get the Lateral Acceleration Confidence.
Definition
cam_getters.h:50
etsi_its_cam_msgs::access::getPosConfidenceEllipse
std::tuple< double, double, double > getPosConfidenceEllipse(const PosConfidenceEllipse &position_confidence_ellipse)
Extract major axis length, minor axis length and orientation from the given position confidence ellip...
Definition
cam_getters.h:202
etsi_its_cam_msgs::access::getLongitudinalAcceleration
double getLongitudinalAcceleration(const LongitudinalAcceleration &longitudinal_acceleration)
Get the longitudinal acceleration.
Definition
cam_getters.h:20
etsi_its_cam_msgs::access::getHeading
double getHeading(const CAM &cam)
Get the Heading value of CAM.
Definition
cam_getters.h:84
cam_getters_common.h
Common getter functions for the ETSI ITS CAM (EN and TS).
cdd_v1-3-1_getters.h
Getter functions for the ETSI ITS Common Data Dictionary (CDD) v1.3.1.
etsi_its_msgs_utils
include
etsi_its_msgs_utils
impl
cam
cam_getters.h
Generated by
1.17.0