[traffic] Dyamically determine radius in which to search for junctions

Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
mvglasow
2025-11-02 21:42:21 +02:00
parent 2b867a64a0
commit 05f6dfad7b
2 changed files with 42 additions and 5 deletions

View File

@@ -540,6 +540,16 @@ private:
*/
std::map<m2::PointD, double> m_endJunctions;
/**
* @brief Radius around reference points in which to search for junctions.
*
* Determined dynamically, based on distance between reference points.
* Maximum distance is never more than half the distance between endpoints.
* It should be between `kJunctionRadiusMin` and `kJunctionRadiusMax`, and as close as possible to
* 1/3 the distance.
*/
double m_junctionRadius;
/**
* @brief The road ref of `m_message`, parsed with `ParseRef()`
*/