Average-speed zones
An average-speed zone (also called a section-control zone) doesn't measure your speed at a single point. It measures how long you take to travel between two points and works out your average speed over the whole section. You can be under the limit at every camera and still be fined on the math.
TollTracker does two things here that a normal camera warning can't: it maps every section, and it measures your own average speed live as you drive through, so you know where you stand before the exit.
Key terms
- Section: a stretch of road between two control points (cameras/gantries) with a known length.
- Polyline: the sequence of GPS coordinates that defines the exact path of the section.
- Map matching: snapping your GPS points to the road for a more accurate distance.
- Projection onto the polyline: finding the closest point on the road line to your GPS position.
1. How enforcement calculates average speed
Enforcement systems use the classic average-speed formula:
where:
— the pre-measured length of the section (in metres) — the time between passing the entry and exit cameras (in seconds) - Conversion:
The process:
- Entry detection: the entry camera reads your plate and records the time.
- Exit detection: the exit camera reads the same plate and records the exit time.
- Calculation: the exact (pre-measured) section length and the time difference give the average speed.
- Violation handling: if the average exceeds the limit plus tolerance, a fine is issued.
2. How the app measures your average speed while driving
TollTracker uses a smart algorithm that works in real time with high accuracy.
2.1 Section detection
The app continuously checks your GPS position against the section database:
For each section:
distance = shortest distance to the section polyline
if distance < 100 metres:
the driver is inside this section2.2 Direction of travel
On entering a section, the direction is determined:
- The distance to each end of the section (A and B) is calculated.
- Close to end A (< 10% of length or < 300 m): travelling A→B.
- Close to end B: travelling B→A.
- Close to neither end: the session is rejected (you probably joined from a side road).
2.3 Two ways to calculate speed
The app runs two parallel methods and blends them intelligently.
Method 1 — distance / time
averageSpeedByFormula = realDistanceTravelled / timeElapsedWorking out the real distance travelled:
- Your current GPS position is projected onto the section polyline.
- The distance from that projected point to each end is calculated.
- Based on direction:
realDistance = segmentLength - distanceToDestination. - As a fallback, the cumulative distance from GPS points is used.
Method 2 — average of GPS speed readings
averageSpeedFromSpeedReadings = sum(allGpsSpeedReadings) / count(readings)All GPS speed readings are collected and averaged.
2.4 Blending the two methods
For maximum accuracy, a weighted average shifts as you progress through the section:
- Start (progress 0%): 100% GPS readings, 0% formula
- Middle (progress 50%): 75% GPS readings, 25% formula
- End (progress 100%): 50% GPS readings, 50% formula
2.5 Why this works well
- GPS speeds are good over short intervals but accumulate error.
- The S/t formula is accurate over long distances but noisy at the start because of GPS inaccuracy.
- The blend takes the strengths of both.
- Projection onto the polyline removes errors from GPS "jumps" off the road.
- Entry validation guarantees the measurement starts from the right place.
2.6 Real-time warnings
The app warns you when:
- your average speed exceeds the limit plus tolerance, and
- you've covered at least a configurable percentage of the section, and
- enough seconds have passed since the last warning.
3. Worked example
Enforcement method:
| Section | Length | Entry | Exit | Time | Average |
|---|---|---|---|---|---|
| Example section | 5.8 km | 10:15:12 | 10:18:24 | 192 s | 108.75 km/h |
v_avg = 5800 m / 192 s × 3.6 = 108.75 km/hIn the app, mid-drive:
At 30% through the section:
- Real distance travelled: 1,740 m (via polyline projection)
- Time elapsed: 58 s
- GPS speeds: ~110 km/h average
- Formula S/t: 1740 m / 58 s × 3.6 = 108 km/h
- Weights: 65% GPS + 35% formula = 109 km/h
At 80% through the section:
- Real distance travelled: 4,640 m
- Time elapsed: 154 s
- GPS speeds: ~110 km/h average
- Formula S/t: 4640 m / 154 s × 3.6 = 108.5 km/h
- Weights: 60% GPS + 40% formula = 109.2 km/h
Data & privacy
- Raw GPS points are kept locally and briefly; only aggregated trip data is stored for your history.
- No personal records or GPS traces are uploaded.
- All calculations run on your device. More on privacy →
Coverage
Average-speed sections are mapped where TollTracker's coverage is deepest first, and rolling out to more countries. See the coverage page or the public map.
