Mercurial Hosting > traffic-intelligence
comparison python/ubc_utils.py @ 16:9d6831cfe675
added tools for speed
author | Nicolas Saunier <nico@confins.net> |
---|---|
date | Wed, 18 Nov 2009 18:36:52 -0500 |
parents | 30559b2cf7a9 |
children | 28e546861263 |
comparison
equal
deleted
inserted
replaced
14:e7bbe8465591 | 16:9d6831cfe675 |
---|---|
34 add = True | 34 add = True |
35 if (len(lines) >= 3): | 35 if (len(lines) >= 3): |
36 obj.positions = Trajectory([[float(n) for n in lines[1].split(' ')], | 36 obj.positions = Trajectory([[float(n) for n in lines[1].split(' ')], |
37 [float(n) for n in lines[2].split(' ')]]) | 37 [float(n) for n in lines[2].split(' ')]]) |
38 if (len(lines) >= 5): | 38 if (len(lines) >= 5): |
39 obj.velocity = Trajectory([[float(n) for n in lines[3].split(' ')], | 39 obj.velocities = Trajectory([[float(n) for n in lines[3].split(' ')], |
40 [float(n) for n in lines[4].split(' ')]]) | 40 [float(n) for n in lines[4].split(' ')]]) |
41 | 41 |
42 if len(lines) != 2: | 42 if len(lines) != 2: |
43 objects.append(obj) | 43 objects.append(obj) |
44 objNum+=1 | 44 objNum+=1 |