SegmentedTripAlgorithm
A decorator that adds the three corrections TieredGpsAlgorithm structurally cannot make, without touching it.
The delegate is a good per-fix classifier, but it decides each fix in isolation and against fixed thresholds. That leaves three one-sided errors on the table:
Accuracy-blind jitter gate. A 6 m step reported with 30 m accuracy is inside its own error ellipse — it is noise, not travel. A fixed 5 m gate passes it and banks it. This over-counts, always in the same direction, and worst exactly where accuracy is worst (urban canyon, tunnels mouths, dense city). A bias does not average out over a year of claims; noise does.
Trusting the wrong speed. Speed differenced from two positions divides position error by a small dt, which manufactures 40 m/s "speeds" from a parked car and defeats every speed-banded gate downstream. Doppler speed from the GNSS chipset is independent of the position error being filtered, so it is the better input when it is trustworthy.
No notion of a stop. Twenty minutes in a car park is a slow random walk that accumulates real metres one legitimate-looking step at a time. No per-fix rule can see it, because no single fix is wrong — only the sequence is.
How a window fits through a one-fix-at-a-time interface. The trick is to buffer the attribution, never the fixes. Every fix is still emitted and persisted the moment it arrives — the map draws, the route is complete, nothing is hidden from the user. Only the decision about whether those metres count is deferred until the stop is confirmed or refuted. That keeps process honest (one fix in, one result out, never retracted) while still allowing a decision that genuinely needs to see the future.
Set enableStopSuppression = false and jitterAccuracyFactor = 0.0 and this becomes bit-identical to the delegate. That is not a courtesy — it is how the parity test is written, and it is what makes "did my change help?" answerable instead of arguable.
ponytail: a decorator, not a fork. Re-implementing the delegate's Kalman/band/gap/spike logic to add three rules would double the surface that has to stay correct, and the two copies would drift.