home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
EDUCATIN
/
MDLPLNE2.LBR
/
AIRPRNT.BQS
/
AIRPRNT.BAS
Wrap
BASIC Source File
|
2000-06-30
|
5KB
|
156 lines
10 DIM A$(8),B$(9),C$(30)
20 PRINT "THIS PROGRAM WILL COMPUTE THE LOCATION OF"
30 PRINT "THE CENTER OF GRAVITY OF MOST CONVENTIONAL AND CANNARD DESIGN MODEL"
40 PRINT "AIRCRAFT. IN ADDITION, IT WILL FIND THE AERODYNAMIC CENTERS OF SURFACES"
50 PRINT "& INDICATE IF THE VERTICAL STABILIZER AREA OF CANNARD DESIGNS"
60 PRINT "IS OF ADEQUATE SIZE. OTHER FEATURES PROVIDE WING LOADING,"
70 PRINT "ENGINE POWER LOADING, AND AREAS OF SURFACES."
80 PRINT "WRITTEN BY BERNIE RAAD AND DICK SARPOLUS"
100 INPUT "MODEL DESIGNATION";C$
110 PRINT
140 PRINT TAB20,C$
160 PRINT
180 INPUT "TOTAL WINGSPAN";B4
200 INPUT "WING ROOT CHORD";R1
220 INPUT "WING TIP CHORD";T1
240 INPUT "LEAD EDGE SWEEP (FWD =-;BKWD =+)";D1
260 INPUT "HORIZ.STAB. TOTAL SPAN";B5
280 INPUT "STAB. ROOT CHORD";R2
300 INPUT "STAB.TIP CHORD";T2
320 INPUT "LEAD EDGE SWEEP (FWD =-;BKWD =+)";D2
340 INPUT "NUMBER OF VERTICAL FINS";V2
350 IF V2=0 THEN 460
360 INPUT "VERT. FIN HEIGHT";B3
390 INPUT "V.FIN ROOT CHORD";R3
410 INPUT "V.FIN TIP CHORD";T3
430 INPUT "LEAD EDGE SWEEP (FWD =-;BKWD =+)";D3
450 INPUT "FIN OFFSET FROM WING LEADING EDGE";L3
470 INPUT "ENTER 2 FOR CANNARD, 1 FOR OTHER";C
490 INPUT "DIST. BETWEEN H. STAB AND WING ROOTS";L1
510 INPUT "TOTAL WEIGHT IN ONCES";W1
530 INPUT "ENGINE SIZE IN CUBIC INCHES";E9
540 B1=B4/2
550 B2=B5/2
560 E1=R1^2+R1*T1+T1^2
570 E2=R2^2+R2*T2+T2^2
580 G1=R1+T1
590 G2=R2+T2
600 H1=R1+2*T1
610 H2=R2+2*T2
620 X1=E1/G1/6+D1/3*H1/G1
630 X2=E2/G2/6+D2/3*H2/G2
640 IF V2=0 THEN 690
650 E3=R3^2+R3*T3+T3^2
660 G3=R3+T3
670 H3=R3+2*T3
680 X3=E3/G3/6+D3/3*H3/G3
690 S1=B1/2*G1
700 S2=B2/2*G2
710 IF V2=0 THEN 730
720 S3=B3/2*G3
730 L=X1-X2+L1+R2
740 L7=W1/E9
750 IF C=1 THEN 810
760 P=L*S2/S1-E1/15/G1
770 L8=W1*72/(S1+S2)
780 L6=W1*72/S1
790 IF V2=0 THEN 860
800 GOTO 840
810 P=L*S2/S1/3-E1/15/G1
820 L8=W1*72/S1
830 IF C=1 THEN 860
840 F=P+L3+X3-X1
850 V=3*B1*S1/(100*F*S3)
860 LPRINT
870 LPRINT TAB20,"INPUT DATA"
880 LPRINT TAB20,"===== ===="
890 LPRINT
900 LPRINT "MAIN WING DIMENSIONS (INCH)"
910 LPRINT "---- ---- ---------- ------"
920 LPRINT "TOTAL SPAN =";B4
930 LPRINT "WING ROOT CHORD =";R1
940 LPRINT "WING TIP CHORD =";T1
950 LPRINT "LEAD EDGE TIP/ROOT OFFSET =";D1
960 LPRINT
970 LPRINT "HORIZONTAL STABILIZER DIMENSIONS (INCH)"
980 LPRINT "---------- ---------- ---------- ------"
990 LPRINT "TOTAL SPAN =";B5
1000 LPRINT "ROOT CHORD =";R2
1010 LPRINT "TIP CHORD =";T2
1020 LPRINT "LEAD EDGE TIP/ROOT OFFSET =";D2
1030 LPRINT "LENGTH OF FUSELAGE BETWEEN WING AND STAB =";L1
1040 LPRINT
1045 IF V2=0 THEN 1200
1050 LPRINT "VERTICAL FIN DIMENSIONS (INCH)"
1060 LPRINT "-------- --- ---------- ------"
1070 IF V2=1 THEN 1110
1090 LPRINT "THERE ARE";V2;"VERTICAL FINS"
1100 GOTO 1120
1110 LPRINT "THERE IS ONLY ONE VERTICAL FIN"
1120 LPRINT "FIN HEIGHT =";B3
1130 LPRINT "FIN ROOT CHORD =";R3
1140 LPRINT "FIN TIP CHORD =";T3
1150 LPRINT "LEAD EDGE TIP/ROOT OFFSET =";D3
1160 LPRINT "TOTAL WEIGHT OF THE AIRPLANE =";W1;"OUNCES"
1170 LPRINT "ENGINE SIZE =";E9;"CUBIC INCHES"
1180 LPRINT "FIN LEAD EDGE OFFSET RELATIVE TO WING LEAD EDGE AT ROOT =";L3
1190 GOTO 1230
1200 LPRINT
1210 LPRINT "TOTAL WEIGHT OF THE AIRPLANE =";W1;"OUNCES"
1220 LPRINT "ENGINE SIZE =";E9;"CUBIC INCHES"
1230 LPRINT
1240 LPRINT TAB20,"OUTPUT DATA"
1250 LPRINT TAB20,"====== ===="
1260 LPRINT
1270 LPRINT "SURFACE AREAS IN SQUARE INCHES"
1280 LPRINT "TOTAL WING AREA =";2*S1
1290 LPRINT "TOTAL HORIZONTAL STAB AREA =";2*S2
1300 IF V2=0 THEN 1320
1310 LPRINT "TOTAL VERTICAL FIN AREA =";V2*S3
1320 LPRINT
1340 LPRINT "AERODYNAMIC CENTERS OF SURFACES (INCHES FROM L.E. AT FUSE.)"
1350 LPRINT "WING A.C. =";X1
1360 LPRINT "STAB A.C. =";X2
1370 IF V2=0 THEN 1390
1380 LPRINT "V. FIN A.C. =";X3
1390 LPRINT
1400 LPRINT
1410 IF C=1 THEN 1480
1420 F1=P-X1
1430 F2=F1*1.2
1440 LPRINT "CANNARD DESIGN C.G. IS ";F1;"TO";F2;"INCHES AHEAD OF L.E. AT FUSE"
1450 LPRINT "WING LOADING INCL STAB IS";L8;"OZ/SQ.FT."
1460 LPRINT "WING LOADING EXCL STAB IS";L6;"OZ/SQ.FT."
1470 GOTO 1520
1480 F3=P+X1
1490 F4=F3*.8
1500 LPRINT "CONVENTIONAL DESIGN C.G. IS";F3;"TO";F4;"INCHES BEHIND L.E. AT FUSE"
1510 LPRINT "WING LOADING EXCL STAB IS";L8;"OZ/SQ.FT."
1520 LPRINT "ENGINE LOADING IS";L7;"OZ/CUBIC INCH OF ENG.DISP."
1530 LPRINT
1540 IF C=1 OR V2=0 THEN 1750
1550 LPRINT "THE V EQUATION YIEDS";V
1560 LPRINT
1570 IF V2=1 THEN 1610
1580 S6=3*B1*S1/(100*F)
1590 F6=3*B1*S1/(100*S3)
1600 GOTO 1630
1610 S6=3*B1*S1/(50*F)
1620 F6=3*B1*S1/(50*S3)
1630 P9=S3/S6*100
1640 IF P9>=100 THEN 1670
1650 A$="SMALLER"
1660 GOTO 1680
1670 A$="LARGER"
1680 L9=F6-P+X1-X3
1690 IF L9>=0 THEN 1720
1700 B$="AHEAD OF"
1710 GOTO 1730
1720 B$="BEHIND"
1730 LPRINT "VERTICAL FIN AREA IS ";A$;" THAN NEEDED. SUFFICIENT AREA WOULD BE"
1740 LPRINT (100*S6/S3)"% OF PRESENT DESIGN OR";(V2*S6);"SQ.IN. TOTAL"
1750 LPRINT
1770 END
DED. SUFFICIENT AREA WOULD BE"
1740 LPRINT (100*S6/S3)"% OF PRESENT DESIGN OR";(V2*S6);"SQ.IN. TOTAL"
1750 LPRINT