Switch to haversine in DCM intersection check
This commit is contained in:
parent
148eb02636
commit
bf2ba4604c
|
|
@ -34,7 +34,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_VINCENTY)) {
|
||||
if (it2s_tender_is_inside_rectangle(tA[a].latitude, tA[a].longitude, tB[b].latitude, tB[b].longitude, 8, 8, 0, DCM_HAVERSINE)) {
|
||||
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-tA[0].timestamp);
|
||||
|
|
|
|||
Loading…
Reference in New Issue