GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - russbiggs/asturlab: qibla calculator 🧭🕋

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
dist
dist
 
 
src
src
 
 
.babelrc
.babelrc
 
 
.gitignore
.gitignore
 
 
.npmignore
.npmignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
jest.config.js
jest.config.js
 
 
package.json
package.json
 
 
rollup.config.js
rollup.config.js
 
 
tsconfig.json
tsconfig.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

Asturlab - ٱلأَسْطُرلاب‎

A small JavaScript library to calculate the qibla (direction to the kaaba in Mecca) from a given coordinate pair. Calculates using great-circle (default) or a rhumb line. Most of the code adaptions of the calculations in the source code are directly from or adapted from turf.js, however turf is not a dependency.

Installation

npm install asturlab

Usage

Available in AMD, CJS, IIFE (with compatible version down to IE10) and ES6 Module.

In the browser

as an ES6 Module

import asturlab from 'asturlab';

from a script tag

<script src="path/to/dist/asturlab-iife.min.js"></script>

In node

const asturlab = require('asturlab');
const qibla = asturlab([32.123, 54.321]);
// qibla is now the bearing to the kaaba in degrees

API

asturlab(coordinates[, options]])

coordinates is a [x,y] (long, lat) pair of decimal degree coordinates in WGS84

options supported:

  • rhumb - boolean, sets calculation to use rhumb line instead of great circle

About

qibla calculator 🧭🕋

Topics

astrolabeislamkaabaqiblaqiblah-direction

Resources

Readme
License
Activity

Stars

0 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.