home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hacker Chronicles 2
/
HACKER2.BIN
/
283.WING.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1986-05-13
|
24KB
|
486 lines
Program Bootstrap_SailPlane;
(*************************************************************************)
(* Loosely Derived from articles in Soar Tech # 2, 1983, by Armin Saxer, *)
(* pgs 38..42, Chuck Anderson, pgs 130..191, and the Schlosser Brothers, *)
(* pgs 16..22, and Soar Tech # 1, 1982, the article by Martin Simons. *)
(* Converted from BASIC, TI-59 and HP-41 Languages to Turbo Pascal. *)
(* Program Source Code By Ed Karns with help from Rolf Unternaehrer *)
(* VERSION 2.06 May 1986. CopyRight 1986 *)
(* *)
(* This program source code is offered on a "free ware" basis. *)
(* If you find the WING PROGRAM of value, send $25.00 to : *)
(* Departure Company, 16 Jess Ave., Petaluma, Ca. 94952 *)
(* In return we will send a copy of Soar Tech #2 an excellent sailplane *)
(* publication and the source for much of this program's documentation *)
(* and latest version of this program. *)
(*************************************************************************)
(* Compiler Directives for proper modification. All Set for max. speed *)
{$C+,D+,F2,I+,K-,R-,V+,U-}
Const (* Constants *)
Gravity : Real = 9.80665; (* Gravitional Pull of the Earth *)
Gas_Const : Real = 29.27; (* R , Universal Gas Constant *)
FRE : Real = 68459.6; (* Reynolds Calculation Factor *)
Number_of_Records : Integer = 45; (* Number of air foils in record *)
(* Pi is predetermined by Turbo Pascal, others > Pi : Real = 3.14159 *)
Type Air_Foil_Record = Record
Name : String [30]; (* like E205 or NACA 2214, etc. *)
R_Number1 : Real; (* Reynolds assoc. with CD_Array *)
R_Number2 : Real;
R_Number3 : Real;
R_Number4 : Real;
Drag_Array1 : Array [1..64] of Real;
Drag_Array2 : Array [1..64] of Real;
Drag_Array3 : Array [1..64] of Real;
Drag_Array4 : Array [1..64] of Real;
Rec_Number : Integer; (* File Pointer *)
End; (* Random access file on disk containing : Foil name, Four *)
(* Reynolds numbers, C/D arrays related to R #'s, and record number. *)
(* Variables For Diminsions, Weights, Coefficents, Ratios, Etc... *)
Var Root_Chord, RC : Real; (* Root Chord of Wing, mm *)
Root_Foil_Thickness, RFT : Real;
Tip_Chord, TC : Real; (* Tip Chord of Wing, mm *)
Tip_Foil_Thickness, TFT : Real;
Mean_Chord, TM : Real; (* Mean Chord of Wing, millimeters *)
Percent_Thickness : Real; (* Airfoil thickness in Percent, % *)
Wing_Span, S : Real; (* Wing Span in millmeters *)
Wing_Area, WA : Real; (* Wing Surface Area, m^2 *)
Wing_Sweep, WW : Real; (* Wing Root/Tip LE Difference *)
(**) Stab_Root, SR : Real; (* Stabalizer Root Chord *)
Stab_Tip, ST : Real; (* Stab Tip Chord *)
Stab_Span, SS : Real; (* Stab Span *)
Stab_Area, SA : Real; (* Stab Area *)
Stab_Sweep, SW : Real; (* Stab Root/Tip LE Difference *)
(**) Fin_Root, FR : Real; (* Fin Root Chord *)
Fin_Tip, FT : Real; (* Fin Tip Chord *)
Fin_Height, HT : Real; (* Fin Height in Inches *)
Fin_Area, SV : Real; (* Fin Area, Square Inches *)
Fin_Sweep, FW : Real; (* Fin Root/Tip LE Difference *)
(**) Wing_Stab, WS : Real; (* Wing Root LE to Stab Root LE *)
Wing_Fin, WF : Real; (* Distance WLE/FLE *)
Fin_Distance, FD : Real; (* Geo. Aero. Center Dist., W / F *)
L_Distance, L : Real; (* Intermediate Result *)
CG_Distance, P : Real; (* Distance from wing LE to CG *)
F_Distance, F : Real; (* Intermediate Result *)
Wing_GAC, WG : Real; (* Wing Geo. Aero. Center *)
Stab_GAC, SG : Real; (* Stab Geo. Aero. Center *)
Fin_GAC, FG : Real; (* Fin Geo. Aero. Center *)
(**) Aspect_Ratio : Real; (* LAM, Aspect ( span/cord ) Ratio *)
Glide_Ratio : Real; (* Glide ( lift to drag ) Ratio *)
Fin_Ratio : Real; (* AV, Fin Aspect Ratio *)
Stab_Ratio : Real; (* Horiz. Stab. Aspect Ratio *)
Wing_Load, FB : Real; (* Wing Loading, kg/m^2 *)
Wing_Dihedral : Real; (* Dihedral in Degrees *)
Stability_Factor : Real; (* Stability Factor, Negative # *)
(**) Lift_Coef : Real; (* CA, Lift Coefficent *)
Air_Force_Coef : Real; (* CR, Resultant Air Force Coeff. *)
Total_Drag_Coef : Real; (* CW, Total Drag Coefficent *)
Induced_Drag_Coef : Real; (* CWI, Induced Drag Coefficent *)
Profile_Drag_Coef : Real; (* CWP, Profile Drag Coefficent *)
Parasite_Drag_Coef : Real; (* CWZ, Parasitic Drag Coefficent *)
Tail_Drag_Coef : Real; (* Tail & Fuse Drag Coefficent *)
Tail_Vol_Coef : Real; (* Tail Volume Coefficent *)
(**) Speed, V : Real; (* Flight Speed of Plane, m/s *)
Horiz_Speed, VX : Real; (* Horizontal Component of Speed *)
Vert_Speed, VY : Real; (* Vertical Component of Speed *)
(**) Weight, GM, B_Weight, BGM: Real; (* Actual SailPlane Weight, kgrams *)
Temperature, T : Real; (* Temperature, C degrees *)
Atmos_Density, DL : Real; (* Atmospheric Density, kps/m^2 *)
Air_Press, Pr : Real; (* Air Pressure, kg/m^2 *)
Reynolds, Reynolds1, Reynolds2, Reynolds3, Reynolds4 : Real;
Foil, Foil1, Foil2, Foil3, Foil4 : Array [1 .. 64] of Real; (* AIRFOIL.DAT *)
Result, Result1, Result2, Result3, Result4, Result5, Result6 : Real;
Foil_File : File of Air_Foil_Record; (* Turbo needs it this way *)
Foil_Record : Air_Foil_Record; (* These name the File on Disk *)
Units, Foil_Name : String [30]; (* Display string *)
Ans, Wing_Position : Char; (* Keyboard Answer, Wing Position *)
I, J, X, Y, File_Pointer : Integer; (* Counters for Program Control *)
Metric, T_Tail, Stall : Boolean; (* Units, T Tail, True or False *)
(* The following are all the key formulae functions for the program *)
Function Fixed_Calc : Real; Begin (* Does All Fixed Dimension Calculations *)
Atmos_Density :=
( Air_Press / ( Gas_Const * ( Temperature + 273.00 ))) / Gravity;
(* DL = GA / g *) (* GA = Pr / ( R * ( T + 273 )) *)
Mean_Chord := (( Root_Chord + Tip_Chord ) / 2 ) / 100;
TM := ( RC + TC ) / 2; (* in Inches *)
(* Mean Chord = ( Root Chord + Tip Chord ) / 2 in Meters *)
Wing_Area := Wing_Span * Mean_Chord; (* in Square Meters *)
WA := S * TM; (* in Square Inches *)
(* WA = S * TM *)
Wing_GAC :=
(( Root_Chord * Root_Chord + Root_Chord * Tip_Chord + Tip_Chord * Tip_Chord )
/ ( Root_Chord + Tip_Chord ) / 6 ) +
(( Wing_Sweep / 3 ) * ( Root_Chord + 2 * Tip_Chord )
/ ( Root_Chord + Tip_Chord ));
WG := Wing_GAC / 2.540; (* Converts to Inches *)
Aspect_Ratio := Wing_Span / Mean_Chord;
(* LAM = S / TM *)
Wing_Load := ( Weight + B_Weight ) / Wing_Area;
FB := ( ( GM + BGM ) / WA ) * 16; (* Converts to Oz. per Sq. Inch *)
(* FB = GM / WA *)
Stab_Area := (( Stab_Root + Stab_Tip ) / 2 ) * Stab_Span; (* in C.Meters *)
SA := (( SR + ST ) / 2 ) * SS; (* in Square Inches *)
Stab_GAC :=
(( Stab_Root * Stab_Root + Stab_Root * Stab_Tip + Stab_Tip * Stab_Tip )
/ ( Stab_Root + Stab_Tip ) / 6 ) +
(( Stab_Sweep / 3 ) * ( Stab_Root + 2 * Stab_Tip )
/ ( Stab_Root + Stab_Tip ));
SG := Stab_GAC / 2.540; (* Converts to Inches *)
Stab_Ratio := ( (SR + ST) * (SR + ST) / 2 ) / SS;
(* Horiz. Stab Aspect Ratio *)
Fin_Area := (( Fin_Root + Fin_Tip ) / 2 ) * Fin_Height; (* in Sq. CM's *)
SV := (( FR + FT ) / 2 ) * HT; (* in Square Inches *)
Fin_GAC :=
(( Fin_Root * Fin_Root + Fin_Root * Fin_Tip + Fin_Tip * Fin_Tip )
/ ( Fin_Root + Fin_Tip ) / 6 ) +
(( Fin_Sweep / 3 ) * ( Fin_Root + 2 * Fin_Tip )
/ ( Fin_Root + Fin_Tip ));
FG := Fin_GAC / 2.540; (* Converts to Inches *)
Fin_Ratio := ( HT * HT ) / SV;
If T_Tail = True Then Fin_Ratio := 1.500 * Fin_Ratio;
(* Fin Aspect Ratio *)
L_Distance := Wing_GAC - Stab_GAC + Wing_Stab + Stab_Root;
L := L_Distance / 2.540;
CG_Distance :=
(( L_Distance * (Stab_Area/2) ) / ( 3 * (Wing_Area/2)
- ( Root_Chord * Root_Chord+ Root_Chord * Tip_Chord + Tip_Chord*Tip_Chord))
/ ( 15 * (Tip_Chord + Root_Chord) ));
P := CG_Distance / 2.540;
F_Distance := CG_Distance + Wing_Fin - Wing_GAC + Fin_GAC;
F := F_Distance / 2.540;
Fin_Distance := Wing_Fin - Wing_GAC + Fin_GAC;
FD := Fin_Distance / 2.540;
Tail_Vol_Coef := ( SV * FD ) / ( WA * S );
(* T_V_C = ( Fin Area * Fin Distance ) / ( Wing Surface Area * Wing Span ) *)
Result1 := 0.0188 + ( 0.0222 * Fin_Ratio ) - ( 0.0026 * Sqr ( Fin_Ratio ));
(* Calculation of A, See Page 42, line 130 and 210 *)
If Wing_Position = 'H' Then Result2 := 0.0 Else Result2 := 0.0001;
If Wing_Position = 'M' Then Result2 := 0.0002;
(* Mid, Shoulder (Default = 0.0001) or High *)
Stability_Factor := Result2 - ( Result1 * Tail_Vol_Coef );
(* Stability Factor = Position Constant - Tail Volume Coef * Constant *)
Wing_Dihedral := 10 + ( 3300 * Stability_Factor );
(* Wing Dihedral = 10 + ( 3300 * Stability Factor ) *)
End; (* of Function Fixed_Calc *)
Function Flight_Speed : Real; Begin
(* Returns Velocity Through the Air and all related calcs. *)
Induced_Drag_Coef := (( 1 + ( 0.03 * Aspect_Ratio)) *
( Sqr ( Lift_Coef ))) / ( Pi * Aspect_Ratio );
(* CWI = ( 1 + FI * LAM ) * CA ^ 2 / ( Pie * LAM ) *)
Parasite_Drag_Coef :=
Tail_Drag_Coef + ( 0.004 * ( Sqr ( Lift_Coef )));
(* Changes here as per Herk Stokely : Removal of 0.005 to account *)
(* for tail drag coef. calculated below. Tail_Drag_Coef initially *)
(* = 0.005 and CWZ = CD(tail) + ( 0.004 * CA^2 ). *)
Total_Drag_Coef :=
Profile_Drag_Coef + Induced_Drag_Coef + Parasite_Drag_Coef;
(* CW = CWP + CWI + CWZ *)
Air_Force_Coef := Sqrt ( Sqr ( Lift_Coef ) + Sqr (Total_Drag_Coef ));
(* CR = Sqrt ( CA^2 + CW^2 ) *)
Speed := Sqrt (( ( Weight + B_Weight ) * 2 ) /
( Atmos_Density * Wing_Area * Air_Force_Coef ));
(* V = Sqrt (( GM * 2 ) / ( WA * DL * CR )) *)
Vert_Speed := ( Speed * Total_Drag_Coef ) / Air_Force_Coef;
(* VY = V * VW / CR *)
Horiz_Speed := ( Speed * Lift_Coef ) / Air_Force_Coef;
(* VX = V * CA / CR *)
Glide_Ratio := Horiz_Speed / Vert_Speed;
(* G = VX / VY *)
Reynolds := FRE * Mean_Chord * Speed ;
(* Reynolds Calculation Factor = FRE = 68459.6 *)
Tail_Drag_Coef := (( 3.75615 / Sqrt ( Reynolds )) / Wing_Area );
(* Note changes made here upon advice of Herk Stokely to correct CD *)
(* CD ( Tail & Fuse ) = (( 3.75615 / R^1/2 ) * 1/S ) where S is WA *)
(* From Soar Tech # 1 article and TI 59 program by Martin Simons *)
(* This gets added in above on next round of calculations *)
End; (* of Function Flight_Speed *)
Function Calc_CD : Real; Begin
(* Calculates the Coef. of Drag for all Coef. of Lift. *)
(* Using a rise / run approximation, fills in the blanks in arrays. *)
(* This effectively connects the points on the CL/CD graph with *)
(* Straight lines. The more valid points entered, the better the *)
(* curviture of the graph. Don't enter points that are not results *)
(* from real wind tunnel tests. Guestimates are worse than nothing. *)
Foil1 [64] := 1.000; Foil2 [64] := 1.000; (* Enters end point *)
Foil3 [64] := 1.000; Foil4 [64] := 1.000; (* Enters end point *)
Foil [64] := 1.000; (* This insures end of calculations *)
(* Fills Array of Foil1 *)
I := 1; J := 1; (* Initialize Counters *)
Repeat (* Until I > 63 *)
Repeat (* Until Foil1 > 0 *)
J := J + 1;
Until Foil1 [J] > 0.0; (* Finds next entered point *)
Result1 := ( Foil1 [J] - Foil1 [I] ) / ( J - I ); (* Finds differential *)
(* Next adds difference to intermediate array cells *)
While I < ( J - 1 ) Do Begin
I := I + 1;
Foil1 [I] := Foil1 [ I - 1 ] + Result1;
End; (* of while I < J - 1 *)
I := J; (* Points to next valid point *)
Until I > 63; (* Arrays are filled *)
(* Fills Array of Foil2 *)
I := 1; J := 1; (* Initialize Counters *)
Repeat (* Until I > 63 *)
Repeat (* Until Foil2 > 0 *)
J := J + 1;
Until Foil2 [J] > 0.0; (* Finds next entered point *)
Result1 := ( Foil2 [J] - Foil2 [I] ) / ( J - I );
(* Next add differential to previous array cell *)
While I < ( J - 1 ) Do Begin
I := I + 1;
Foil2 [I] := Foil2 [ I - 1 ] + Result1;
End; (* of while I < J - 1 *)
I := J; (* Points to next valid point *)
Until I > 63; (* Arrays are filled *)
(* Fills Array of Foil3 *)
I := 1; J := 1; (* Initialize Counters *)
Repeat (* Until I > 63 *)
Repeat (* Until Foil3 > 0 *)
J := J + 1;
Until Foil3 [J] > 0.0; (* Finds next entered point *)
Result1 := ( Foil3 [J] - Foil3 [I] ) / ( J - I );
(* Determines differential for sumations *)
(* Next add differential to previous array cell *)
While I < ( J - 1 ) Do Begin
I := I + 1; Foil3 [I] := Foil3 [ I - 1 ] + Result1;
End; (* of while I < J - 1 *)
I := J; (* Points to next valid point *)
Until I > 63; (* Arrays are filled *)
(* Fills Array of Foil4 *)
I := 1; J := 1; (* Initialize Counters *)
Repeat (* Until I > 63 *)
Repeat (* Until Foil4 > 0 *)
J := J + 1;
Until Foil4 [J] > 0.0; (* Finds next entered point *)
Result1 := ( Foil4 [J] - Foil4 [I] ) / ( J - I ); (* Finds Differential *)
(* Next adds differential to previous array cell *)
While I < ( J - 1 ) Do Begin
I := I + 1; Foil4 [I] := Foil4 [ I - 1 ] + Result1;
End; (* of while I < J - 1 *)
I := J; (* Points to next valid point *)
Until I > 63; (* Arrays are filled *)
(* Next Takes the Foil arrays and runs them past the Flight_Speed *)
(* Function to produce a curve used in displaying close to real *)
(* data in Run Procedure. Interpolations based on Soar Tech # 1 *)
(* article in TI 59 program language by Martin Simons. *)
Lift_Coef := 0.00; (* Init Lift Coef. for calculations of R #, etc. *)
Profile_Drag_Coef := Foil1 [1]; (* Setup for first calculation *)
For I := 1 to 63 Do Begin
Result := Flight_Speed; (* Calls Function that returns new Reynolds *)
If Reynolds >= Reynolds4 Then
Foil [I] := Foil4 [I] * ( Sqrt ( Reynolds4 / Reynolds ));
(* Note that if R4 is set greater than 3 or 4 million then this *)
(* If statement is Ignored, as requires very high speed to reach *)
(* and displayed results are obtained using only 3 Reynolds arrays *)
If Reynolds < Reynolds4 Then
If Reynolds >= Reynolds3 Then
Foil [I] := Foil3 [I] * ( Sqrt ( Reynolds3 / Reynolds ));
If Reynolds < Reynolds3 Then
If Reynolds >= Reynolds2 Then
Foil [I] := Foil2 [I] * ( Sqrt ( Reynolds2 / Reynolds ));
If Reynolds < Reynolds2 Then
Foil [I] := Foil1 [I] * ( Sqrt ( Reynolds1 / Reynolds ));
Profile_Drag_Coef := Foil [I]; (* Previous Foil [I] used for next R # *)
Lift_Coef := Lift_Coef + 0.020; (* Increment Lift Coef for next calc. *)
End; (* of For I = 1 to 63, I Indexes automatically, end of Interpolations *)
End; (* of Function Calc_CD *)
(* End of Functions, Begining of Procedures *)
{$I WINGIT.INC} (* Include Files - Including many Procedures *)
Procedure ReSet_Defaults; Begin
(* Initialization of Variables, F3B Glider at Reasonable Weight *)
(* Using E 387 Air Foil, 3.0 Meter Span, 25 Centimeter Chord, 10 % *)
(* Mid Wing Mount, 2.5 Kilos All Up, Std. Temp. & Pressure. *)
X := 1; Y := 3; Foil_Name := ''; I := 1;
T_Tail := False; Metric:= True; Stall := False;
Temperature := 15.0; T := (( 9 / 5 ) * Temperature ) + 32.0;
Air_Press := 10132.0; Pr := ( 2116.0 / 10132.0 ) * Air_Press;
Root_Chord := 22.0; RC := Root_Chord / 2.540;
Root_Foil_Thickness := 2.20; RFT := Root_Foil_Thickness / 2.540;
Tip_Chord := 22.0; TC := Tip_Chord / 2.540;
Tip_Foil_Thickness := 2.20; TFT := Tip_Foil_Thickness / 2.540;
Percent_Thickness := 10.0;
Wing_Span := 2.74; S := Wing_Span * ( 36 / 0.9144 ); (* " *)
Wing_Sweep := 9.00; WW := Wing_Sweep / 2.540; (* CM & " *)
Stab_Root := 10.00; SR := Stab_Root / 2.540;
Stab_Tip := 10.00; ST := Stab_Tip / 2.540;
Stab_Span := 60.00; SS := Stab_Span / 2.540;
Stab_Sweep := 2.50; SW := Stab_Sweep / 2.540;
Wing_Stab := 95.00; WS := Wing_Stab / 2.540;
Fin_Root := 22.00; FR := Fin_Root / 2.540;
Fin_Tip := 6.00; FT := Fin_Tip / 2.540;
Fin_Height := 22.00; HT := Fin_Height / 2.540;
Fin_Sweep := 18.00; FW := Fin_Sweep / 2.540;
Wing_Fin := 90.00; WF := Wing_Fin / 2.540;
Weight := 1.90; GM := Weight / 0.45359237; (* # to Kilos *)
B_Weight := 0.00; BGM := B_Weight / 0.45359237;(* # to Kilos *)
Wing_Position := 'M'; (* M is for Mid Position *)
Tail_Drag_Coef := 0.005;
(* Initial value of Tail_Drag_Coef changed after first run of Functions *)
End; (* of Procedure ReSet_Defaults *)
Procedure Double_Check; Begin
ClrScr; (* Clears the Screen *) GotoXY ( 10, 10 );
Write ('Are You Sure That You Want to RESET ALL VARIABLES ??');
Read ( Kbd, Ans );
If UpCase ( Ans ) = 'Y' Then ReSet_Defaults;
End; (* of Procedure Double_Check *)
Procedure Menu; Begin (* Displays Menu, Menu of Choises *)
ClrScr; (* Clears the Screen *)
GotoXY ( 1, 3 ); LowVideo;
Writeln (' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *');
Writeln; NormVideo;
Writeln (' A = Changes Air Foils');
Writeln (' E = Edits Air Foils in storage files');
Writeln;
Writeln (' W = Changes Wing Chord, Thickness and Span');
Writeln (' F = Changes Fin and Rudder Dimensions');
Writeln (' S = Changes Horiz. Stabilizer Dimensions');
Writeln (' U = Changes Units, Temp., Press, & Flying Mass');
Writeln;
Writeln (' R = Reset ALL Variables to Original Values');
Writeln;
Writeln (' T = Display Tail Fixed Dimension Results');
Writeln (' D = Display Wing Fixed Dimension Results');
Writeln (' X = Calculates & Displays Flight Simulation');
Writeln;
Writeln (' Q = Quit, Exit the Program');
Writeln; LowVideo;
Writeln (' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *');
GotoXY ( 1, 24 ); NormVideo;
Write (' Choose : A E W F S U R T D X Q uit ');
End; (* of Procedure Menu *) (* End of all Procedures *)
Begin (* Begining of Main Part of Program Boot_Strap_SailPlane *)
ClrScr; Writeln; Writeln; LowVideo;
Writeln
(' The WING PROGRAM is made available on a Free Ware basis.');
Writeln;
Writeln
(' Feel free to make copies of these files and pass them on to your friends.');
Writeln;
Writeln
(' If you like this program and wish to have the latest version then');
Writeln; NormVideo;
Writeln
(' Send $ 25.00 to :');
Writeln;
Writeln
(' Departure Company 16 Jess Avenue, Petaluma, California 94952');
Writeln; LowVideo;
Writeln
(' We will send the latest version of the WING PROGRAM and source code and');
Writeln;
Writeln
(' Soar Tech # 2, the fine publication that this program is based upon.');
Writeln;
Writeln
(' Versions of the WING PROGRAM are available for :');
Writeln
(' IBM PC, XT & AT and PClones running PC-DOS, MS-DOS and CP/M-86,');
Writeln
(' CompuPro, Eagle, Osborne and other machines running CP/M and CP/M-86');
Writeln
(' and Apple II and Apple III computers running Apple ( UCSD ) Pascal.');
Writeln; Writeln;
Writeln
(' Be sure to read the information in the "WINGREAD.ME" file.');
NormVideo;
For I := 1 to 200 Do Begin
GotoXY ( 47, 3 );
Write ('\ Free Ware |'); GotoXY ( 75, 4 );
GotoXY ( 47, 3 );
Write ('| Free Ware \'); GotoXY ( 75, 4 );
GotoXY ( 47, 3 );
Write ('/ Free Ware -'); GotoXY ( 75, 4 );
GotoXY ( 47, 3 );
Write ('- Free Ware /'); GotoXY ( 75, 4 );
End; (* of For *)
ClrScr;
ReSet_Defaults; (* Initializes Variables *)
Repeat (* Until UpCase ( Ans ) = Q for Quit *)
Repeat (* Until UpCase ( Ans ) = Q, again *)
Result := Fixed_Calc; (* Does All Fixed Dimension ReCalculations *)
Menu; (* Displays Menu of Choices *)
Read ( Kbd, Ans );
Case UpCase ( Ans ) of
'A' : Change_Foil_Records;
'D' : Display;
'E' : Edit_AirFoil;
'F' : Change_Fin;
'R' : Double_Check;
'S' : Change_Stab;
'T' : Display_Extras;
'U' : Change_Units;
'W' : Change_Wing;
'X' : Calculate_Display;
Else Write ( ^G ); (* Bell *)
End; (* of Case *)
Until UpCase ( Ans ) = 'Q';
Ans := ' '; (* Double Q and out, done *)
ClrScr; (* Clears the Screen *)
Write ( ^G ); (* Bell *)
GotoXY ( 5, 10 );
Write
('Entering Q for Quit will Exit the Program, Any Other Key Continues >');
Read (Kbd, Ans);
Until UpCase ( Ans ) = 'Q'; (* Double Q and out, done *)
ClrScr; (* Clears the Screen *) GotoXY ( 1, 10 );
Writeln (' ... the WING PROGRAM ...');
Writeln;
Writeln (' CopyRight 1986 by Ed Karns VERSION 2.06');
End.
(**********************************************************)