Mercurial Hosting > traffic-intelligence
changeset 295:ba29bd82bd04
added option to disable computation of crossing zones
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Mon, 11 Feb 2013 15:59:15 -0500 |
parents | 1f253f218b9f |
children | 586ead03fc00 |
files | python/prediction.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/python/prediction.py Fri Feb 08 18:35:24 2013 -0500 +++ b/python/prediction.py Mon Feb 11 15:59:15 2013 -0500 @@ -190,7 +190,7 @@ t += 1 return t, p1, p2 -def computeCrossingsCollisionsAtInstant(currentInstant, obj1, obj2, predictionParameters, collisionDistanceThreshold, timeHorizon, debug = False): +def computeCrossingsCollisionsAtInstant(currentInstant, obj1, obj2, predictionParameters, collisionDistanceThreshold, timeHorizon, computeCZ = False, debug = False): '''returns the lists of collision points and crossing zones Check: Predicting all the points together, as if they represent the whole vehicle''' @@ -205,7 +205,7 @@ if t <= timeHorizon: collisionPoints.append(SafetyPoint((p1+p2).multiply(0.5), et1.probability*et2.probability, t)) - else: # check if there is a crossing zone + elif computeCZ: # check if there is a crossing zone # TODO? zone should be around the points at which the traj are the closest # look for CZ at different times, otherwise it would be a collision # an approximation would be to look for close points at different times, ie the complementary of collision points