etsi_its_messages v3.4.0
Loading...
Searching...
No Matches
cam_ts_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
11namespace etsi_its_cam_ts_msgs::access {
13
15
20 * where x is the longitudinal axis and y is the lateral axis of the vehicle.
21 *
22 * @param cam The CAM message to get the reference position from
23 * @return const std::array<double, 4> the covariance matrix, as specified above
24 */
25inline const std::array<double, 4> getRefPosConfidence(const CAM& cam) {
26 double object_heading = getHeading(cam) * M_PI / 180.0;
27 return getPositionConfidenceEllipse(cam.cam.cam_parameters.basic_container.reference_position.position_confidence_ellipse, object_heading);
29
39inline const std::array<double, 4> getWGSRefPosConfidence(const CAM& cam) {
40 return getWGSPositionConfidenceEllipse(cam.cam.cam_parameters.basic_container.reference_position.position_confidence_ellipse);
41}
43} // namespace etsi_its_cam_ts_msgs::access
Common getter functions for the ETSI ITS CAM (EN and TS).
std::array< double, 4 > getWGSPositionConfidenceEllipse(const PositionConfidenceEllipse &position_confidence_ellipse)
Get the covariance matrix of the position confidence ellipse.
const std::array< double, 4 > getWGSRefPosConfidence(const CAM &cam)
Get the confidence ellipse of the reference position as Covariance matrix.
const std::array< double, 4 > getRefPosConfidence(const CAM &cam)
Get the confidence ellipse of the reference position as Covariance matrix.
std::tuple< double, double, double > getPositionConfidenceEllipse(PositionConfidenceEllipse &position_confidence_ellipse)
Extract major axis length, minor axis length and orientation from the given position confidence ellip...
double getHeading(const CAM &cam)
Get the Heading value of CAM.
Getter functions for the ETSI ITS Common Data Dictionary (CDD) v2.1.1.