# HG changeset patch # User Nicolas Saunier # Date 1437157694 14400 # Node ID 8d99a9e16644628d2012da03f35fff268ad9285f # Parent 0421a5a0072cba6ac6f39d9a234c600872201e57 added clarification comments diff -r 0421a5a0072c -r 8d99a9e16644 python/prediction.py --- a/python/prediction.py Fri Jul 17 14:22:45 2015 -0400 +++ b/python/prediction.py Fri Jul 17 14:28:14 2015 -0400 @@ -492,7 +492,8 @@ class CVDirectPredictionParameters(PredictionParameters): '''Prediction parameters of prediction at constant velocity - using direct computation of the intersecting point''' + using direct computation of the intersecting point + Warning: the computed time to collision may be higher than timeHorizon (not used)''' def __init__(self): PredictionParameters.__init__(self, 'constant velocity (direct computation)', None) @@ -548,7 +549,8 @@ class CVExactPredictionParameters(PredictionParameters): '''Prediction parameters of prediction at constant velocity - using direct computation of the intersecting point (solving for the equation''' + using direct computation of the intersecting point (solving the equation) + Warning: the computed time to collision may be higher than timeHorizon (not used)''' def __init__(self): PredictionParameters.__init__(self, 'constant velocity (direct exact computation)', None) diff -r 0421a5a0072c -r 8d99a9e16644 python/utils.py --- a/python/utils.py Fri Jul 17 14:22:45 2015 -0400 +++ b/python/utils.py Fri Jul 17 14:28:14 2015 -0400 @@ -240,6 +240,7 @@ return ceil(v*tens)/tens def inBetween(bound1, bound2, x): + 'useful if one does not know the order of bound1/bound2' return bound1 <= x <= bound2 or bound2 <= x <= bound1 def pointDistanceL2(x1,y1,x2,y2):