Reference · Rockets, variants, parts and the fit check
rocketSpeedfunction
The relativistic rocket equation: the speed, as a fraction of c, that a rocket with exhaust speed exhaustOfC reaches burning from full down to dry mass.
Import it
import { rocketSpeed } from "@johnmorrisdotca/uchusen-rockets";
Definition
function rocketSpeed(exhaustOfC: number, full: number, dry: number): number
Parameters
| Name | Type | Description |
|---|---|---|
exhaustOfC | number | Exhaust speed as a fraction of the speed of light. |
full | number | The mass before the burn. |
dry | number | The mass after it. |
Returns
number
The speed as a fraction of c.
Examples
import { rocketSpeed } from "@johnmorrisdotca/uchusen-rockets";
console.log(rocketSpeed(0.04, 10, 1).toFixed(3));0.092What it prints (run when this page was built)