Scope Finder

Date: 198x
Type: Program
Platform(s): TS 2068
Tags: Astronomy

Scope Finder is a telescope parameter calculator that takes aperture, secondary mirror size, focal ratio, and focal length as inputs and computes a comprehensive set of optical and observational figures. Calculations include light-grasp (in units relative to the naked eye), unobstructed objective area, limiting magnitude range, Dawes’ limit for resolving power, and recommended eyepiece focal lengths for maximum, average, and minimum useful magnification. A notable feature is the unit-conversion subroutine starting at line 800, which prompts whether each entered value is in inches and branches to one of three conversion stubs (lines 900, 910, 920) using a computed GO SUB target derived from the variable g, initialized to 890 and incremented by 10 on each call. The program outputs a formatted 20-row display with optional COPY (screen print) support.

Program Structure

The program is a single-pass calculator with no main loop beyond the final GO TO 1000 (a non-existent line used to halt execution). Execution flows linearly from line 505 through the display block ending at line 795, with two categories of subroutines: the unit-conversion dispatcher at line 800 and the three unit-conversion stubs at lines 900, 910, and 920.

Unit-Conversion Dispatch Mechanism

A computed GO TO technique is used to route each aperture/secondary/focal-length input to its own conversion stub. The variable g is initialized to 890 at line 505 and incremented by 10 at line 800 before the prompt. After the first call g becomes 900, after the second 910, after the third 920 — exactly matching the line numbers of the three stubs. If the user answers that the value was in inches, execution jumps to GO TO g; otherwise RETURN is reached immediately at line 810, leaving the value assumed to already be in millimeters.

  • Line 900 — aperture stub: stores raw value in a1, converts a to mm
  • Line 910 — secondary stub: stores raw value in s1, converts s to mm
  • Line 920 — focal-length stub: converts f to mm

Lines 520 and 530 provide a fallback: if a1 or s1 is still 0 after the subroutine (i.e., the value was entered in mm), the program converts to inches using INT(100*(x/25.4))/100 for display purposes.

Optical Calculations

VariableMeaningFormula summary
lgLight-grasp (×eye)(a1 × 3.54)² — aperture in inches scaled by pupil ratio
lFree objective area (×eye)Net annular area (π·(a/2)² − π·(s/2)²) divided by eye reference area ~50.264 mm²
pSecondary obstruction %s/a × 100
min/maxLimiting magnitude range8.8 + 5·ln(a1)·0.434 / 9.8 + … (log base-10 approximation via natural log)
tUnfolded tube length (feet)(f / 25.4) / 12
fnFocal ratio f/Nf / a
pl/pm/psMax/avg/min magnificationa1×55, a1×25, a1×3.2
el/em/esEyepiece focal lengths (mm)f / magnification
dlDawes’ limit (arc-sec)4.56 / a1 (standard formula)
reResolution probability (arc-sec)((178/fn) − (fn/10 + 4)) × fn / a

The limiting magnitude formula uses LN a1 * 0.434 to convert natural log to log base 10 (since log₁₀(x) = ln(x) / ln(10) ≈ ln(x) × 0.4343). This is a common workaround on systems that provide only LN.

Display Formatting

Line 735 draws a border of quote characters (CHR$ 34) along columns 1–31 of rows 0 and 19 using a FOR loop with AT positioning, creating a simple box frame. All numerical results are pre-rounded using the INT(x + 0.5) idiom or INT(1000 * x) / 1000 patterns to control decimal places before printing.

Bugs and Anomalies

  • Line 535: IF r <> 0 THEN GO TO 550 skips to line 550, but there is no line 550 in the listing — execution falls through to line 555 regardless (the next existing line), so the GO TO has no net effect. This means the focal-length input at line 540 is never reached when a valid focal ratio is given; the jump to the non-existent line 550 causes execution to continue at 555, which is correct behavior, but line 540 is effectively dead code unreachable via this path when r <> 0.
  • The g-based dispatch assumes exactly three calls in order. A fourth call would target line 930, which does not exist, causing an error. The program is structured so this cannot happen under normal use.
  • Line 799 contains a SAVE "scopefind" statement reachable only if GO TO 1000 at line 795 somehow fails — in practice it is unreachable dead code acting as an inline save reminder.

Image Gallery

Source Code

 500 REM SAVE "scpfnd"
 505 LET g=890:LET a1=0:LET s1=0
 510 CLS :PRINT AT 20,0;"Scope name , etc.":INPUT n$:CLS 
 515 INPUT "Aperture size? ";a:GO SUB 800
 520 IF a1=0 THEN LET a1=(INT (100*(a/25.4)))/100
 525 INPUT "Secondary size? ";s:GO SUB 800
 530 IF s1=0 THEN LET s1=(INT (100*(s/25.4)))/100
 535 INPUT "focal ratio? ";r:LET f= INT (.5+(a*r)):IF r <>0 THEN GO TO 550
 540 INPUT "focal OR tube length? ";f:GO SUB 800
 555 LET lg= INT ((a1*3.54)^2)
 560 LET l= INT ((((a/2)^2* PI)-((s/2)^2* PI))/50.264)
 580 LET p=(INT (1000*(s/a)))/10
 600 LET min=(INT (10*(8.8+5* LN a1*.434)))/10
 610 LET max=(INT (10*(9.8+5* LN a1*.434)))/10
 630 LET t=(INT (100*((f/25.4)/12)))/100
 640 LET fn=(INT (.5+(10*(f/a))))/10
 660 LET pl= INT a1*55
 670 LET pm= INT a1*25
 680 LET ps= INT (.5+(a1*3.2))
 690 LET el= INT (f/pl)
 700 LET em= INT (f/pm)
 710 LET es= INT (f/ps)
 725 LET dl=(INT (1000*4.56/(a/25.4)))/1000
 730 LET re=(INT (1000*(((178/fn)-(fn/10+4))*fn)/a))/1000
 735 FOR i=1 TO 31:PRINT AT 0,i; CHR$ 34; AT 19,i; CHR$ 34:NEXT i
 740 PRINT AT 1,0;"APERTURE: ";A1;" inches"; TAB 24;a;"mm":PRINT "secondary: ";s1;" inches"; TAB 24;s;"mm"
 745 PRINT "Light-grasp: ";lg;" X eye":PRINT "Obstruction: ";p;"%"
 750 PRINT "Free Objective Area= ";l;" X eye"
 755 PRINT "Magnitude Range: "; TAB 19;"min ";min:PRINT TAB 19;"max ";max
 760 PRINT "Unfolded Tube Length: ";t;" ft ":PRINT "Focal length: ";f;"mm":PRINT "Focal Ratio: f/";fn
 765 PRINT "Magnification Limits: ":PRINT TAB 2;"Max: ";pl;"X"; TAB 15;"eyepiece: ";el;"mm"
 770 PRINT TAB 2;"Avg: ";pm;"X"; TAB 15;"eyepiece: ";em;"mm"
 775 PRINT TAB 2;"Min: ";ps;"X"; TAB 15;"eyepiece: ";es;"mm"
 780 PRINT "Dawes' Limit: ";dl;" Arc sec":PRINT "Resolution Prob: ";re;" Arc sec"
 785 PRINT AT 18,0;"For: ";n$
 790 INPUT "Copy? Y/N ";a$:IF a$="Y" OR a$="y" THEN COPY 
 795 GO TO 1000
 799 SAVE "scopefind"
 800 LET g=g+10:INPUT "was last value in inches? ";a$:IF a$ <>"n" THEN GO TO g
 810 RETURN 
 900 LET a1=a:LET a= INT (.5+(a*25.4)):RETURN 
 910 LET s1=s:LET s= INT (.5+(s*25.4)):RETURN 
 920 LET f= INT (.5+(f*25.4)):RETURN 

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.