Mercurial Hosting > traffic-intelligence
changeset 602:480c8edf177e
condition to make the minTTC is zero not 1 -need to refine-
author | Mohamed Gomaa |
---|---|
date | Thu, 02 May 2013 11:37:24 -0400 |
parents | e1f3b789c632 |
children | c7ece0f0ced9 |
files | python/prediction.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/python/prediction.py Thu May 02 11:35:45 2013 -0400 +++ b/python/prediction.py Thu May 02 11:37:24 2013 -0400 @@ -204,6 +204,7 @@ Index=np.unravel_index(distance.argmin(), distance.shape) involvedPosition1= p1[Index[0]] involvedPosition2= p2[Index[1]] + t=[0 if t==1 else t][0] # condition to make the minimum value equal zero (Need to refine) return t, involvedPosition1, involvedPosition2 else: t = 1 @@ -213,6 +214,7 @@ p1 = predictedTrajectory1.predictPosition(t) p2 = predictedTrajectory2.predictPosition(t) t += 1 + t=[0 if t==1 else t][0] # condition to make the minimum value equal zero (Need to refine) return t, p1, p2 def computeCrossingsCollisionsAtInstant(currentInstant, obj1, obj2, predictionParameters, collisionDistanceThreshold, timeHorizon, computeCZ = False, debug = False, asWholeVehicle=False):