home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hacker Chronicles 2
/
HACKER2.BIN
/
439.FINDSAT5.BAS
< prev
next >
Wrap
BASIC Source File
|
1993-05-27
|
3KB
|
108 lines
CLS
REM FINDSAT5.BAS
REM
REM (c)1992,1993 by John W. Gardner, Jr.
REM
REM AN ELEMENT FILE BUILDING PROGRAM
REM ( selectable parameters )
REM
rem 'QBASIC Microsoft ver 1.0
SCREEN 0
COLOR 15, 1
CLS
ON ERROR GOTO 970
INPUT "Enter name of your NORAD element file to extract parameters "; Z$
OPEN "NEWSET.SZN" FOR APPEND AS #2
160 OPEN Z$ FOR INPUT AS #1
LOCATE 4, 6
PRINT "MARISAT 3 NAME ( first four characters or FULL name must be used )"
LOCATE 5, 6
PRINT "03029U satellite ID number ( full ID & the U must be specified )"
LOCATE 6, 6
PRINT "92240.427... EPOCH date ( minimum of first 2 digits must be specified )"
LOCATE 7, 6
PRINT "10.1248 INCLINATION ( first 3 characters must be specified )"
LOCATE 8, 6
PRINT "13.353... MEAN MOTION ( first 3 characters must be specified )"
LOCATE 12, 4
PRINT "Type the parameter for which new element set file will be determined."
LOCATE 14, 4
PRINT "HINT: The more complete the specification, the more restricted the results"
LOCATE 16, 4
PRINT "Selectable parameters are limited to satellite name, ID number,"
LOCATE 17, 4
PRINT "epoch, inclination or mean motion. Enter per examples shown above."
LOCATE 20, 4
PRINT "IF your using a control file containing sorted pre-selected NORAD IDs for"
PRINT " input, press 0 key. Else type parameter to continue OR press ENTER "
INPUT " to abort program. "; T$
IF T$ = "0" THEN 410
IF T$ = "" THEN 970 ELSE 490
410 LOCATE 24, 4
INPUT "Enter control file to extract specified element sets "; W$
OPEN W$ FOR INPUT AS #3
CLS
X = 0
460 IF EOF(3) THEN 800
LINE INPUT #3, U$
T$ = MID$(U$, 1, 6)
GOTO 500
490 CLS
500 IF EOF(1) THEN 800
LOCATE 1, 6
PRINT "Searching file "; Z$; " for "; T$ ; " data. One moment please."
INPUT #1, G$
INPUT #1, H$
INPUT #1, I$
Q = LEN(T$)
A$ = MID$(G$, 1, Q)
B$ = MID$(H$, 3, Q)
C$ = MID$(H$, 19, Q)
D$ = MID$(I$, 9, Q)
M$ = MID$(I$, 10, Q)
E$ = MID$(I$, 53, Q)
N$ = MID$(I$, 54, Q)
IF A$ <> T$ THEN 650 ELSE 690
650 IF B$ <> T$ THEN 660 ELSE 690
660 IF C$ <> T$ THEN 670 ELSE 690
670 IF D$ <> T$ AND M$ <> T$ THEN 680 ELSE 690
680 IF E$ <> T$ AND N$ <> T$ THEN 500 ELSE 690
690 PRINT #2, G$
PRINT #2, H$
PRINT #2, I$
LOCATE 6, 1
PRINT G$; SPC(16);
PRINT H$
PRINT I$
LOCATE 23, 21
PRINT "Data written to disk as file NEWSET.SZN"
X = X + 1
IF LEN(W$) > 1 THEN 460 ELSE 500
800 L = LOF(2)
IF L < 5 THEN 820 ELSE 860
820 CLS
LOCATE 10, 18
PRINT "No element set matching parameter "; T$; " found"
GOTO 1000
860 BEEP
LOCATE 13, 4
PRINT ; X; "element sets appended to NEWSET.SZN based on parameter "; T$
LOCATE 15, 17
INPUT "Do you wish to select more satellites ( Y/N ) "; O$
IF O$ = "Y" OR O$ = "y" THEN 920 ELSE 950
920 CLOSE #1
CLS
GOTO 160
950 CLS
GOTO 1000
970 CLS
LOCATE 10, 9
PRINT "Program aborted with no input by user OR bad file name/path used"
1000 CLOSE #1
CLOSE #2
LOCATE 12, 25
PRINT "Type CLS to clear screen colors"
BEEP
SYSTEM
END