Interactive Compass Demo

Experience the same algorithms running on SideQuester hardware

Heading:
Direction: N
Distance: 0 m
Bearing:

🎮 Controls

Simulate compass and GPS data

0.08

📍 GPS Positions

Your Location

Friend's Location

ℹ️ 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

  1. Adjust Your Heading: Use the slider to simulate rotating your device (like a compass needle)
  2. Set GPS Positions: Enter coordinates for you and your friend, or use presets
  3. Calculate: The demo calculates distance and bearing between the two positions
  4. 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...