Interactive Compass Demo
Experience the same algorithms running on SideQuester hardware
Heading:
0°
Direction:
N
Distance:
0 m
Bearing:
0°
📍 GPS Positions
ℹ️ Algorithm Info
Heading: atan2(y, x) × 180/π
Distance: Haversine formula
Bearing: Initial bearing calculation
Smoothing: Exponential moving average
⚡ Powered by Rust + WebAssembly
What You're Seeing
✓ Real Algorithms
Same code running on ESP32 hardware
✓ Live Calculations
Distance, bearing, and heading in real-time
✓ Smoothing Filter
Exponential smoothing with dead zone
✓ WebAssembly
Rust compiled to WASM for performance
How This Demo Works
- Adjust Your Heading: Use the slider to simulate rotating your device (like a compass needle)
- Set GPS Positions: Enter coordinates for you and your friend, or use presets
- Calculate: The demo calculates distance and bearing between the two positions
- Watch the Compass: The red arrow shows the direction to your friend relative to your heading
On actual hardware, GPS provides real coordinates and the magnetometer provides heading automatically!
Loading WebAssembly module...