Change PCM rectangle to circle intersection
This commit is contained in:
parent
3b58068f78
commit
47c0e6fc46
|
|
@ -35,7 +35,7 @@ static int are_vehicles_intersecting(
|
||||||
// B2[1] = tB[b+1].longitude;
|
// B2[1] = tB[b+1].longitude;
|
||||||
|
|
||||||
// if (it2s_tender_do_segments_intersect(A1, A2, B1, B2)) {
|
// 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 &&
|
if (tA[a].timestamp < tB[b].timestamp + 2000 &&
|
||||||
tA[a].timestamp > tB[b].timestamp - 2000) {
|
tA[a].timestamp > tB[b].timestamp - 2000) {
|
||||||
*index = a;
|
*index = a;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue