Distance to North Pole Web App

A simple web application that calculates the distance from the user's current location to the North Pole.

Features

  • 📍 Geolocation: Uses the browser's geolocation API to get the user's current position
  • 🧭 Distance Calculation: Calculates the great circle distance to the North Pole using the Haversine formula
  • 📏 Unit Conversion: Allows users to toggle between kilometers and miles
  • 🎨 Responsive Design: Clean, mobile-friendly interface using TailwindCSS
  • Real-time Updates: Distance updates instantly when switching between units

How It Works

  1. Click "Get My Location" to request location access
  2. The app uses the browser's geolocation API to get your coordinates
  3. It calculates the distance to the North Pole (90°N, 0°E) using the Haversine formula
  4. Toggle between kilometers and miles to see the distance in your preferred unit

Technical Details

  • Distance Calculation: Uses the Haversine formula for calculating great circle distances on Earth
  • Earth Radius: 6,371 km (mean radius)
  • Conversion Factor: 1 km = 0.621371 miles
  • Geolocation Options: High accuracy enabled with 10-second timeout

Privacy

  • Location data is only used for distance calculation
  • No location data is stored or transmitted to any server
  • All calculations happen in your browser

Browser Compatibility

Requires a modern browser with:

  • Geolocation API support
  • JavaScript enabled
  • HTTPS connection (required for geolocation)

Usage

Simply visit the web app and click "Get My Location" to start!