Aggregate statistics are now computed in the database.

This commit is contained in:
Dennis Guse
2025-11-05 20:10:42 +01:00
parent ca64f2c749
commit 221b61c7f1
12 changed files with 197 additions and 304 deletions
@@ -19,6 +19,8 @@ public record Distance(double distance_m) {
return Distance.of((double) distance_m);
}
}
@Deprecated //TODO Remove
public static Distance of(String distance_m) {
return of(Float.parseFloat(distance_m));
}
@@ -20,6 +20,7 @@ public record Speed(double speed_mps) {
return new Speed(speed_mps);
}
@Deprecated //TODO Remove
public static Speed of(String speed_mps) {
return of(Float.parseFloat(speed_mps));
}
@@ -35,9 +35,6 @@ public record Statistics(
}
public Speed getAverageSpeed() {
if (totalTime.isZero()) {
return Speed.ZERO;
}
return Speed.of(totalDistance, totalTime);
}