home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Phoenix CD 2.0
/
Phoenix_CD.cdr
/
02a
/
orbsrc14.zip
/
MODCFG.BAS
< prev
next >
Wrap
BASIC Source File
|
1988-05-12
|
5KB
|
197 lines
'MODCFG.BAS
'Compile as .TBC file
'880511-1
defdbl a - z
cls
color 0,7
PRINT" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = "
PRINT" = = "
PRINT" = Modify ORBS.CFG Entries = "
PRINT" = = "
PRINT" = 5/11/1988 = "
PRINT" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = "
print
print"The ORBS.CFG file contains 'observer specific' data used by the prediction"
print"program. Existing entries will be displayed for possible modification. "
print"Latitude is entered as decimal degrees (nn.nnn); Southern latitudes are "
print"preceeded by a '-' (-nn.nnn). Longitude is entered as decimal degrees "
print"West longitude. Observer Altitude is entered in meters...(feet x 0.3048)." "
print"Minimum elevation is that elevation (in degrees) above which you wish the "
print"printout to commence (usually 0 or -1). "
color 7,0
print
sflag = 0 'station selected flag
open "ORBS.TMP" for OUTPUT as #2 'open output file
open "ORBS.CFG" for INPUT as #1 'prepare to read file
while not EOF(1)
input# 1, c$, lat, lon, alt, minel, sflag 'read record
gosub recdisplay 'display the record
y6 = csrlin 'save csrlin for query
color 0,7
print"Accept or Modify this entry (A/m): ";
resp$ = input$ (1)
if resp$ = chr$(13) then resp$ = "A"
resp$ = ucase$(resp$)
print resp$
color 7,0
if resp$ = "M" then gosub update 'go update the record
' if resp$ = "D" then
' locate y3,45
' color 0,7
' print "RECORD DELETED"
' color 7,0
' delay 0.75
' gosub clrbot 'clr screen, delete record
' goto nowrite
' end if
writerec:
write# 2, c$, lat, lon, alt, minel, sflag 'write the record
nowrite:
locate y1,1
for i = y1 to 23 'clear bottom of screen
print" "
next i
locate y1,1
WEND 'fall thru when input file MT
close# 1 'input file is MT, close it.
'getadtl: 'Get addtl new records
' c$ = "" 'empty the fields
' lat = 0
' lon = 0
' alt = 0
' minel = 0
' locate y1, 1
' gosub recdisplay 'display empty record
' locate y6, x1
' color 0,7
' print " Lone <CR> ENDS additions."
' color 7,0
' locate y1, x1 'input new call letters
' line input;resp$
' if len(resp$) = 0 then alldone 'exit on lone <CR>
' resp$ = ucase$(resp$)
' c$ = resp$
' locate y1, x1
' print resp$;" "
' locate y6, x1
' print " " 'erase <CR> message
' gosub up1 'go get rest of data
' write# 2, c$, lat, lon, alt, minel,sflag 'write new record to ORBS.TMP
' gosub clrbot 'clear bottom of screen
' goto getadtl 'go get records til <CR> for C$
alldone:
gosub clrbot 'clear bottom of screen
locate y1,1
print" ";
color 0,7
print " Modification complete.."
color 7,0
close# 2
kill "ORBS.CFG"
name "ORBS.TMP" as "ORBS.CFG"
RUN "ORBS.EXE" 'EXIT to menu program
'= = = = = = = = = = = = = = = = = = = =
update:
up0:
locate y1, x1
line input;resp$
if len(resp$) = 0 then up1
print" "
c$ = resp$
up1:
locate y2, x2
line input;resp$
if len(resp$) = 0 then up2
print" "
lat = val(resp$)
up2:
locate y3, x3
line input;resp$
if len(resp$) = 0 then up3
print" "
lon = val(resp$)
up3:
locate y4, x4
line input;resp$
if len(resp$) = 0 then up4
print" "
alt = val(resp$)
up4:
locate y5, x5
line input;resp$
if len(resp$) = 0 then up5
print" "
minel = val(resp$)
up5:
locate y6,1
print " ";
print " "
locate y6,1
color 0,7
print " Is data correct (Y/n): ";
resp$ = input$ (1)
if resp$ = chr$(13) then resp$ = "Y"
resp$ = ucase$(resp$)
print resp$
color 7,0
if resp$ = "N" then up0 'Try update again
RETURN 'RETURN to write record
'= = = = = = = = = = = = = = = = = = = = = = = =
recdisplay:
print " Station call: ";
x1 = pos(1)
y1 = csrlin 'save cursor position
print c$
print " Station latitude: ";
x2 = pos(1)
y2 = csrlin
print using "###.###";lat
print " Station W. longitude: ";
x3 = pos(1)
y3 = csrlin
print using "###.###";lon
print " Station altitude: ";
x4 = pos(1)
y4 = csrlin
print alt
print "Min sat elevation (deg): ";
x5 = pos(1)
y5 = csrlin
print minel
print
RETURN
'= = = = = = = = = = = = = = = = = = = = = = = =
clrbot:
locate y1,1
for i = y1 to 23 'clear bottom of screen
print " ";
print " "
next i
return
'= = = = = = = = = = = = = = = = = = = = = = = =