home *** CD-ROM | disk | FTP | other *** search
- 1 PRINT "From the June 1985 SKY & TELESCOPE, pp. 545-6."
- 2 PRINT
- 3 PRINT "This program calcuates, from three lines of known wavelength, the"
- 4 PRINT "wavelengths corresponding to any additional features. The distances"
- 5 PRINT "of the lines of known wavelength are measured from some fiducial"
- 6 PRINT "point at the red end of the spectrum (so the values increase toward"
- 7 PRINT "the blue end) and should be well separated.
- 8 PRINT
- 9 PRINT "INPUT: Measured distances (mm) and wavelengths (nm) of three lines"
- 10 PRINT "of known wavelength, measured distance (mm) of additional feature."
- 11 PRINT
- 12 PRINT "OUTPUT: Calculated wavelength (nm) of additional feature."
- 13 PRINT
- 100 REM WAVELENGTHS
- 110 REM
- 120 INPUT "FIRST KNOWN WAVELENGTH, DISTANCE";W1,S1
- 130 INPUT "SECOND KNOWN WAVELENGTH, DISTANCE";W2,S2
- 140 INPUT "THIRD KNOWN WAVELENGTH, DISTANCE";W3,S3
- 180 P=W2-W1: Q=W3-W1: R=S2-S1
- 190 S=S3-S1: T=S3-S2
- 200 A=R/P: B=S/Q
- 210 U=A-B: V=T/U: L=W1-V
- 220 D1=A*(W2-L): D2=D1+S1
- 230 C=(D1*T)/U
- 240 PRINT
- 250 INPUT "DISTANCE";D
- 260 IF D<0 THEN 310
- 270 W=L+(C/(D2-D))
- 280 W=INT(W+.5)
- 290 PRINT "WAVELENGTH = ";W
- 310 RUN "ASTRMENU.BAS"
- T "DISTANCE";D
- 260 IF D<0 THEN 310
- 270 W=L+(C/(D2-D))
- 280 W=INT(W+.5)
- 290 PRINT "WAVELENGTH = ";W
- 310 RU