Dew Heater Calculations

To make a heated dew shield using resistors

The best type of resister is 1/2 to 1 watt, using 12 volts DC

3 watts suitable for eyepiece & finder, 5 watts for mirror.

Inputs
Volts: Watts required: Resistor to be used (ohms): Battery amps per hr:
Outputs
Total resistance (ohms):
No. of resistors required:
Amps drawn (eg .25 gives 4 hrs on 1 amp hr battery):
Battery life (hours):

Translated by David Benn to ECMAScript from BASIC code supplied by Justin Tilbrook.
4 KEY OFF
5 LOCATE 25,5
10 PRINT DATE$,TIME$
15 REM
20 REM
21 REM
25 PRINT"                       Dew Heater programme."
26 PRINT
30 PRINT"    To make a heated dew shield using resistors"
31 PRINT
32 PRINT"    The best type of resister is 1/2 to 1 watt, using 12 volts DC"
33 PRINT
34 PRINT"    3 watts suitable for eyepiece & finder, 5 watts for mirror."
35 PRINT "To quit type (2) in volts"
36 PRINT
40 INPUT "Volts ie (12 volt)";A
45 IF A=1 THEN END
46 IF A=2 THEN CHAIN "scofix",5
47 INPUT "Watts required ie (3 watts)";B
48 INPUT "Resister ohms ie (15)";D
49 INPUT "Battery amps per hr ie (1 amp per hr)";L
50 C=((A*A)/B)
51 E=C/D
52 F=B/A
53 G=L/F
59 REM
150 PRINT C;"= Total ohms"
151 PRINT
152 PRINT E;" No. of resisters required"
153 PRINT
154 PRINT F;"is the amps drawn, ie(.25  gives you 4 hrs on 1amp hr battery)"
155 PRINT
156 PRINT G;" is battery life in hours."
160 GOTO 35
201 END