main
ifiguero 2025-02-27 17:41:34 -03:00
parent d08cc18a73
commit af30b31d64
1 changed files with 1 additions and 1 deletions

View File

@ -173,7 +173,7 @@ def estima_llegada(parada_distance, expedicion):
ts = int(time.time()) ts = int(time.time())
data_keys = ['trip_traveled', 'bus_id', 'trip_lat', 'trip_lon', 'trip_pos', 'ts'] data_keys = ['trip_traveled', 'bus_id', 'trip_lat', 'trip_lon', 'trip_pos', 'ts']
trip_info = dict(zip(data_keys, expedicion)) trip_info = dict(zip(data_keys, expedicion))
trip_info['bus_id'] = xxhash.xxh32(trip_info['bus_id'], seed=int(parada_distance).hexdigest() trip_info['bus_id'] = xxhash.xxh32(trip_info['bus_id'], seed=int(parada_distance)).hexdigest()
trip_info['drift'] = int(trip_info['ts']) - ts trip_info['drift'] = int(trip_info['ts']) - ts
trip_info['trip_distance'] = parada_distance - int(trip_info['trip_traveled']) trip_info['trip_distance'] = parada_distance - int(trip_info['trip_traveled'])