From 13a3a7a943c82b63c3c91cfd7cedee063b446eec Mon Sep 17 00:00:00 2001 From: emanuel Date: Wed, 9 Feb 2022 12:30:38 +0000 Subject: [PATCH] Remove unecessary DCM path intersect check var --- src/dcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dcm.c b/src/dcm.c index 0ed7db0..2ea5d2f 100644 --- a/src/dcm.c +++ b/src/dcm.c @@ -10,7 +10,7 @@ #define SLEEP_TIME_MS 100 -static int are_paths_intersecting(it2s_tender_st_s* tA, int tA_len, it2s_tender_st_s* tB, int tB_len, uint64_t now) { +static int are_paths_intersecting(it2s_tender_st_s* tA, int tA_len, it2s_tender_st_s* tB, int tB_len) { // TODO check first time intersection, then the spacial trajectory @@ -32,7 +32,7 @@ static int are_paths_intersecting(it2s_tender_st_s* tA, int tA_len, it2s_tender_ if (it2s_tender_do_segments_intersect(A1, A2, B1, B2)) { if (tA[a].timestamp < tB[b].timestamp + 2000 && tA[a].timestamp > tB[b].timestamp - 2000) { - syslog_info("[facilities] [dc] intersecting @ (%d, %d) in %ld ms", tA[a].latitude, tA[a].longitude, tA[a].timestamp-now); + syslog_info("[facilities] [dc] intersecting @ (%d, %d) in %ld ms", tA[a].latitude, tA[a].longitude, tA[a].timestamp-tA[0].timestamp); return 1; } } @@ -81,7 +81,7 @@ int dcm_check(void* fc, DCM_t* dcm) { } if (trajectoryA_len > 1 && trajectoryB_len > 1) { - are_paths_intersecting(trajectoryA, trajectoryA_len, trajectoryB, trajectoryB_len, now); + are_paths_intersecting(trajectoryA, trajectoryA_len, trajectoryB, trajectoryB_len); } cleanup: