You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
More realistic GPS simulation with consistent lateral offset
Current Behavior
The current simulated location provider follows route coordinates exactly, which doesn't reflect real-world GPS behavior. This makes it difficult to properly test route-snapping and other location-based features under realistic conditions.
Proposed Changes
Add support for simulated GPS inaccuracy by implementing consistent lateral offset from the route line.
The text was updated successfully, but these errors were encountered:
the idea of this is to add lateral jitter to the simulated location and give the user full control over it by
adding support for configurable GPS bias simulation through a type-safe enum:
pubenumLocationBias{Left(f64),// meters offset to the left of routeRight(f64),// meters offset to the right of routeRandom(f64),// randomly alternate between left/right with given radiusNone,// exact route following (current behavior)}
the end user would use it in this way:
letprovider=SimulatedLocationProvider()
// Test left-biased GPS behavior (4 meters to the left)
try provider.setSimulatedRoute(route, resampleDistance:10, bias:.left(4.0))
// Or test right-biased behavior
try provider.setSimulatedRoute(route, resampleDistance:10, bias:.right(4.0))
// Or exact route following
try provider.setSimulatedRoute(route, resampleDistance:10) // Default behavior bias: .none
More realistic GPS simulation with consistent lateral offset
Current Behavior
The current simulated location provider follows route coordinates exactly, which doesn't reflect real-world GPS behavior. This makes it difficult to properly test route-snapping and other location-based features under realistic conditions.
Proposed Changes
Add support for simulated GPS inaccuracy by implementing consistent lateral offset from the route line.
The text was updated successfully, but these errors were encountered: