| 50 rem Program: SAIL
60 rem This program was written by Mark Antry April 1990
100 print "This program will Calculate the Mean Aerodynamic Chord,"
120 print "its position, Area and Aspect Ratio of Wings along with"
125 print "optional Stab and Pitch Stability Calculations."
130 print "NOTE: All dimensions are in decimal inches and weight in OZ's."
140 print\print
200 print "How many different sections does this wing have?"
220 print "A single taper flat wing would have 1, a polyhedrel plane"
240 print "will probably have 2, Schuman 3, etc."
260 input "Number of sections ",NUMSEC
280 print\print
300 print " First Section"
320 print\print
340 input "What is the length of the root chord of this section ",FROOT
360 input "What is the length of the tip chord of this section ",FTIP
380 print\print "The offset is how far the Leading edge of the tip is"
400 print "back from the Leading edge of root. Example: If you had a"
420 print "10in root and a 6in tip and the leading edge was square the "
440 print "offset would 4in...."
460 input "What is the offset of the Tip chord from the Root Chord ",FOFF
480 input "What is the span of this section ",FSPAN
499 if numsec < 2 then goto 5000
500 print\print " Second Section"
520 print\print
540 input "What is the length of the root chord of this section ",SROOT
550 input "What is the length of the tip chord of this section ",STIP
560 input "What is the offset of the Tip chord from the Root Chord ",SOFF
570 input "What is the span of this section ",SSPAN
599 if numsec < 3 then goto 5000
600 print\print " Third Section"
620 print\print
640 input "What is the length of the root chord of this section ",TROOT
650 input "What is the length of the tip chord of this section ",TTIP
660 input "What is the offset of the Tip chord from the Root Chord ",TOFF
670 input "What is the span of this section ",TSPAN
5000 print\print\Input "What does the model weigh (oz's) ",weight
5005 REM CALCULATE DATA
5010 REM COMPUTE ALL MAC'S
5020 FMAC = (2*(FROOT^2+FROOT*FTIP+FTIP^2))/(3*(FROOT+FTIP))
5030 if numsec > 1 then SMAC = (2*(SROOT^2+SROOT*STIP+STIP^2))/(3*(SROOT+STIP))
5060 if numsec > 2 then TMAC = (2*(TROOT^2+TROOT*TTIP+TTIP^2))/(3*(TROOT+TTIP))
5100 REM COMPUTE ALL MAC OFFSET'S
5120 FMACO = (FOFF*(FROOT-FMAC)/(FROOT-FTIP+0.00000001))
5140 if numsec > 1 then SMACO = (SOFF*(SROOT-SMAC)/(SROOT-STIP+0.00000001))
5160 if numsec > 2 then TMACO = (TOFF*(TROOT-TMAC)/(TROOT-TTIP+0.00000001))
5200 REM COMPUTE ALL AREA'S
5210 FAREA = (FSPAN*(FROOT+FTIP)/2)
5220 if numsec > 1 then SAREA = (SSPAN*(SROOT+STIP)/2)
5240 if numsec > 2 then TAREA = (TSPAN*(TROOT+TTIP)/2)
5300 REM COMPUTE TOTAL WING VALUES
5305 TOTAREA = FAREA+SAREA+TAREA
5310 WMAC = (FMAC*FAREA+SMAC*SAREA+TMAC+TAREA)/TOTAREA
5320 WOFF = (FMACO*FAREA+(FOFF+SMACO)*SAREA+(FOFF+SOFF+TMACO)*TAREA)/TOTAREA
5340 WAREA = (FAREA+SAREA+TAREA)*2
5360 WASPECT = (2*(FSPAN+SSPAN+TSPAN))^2/WAREA
5380 WSPAN = (2*(FSPAN+SSPAN+TSPAN))
5400 REM Compute Wing Loading
5420 WLOAD = WAREA / WEIGHT
5600 REM Stab data
5605 print\print
5610 Input "Do you wish to do Stab Calculations (Y/N)",QSTAB$
5620 If QSTAB$ <> "Y" and QSTAB$ <> "y" then goto 6000
5630 print\print
5640 input "What is the length of the root chord of this stab ",STROOT
5650 input "What is the length of the tip chord of this stab ",STTIP
5660 input "What is the offset of the Tip chord from the Root Chord ",STOFF
5670 input "What is the span of this stab ",STSPAN
5690 STMAC = (2*(STROOT^2+STROOT*STTIP+STTIP^2))/(3*(STROOT+STTIP))
5700 STMACO = (STOFF*(STROOT-STMAC)/(STROOT-STTIP+0.00000001))
5720 STAREA = (2*(STSPAN*(STROOT+STTIP)/2))
5730 STASPECT = (2*(STSPAN))^2/STAREA
5740 STSPANT = STSPAN*2
5800 REM Stab calculations
5820 print\print
5840 Input "Do you wish to do Pitch Stability Calculations (Y/N)",QPITCH$
5860 If QPITCH$ <> "Y" and QPITCH$ <> "y" then goto 6000
5880 print "What is the lenght from the Leading edge of the Wing to"
5900 input "the leading edge of the STAB ",LENLELE
5910 input "At what percent of the CG will this plane be balanced at ",WCG
5920 PITCHLEN = LENLELE-WOFF-STMACO-(STMAC-(STMAC*0.25))
5940 TVFAC = (STAREA/WAREA) * (PITCHLEN/WMAC)
5960 YINTERSECT = 2.2 * (WCG * .01) + (- .49)
6000 REM PRINT OUT RESULTS
6020 PRINT\PRINT\PRINT\PRINT\PRINT
6060 print "The Total Wing summary is:"
6080 print " MAC ";WMAC
6090 print " MAC offset ";WOFF;" from Leading edge of the root"
6100 print " Area ";WAREA;" sq in"
6110 print " Aspect Ratio ";WASPECT;" to 1"
6120 print " Wing Span ";WSPAN
6130 print " Wing Loading ";WLOAD;" oz/sq inch"
6140 print "NOTE: CG would be calculated as CG % * MAC + MAC offset"
6150 print " measured from leading edge of the root"
6200 print\print\print
6210 print "The First Section summary is:"
6220 print " MAC ";FMAC
6240 print " MAC offset ";FMACO
6260 print " Area ";FAREA;" sq in"
6280 if numsec < 2 then goto 7000
6305 print\print\print
6310 print "The Second Section summary is:"
6320 print " MAC ";SMAC
6340 print " MAC offset ";SMACO
6360 print " Area ";SAREA;" sq in"
6380 if numsec < 3 then goto 7000
6405 print\print\print
6410 print "The Third Section summary is:"
6420 print " MAC ";TMAC
6440 print " MAC offset ";TMACO
6460 print " Area ";TAREA;" sq in"
7000 rem Print Stab results if needed
7020 If QSTAB$ <> "Y" and QSTAB$ <> "y" then goto 8000
7300 print\print\print
7320 print "The Stab Section summary is:"
7340 print " MAC ";STMAC
7360 print " MAC offset ";STMACO
7380 print " Area ";STAREA;" sq in"
7370 print " Aspect ratio ";STASPECT;" to 1"
7400 print " Span ";STSPANT
8000 rem Do we do pitch calculation PRINTS
8020 If QPITCH$ <> "Y" and QPITCH$ <> "y" then goto 9000
8040 print\print
8060 print "The pitch stability summary is:"
8080 print " Effective Tail Volume Factor ";TVFAC
8100 if TVFAC >= YINTERSECT then print " Model WILL be stable in Pitch"
8110 goto 9000
8120 print "Model WILL !!NOT!! be stable in Pitch"
8140 print "In order for Model to be stable the "
8160 print "Effective Tail Volume Factor would have to be ";YINTERSECT
9000 rem
|
| Gee I am crushed that noone has been using this program...Boo Hoo...
Oh well.
Anyway, I found two errors in the program, please make the following
changes.
NEW 5420 WLOAD = WEIGHT / (WAREA / 144)
OLD 5420 WLOAD = WAREA / WEIGHT
NEW 6130 print " Wing Loading ";WLOAD;" oz/sq foot"
OLD 6130 print " Wing Loading ";WLOAD;" oz/sq inch"
Sorry about the goof!
|