10 REM This program will solve the wind triangle for following a desired 20 'course. To solve it, the user must specify the wind direction, and velocity 30 'as well as the desired True Course and the cruise True Air Speed. Wind 40 'velocity and TAS must be in similar units, i.e., both in knots or both in 50 'miles per hour. 51 'This program has been modified to run on an H/Z-89,H/Z-90 CP/M-80 system. 60 DEF FNRW=RW/180*3.14159'converts degrees to radians for PC 70 DEF FNDA=DA*180/3.14159'converts radians to degrees for display 80 REM input NAV and Wind data 90 PRINT CHR$(27);CHR$(69):PRINT TAB(30) "WNDTRNGL PROGRAM":PRINT 100 INPUT "Wind direction=";WD 110 INPUT "Wind Velocity=";WV 120 INPUT "True Course=";TC 130 INPUT "TAS=";TAS 140 RW=WD+TC+360'RW represents wind direction relative to desired course 150 IF RW<360 THEN 170 160 RW=WD-TC 170 PRP=SIN(FNRW)*WV'PRP is cross-wind component 180 WC=WV*COS(FNRW)'WC=along-course component of wind 190 DA=ATN(PRP/TAS/SQR(ABS(1-PRP*PRP/TAS/TAS))) 200 TH=TC+(FNDA)'TH=True Heading 210 IF TH>360 THEN LET TH=TH-360 220 IF TH<0 THEN LET TH=TH+360 230 EFFTAS=COS(DA)*TAS'EFFTAS is TAS (reduced by drift) component of GS 240 PRINT 250 PRINT 260 GS=EFFTAS-WC'GS=ground speed 270 PRINT"True Heading=";TH 280 PRINT "Ground Speed=";GS 281 PRINT 290 PRINT TAB(20)"Would you like to run another (Y or N)?";:X$=INPUT$(1) 300 IF X$="Y" THEN 90 310 IF X$="N" THEN 320 320 PRINT CHR$(27);CHR$(69):END