Reference · Passes: when a satellite crosses the sky over a place
magnitudefunction
The apparent magnitude of a satellite, treating it as a sphere that reflects light evenly: the standard magnitude, dimmed by the distance (5 magnitudes for every tenfold) and by how little of it the Sun lights from where the watcher stands (the phase angle, 0 when the Sun is behind the watcher and the satellite is fully lit, 180 degrees when it is all dark). A smaller number is brighter; Sirius, the brightest star, is about -1.5 and the naked eye reaches about 6. The standard magnitude is the brightness from 1000 km with half of the satellite lit, the convention satellite observers use, and the phase function is that of a diffuse sphere.
Import it
import { magnitude } from "@johnmorrisdotca/chikyu-earth/passes";
Definition
function magnitude(standard: number, rangeKm: number, phaseDeg: number): number
Parameters
| Name | Type | Description |
|---|---|---|
standard | number | The standard magnitude (at 1000 km, half lit). |
rangeKm | number | The distance from the watcher to the satellite. |
phaseDeg | number | The angle, in degrees, at the satellite between the Sun and the watcher (0 to 180). |
Returns
number
The magnitude (positive infinity when the satellite is unlit: a phase of 180 degrees).
Examples
import { magnitude } from "@johnmorrisdotca/chikyu-earth/passes";
// a satellite of standard magnitude -1 straight overhead (420 km) with the Sun at right angles to the view
console.log(magnitude(-1, 420, 90).toFixed(1));-2.9What it prints (run when this page was built)