const TestMode = 0 ' 1 is test; don't update fits file ' 0 is don't test dim count dim strng dim flag Dim OutputFile ' ' Logging file ' Dim logFSO ' Logging file Dim logStream ' Logging text stream Dim outFSO Dim outStream ' ' Specific to the Target List. ' Dim obsList ' Target object list (CAA plan format) Dim fso ' Target list FileSystemObject Dim infile ' Target list text stream Dim Message Dim imageDir ' Where the images are to be saved dim logDir ' Log file goes here '------------------------------------------------------------------------------ ' ' ================ ' MAIN ENTRY POINT ' ================ ' OutputFile = inputbox("Enter the name and directory of the output File:") Set outFSO = CreateObject("Scripting.FileSystemObject") Set outStream = outFSO.CreateTextFile(outputfile, True) Dim rate, angle, increment, total_time, RA, Dec Dim RA_rate, Dec_rate rate = inputbox("Rate in Arc seconds per hour") rate = rate/(3600 * 1.5) 'convert to pixels per second angle = inputbox("Position Angle") angle = angle/ 57.295 ' convert to radians Increment = inputbox("Time increment") totaltime = inputbox("Enter total number of seconds") RA_Rate = -1 * sin(angle) * rate Dec_Rate = -1 * cos(angle) * rate RAsum = 0 Decsum = 0 prev_count = 0 for count = increment to totaltime step increment ' to correct for rounding errors, calculate as current - sum of previous values RA = int(10*(count * RA_Rate - RAsum)+.5)/10 ' make one decimal RAsum = RAsum + RA Dec = int(10*(count * Dec_Rate - DecSum)+.5)/10 ' make one decimal DecSum = DecSum + Dec strng = increment & " " if RA >= 0 then Strng = Strng & "+" & RA & " " else Strng = Strng & RA & " " end if if Dec >= 0 then Strng = Strng & "+" & Dec else Strng = Strng & Dec end if outStream.WriteLine Strng prev_count = count Next outStream.Close msgbox("Script finished.")