Mercurial Hosting > traffic-intelligence
comparison trafficintelligence/moving.py @ 1111:345cd9cd62d8
ideas
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Mon, 06 May 2019 17:13:13 -0400 |
parents | 6bbcd9433732 |
children | 956a66096e91 |
comparison
equal
deleted
inserted
replaced
1110:6bbcd9433732 | 1111:345cd9cd62d8 |
---|---|
1306 self.initialAlignmentIdx = initialAlignmentIdx | 1306 self.initialAlignmentIdx = initialAlignmentIdx |
1307 self.timeAtS0 = None # time at which the vehicle's position is s=0 on the alignment | 1307 self.timeAtS0 = None # time at which the vehicle's position is s=0 on the alignment |
1308 | 1308 |
1309 def updateCurvilinearPositions(self, method, instant, timeStep, _nextAlignmentIdx = None, maxSpeed = None, acceleration = None): | 1309 def updateCurvilinearPositions(self, method, instant, timeStep, _nextAlignmentIdx = None, maxSpeed = None, acceleration = None): |
1310 '''Update curvilinear position of user at new instant''' | 1310 '''Update curvilinear position of user at new instant''' |
1311 # TODO changer nextAlignmentIdx pour l'alignment en cours, reflechir pour des control devices | |
1311 | 1312 |
1312 if method == 'newell': | 1313 if method == 'newell': |
1313 if self.curvilinearPositions is None: # vehicle without positions | 1314 if self.curvilinearPositions is None: # vehicle without positions |
1314 if self.timeAtS0 is None: | 1315 if self.timeAtS0 is None: |
1315 if self.leader is None: | 1316 if self.leader is None: |