detail TODO tag
This commit is contained in:
parent
6717f07a49
commit
1baf2e39d7
2
model.py
2
model.py
@ -9,6 +9,7 @@ from geopy import distance
|
|||||||
|
|
||||||
|
|
||||||
# TODO: instead of centroid use speed and bearing of flockers to create a vector, point rider towards it
|
# TODO: instead of centroid use speed and bearing of flockers to create a vector, point rider towards it
|
||||||
|
# use time elapsed since last update, speed vector and current point to compute future location
|
||||||
class Flock:
|
class Flock:
|
||||||
"""
|
"""
|
||||||
Flock object is created from a list of agents
|
Flock object is created from a list of agents
|
||||||
@ -64,7 +65,6 @@ class Bike(Document):
|
|||||||
else:
|
else:
|
||||||
t = target
|
t = target
|
||||||
|
|
||||||
print(s, t)
|
|
||||||
return s.heading_initial(t)
|
return s.heading_initial(t)
|
||||||
|
|
||||||
def distance_to(self, point):
|
def distance_to(self, point):
|
||||||
|
|||||||
@ -39,7 +39,6 @@ def update(bike_id):
|
|||||||
|
|
||||||
bike.update(lat, lon, speed, bearing)
|
bike.update(lat, lon, speed, bearing)
|
||||||
|
|
||||||
print('d', bike.destination, bike.flock_data())
|
|
||||||
return jsonify(
|
return jsonify(
|
||||||
dest_heading=bike.heading_to([bike.destination[1],
|
dest_heading=bike.heading_to([bike.destination[1],
|
||||||
bike.destination[0]]),
|
bike.destination[0]]),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user