Skip to content

xto42/bearingcompass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

🐻 Bearing Compass 🧭

Calculate true and magnetic bearings between waypoints on a map.

Usage: Open in your browser. Click to add waypoints, double-click to zoom.

Features

  • Calculate true bearing, magnetic bearing, declination, and distance for route legs
  • WMM2025 magnetic model (valid 2025-2030) embedded, no API calls
  • Mobile-optimized with swipeable result cards
  • Shareable URLs with encoded waypoints
  • Color-coded routes

Tech Stack

Methodology

True Bearing: Forward azimuth formula on WGS84 ellipsoid Distance: Haversine formula (great circle) Magnetic Bearing: True bearing adjusted by WMM2025 declination

Magnetic Bearing = True Bearing - Declination

Declination accuracy: ±1°, sufficient for navigation.

Data Sources

Credits

  • Christopher Weiss (@cmweiss) - geomagJS
  • Vladimir Agafonkin - Leaflet.js
  • NOAA NCEI - World Magnetic Model

About

Calculate true and magnetic bearings between waypoints on a map

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Contributors

Languages