spacecraftLightTimefunction
How long a radio signal takes from the Earth to a craft (or back), at a moment, in seconds: the distance from the Earth over the speed of light.
Import it
import { spacecraftLightTime } from "@johnmorrisdotca/wakusei-planets/spacecraft";
Definition
function spacecraftLightTime(id: SpacecraftId, when: When): number
Parameters
| Name | Type | Description |
|---|---|---|
id | "voyager1" | "voyager2" | "newhorizons" | "pioneer10" | "pioneer11" | "cassini" | "galileo" | "juno" | "parker" | "webb" | The craft. |
when | When | A |
Returns
number
One-way light time in seconds.
Examples
import { loadSpacecraft, spacecraftLightTime } from "@johnmorrisdotca/wakusei-planets/spacecraft";
await loadSpacecraft("voyager1");
console.log((spacecraftLightTime("voyager1", Date.UTC(2026, 10, 8)) / 3600).toFixed(1), "hours");24.0 hoursWhat it prints (run when this page was built)