enconding fixes
Signed-off-by: Tiago Garcia <tiago.rgarcia@av.it.pt>
This commit is contained in:
parent
b249bc0ed2
commit
16f608faec
|
@ -348,7 +348,8 @@ namespace v2x
|
||||||
bvc.yawRate.yawRateConfidence = YawRateConfidence_unavailable;
|
bvc.yawRate.yawRateConfidence = YawRateConfidence_unavailable;
|
||||||
// ------------------------------
|
// ------------------------------
|
||||||
|
|
||||||
RCLCPP_INFO(node_->get_logger(), "[CamApplication::send] Sending CAM from station with ID %ld with generationDeltaTime %ld", stationId_, cam.generationDeltaTime);
|
RCLCPP_INFO(node_->get_logger(), "[CamApplication::send] Sending CAM from station with ID %ld with generationDeltaTime %ld, latitude %f, longitude %f, altitude %f",
|
||||||
|
stationId_, cam.generationDeltaTime, ego_.latitude, ego_.longitude, ego_.altitude);
|
||||||
std::unique_ptr<geonet::DownPacket> payload{new geonet::DownPacket()};
|
std::unique_ptr<geonet::DownPacket> payload{new geonet::DownPacket()};
|
||||||
payload->layer(OsiLayer::Application) = std::move(message);
|
payload->layer(OsiLayer::Application) = std::move(message);
|
||||||
|
|
||||||
|
|
|
@ -440,7 +440,6 @@ namespace v2x {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CpmApplication::send() {
|
void CpmApplication::send() {
|
||||||
|
|
||||||
if (is_sender_) {
|
if (is_sender_) {
|
||||||
|
|
||||||
sending_ = true;
|
sending_ = true;
|
||||||
|
@ -449,6 +448,8 @@ namespace v2x {
|
||||||
|
|
||||||
// RCLCPP_INFO(node_->get_logger(), "[CpmApplication::send] Sending CPM...");
|
// RCLCPP_INFO(node_->get_logger(), "[CpmApplication::send] Sending CPM...");
|
||||||
|
|
||||||
|
std::chrono::milliseconds now_ms = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch());
|
||||||
|
|
||||||
vanetza::asn1::Cpm message;
|
vanetza::asn1::Cpm message;
|
||||||
|
|
||||||
// ITS PDU Header
|
// ITS PDU Header
|
||||||
|
@ -461,8 +462,7 @@ namespace v2x {
|
||||||
|
|
||||||
// Set GenerationTime
|
// Set GenerationTime
|
||||||
RCLCPP_INFO(node_->get_logger(), "[CpmApplication::send] %ld", gdt_timestamp_);
|
RCLCPP_INFO(node_->get_logger(), "[CpmApplication::send] %ld", gdt_timestamp_);
|
||||||
//asn_long2INTEGER(&cpm.generationTime, (long) gdt_timestamp_);
|
cpm.generationDeltaTime = (now_ms.count() - 1072915200000) % 65536;
|
||||||
cpm.generationDeltaTime = gdt_timestamp_;
|
|
||||||
|
|
||||||
CpmManagementContainer_t &management = cpm.cpmParameters.managementContainer;
|
CpmManagementContainer_t &management = cpm.cpmParameters.managementContainer;
|
||||||
management.stationType = StationType_passengerCar;
|
management.stationType = StationType_passengerCar;
|
||||||
|
|
Loading…
Reference in New Issue