changeset 698:8d99a9e16644 dev

added clarification comments
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Fri, 17 Jul 2015 14:28:14 -0400
parents 0421a5a0072c
children 0f1b6907643a
files python/prediction.py python/utils.py
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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):