comparison python/prediction.py @ 888:40994bb43148

corrected bug
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 22 Mar 2017 10:50:39 -0400
parents 8ba82b371eea
children 063d1267585d
comparison
equal deleted inserted replaced
887:e2452abba0e7 888:40994bb43148
569 intersection = moving.intersection(p1, p1+v1, p2, p2+v2) 569 intersection = moving.intersection(p1, p1+v1, p2, p2+v2)
570 570
571 if intersection is not None: 571 if intersection is not None:
572 ttc = moving.Point.timeToCollision(p1, p2, v1, v2, collisionDistanceThreshold) 572 ttc = moving.Point.timeToCollision(p1, p2, v1, v2, collisionDistanceThreshold)
573 if ttc is not None: 573 if ttc is not None:
574 collisionPoints = SafetyPoint(intersection, 1., ttc) 574 collisionPoints = [SafetyPoint(intersection, 1., ttc)]
575 else: 575 else:
576 pass # compute pPET 576 pass # compute pPET
577 577
578 return currentInstant, collisionPoints, crossingZones 578 return currentInstant, collisionPoints, crossingZones
579 579