Star places and sidereal time for sight reduction
Almanac 0.12.0
Release Sky
Almanac 0.12.0 gives sight reduction what it needs from the sky: a star's apparent place and Greenwich sidereal time, in TypeScript, Swift, and Kotlin. Celestial navigation apps can now form any body's Greenwich hour angle and declination from Almanac alone.
starAltAz results move by up to 20.5″. It now applies annual aberration, so stars land where the Nautical Almanac and USNO put them. No code changes are needed.
starPosition(raDeg, decDeg, time)/starPosition(raDeg:decDeg:at:)returns a star's apparent right ascension and declination of date from its J2000 catalog position, with annual aberration, precession, and nutation. #90greenwichSiderealTime(time)returns Greenwich apparent sidereal time in degrees,[0, 360). A body's GHA is this minus its right ascension, wrapped into[0, 360), for the Sun, the Moon, or a star. #90- Sidereal time, right ascension, azimuth, and hour angle no longer return exactly 360 for an angle a hair below zero. #90
- The Astronomy Engine migration guide maps
DefineStarwithEquator, andSiderealTime, to the new calls.
Proper motion is still not applied. By 2026 a J2000 position is more than 0.1′ off for navigational stars moving faster than about 230 milliarcseconds a year, among them Sirius, Procyon, and Arcturus. A caller that needs those stars at that precision propagates its catalog's proper motion to the date first; the scope has the details.
Against USNO's celestial-navigation GHA and declination for the navigational stars, with each star's catalog proper motion carried to the date, every one of 226 rows from 1999 to 2050 matches within 1″; the worst is 0.34″. Star places and sidereal time match Astronomy Engine 2.1.19 within a milliarcsecond in all three ports.
A star now costs about what the Sun does when its instant changes, about 2.3 µs a call in TypeScript. TypeScript and Kotlin cache Earth's state on the exact instant, so a catalog drawn at one moment stays at its earlier speed; Swift recomputes it on every call.
npm install @openwaters/almanac@0.12.0
import { starPosition, greenwichSiderealTime } from '@openwaters/almanac';
const place = starPosition(88.792939, 7.407064, time); // Betelgeuse, J2000
const ghaDeg = (greenwichSiderealTime(time) - place.raDeg + 360) % 360;
.package(url: "https://github.com/openwatersio/almanac.git", exact: "0.12.0")
Kotlin consumers can pin the v0.12.0 source checkout using the installation guide. No Maven artifact is published.
Star places and sidereal time: #90. Release preparation: #91.