![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#10
|
|||
|
|||
![]()
This was origonally written on a TRS80 (with line numbers and no WHILE)
As it, it should run under Qbasic interpreter, or compiled with QB45. Anyone who wants to play with it but doesn't have the software to run it can email me and I'll send a compiled executible file. FF = 0 TT = NOT FF doRun = TT KK$ = "LVSCQ?" 'initial values: L = 555 W = L A = 55 V = A * 1.4666 CL = 1.2 S = 125 CLS PRINT "Finite Wing Theory: ---== R. Lamb 1983 ==---"; : PRINT WHILE doRun = TT PRINT "solve for Lift Velocity Surface Clift Quit [LVSCQ?] "; Z$ = "" WHILE Z$ = "" Z$ = UCASE$(INKEY$): IF Z$ = CHR$(13) THEN Z$ = "" IF Z$ = CHR$(27) THEN Z$ = "Q" IF INSTR(KK$, Z$) = 0 THEN Z$ = "" WEND SELECT CASE UCASE$(Z$) CASE "L" PRINT " Calculate LIFT.............." GOSUB doLift CASE "V" PRINT " Calculate Velocity.........." GOSUB doVel CASE "S" PRINT " Calculate Wing Area........." GOSUB doSurf CASE "C" PRINT " Calculate Coef. of Lift....." GOSUB doCL CASE "?" 'GOSUB doDump PRINT " Variable dump:---------------------------" PRINT " Lift / Weight "; L; " lbs" PRINT " Airspeed "; A; " mph = "; V; " fps" PRINT " Coefec of Lift "; CL PRINT " Wing Area "; S; " sq ft" PRINT " -----------------------------------------" CASE "Q" doRun = FF END SELECT WEND END doLift: GOSUB GetSurf GOSUB GetVel GOSUB GetCL L = .001188 * CL * V * V * S PRINT " Lift = "; L RETURN doVel: GOSUB GetSurf GOSUB GetCL GOSUB GetWgt V = SQR(L / (.001188 * CL * S)) A = V * .681 PRINT " Velocity = "; PRINT USING "#,###.#"; A; PRINT " MPH = "; PRINT USING "#,###.#"; V; PRINT " FPS" RETURN doSurf: GOSUB GetCL GOSUB GetWgt GOSUB GetVel S = L / (.001188 * CL * V * V) PRINT " Surface = "; S RETURN doCL: GOSUB GetWgt GOSUB GetVel GOSUB GetSurf CL = L / (.001188 * S * V * V) PRINT " Coeff. Lift = "; CL RETURN GetSurf: PRINT " Wing Area (sq ft) ["; S; "]"; INPUT ""; X IF X 0 THEN S = X RETURN GetVel: PRINT " Airspeed (mph) ["; A; "]"; INPUT ""; X IF X 0 THEN A = X V = X * 1.467 END IF RETURN GetCL: PRINT " Coeff. Lift (#.##) ["; CL; "]"; INPUT ""; X IF X 0 THEN CL = X RETURN GetWgt: PRINT " Gross Weight (lbs) ["; L; "}"; INPUT ""; X IF X 0 THEN W = X ' steady state W = L L = X END IF RETURN |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
q horsepower | Euro-Motors | Aerobatics | 2 | May 19th 08 12:25 AM |
more horsepower | T-Bone | Piloting | 11 | March 20th 06 10:56 PM |
Lycoming Horsepower Calculation? | Mark Doble | Home Built | 1 | June 20th 05 10:46 PM |
Thermals and Horsepower | Ken Kochanski (KK) | Soaring | 14 | January 9th 05 05:50 PM |
Horsepower | Andre | Home Built | 3 | July 18th 03 10:50 AM |