{"id":19917591,"url":"https://github.com/russbiggs/asturlab","last_synced_at":"2025-03-01T09:44:12.376Z","repository":{"id":95245947,"uuid":"167401273","full_name":"russbiggs/asturlab","owner":"russbiggs","description":"qibla calculator 🧭🕋","archived":false,"fork":false,"pushed_at":"2019-01-24T16:56:36.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-24T08:18:42.267Z","etag":null,"topics":["astrolabe","islam","kaaba","qibla","qiblah-direction"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/russbiggs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-24T16:40:35.000Z","updated_at":"2019-02-05T18:56:03.000Z","dependencies_parsed_at":"2023-03-20T21:11:21.920Z","dependency_job_id":null,"html_url":"https://github.com/russbiggs/asturlab","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"a3660b259fe021545e971703303fdf5f21e2a7d3"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/russbiggs%2Fasturlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/russbiggs%2Fasturlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/russbiggs%2Fasturlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/russbiggs%2Fasturlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/russbiggs","download_url":"https://codeload.github.com/russbiggs/asturlab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241348197,"owners_count":19948157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["astrolabe","islam","kaaba","qibla","qiblah-direction"],"created_at":"2024-11-12T21:50:39.707Z","updated_at":"2025-03-01T09:44:12.350Z","avatar_url":"https://github.com/russbiggs.png","language":"TypeScript","readme":"\u003cdiv style=\"text-align:center\"\u003e\n\u003cimg src='https://upload.wikimedia.org/wikipedia/commons/7/78/Al-Ashraf_compass_and_qibla_diagram.png' style=\"width:300px;\"/\u003e\n\u003c/div\u003e\n\n# Asturlab -  ٱلأَسْطُرلاب‎\n\nA small JavaScript library to calculate the qibla (direction to the kaaba in Mecca) from a given coordinate pair. Calculates using [great-circle](https://en.wikipedia.org/wiki/Great-circle_distance) (default) or a [rhumb line](https://en.wikipedia.org/wiki/Rhumb_line). Most of the code adaptions of the calculations in the source code are directly from or adapted from [turf.js](http://turfjs.org/), however turf is not a dependency.\n\n## Installation\n\n```sh\nnpm install asturlab\n```\n\n## Usage\n\nAvailable in AMD, CJS, IIFE (with compatible version down to IE10) and ES6 Module.\n\n### In the browser\n\n#### as an ES6 Module\n```js\nimport asturlab from 'asturlab';\n```\n\n### from a script tag\n\n```html\n\u003cscript src=\"path/to/dist/asturlab-iife.min.js\"\u003e\u003c/script\u003e\n```\n\n### In node\n```js\nconst asturlab = require('asturlab');\nconst qibla = asturlab([32.123, 54.321]);\n// qibla is now the bearing to the kaaba in degrees\n```\n\n## API\n\n__asturlab(coordinates[, options]])__\n\n```coordinates``` is a \\[x,y\\] (long, lat) pair of decimal degree coordinates in WGS84\n\n```options``` supported:\n\n* ``` rhumb ``` - boolean, sets calculation to use rhumb line instead of great circle\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frussbiggs%2Fasturlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frussbiggs%2Fasturlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frussbiggs%2Fasturlab/lists"}