Spaces:
Runtime error
Runtime error
Commit
·
42d4711
1
Parent(s):
6b53a1a
round lat lon
Browse files
main.py
CHANGED
@@ -167,7 +167,7 @@ def compute_accelerations(telemetry):
|
|
167 |
lon_acc = remove_acceleration_outliers(lon_acc)
|
168 |
lat_acc = remove_acceleration_outliers(lat_acc)
|
169 |
|
170 |
-
return lon_acc, lat_acc
|
171 |
|
172 |
@st.cache_data
|
173 |
@app.get("/", response_model=None)
|
@@ -301,8 +301,8 @@ def telemetry_data(year: int, event: str | int, session: str, driver: str, lap_n
|
|
301 |
telemetry = selected_lap.get_telemetry()
|
302 |
|
303 |
lon_acc, lat_acc = compute_accelerations(telemetry)
|
304 |
-
telemetry["lon_acc"] =
|
305 |
-
telemetry["lat_acc"] =
|
306 |
|
307 |
telemetry['Time'] = telemetry['Time'].dt.total_seconds()
|
308 |
|
|
|
167 |
lon_acc = remove_acceleration_outliers(lon_acc)
|
168 |
lat_acc = remove_acceleration_outliers(lat_acc)
|
169 |
|
170 |
+
return np.round(lon_acc,2), np.round(lat_acc,2)
|
171 |
|
172 |
@st.cache_data
|
173 |
@app.get("/", response_model=None)
|
|
|
301 |
telemetry = selected_lap.get_telemetry()
|
302 |
|
303 |
lon_acc, lat_acc = compute_accelerations(telemetry)
|
304 |
+
telemetry["lon_acc"] = lon_acc
|
305 |
+
telemetry["lat_acc"] = lat_acc
|
306 |
|
307 |
telemetry['Time'] = telemetry['Time'].dt.total_seconds()
|
308 |
|