Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-du-car committed Aug 27, 2024
1 parent 28ffe11 commit 49b95ae
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace MUSTSensorDriverPlugin {
detectedObject.set_objectId(detection.trackID);
tmx::messages::Position pos(detection.position_x, detection.position_y, 0);
detectedObject.set_position(pos);
detectedObject.set_confidence(detection.confidence/PERCENTAGE_TO_DECIMAL);
detectedObject.set_confidence(detection.confidence/100.0);
detectedObject.set_timestamp(static_cast<long>(detection.timestamp*1000)); // convert decimal seconds to int milliseconds.
detectedObject.set_velocity(headingSpeedToVelocity(detection.heading, detection.speed));
detectedObject.set_type(detectionClassificationToSensorDetectedObjectType(detection.cl));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ namespace MUSTSensorDriverPlugin {
DetectionSize size = DetectionSize::NA;
// Confidence in type
double confidence = 0;
int PERCENTAGE_TO_DECIMAL = 100.0;
// Unique ID
unsigned int trackID = 0;
// Timestamp in seconds
Expand Down

0 comments on commit 49b95ae

Please sign in to comment.