Reference · The Milky Way: a brightness map and soft bands to draw
toGalacticfunction
The galactic longitude and latitude of a point of the sky (J2000, the IAU's galactic frame).
Import it
import { toGalactic } from "@johnmorrisdotca/hoshi-stars/milky-way";
Definition
function toGalactic(point: SkyPoint): GalacticPoint
Parameters
| Name | Type | Description |
|---|---|---|
point | SkyPoint | A right ascension and declination in degrees. |
Returns
GalacticPoint
Longitude 0 up to but not including 360, latitude -90 to 90.
Examples
import { toGalactic } from "@johnmorrisdotca/hoshi-stars/milky-way";
// Sagittarius A*, the centre of the Galaxy, is at the origin
console.log(toGalactic({ rightAscension: 266.4168, declination: -29.0078 })); // about { longitude: 0, latitude: 0 }{ longitude: 359.94424320969074, latitude: -0.04613171564528116 }What it prints (run when this page was built)