fix(stats): reject sub-threshold gps drift

This commit is contained in:
lingniu
2026-07-20 01:27:16 +08:00
parent 2ef027c7c2
commit 275d453954
6 changed files with 72 additions and 4 deletions

View File

@@ -622,7 +622,7 @@ ORDER BY ts ASC`, ident(cfg.TDengineDatabase), strings.Join(where, " AND "))
}
added := 0
for target, state := range states {
if state.usableSegments == 0 {
if !stats.GPSMileageCandidateEligible(state.distanceKM, state.usableSegments) {
continue
}
parts := strings.SplitN(target, "|", 2)