{"id":18924509,"url":"https://github.com/sharpcoder/altaz-js","last_synced_at":"2026-03-02T10:03:08.919Z","repository":{"id":176492590,"uuid":"658828849","full_name":"SharpCoder/altaz-js","owner":"SharpCoder","description":"A package for astronomy math in javascript","archived":false,"fork":false,"pushed_at":"2024-08-24T15:45:05.000Z","size":71,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-28T01:45:01.030Z","etag":null,"topics":["astronomy","math","space"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/altaz","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SharpCoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-06-26T15:15:23.000Z","updated_at":"2024-08-24T15:45:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"6ae86988-3c72-48c2-9a93-a7b613e6b686","html_url":"https://github.com/SharpCoder/altaz-js","commit_stats":null,"previous_names":["sharpcoder/altaz-js"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SharpCoder/altaz-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpCoder%2Faltaz-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpCoder%2Faltaz-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpCoder%2Faltaz-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpCoder%2Faltaz-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SharpCoder","download_url":"https://codeload.github.com/SharpCoder/altaz-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpCoder%2Faltaz-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29998085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T09:59:02.300Z","status":"ssl_error","status_checked_at":"2026-03-02T09:59:02.001Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["astronomy","math","space"],"created_at":"2024-11-08T11:07:02.189Z","updated_at":"2026-03-02T10:03:08.872Z","avatar_url":"https://github.com/SharpCoder.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AltAz\n\nAltAz is a library for performing common astronomy calculations.\n\n## Installation\n\nUse any familiar package manager\n\n```bash\npnpm install --save altaz\nnpm install --save altaz\nyarn add altaz\n```\n\n## Usage\n\n```typescript\n// *************************************************\n// Calculating days julian\n// *************************************************\nimport { instantToDaysJulian } from \"altaz\";\nconst jday = instantToDaysJulian(now);\n\n// *************************************************\n// Calculating the position of a star at an instant\n// *************************************************\nimport {\n  Angle,\n  GPSCoordinate,\n  round,\n  sphereToHorizontal,\n  SphericalCoordinate,\n  timeToAngle,\n  timeToDec,\n} from \"altaz\";\n\n// Position of observer (Seattle)\nconst location = new GPSCoordinate(\n    Angle.fromDegrees(47.608013),\n    Angle.fromDegrees(-122.335167.),\n);\n\n// Position of the star\nconst skyTarget = {\n  ra_h: 1.0,\n  ra_m: 1.0,\n  ra_s: 1.0,\n  dec_deg: 1.0,\n  dec_m: 1.0,\n  dec_s: 1.0,\n};\n\nconst starRightAscension = timeToAngle(\n  parseFloat(skyTarget.ra_h),\n  parseFloat(skyTarget.ra_m),\n  parseFloat(skyTarget.ra_s)\n);\n\nconst starDeclination = Angle.fromDegrees(\n  parseFloat(skyTarget.dec_deg) +\n    timeToDec(0, parseFloat(skyTarget.dec_m), parseFloat(skyTarget.dec_s))\n);\n\nconst targetPosition = new SphericalCoordinate(\n  1.0,\n  starRightAscension,\n  starDeclination\n);\n\nconst targetAltAz = sphereToHorizontal(location, targetPosition, new Date());\n\n// *************************************************\n// Calculating the position of a planet at an instant\n// *************************************************\nimport { Mercury, sphereToHorizontal } from \"altaz\";\n\n// Position of observer (Seattle)\nconst location = new GPSCoordinate(\n    Angle.fromDegrees(47.608013),\n    Angle.fromDegrees(-122.335167.),\n);\n\n// Position of the planet\nconst targetPosition = Mercury.asSphere();\nconst targetAltAz = sphereToHorizontal(location, targetPosition, new Date());\n```\n\n## Installation\n\nBuild with the script\n\n```bash\npnpm run build\nnpm run build\nyarn run build\n```\n\n## Tests\n\nI have tests somewhere. I'll migrate them eventually but I promise the math here is pretty well tested and used in a few simple production apps.\n\n## Contributing\n\nPlease open an issue first to discuss what you would like to change and we'll go from there.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpcoder%2Faltaz-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharpcoder%2Faltaz-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpcoder%2Faltaz-js/lists"}