From 47c0e6fc46957498a1c3baa6c6b8da2ed2fa669f Mon Sep 17 00:00:00 2001 From: emanuel Date: Fri, 8 Apr 2022 15:44:37 +0000 Subject: [PATCH] Change PCM rectangle to circle intersection --- src/pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pcm.c b/src/pcm.c index a76821d..718c0c8 100644 --- a/src/pcm.c +++ b/src/pcm.c @@ -35,7 +35,7 @@ static int are_vehicles_intersecting( // B2[1] = tB[b+1].longitude; // if (it2s_tender_do_segments_intersect(A1, A2, B1, B2)) { - if (it2s_tender_is_inside_rectangle(tA[a].latitude, tA[a].longitude, tB[b].latitude, tB[b].longitude, 8, 8, 0, DCM_HAVERSINE)) { + if (it2s_tender_is_inside_circle(tA[a].latitude, tA[a].longitude, tB[b].latitude, tB[b].longitude, 8, DCM_HAVERSINE)) { if (tA[a].timestamp < tB[b].timestamp + 2000 && tA[a].timestamp > tB[b].timestamp - 2000) { *index = a;