Astronomical calculations in JavaScript.
These tiles were generated using the astronomy-svg library.
👉 Check out the live demo here
<script type="text/javascript" src="astronomy-js.min.js"></script>
// latitude, longitude
let astronomyJS = AstronomyJS.initialize(56.2, 18.1)
astronomyJS.getAltAzCoordinatesForObject("Sun");
npm install astronomy-js
import { AstronomyJS } from "astronomy-js";
// latitude, longitude
let astronomyJS = AstronomyJS.initialize(56.2, 18.1)
astronomyJS.getAltAzCoordinatesForObject("Sun");
This project is licensed under the MIT License — feel free to use, modify, and share it.
Please make sure to retain the original license and attribution when reusing or modifying the code.
See the LICENSE file for full details.
This library provides astronomical calculations for leisure purposes only. Some important basic aspects are not implemented, such as:
US Naval Observatory, Explanatory Supplement to the Astronomical Almanac, 1992