A aviation & planes forum. AviationBanter

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.

Go Back   Home » AviationBanter forum » rec.aviation newsgroups » Home Built
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

13 Horsepower



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #10  
Old July 31st 08, 12:25 AM posted to rec.aviation.homebuilt
cavelamb himself[_4_]
external usenet poster
 
Posts: 474
Default 13 Horsepower

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



PRINT

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

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



PRINT



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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 11:40 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 AviationBanter.
The comments are property of their posters.