siderust-js
ActiveJavaScript and WebAssembly bindings for Siderust astronomy: observers, ephemerides, transforms, and event searches.
0 stars
0 forks
JavaScript
AGPL-3.0
Updated 2 months ago
Why it exists
siderust-js lets JavaScript projects use the same astronomy building blocks as the Rust crates. It keeps the boundaries explicit by sharing quantity and time types with qtty-js and tempoch-js.
Key Features
- Node package: @siderust/siderust
- Browser/WASM package: @siderust/siderust-web
- Observer models, ephemerides, and transforms
- Altitude, azimuth, crossing, and culmination search
- Strict interop with qtty-js and tempoch-js types
Getting Started
npm install @siderust/siderust @siderust/qtty @siderust/tempoch
const { Quantity } = require('@siderust/qtty');
const { JulianDate } = require('@siderust/tempoch');
const { Observer, bodyAltitudeAt } = require('@siderust/siderust');
const observer = new Observer(
new Quantity(-17.8925, 'Degree'),
new Quantity(28.7543, 'Degree'),
new Quantity(2396, 'Meter'),
);
const altitude = bodyAltitudeAt('Sun', observer, new JulianDate(2451545.0).toModifiedJulianDate());
console.log(altitude.value, altitude.unit); Contributing
We welcome contributions! Here's how you can help:
- 1 Fork the repository and create your branch from main
- 2 Make your changes and add tests if applicable
- 3 Ensure all tests pass with cargo test
- 4 Submit a pull request with a clear description
License
This project is licensed under the AGPL-3.0 license. See the LICENSE file for details.
Quick Links
Tags
javascript wasm node browser astronomy ephemeris bindings