Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f6384e1ebd
@ -104,8 +104,12 @@ class Vehicle:
|
||||
|
||||
:return: True if NCE invoked, otherwise False
|
||||
"""
|
||||
d = geopy.distance.distance(kilometers=0.4)
|
||||
tl2_loc = geopy.Point(47.90937, 16.20814)
|
||||
# Calculate point 400m south of traffic light 2
|
||||
nce_point = d.destination(point=tl2_loc, bearing=182)
|
||||
if self._nce_possible and not self._nce_happened:
|
||||
if self._driven_kms >= NCE_KM:
|
||||
if self._gps_location.latitude >= nce_point.latitude:
|
||||
self._nce_happened = True
|
||||
self._last_velocity = self.velocity
|
||||
self.velocity = 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user