    

 ## On this page

  

 

 # simulation\_framework::evaluator::DistanceDrivenCalculator Class Reference

 Last update: 16.07.2025 

class [DistanceDrivenCalculator](classsimulation__framework_1_1evaluator_1_1DistanceDrivenCalculator.xhtml "class DistanceDrivenCalculator") [More...](classsimulation__framework_1_1evaluator_1_1DistanceDrivenCalculator.xhtml#details)

`#include <<a class="el" href="distance__calculator_8h_source.xhtml">distance_calculator.h</a>>`

## <a name="pub-methods"></a>Public Member Functions

<a id="a0dc0d0277ea854d8ce9d6a3c1e815d4f"></a>double **Calculate** (const avx\_osi3::GroundTruth &amp;ground\_truth) <a id="details" name="details"></a>## Detailed Description

class [DistanceDrivenCalculator](classsimulation__framework_1_1evaluator_1_1DistanceDrivenCalculator.xhtml "class DistanceDrivenCalculator")

[DistanceDrivenCalculator](classsimulation__framework_1_1evaluator_1_1DistanceDrivenCalculator.xhtml "class DistanceDrivenCalculator") class to calculate the total distance covered/driven by an Ego car based on osi GroundTruth Algorithm explaination:

1. Find out the Ego vehicle index within MovingObject list from GroundTruth and compute the BoundingBox
2. Get the position of Ego vehicle at each time interval/step.
3. Calculate the Eucledian distance between two positions of Ego vehicle(at given time stamp)
4. Make the sum of all the distances calculated(For each time step)
5. One of the possible validation method could be to calculate distance from Formulas based on the Average car Velocity and total travel Time. And compare the result with distance calculated using Euclidean method.
6. For now, we have added a few tests based on hard-coded values of position, which helps to confirm/validate the basic logic of distance driven caluclation.



---

The documentation for this class was generated from the following files:- [distance\_calculator.h](distance__calculator_8h_source.xhtml)
- distance\_calculator.cpp