Carma-platform v4.2.0
CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication.
carma_cooperative_perception::Position3D Struct Reference

#include <j2735_types.hpp>

Collaboration diagram for carma_cooperative_perception::Position3D:
Collaboration graph

Static Public Member Functions

static auto from_msg (const j2735_v2x_msgs::msg::Position3D &msg) -> Position3D
 
static auto from_msg (const carma_v2x_msgs::msg::Position3D &msg) -> Position3D
 

Public Attributes

units::angle::deci_micro_degrees_t latitude {0.0}
 
units::angle::deci_micro_degrees_t longitude {0.0}
 
std::optional< units::length::deca_centimeters_t > elevation
 

Detailed Description

Definition at line 63 of file j2735_types.hpp.

Member Function Documentation

◆ from_msg() [1/2]

auto carma_cooperative_perception::Position3D::from_msg ( const carma_v2x_msgs::msg::Position3D &  msg) -> Position3D
static

Definition at line 88 of file j2735_types.cpp.

89{
90 Position3D position{
91 units::angle::degree_t{static_cast<double>(msg.latitude)},
92 units::angle::degree_t{static_cast<double>(msg.longitude)}, std::nullopt};
93
94 if (msg.elevation_exists) {
95 position.elevation = units::length::meter_t{static_cast<double>(msg.elevation)};
96 }
97
98 return position;
99}

References elevation.

◆ from_msg() [2/2]

auto carma_cooperative_perception::Position3D::from_msg ( const j2735_v2x_msgs::msg::Position3D &  msg) -> Position3D
static

Definition at line 75 of file j2735_types.cpp.

76{
77 Position3D position{
78 units::angle::deci_micro_degrees_t{static_cast<double>(msg.latitude)},
79 units::angle::deci_micro_degrees_t{static_cast<double>(msg.longitude)}, std::nullopt};
80
81 if (msg.elevation_exists) {
82 position.elevation = units::length::deca_centimeters_t{static_cast<double>(msg.elevation)};
83 }
84
85 return position;
86}

References elevation.

Referenced by carma_cooperative_perception::to_detection_list_msg().

Here is the caller graph for this function:

Member Data Documentation

◆ elevation

std::optional<units::length::deca_centimeters_t> carma_cooperative_perception::Position3D::elevation

Definition at line 67 of file j2735_types.hpp.

Referenced by from_msg().

◆ latitude

units::angle::deci_micro_degrees_t carma_cooperative_perception::Position3D::latitude {0.0}

Definition at line 65 of file j2735_types.hpp.

◆ longitude

units::angle::deci_micro_degrees_t carma_cooperative_perception::Position3D::longitude {0.0}

Definition at line 66 of file j2735_types.hpp.


The documentation for this struct was generated from the following files: