๐Ÿงญ Helm

Terminus

Stardate 55170.1 ยท UES Magnanimous

Briefing

It is 06:14 on stardate 55170.1, and nothing has happened. The manifold is holding. The logs, run through your reconciler, agree to the entry. Across two kilometres of nothing, the other Magnanimous has lowered its shields, and its transponder has switched to UES Magnanimous, decommissioned, which Lt. Skree says is "the most polite way a ship has ever said goodbye".

The Captain wants a course home, and he wants it from you: a heading from where we are to where we are going, kept honest in the range 0 to 359; a distance; an ETA at a given warp factor, rounded up, because you do not tell a crew "three point two hours" and arrive in four; a fuel check; and, because he is the Captain and it is tradition, the countdown, and a log entry to close the season on. Eight objectives. Ensign Tannenbaum will press the button. Supervised.

Mission objectives

ARCHIE checks all eight every time you run diagnostics.

  • โ€ขheading_to: the compass bearing from one point to another, whole degrees
  • โ€ขheading_to: never negative, always 0 to 359
  • โ€ขdistance_to: straight-line distance, two decimal places
  • โ€ขeta_hours: distance over warp cubed, rounded UP to whole hours
  • โ€ขeta_hours: an exact number of hours is not rounded up further
  • โ€ขfuel_ok: enough fuel for the trip at that warp, at 3 units per light-hour
  • โ€ขengage: the countdown from Season 2, from 3, then the course
  • โ€ขlog_entry: the closing line, formatted exactly
Ask Commander Raghunathan for a hint

atan2(dy, dx) gives an angle in radians from the x axis; convert to degrees, then to a compass bearing with (90 - angle) % 360. Round distance to two places, ETA with ceil. Everything else is string formatting you have done all season.

๐Ÿš€ Away mission

Away mission, the last one: put the whole ship in one program. A command-line tool with subcommands: manifold (mission 41), logs (42), frame and unframe (43), course (44). One entry point, shared error handling, tests for each. It is the same shape as every real tool you will ever admire, and you have already written every part of it. Then, if you like, publish it: a package on PyPI, or a crate on crates.io, with a README that explains what a Magnanimous is. Somebody will find it.