From 6f4f98ea41c6c792d99bceb2618c659ead349c08 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 17 Oct 2006 17:47:37 +0000 Subject: [PATCH] More documentation improvements. --- doc/HACKING | 22 ++++++++++++++++++++++ src/sst.py | 8 -------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/doc/HACKING b/doc/HACKING index ef0ddb9..1cef4b4 100644 --- a/doc/HACKING +++ b/doc/HACKING @@ -245,3 +245,25 @@ FORTRAN all the vector representation was done with parallel arrays; in C, I introduced a struct; in Python, the class has a complete repertoire of vector-algebra operations. +There's one weird archeological detail about the nav code that +deserves a remark. This program originally required input in terms of +a (clock) direction and distance -- essentially, directions were real +numbers modulo 12 with zero being north. Somewhere in history, it was +changed to Cartesian coordinates. But the bearing method still computes +polar coordinates in clockface units -- that's the reason for the +wacky constant 1.90985, inherited straight from the ancestral FORTRAN. +Elsewhere, there were a bunch of computations, now centralized in the +course object, that looked like (15.0 - bearing)*0.5235988; this is a +conversion from clockface units to radians with zero on the X axis. + +As a previous maintainer, probably Tom Almy, observed: Probably +"manual" input should still be done this way -- it's a real pain if +the computer isn't working! Manual mode is still confusing because it +involves giving x and y motions, yet the coordinates are always +displayed y - x, where +y is downward! + +Because I think he's arguably right, I haven't ripped out all the +clockface-to-radian conversions. For this reason, and others, the +trig code is still a bit wacky and obscure. Modify with caution +and test thoroughly. + diff --git a/src/sst.py b/src/sst.py index 637a65d..59c5ffc 100644 --- a/src/sst.py +++ b/src/sst.py @@ -3530,14 +3530,6 @@ def dock(verbose): prout(_("Lt. Uhura- \"Captain, an important message from the starbase:\"")) attackreport(False) game.iseenit = True - -# This program originally required input in terms of a (clock) -# direction and distance. Somewhere in history, it was changed to -# cartesian coordinates. So we need to convert. Probably -# "manual" input should still be done this way -- it's a real -# pain if the computer isn't working! Manual mode is still confusing -# because it involves giving x and y motions, yet the coordinates -# are always displayed y - x, where +y is downward! def cartesian(loc1=None, loc2=None): if loc1 is None: -- 2.31.1