skyFromfunction
The sky as seen from another star or point in space. Each star with a distance is placed in three dimensions from its position and parallax, the viewpoint is subtracted, and what is left is its direction and distance from there; its
apparent magnitude is m' = M + 5 log10(d' / 10 parsecs) from its absolute magnitude M. The Sun is among the stars (absolute magnitude 4.83, colour index 0.65): from Alpha Centauri it is a star of magnitude 0.5 in Cassiopeia.
The directions are on the same J2000 axes as the Earth's sky, so a chart from there can use the same projections.
Only a star with a distance can be moved, so the 2,517 of the 5,080 bright stars with no parallax are left out and counted in skipped, and a star too faint to be in the table from the Sun is missing even if it would be bright from the viewpoint.
The viewpoint star itself is left out, and so is a star nearer to the viewpoint than the error of the viewpoint's own distance (the other star of Alpha Centauri is 0.00004 light-years away by the positions, and the distance is good to 0.03: where it is from there is not known); it is counted in skipped. Distances from the parallaxes have errors (starDistance gives them): a star near the viewpoint, with a distance no better than its own error, can be anywhere. Positions are J2000 and are not carried by proper motion.
Import it
import { skyFrom } from "@johnmorrisdotca/hoshi-stars/sky-from";
Definition
function skyFrom(viewpoint: SkyFromViewpoint, options?: SkyFromOptions): SeenSky
Parameters
| Name | Type | Description |
|---|---|---|
viewpoint | SkyFromViewpoint | A star, a nearby star, a name |
options (optional) | SkyFromOptions |
|
Returns
SeenSky
A new list of seen stars, brightest first, with a skipped count.
Examples
import { skyFrom } from "@johnmorrisdotca/hoshi-stars/sky-from";
const sky = skyFrom("Rigil Kentaurus");
const sun = sky.find((star) => star.id === "sun")!;
console.log(sun.rightAscension.toFixed(1), sun.declination.toFixed(1), sun.magnitude.toFixed(2)); // 39.9 60.8 0.4639.9 60.8 0.45What it prints (run when this page was built)