Geospatial & Location ServicesReal-time Location TrackingMedium⏱️ ~3 min

Data Validation and Anomaly Detection

Common Data Quality Issues

GPS drift: Device reports position 100 meters from actual location. Caused by poor signal, urban canyons, indoor positioning. A parked driver appears to jump around.

Teleportation: Position jumps impossibly far between updates. Device switched from GPS to cell tower estimation. Or replay attack sending old cached positions.

Impossible speed: Two updates 5 seconds apart show 10 km distance. That is 7200 km/h. GPS glitch or fraudulent data.

Validation Rules

Bounding box: Position must be within service area. Reject coordinates in the ocean or outside operating region.

Speed limit: Distance between consecutive positions divided by time interval must be plausible. Maximum 200 km/h for cars, 50 km/h for bikes, 10 km/h for walking.

Accuracy threshold: GPS reports accuracy estimate. Reject positions with accuracy worse than 100 meters. Or store but flag as low confidence.

Anomaly Detection

Kalman filtering: Smooth position estimates using physics model. Predict next position from velocity. Weight actual measurement against prediction. Reduces noise and catches implausible jumps.

Historical patterns: Learn typical behavior per entity. A driver who usually works downtown suddenly appearing at the airport might be legitimate or might be GPS spoof. Flag for review if pattern differs significantly.

Clustering: If many devices in an area report similar anomalies simultaneously, likely a GPS disruption event, not individual fraud. Handle differently than isolated anomalies.

✅ Best Practice: Validate and smooth positions before using in business logic. Reject or flag implausible data. Use Kalman filtering for smoothing. Log rejected data for fraud analysis. Do not let bad GPS data cause wrong ETA or incorrect billing.
💡 Key Takeaways
GPS drift, teleportation, and impossible speed are common data quality issues
Validate: bounding box, speed limit, accuracy threshold
Kalman filtering smooths noise and catches implausible jumps
Historical patterns detect unusual behavior for fraud review
Clustered anomalies suggest GPS disruption, not individual fraud
📌 Interview Tips
1Calculate impossible speed: 10 km in 5 seconds is 7200 km/h; reject this update
2Explain Kalman filter: predict position from velocity, blend with measurement, output smoothed estimate
3If 100 devices near an airport all show drift simultaneously, suspect GPS jamming rather than fraud
← Back to Real-time Location Tracking Overview