qibla library
Qibla direction, great-circle path, and haversine distance for Dart.
Pure math, zero external dependencies. Computes the initial bearing from any point on Earth to the Ka'bah using spherical trigonometry.
Constants
Functions
-
compassDir(
double bearing) → String - Eight-point compass abbreviation for a bearing.
-
compassName(
double bearing) → String - Full compass direction name for a bearing.
-
distanceKm(
double lat1, double lng1, double lat2, double lng2) → double - Haversine distance between two coordinate pairs.
-
qiblaAngle(
double lat, double lng) → double - Qibla bearing in degrees clockwise from true north.
-
qiblaGreatCircle(
double lat, double lng, [int steps = 120]) → List< List< double> > -
Great-circle waypoints from (
lat,lng) to the Ka'bah.