Category : Science and Education
Archive   : SATFLY11.ZIP
Filename : SATFLY11.BAS

 
Output of file : SATFLY11.BAS contained in archive : SATFLY11.ZIP
ÿ5

*** SATFLY11.BAS, April 15, 1989 W J Cuneo, Jr (301) 977 5778€
*** SATFLY11.DOC is the companion document file read by this program.å
*** Copyright 1989. Commercial use not authorized without agreement beforehand.ó
(• § ‰ ^û
2É Ý <¯ AêH,OêY:¬ Z:­ B,IêK] F† CLIFE(, ): *** Holds the empirical factors for life estimatingê P† DS( ,),DH( ,),DL( ,):*** for the altitude/density input values for calculating the semilog fit for the selected atmosphere. Z† DENCOEFF( ,): *** will hold the semilog coefficients which will be used to calculate density as function of altitude. Density=10^(ah+b)´ d ALTITUDE/DENSITY DATA FOR STANDARD ATMOSPHERE.ù n„ 0,1.22:*** units are altitude (km), density (Kg/meters cubed)
x„ 100,5.6E-7
‚„ 150,2.1E-9-
Œ„ 200,2.5E-10?
–„ 300,1.9E-11Q
 „ 400,2.8E-12c
ª„ 500,5.2E-13v
´„ 600,1.14E-13ˆ
¾„ 700,3.1E-14›
Ȅ 800,1.14E-14­
҄ 900,5.8E-15܄ 1000,3.6E-15æ DATA FOR ALTITUDE/DENSITY FOR HIGH SOLAR ACTIVITY ATMOSPHEREHð„ 0,1.22:*** units are altitude (km), density (Kg/meters cubed)Yú„ 100,5.6E-7j„ 150,3.2E-9|„ 200,4.5E-10Ž„ 300,5.0E-11 "„ 400,2.0E-11²,„ 500,5.2E-12Ä6„ 600,1.4E-12Ö@„ 700,6.0E-13èJ„ 800,3.0E-13úT„ 900,1.0E-13
^„ 1000,5.0E-14Lh ALTITUDE/DENSITY DATA FOR LOW SOLAR ACTIVITY ATMOSPHERE.‘r„ 0,1.22:*** units are altitude (km), density (Kg/meters cubed)¢|„ 100,5.6E-7³†„ 150,2.1E-9Ő„ 200,1.5E-10ך„ 300,9.0e-12餄 400,3.0E-13û®„ 500,3.0E-14
¸„ 600,5.0E-15„ 700,1.0E-151Ì„ 800,1.5E-16CÖ„ 900,8.0E-17Và„ 1000,5.0E-17‚ê EMPIRICAL FACTORS FOR LIFE ESTIMATING¶ô„ .2,.2,.2,.2,.37,.38,.355,.33,.314,.32,.36,.43íþ„ .2,.2,.2,.2,.414,.5,.565,.432,.395,.435,.38,.355'„ .2,.2,.2,.2,.275,.298,.235,.255,.264,.236,.286,.392H___________________________q BEGINNING OF EXECUTABLE STATEMENTS &À:Ê ,#:‘" WAIT FOR 4 SECONDS.... "é0 DEFINE CONSTANTS USED. THE `LET' IS UNNECESSARY, BUT DISTINCTIVE./:ˆ CçìÿŠ(
): *** constant for converting natural log to base 10BDˆ PIç¾h!¢ÚI‚Nˆ Gçì_:*** Gravitational Constant in mks (nt-m2/kg2)«Xˆ MEARTHçd^Ó:*** Mass of earth in Kgîbˆ UçGëMEARTH: *** U simplifies the satellite motion equations,lˆ METPERNMçÀë ë\"‚ìd: *** meters per nautical milervˆ REARTHçsë ë ë\"‚ìd: *** earth radius (6364.956 meters)›€ˆ NTLBç¨Wƒ: *** newtons per pound8Šˆ OPTIMEçœ3"{:*** empirical value to adapt realtime to simulation time for display of time speedup/slowdown. Value is code, not machine, dependent.„”ˆ ICALCç
:*** number of calculation cycles done before display updateÍž À: *** to routine which estimates speed of machine; needs clock¨ LOAD ALTITUDE/DENSITY DATA FOR STANDARD ATMOSPHERE.²‚ Iç Ì  $¼‚ Jç Ì 2Ƈ DS(I,J):Ѓ JBÚƒ IŠä LOAD DATA FOR ALTITUDE/DENSITY FOR HIGH SOLAR ACTIVITY ATMOSPHERE™î‚ Iç Ì  §ø‚ Jç Ì µ‡ DH(I,J)½ ƒ JŃ I   LOAD ALTITUDE/DENSITY DATA FOR LOW SOLAR ACTIVITY ATMOSPHERE.*‚ Iç Ì  &4‚ Jç Ì 4>‡ DL(I,J)<Hƒ JDRƒ Iu\ LOAD EMPIRICAL FACTORS FOR LIFE ESTIMATINGƒf‚ Jç Ì ’p‚ Kç Ì  £z‡ CLIFE(J,K)C„CLIFE(J,K)çCLIFE(J,K)ìö(<‚ :*** this fudge factor is artifact of earlier process to calibrate actual vs predicted. Am too lazy to change the numbers.KŽƒ KS˜ƒ Jt¢___________________________¶¬ BEGINNING OF PROGRAM CYCLE FOR A PARTICULAR SATELLITE CASE.¶ˆ ISOUNDç:***flag for using/not using sound; initially off;`o' toggles:Àˆ DDTç:*** used for final seconds clock display.‡Êˆ ISCREENç:*** assures screen selection will reset at start of a case.ÃÔTIMEç:ORBITç:Iç:*** start cumulating variables overøÞFç:FHOLDç:*** zeros the rate of decay measureè___________________________Cò*** NOW DISPLAY THE SELECTION SCREEN{ü¿ ,:À: ¿ ,:Ê ,:‘"SATFLY11.BAS Apr 15, 1989"¾¿ ,:Ê ,:‘" HOW LONG WILL A SATELLITE REMAIN IN ORBIT ? "Ê ,:‘" THIS PROGRAM CALCULATES THE DRAG DECAY OF A CIRCULAR ORBIT "6Ê ,:‘" HIT `d' TO USE DEFAULT VALUES: "j$Ê ,':‘" 150 nautical miles initial altitude "Ÿ.Ê 
,':‘" 500 kilograms mass "Ô8Ê  ,':‘" 2 square meters cross section " BÊ  ,':‘" 1000 seconds per step in time ">LÊ 
,':‘" standard atmosphere density model "oVÊ ,:‘" HIT TO ENTER NEW VALUES. "¯`Ê ,:‘" HIT `r' FOR TEXTUAL DESCRIPTION OF THIS PROGRAM."ÝjÊ ,:‘" **** HIT TO QUIT **** "þt___________________________&~ NOW ALLOW USER TO SELECT OPTIONSRˆÊ ,:¿ ,:‘" You may now select ";’ z:*** to routine to purge inkey of stray keystrokes«œZ2$çÞ:‹ ÿ’(Z2$)ç Í œë¦‹ ÿ•(Z2$)ç
Í  R : *** to new value selection routine.3°‹ ÿ•(Z2$)ç
Í :*** new values selected, so exit to next stage.nº‹ ÿ•(Z2$)çd Í  

: *** to definition of defaults.µÄ‹ ÿ•(Z2$)çd Í :*** use default values, so exit to next stage.ê΋ ÿ•(Z2$)çr Í  Ð : *** to text description.%Ø‹ ÿ•(Z2$)çr Í Š: *** to beginning after reading textYâ‹ ÿ•(Z2$)ç Í À:*** prepare for quit routine.–ì‹ ÿ•(Z2$)ç Í  P :¡ œ: *** to final quit routine.·ö___________________________æ NOW CREATE SELECTION DEPENDENT CONSTANTS
 l: *** to make standard altitude graphic barP DEFINE A STRING ONCE FOR USE MANY TIMES LATER}‹ BATMç Í ZATMOS$ç"standard atmosphere"ª(‹ BATMç Í ZATMOS$ç"high solar activity"Ö2‹ BATMç Í ZATMOS$ç"low solar activity"8 <• BATM  Œ,Ò,:*** Calculate semilog fit coefficients for selected atmosphereu F¿ ,:À:¿ ,:  : *** put options on status screen° P‹ KMç Í  2
: *** display initial values, nm units.ë Z‹ KMç Í  Z
: *** display initial values, km units.(!dˆ ALTçALTITUDEëMETPERNM: *** initial altitude in meterst!nˆ RçREARTHéALT:*** distance of satellite from center of earth (meters)½!x NOW CALCULATE TWO VALUES NEEDED TO INITIALIZE THE CALCULATION LOOPõ!‚ˆ Vç(UìR)í€ :*** initial velocity of satellite8"Œˆ Eçê(MëU)ì(ëR) :*** initial energy of the satellite's orbitY"–___________________________š"  NOW START THE LOOP FOR ORBIT DECAY CALCULATION INCREMENTSã"ª‚ Iç Ì ICALC: *** do ICALC calculation cycles before each display.k#´ZT$çÞ: *** toggle indicator; if anything is found in inkey, then `s',`f',`o', `p' or `esc'is looked for in the GOSUB below.Ú#¾‹ ÿ’(ZT$)æ Í  ¸ : *** to toggle DT up, down by x2; toggle sound on/off; pause; or to quit$ÈTHETA1ç(VìR)ëDT :*** calculation of orbital epoch incrementh$ÒHç(RêREARTH)ìè:*** density equations are in km; use H as the variable¸$Ü Ê ,:‹ Hæç° Í ‘" NOTE - Altitudes over 1200 Km are not modelled well. "6%æLç: *** Find altitude band where satellite is now. Need for selection of density model semilog coefficients.J%ð‹ Hæç„ Í Lç Z%ú‹ Læ Í Ân%‹ Hæç  Í Lç ~%‹ Læ Í Â’%‹ Hæç¼ Í Lç
¢%"‹ Læ Í Âµ%,‹ HæçX Í LçÅ%6‹ Læ Í ÂØ%@‹ Hæçô Í Lçè%J‹ Læ Í Âû%T‹ Hæç Í Lç &^‹ Læ Í Â&h‹ Hæç, Í Lç.&r‹ Læ Í Â@&|‹ HæçÈ Í LçP&†‹ Læ Í Âb&‹ Hæç– Í Lçr&š‹ Læ Í Â„&¤‹ Hæçd Í Lç”&®‹ Læ Í Â¥&¸‹ Hæç Í Lçñ&ÂDENSITYç
í(DENCOEFF(L,)ëHéDENCOEFF(L,)): *** calculate density at H4'ÌDEçDENSITYëNXë(Ví)ëDT : *** orbital energy change in time dTb'ÖENEWçEêDE : *** new energy after time dT©'àRNEWçê(MëU)ì(ëENEW) : *** new radius corresponding to new energyî'ê‹ RNEWçèREARTH Í ô :¡ þ:*** possibly start altitude too low0(ô‹ TIMEç Í  @:*** if true, then start altitude IS too lowj(þVNEWç(UìRNEW)í€ : *** new velocity at new radius±(THETA2ç(VNEWìRNEW)ëDT :*** calculation of orbital epoch incrementI)ORBITçORBITé(THETA1éTHETA2)ì(ëëPI):*** orbit epoch averaged using beginning and end velocities and radii for the latest time increment.u)PERIODç(ëDTëëPI)ì((THETA1éTHETA2)ë<)º)&TIMEçTIMEéDT:*** keep current time into the flight (in seconds)ü)0‹ ISOUNDç Í  ‚
:*** make reentry warning sound if desired\*:Fç(ëPIì(THETA1))ë(RêRNEW)ì(RêREARTH): *** fractional change in orbital altitude per orbit¨*DFORCEçDENSITYëNXëVí : *** drag force in newtons at start of incrementê*N‹ RNEWèREARTHé N Í  È
: *** to burnup routine, below 20km6+X‹ Fæ€ Í DDTçDDTéDT: *** make value for final seconds clock displayÎ+bRHOLDçR:RNEWHOLDçRNEW:VHOLDçV:DENHOLDçDENSITY:THETA1HDçTHETA1:*** holds current values for output after new values are evaluated as a burnup.‡,lTHETA2HDçTHETA2:PERIODHDçPERIOD:ORBITHDçORBIT:TIMEHOLDçTIME:FHOLDçF: FORCEHLDçFORCE:*** holds current values for output after new values are evaluated as a burnup.Ð,vEçENEW:RçRNEW:VçVNEW: *** set new initial values for next iterationØ,€ƒ I-Š‹ ISOUNDç Í Ä p,:*** a little pip for each displayË-”‹ ISCREENç Í  î:  allows only one pass through the ISCREEN selection, thus preserving the initial value calculated in the GOSUB for PREDICTed number of days..ž‹ Fæ€ Í ISCREENç: *** when near reentry go to fine time screen<.¨  :*** to make standard display¹.²• ISCREEN  î ,” ,¬
,:  to appropriate screen for life dependent presentation of status of satellite.ý.¼‰  : *** Repeat loop. This loop is the core of this program./Ə/Џ------3/ڏ FOLLOWING ARE THE SUBROUTINES?/ä------ˆ/î ROUTINE TO SELECT DISPLAY SCREEN APPROPRIATE TO PREDICTED LIFETIMEk0øDAYENTERç((ìFHOLD)ëPERIODHD)ëCLIFE(BATM,L)ì(<ë):PREDICTçDAYENTER: *** first PREDICTion of time (days) to entry; this value made in very first increment of time, and kept for display at burnup or quit.±0‹ DAYENTER æç' Í ISCREENç:*** ISCREEN selects display formatÇ0 ‹ ISCREENæ Í >æ0‹ DAYENTER æç Í ISCREENçü0 ‹ ISCREENæ Í >1*‹ DAYENTER æç Í ISCREENç114‹ ISCREENæ Í >71>ŽC1H------n1R---NEW INITIAL VALUE SELECTION SCREEN‚1\¿ ,:À:¿ ,à1fÊ ,:‘ "Now enter initial altitude, mass, cross-section, time increment, and atmosphere"(2p‘:‘"Please input initial altitude. You will select km or nm next. "X2z…" ALTITUDE (Default is 150) = ",ALTITUDEw2„‹ ALTITUDEç Í ALTITUDEç–°2Ž‘"Hit `k' if kilometers, hit `n' if nautical miles";í2˜ z:*** to routine to purge inkey of stray keystrokes
3¢Z1$çÞ: ‹ ÿ’(Z1$)ç Í ¢83¬‹ ÿ•(Z1$)çk Í ‘ " *KILOMETERS selected"X3¶‹ ÿ•(Z1$)çk Í KMç :¡ KMç•3À‹ ÿ•(Z1$)çk Í Þ: *** exit decision routine for unitsÆ3Ê‹ ÿ•(Z1$)çn Í ‘" *NAUTICAL MILES selected"ä3Ô‹ ÿ•(Z1$)çn Í Þ :¡ ¢j4Þ‹ KMç Í ALTITUDEçALTITUDEëèìMETPERNM: *** keep the variable ALTITUDE in nautical mile units throughout this program.°4è‹ ALTITUDEè Í †:*** to announce altitude is too low to startø4ò‹ ALTITUDEæè Í Â:*** to announce altitude is too high to start/5ü‘:‘"Please input mass (kg.). Default is 500 kg. ":P5 … "MASS = "; M:‹ Mç Í Mçôm5 ‹ Mè Í ZERROR$ç" MASS "¥5 ‹ Mè Í  þ: *** to announce an illogical value.ê5$ ‘:‘"Please input cross-section (meters squared). Default is 2.":A6. ‘ "(Change cross-section proportionally if drag coefficient is different than 2.)"l68 … "CROSS SECTION = "; NX:‹ NXç Í NXç“6B ‹ NXè Í ZERROR$ç" CROSS SECTION "Ì6L ‹ NXè Í  þ: *** to announce an illogical value.7V ‘:‘"Please input time step length (seconds). Default is 1000 seconds.":A7` … "TIME STEP = "; DT:‹ DTç Í DTçèi7j ‹ DTè Í ZERROR$ç" TIME INCREMENT "¢7t ‹ DTè Í  þ: *** to announce an illogical value.ú7~ ‘:‘"Select atmosphere. S = standard, H = hi solar activity, L = low solar activity""8ˆ ‘ "Default is standard atmosphere";-8’ BATMç\8œ  z:*** purge inkey of stray keystrokesv8¦ Z$çÞ:‹ ÿ’(Z$)ç Í ¦ ¸8° ‹ ÿ•(Z$)ç
Í ‰ ì : *** short goto for a bypass to speed upâ8º ‹ ÿ•(Z$)çs Í BATMç : s is selected 9Ä ‹ ÿ•(Z$)çh Í BATMç : h is selected69Î ‹ ÿ•(Z$)çl Í BATMç : l is selectedu9Ø ‹ BATMç Í ¦ : *** continue to wait for a correct choice¶9⠉ ö : *** this short goto enables the bypass 8 lines above:ì BATMç: *** selects standard atmosphere if default bypass used above:ö Ž:
------?:

---DEFINITION OF DEFAULT INITIAL VALUESm:
ALTITUDEç–:Mçô:NXç:DTçè:KMç:BATMçs:
Ž:(
------ª:2
---DISPLAY INITIAL VALUES, NM UNITS. ;<
¿ ,:Ê ,:‘"Start(nm)=";ALTITUDE;" Mass(Kg)=";M;" Xsection(m2)=";NX;" ";ZATMOS$:¿ ,;F
Ž;P
------F;Z
---DISPLAY INITIAL VALUES, KM UNITS.²;d
¿ ,:Ê ,:‘"Start(km)=";ALTITUDEëMETPERNMìè;" Mass(Kg)=";M;" Xsection(m2)=";NX;" ";ZATMOS$:¿ ,¸;n
ŽÄ;x
------ð;‚
--- ROUTINE FOR REENTRY WARNING SOUNDS(<Œ
‹ Fèš™ Í Ž:*** not near reentry; sound no alarmo<–
‹ Fæè Í ´
: *** use constant frequency sound; reentry imminent³< 
TONEçFëé%:*** tone <37 makes GWBASIC fail, but BASICA works.Ü<ª
Ä TONE,:Ž: *** reentry alert sound=´
Ä € ,:Ž:*** reentry is imminent.=¾
-------=È
--- ROUTINE FOR REENTRYG=Ò
‹ ISOUNDç Í Ä Ü,~=Ü
‚ IBç Ì IPATCH:*** dapples screen with hot spots¤=æ
IROWçÿ…(ÿˆë)é:ICOLçÿ…(ÿˆëN)éË=ð
Ê IROW,ICOL:¿  ,:‘ ÿ–(²);ÿ–(²)Ô=ú
ƒ IB> ¿ ,:Ê ,:ZSPACE$çÿ˜(<):‘ ZSPACE$;:*** erases lineG> ‹ ISOUNDç Í " :*** bypass sound if not desired > Ä € ,:¿  , :À:Ä ,:¿ ,:À:Ä 2,:À:Ä (,:¿ 
,
:À:Ä &,:¿ ,:À:¿ ,ç>" ‚ Iç Ì IFLICKER:*** repeat soundless colors for good persistence?, ¿  , :À:¿ ,:À:¿ 
,
:À:¿ ,:À:¿ , ?6 ƒ I`?@  ’: *** to display last calculated state before reentryr?J Ê ,:‘ ZBAR$ˆ?T Ê ,NBAR:‘ ÿ–(²)ì?^ ¿  ,:Ê ,:‘" REENTRY !! LAST CALCULATED STATE BEFORE REENTRY IS SHOWN ABOVE. "2@h ‚ IBç Ì IFLASH:*** makes flashing burnup cloud on altitude bar.\@r Ê ,NBAR:‘ ÿ–(±):Ê ,NBARê:‘ ÿ–(²)†@| Ê ,NBAR:‘ ÿ–(ù):Ê ,NBARê:‘ ÿ–(*)°@† Ê ,NBAR:‘ ÿ–(²):Ê ,NBARê:‘ ÿ–(±)¹@ ƒ IBú@š  P:*** to routine for choice of new case or exit to DOS.:A¤ Ž: *** return ineffective; only way out is new case or DOSFA® ------’A¸ --- ROUTINE TO TOGGLE SECONDS PER STEP UP/DOWN BY x2, OR TO QUIT/PAUSEÉA ‹ ÿ•(ZT$)çf Í DTçDTë: *** `f' (faster) detectedBÌ ‹ ÿ•(ZT$)çs Í DTçDTì: *** `s' (slower) detectedABÖ ‹ ÿ•(ZT$)ço Í  :: *** `o' detected; toggle sound on/offƒBà ‹ ÿ•(ZT$)çp Í  ð: *** to pause routine for status screenÄBê ‹ ÿ•(ZT$)ç Í  È: *** to quit routine for status screenÊBô ŽÖBþ ------C --- ROUTINE TO MAKE STANDARD DISPLAY…C Ê ,:‘" CURRENT ALTITUDE (nm, km) = ";:‘ ×"####,.#######"; (RHOLDêREARTH)ìMETPERNM;:‘ ×"#######,.#######";(RHOLDêREARTH)ìè—C Ê ,:‘ ZBAR$ÌC& NBARçéÿ…(((RHOLDêREARTH)ìMETPERNM)ëFìALTITUDE)D0 Ê ,NBAR:‘ ÿ–():*** prints satellite symbol on altitude barD: Ê ,:‘" ATMOSPHERE DENSITY (Kg/m3) = ";:‘ ×"##.######^^^^"; DENHOLD;:‘" ( 1.22 Kg/m3 at sea level ) "êDD Ê ,:‘" DRAG FORCE (newtons, lbs) = ";:‘ ×"##.##^^^^";FORCEHLD;:‘" ";:‘ ×"##.##^^^^";FORCEHLDì¨WƒEN ‹ FæÂu{ Í  (:*** display g forceEX Ê 
,:‘" VELOCITY (feet/s, meters/s) = ";:‘ ×"#####,.#####";VHOLDëáz†ì ;:‘ ×"#######,.#####";VHOLDìEb Ê ,:‘ " ORBITAL PERIOD (minutes) = ";:‘ ×"###.######";(ëDTëëPI)ì((THETA1HDéTHETA2HD)ë<);:‘" "CFl DAYENTERç((ìFHOLD)ëPERIODHD)ëCLIFE(BATM,L)ì(<ë):*** estimate of days to entrykFv DAYTOTALçDAYENTERéTIMEHOLDì(ë)qF€ Ž}FŠ ------ÀF” --- ROUTINE TO OUTPUT STATUS SCREEN FOR 10,000 > LIFE > 1 DAYLGž Ê  ,:‘" FRACTIONAL ALTITUDE CHANGE PER ORBIT = ";:‘ ×"##.####^^^^";FHOLD;:‘" (";:‘ ×"##.###^^^^";(RHOLDêREARTH)ëFHOLD;:‘" meters ) "†G¨ Ê ,.:‘" ORBITS FLOWN = ";:‘ ×"#####,.###";ORBITHDH² Ê ,:‘" TIME (days/hours/sec) =";:‘ ×"#####,.###";TIMEHOLDì(ë);:‘" ";:‘ ×"######,.###";TIMEHOLDì;:‘" ";: ‘ ×"##.####^^^^";TIMEHOLD¶H¼ Ê ,:‘" DAYS TO ENTRY ";:‘ ×"#######,.##";DAYENTER;:‘" ";:‘ ×"####.##";dëDAYENTERìDAYTOTAL;:‘" % ";:‘" DAYS TOTAL LIFETIME ";:‘ ×"#####,.##";DAYTOTALIÆ Ê ,:‘ " TIME STEP (sec) = ";: ‘ ×"#########,.##";DT;: ‘" (`s' to slow, `f' to speedup x2 )"dIÐ  ˆ:*** to calculate/display relation of real to simulated time.jIÚ ŽvIä ------¶Iî --- ROUTINE TO OUTPUT STATUS SCREEN FOR LIFE > 10,000 DAYSCJø Ê  ,:‘" FRACTIONAL ALTITUDE CHANGE PER ORBIT = ";:‘ ×"##.####^^^^";FHOLD;:‘" (";:‘ ×"##.####^^^^";(RHOLDêREARTH)ëFHOLD;:‘" meters ) "|J
‹ TIMEæ|Ÿ.« Í *
:*** use exponent display of timeºJ
Ê ,.:‘" ORBITS FLOWN = ";:‘ ×"###########,.#";ORBITHDXK
Ê ,:‘" TIME (years/days/sec) =";:‘ ×"#######,.##";TIMEHOLDì(ëë 6‰);:‘" ";:‘ ×"##########,";TIMEHOLDì(ë);:‘" ";: ‘ ×"##.####^^^^";TIMEHOLD‡K
‰ >
:*** bypass exponent display of timeÎK*
Ê ,.:‘" ORBITS FLOWN = ";:‘ ×"##.####^^^^";ORBITHD;:‘" "TL4
Ê ,:‘" TIME (years/sec) = ";:‘ ×"##.###^^^^";TIMEHOLDì(ëë 6‰);:‘" ";: ‘ ×"##.####^^^^";TIMEHOLD;:‘" "•L>
‹ DAYTOTALæˆ< š Í \
:*** jump to exponent display of life=MH
Ê ,:‘" YEARS TO ENTRY ";:‘ ×"######,.##";DAYENTERì 6‰;:‘" ";:‘ ×"####.##";dëDAYENTERìDAYTOTAL;:‘" % ";:‘" YEARS TOTAL LIFE ";:‘ ×"######,.##";DAYTOTALì 6‰lMR
‰ f
:*** bypass exponent display of lifeN\
Ê ,:‘" YEARS TO ENTRY ";:‘ ×"##.###^^^^";DAYENTERì 6‰;:‘" ";:‘ ×"####.##";dëDAYENTERìDAYTOTAL;:‘" % ";:‘" YEARS TOTAL LIFE ";:‘ ×"##.###^^^^";DAYTOTALì 6‰PNf
‹ DTæÎlž Í „
:*** use exponent display of time step·Np
Ê ,:‘ " TIME STEP (sec) = ";: ‘ ×"###########,";DT;: ‘" (`s' to slow, `f' to speedup x2 ) "ëNz
‰ Ž
:*** bypass exponent display of time step`O„
Ê ,:‘ " TIME STEP (years) = ";: ‘ ×"##.###^^^^";DTì(ëë 6‰);: ‘" (`s' to slow, `f' to speedup x2 ) "¨OŽ
 ˆ:*** to calculate/display relation of real to simulated time.®O˜
ŽºO¢
------õO¬
--- ROUTINE TO OUTPUT STATUS SCREEN FOR LIFE < 1 DAY€P¶
Ê  ,:‘" FRACTIONAL ALTITUDE CHANGE PER ORBIT = ";:‘ ×"##.####^^^^";FHOLD;:‘" (";:‘ ×"##.##^^^^";(RHOLDêREARTH)ëFHOLD;:‘" meters ) "ºPÀ
Ê ,.:‘" ORBITS FLOWN = ";:‘ ×"###,.#####";ORBITHDLQÊ
Ê ,:‘" TIME (days/hours/sec) =";:‘ ×"##,.#####";TIMEHOLDì(ë);:‘" ";:‘ ×"###,.######";TIMEHOLDì;:‘" ";: ‘ ×"########.###";TIMEHOLDíQÔ
Ê ,:‘" DAYS TO ENTRY ";:‘ ×"####,.######";DAYENTER;:‘" ";:‘ ×"####.##";dëDAYENTERìDAYTOTAL;:‘" % ";:‘" DAYS TOTAL LIFETIME ";:‘ ×"###,.######";DAYTOTALSRÞ
Ê ,:‘ " TIME STEP (sec) = ";: ‘ ×"#####,.###";DT;: ‘" (`s' to slow, `f' to speedup x2 ) "›Rè
 ˆ:*** to calculate/display relation of real to simulated time.¡Rò
Ž­Rü
------øR--- ROUTINE TO OUTPUT STATUS SCREEN FOR NEAR REENTRY DISPLAYS OF TIMEmSÊ  ,:‘" ALTITUDE CHANGE PER SECOND = ";:‘ ×"##.##^^^^";(RHOLDêRNEW)ìDT;:‘" meters "µS‹ TIMEì(ë)æc Í B: *** bypass display tailored for <99 daysðS$ Ê ,.:‘" ORBITS FLOWN = ";:‘ ×"####,.#####";ORBITHD‚T.Ê ,:‘" TIME (days/hours/sec) =";:‘ ×"###.#####";TIMEHOLDì(ë);:‘" ";:‘ ×"###.#####";TIMEHOLDì;:‘" ";: ‘ ×"##.#####^^^^";TIMEHOLDÄT8‰ V:*** bypass display of time tailored for life >99 days. UB Ê ,.:‘" ORBITS FLOWN = ";:‘ ×"###.###^^^^";ORBITHD;:‘" " ULÊ ,:‘" TIME (days/hours/sec) =";:‘ ×"##.###^^^^";TIMEHOLDì(ë);:‘" ";:‘ ×"##,.###^^^^";TIMEHOLDì;:‘" ";: ‘ ×"##.#####^^^^";TIMEHOLDÛUVÊ ,:‘ ×"######.####";DDT;:‘" final seconds clock "„V`Ê ,:‘" SECONDS TO BURNUP ";:‘ ×"####,.###"; DAYENTERëë;:‘" ";:‘ ×"####.###";dëDAYENTERìDAYTOTAL;:‘" % ";:‘" DAYS TOTAL LIFETIME";:‘ ×"##.###^^^^";DAYTOTALìVjÊ ,:‘ " TIME STEP (sec) = ";: ‘ ×"#####,.#####";DT;: ‘" (`s' to slow, `f' to speedup x2 ) "4Wt ˆ:*** to calculate/display relation of real to simulated time.:W~ŽFWˆ------ŠW’--- ROUTINE TO OUTPUT FINAL STATUS SCREEN UPON REENTRY OR QUIT´Wœ¿ ,:  :*** to standard displayêW¦Ê ,:ZSPACE$çÿ˜(F):‘ ZSPACE$;:*** erases line_X°Ê  ,:‘" ALTITUDE CHANGE PER SECOND = ";:‘ ×"##.##^^^^";(RHOLDêRNEW)ìDT;:‘" meters "¦Xº Ê ,.:‘" ORBITS FLOWN = ";:‘ ×"##.##^^^^";ORBITHD;:‘" "AYÄÊ ,:‘" TIME (days/hours/sec) =";:‘ ×"##.##^^^^";TIMEHOLDì(ë);:‘" ";:‘ ×"##.##^^^^";TIMEHOLDì;:‘" ";: ‘ ×"##.##^^^^";TIMEHOLD;:‘" "êYÎÊ ,:‘" DAYS TO REENTRY ";:‘ ×"##.###^^^^";DAYENTER;:‘" ";:‘ ×"####.###";dëDAYENTERìDAYTOTAL;:‘" % ";:‘" DAYS TOTAL LIFETIME ";:‘ ×"##.###^^^^";DAYTOTAL;:‘" "+ZØÊ ,3:‘" DAYS PREDICTED ";:‘ ×"##.###^^^^";PREDICT;:‘" "iZâÊ ,:‘ " LAST TIME STEP (sec) = ";: ‘ ×"##.##^^^^";DT;:±Zì ˆ:*** to calculate/display relation of real to simulated time.ÄZöÊ ,:‘" WAS"ÿZ‹ KMç Í  2
: *** display initial values, nm units.:[
‹ KMç Í  Z
: *** display initial values, km units.@[ŽL[------w[(--- DISPLAY G FORCE WHEN NEAR REENTRY¯[2Ê ,<:‘" G's =";:‘ ×"####.####";FORCEHLDì(ÍÌ„ëM)µ[<ŽÁ[F------í[P--- FINAL QUIT ROUTINE FOR ALL SCREENSJ\ZÊ ,:¿ ,:‘" HIT `c' TO RETURN TO SELECTION SCREEN, HIT `e' TO EXIT TO DOS ": ¿ ,y\d z:*** purge inkey of stray keystrokes•\nZ3$çÞ:‹ ÿ’(Z3$)ç Í n¾\x‹ ÿ•(Z3$)çe Í þƒ : *** exit to DOSõ\‚‹ ÿ•(Z3$)çc Í ¬ :¡ n: *** begin another case5]ŒŽ: *** return ineffective; only way out is new case or DOSA]–------„] ---ROUTINE FOR OPTION INSTRUCTION ON BOTTOM OF DISPLAY SCREENÛ]ªÀ:Ê ,:‘" **** Hit `o' to toggle sound on/off, `p' to pause, or to quit ";á]´Ží]¾------^ȏ---PRE-QUIT ROUTINE FOR STATUS SCREENX^ҍ ’: *** to display last calculated state before reentry—^܍ P :*** to routine for choice of rerun or exit to DOS.×^æŽ: *** return ineffective; only way out is new case or DOSã^ð------ü^ú---ROUTINE TO PAUSE+_ z:*** purge inkey of stray keystrokes_Ê ,:‘" >>>> TIME STOPPED. HIT ANY KEY TO CONTINUE ";›_Z2$çÞ:‹ ÿ’(Z2$)ç Í ð_"Ê ,:‘" **** Hit `o' to toggle sound on/off, `p' to pause, or to quit ";ö_,Ž`6------N`@---ROUTINE IF INITIAL ALTITUDE TOO LOW FOR EVEN ONE CALCULATION CYCLE.a`J‹ ISOUNDç Í ÅÀ`TÀ:Ê 
,:‘" INITIAL ALTITUDE TOO LOW FOR THIS CASE. TRY A SMALLER TIME INCREMENT, LIKE 10"a^Ê  ,:‘" MAYBE YOU WILL EVEN HAVE TO START AT A HIGHER ALTITUDE."Hah P:*** to routine for choice of new case or exit to DOS.ˆarŽ: *** return ineffective; only way out is new case or DOS”a|------Õa†---ROUTINE IF INITIAL ALTITUDE LESS THAN 12 NAUTICAL MILES.èa‹ ISOUNDç Í Å3bšÀ:Ê 
,:‘" INITIAL ALTITUDE MUST BE GREATER THAN 12 NAUTICAL MILES. "tb¤ P:*** to routine for choice of new case or exit to DOS.´b®Ž: *** return ineffective; only way out is new case or DOSÀb¸------þb---ROUTINE IF INITIAL ALTITUDE OVER 1000 NAUTICAL MILES.cÌ‹ ISOUNDç Í Å`cÖÀ:Ê 
,:‘" INITIAL ALTITUDE CAN'T BE GREATER THAN 1000 NAUTICAL MILES. "¡cà P:*** to routine for choice of new case or exit to DOS.ácêŽ: *** return ineffective; only way out is new case or DOSícô------5dþ--- ROUTINE IF MASS, CROSS-SECTION, OR TIME INCREMENT ARE NEGATIVEHd‹ ISOUNDç Í Å†dÀ:Ê 
,:‘" VALUES OF";ZERROR$;" CAN'T BE ZERO OR LESS. "Çd P:*** to routine for choice of new case or exit to DOS.e&Ž: *** return ineffective; only way out is new case or DOSe0------Oe:--- TO TOGGLE ISOUND BETWEEN 0 AND 1 (SOUND OFF OR ON)keD‹ ISOUNDç Í N :¡ XzeNISOUNDç:Ž‰eXISOUNDç:Ž•eb------¸el--- MAKE INITIAL ALTITUDE BARÉevZBAR$çÿ–(Û)Øe€‚ Kç Ì FïeŠZBAR$çZBAR$éÿ–(°)÷e”ƒ K fž PRINT ZBAR$Of¨ Û°°°°(looks like this)°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°Îf² The above graphic displayed here by PRINTing it, then labeling with a line number, then making it a REM statement.Ôf¼ŽàfƏ------'gЏ--- ROUTINE FOR PRINTING TO SCREEN THE TEXT FILE FOR THIS PROGRAMTgÚÀ:º "I",,"SATFLY11.DOC": *** text fileggä‚ IREADç Ì ­gî‹ ÿ£() Í >: to prompt for return to opening screen of programÀgø° … #, ZTEXT$Íg‘ ZTEXT$Ùg ƒ IREAD hÊ ,:‘" *** HIT ANY KEY TO READ MORE *** ":h  z:*** purge inkey of stray keystrokesah*ZREAD$çÞ:‹ ÿ’(ZREAD$)ç Í * :¡ ÀŒh4‰ ä: *** read next page of document•h>» #ÔhHÊ ,:‘" *** HIT ANY KEY TO RETURN TO DRAG PROGRAM *** "iR z:*** purge inkey of stray keystrokes%i\ZREAD$çÞ:‹ ÿ’(ZREAD$)ç Í \FifŽ: *** to selection screen.Rip------Ÿiz--- ROUTINE TO PURGE INKEY BUFFER SO STRAY STROKES DONT CONFUSE THINGS. j„ZPURGE$ç"1": *** makes sure inkey buffer has something in it before the purging loop begins next. jŽ±é ÿ’(ZPURGE$)æQj˜ZPURGE$çÞ: *** takes next value from bufferWj¢²]j¬Žij¶------´jÀ--- ROUTINE FOR FINDING SPEED OF MACHINE BEING USED & SET SPEED FLAGSÌjÊZTIMER$çþŽ:ICOUNTçõjÔ±é ÿ”(ÿ‚(ZTIMER$,))ê ÿ”(ÿ‚(þŽ,))ç kÞ²:*** waits for the start of a secondNkèZTIMER$çþŽ: *** record the starting timekò‹ ÿ”(ÿ‚(ZTIMER$,))æ9 Í Ê:*** don't try if near 0 secondsºkü±é ÿ”(ÿ‚(ZTIMER$,))ê ÿ”(ÿ‚(þŽ,))æêÎkICOUNTçICOUNTéùk²:*** continue count for two seconds.:lITIMEç ÿ”(ÿ‚(þŽ,)): *** end second of 2 second measurememtwl$SPEEDçICOUNTì:*** cycles per second for the above loopôl.‹ ITIMEè Í SPEEDçSPEEDìš™:*** accounts for higher speeds being calculated for seconds under 12 in a minute.*m8ISPEEDçÿ…(SPEED): *** puts speed in integer formimB‹ ISPEEDæ Í IMACHINEç :*** is machine 386,AT, or XT ?›mL‹ IMACHINEç Í `:*** if true, then is 386ÕmV‹ ISPEEDæÈ Í IMACHINEç :¡ IMACHINEç:** AT else XTmn`IPATCHç-ëIMACHINE:IFLICKERçëIMACHINE:IFLASHçÿ…(ÿ‡(dëIMACHINE)):ICALCçëIMACHINE: *** sets display/calculation cycle values so visuals are good.µnj‹ ICALCç Í ICALCç:*** adjust XT calculations per display upwards»ntŽÇn~------ oˆ--- ROUTINE FOR DISPLAYING RATIO OF REAL TIME TO SIMULATED TIMEBo’RATTIMEçDTëISPEEDëOPTIME:*** calculate the ratiocoœ‹ RATTIMEæù¢ Í ì :¡ °io¦Ž‰o°‹ RATTIMEæ
Í  
 :¡ ďoºŽ¯oÄ‹ RATTIMEæç Í  ( :¡ صoÎŽÚoØ‹ RATTIMEæ¬Å'p Í  F :¡  dàoâŽ"pì*-- DISPLAY REAL TIME RELATION FOR GREATER THAN 1E+10 FASTERŠpöÊ ,:‘" NOW FLYING ABOUT";:‘ ×"##.##^^^^";ÿ…(RATTIME);:‘" TIMES FASTER THAN REAL TIME "pŽÒp
*-- DISPLAY REAL TIME RELATION FOR > 10, <1E+10 TIMES FASTER;qÊ ,:‘" NOW FLYING ABOUT";:‘ ×"#############,";ÿ…(RATTIME);:‘" TIMES FASTER THAN REAL TIME "AqŽ~q(*-- DISPLAY REAL TIME RELATION FOR 1 TO 10 TIMES FASTERáq2Ê ,:‘" NOW FLYING ABOUT";:‘ ×"###,.##";RATTIME;:‘" TIMES FASTER THAN REAL TIME "çq<Ž(rF*-- DISPLAY REAL TIME RELATION FOR > 1, < 1E+5 TIMES SLOWER’rPÊ ,:‘" NOW FLYING ABOUT ";:‘ ×"######,.#";ìRATTIME;:‘" TIMES SLOWER THAN REAL TIME "˜rZŽÔrd*-- DISPLAY REAL TIME RELATION FOR > 1E+5 TIMES SLOWERAsnÊ ,:‘" NOW FLYING ABOUT ";:‘ ×"##.##^^^^";ìRATTIME;:‘" TIMES SLOWER THAN REAL TIME "GsxŽSs‚------šsŒ--- CALCULATE SEMILOG COEFFICIENTS FOR STANDARD ATM DENSITY MODEL©s–‚ Iç Ì  ñs DENCOEFF(Ié,)ç(CëÿŠ(DS(Ié,))êCëÿŠ(DS(I,)))ì(DS(Ié,)êDS(I,))MtªDENCOEFF(Ié,)ç(CëÿŠ(DS(Ié,))éCëÿŠ(DS(I,)))ìêDENCOEFF(Ié,)ë(DS(Ié,)éDS(I,))ìUt´ƒ I[t¾Žgtȏ------±tҏ--- CALCULATES SEMILOG COEFFICIENTS FOR HIGH SOLAR ATM DENSITY MODELÀtÜ‚ Iç Ì  uæDENCOEFF(Ié,)ç(CëÿŠ(DH(Ié,))êCëÿŠ(DH(I,)))ì(DH(Ié,)êDH(I,))duðDENCOEFF(Ié,)ç(CëÿŠ(DH(Ié,))éCëÿŠ(DH(I,)))ìêDENCOEFF(Ié,)ë(DH(Ié,)éDH(I,))ìluúƒ IruŽ~u------Çu--- CALCULATES SEMILOG COEFFICIENTS FOR LOW SOLAR ATM DENSITY MODELÖu"‚ Iç Ì  v,DENCOEFF(Ié,)ç(CëÿŠ(DL(Ié,))êCëÿŠ(DL(I,)))ì(DL(Ié,)êDL(I,))zv6DENCOEFF(Ié,)ç(CëÿŠ(DL(Ié,))éCëÿŠ(DL(I,)))ìêDENCOEFF(Ié,)ë(DL(Ié,)éDL(I,))ì‚v@ƒ IˆvJŽ”vT------w^--- ERROR TRAPPING FOR EXTREME VALUES, SOUND COMMAND PROBLEMS, MISSING TEXT DOCUMENT, ANY OTHER ERROR.Bwh‹ Õç Í  à:*** to announce out of range value set.swr‹ Õç Í Š:*** start over because of error.´w|‹ Õç5 Í  :*** reports document not found, allows rerunõw†‹ Õç5 Í Š:*** need to rerun to allow future error trapping$xÀ:Ê  ,:‘" ERROR NUMBER ";Õ;" ON LINE ";Ô{xšÊ ,:‘" I CAN'T HANDLE THAT ERROR. YOUR ACTION OR YOUR BASIC IS UNUSUAL TO ME. "Îx¤Ê ,:‘" I CAN RUN UNDER BASICA OR GWBASIC. MAYBE I'M JUST OVERLOADED NOW. "y®Ê ,:‘" TRY NOT USING SOUND. HIT ANY KEY TO RETURN TO DRAG PROGRAM "My¸ z:*** purge inkey of stray keystrokesiyÂZ1$çÞ:‹ ÿ’(Z1$)ç Í ÂoyÌŠuyÖ¨³yà*-- ROUTINE FOR STATING OUT-OF-RANGE VALUE SET CONDITIONzêÀ:Ê 
,:‘" THE VALUE SET YOU SELECTED IS TOO EXTREME TO BE CALCULATED IN THIS PROGRAM. "OzôÊ  ,:‘" TO RETURN TO SELECTION SCREEN, PRESS ANY KEY. "~zþ z:*** purge inkey of stray keystrokesšzZ1$çÞ:‹ ÿ’(Z1$)ç Í  zŽæz*-- ROUTINE FOR REPORTING DOCUMENT NOT FOUND, AND ALLOWING RERUN{&À:Å:Ê 
,
:‘" *** SATFLY11.DOC not found *** "s{0Ê  ,
:‘" Contact Bill Cuneo, (301) 9775778 for information, if necessary. "®{:Ê ,
:‘" HIT ANY KEY TO RETURN TO DRAG PROGRAM "Ý{D z:*** purge inkey of stray keystrokesù{NZ1$çÞ:‹ ÿ’(Z1$)ç Í Nÿ{XŽ

  3 Responses to “Category : Science and Education
Archive   : SATFLY11.ZIP
Filename : SATFLY11.BAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/