Water-Cooled VW Performance Handbook

Shiftpoint Optimizer — BASIC program listing

Copying the following program listing and pasting into your BASIC editor should eliminate any typing errors.


10 rem SHIFTPOINT OPTIMIZER PROGRAM
20 rem Jack Broomall Racing
30 cls
40 dim g(10),r(30),t(30),w,a,n,i,j,d,b,u,u2,k,c,f
50 print "Shift Point Optimizer Program"
60 for a = 1 to 1000
70 next a
80 cls
90 goto 190
100 cls
110 print "Note: It will be necessary to re-enter all data points."
120 for w = 1 to 30
130 r(w) = 0
140 t(w) = 0
150 next w
160 print
170 print
180 goto 200
190 cls
200 print "Input Torque vs. RPM Information from Dyno Testing"
210 print "++++++++++++++++++++++++++++++++++++++++++++++++++"
220 n = 1
230 print "Data Point";n
240 print
250 input "Engine Speed (RPM): ";r(n)
260 print
270 input "Engine Torque (lb/ft): ";t(n)
280 print
290 cls
300 print "If you wish to enter another data point enter 1"
310 print
320 print "If you wish to run the program enter 2"
330 input "1 or 2: ";i
340 if i > 1 then 390
350 n = n+1
360 cls
370 goto 230
380 cls
390 cls
400 print "Please check that torque/RPM data points are correct"
410 print
420 print
430 print "Data points entered this run:"
440 print
450 print "Data","RPM","Torque"
460 print "Point",,"(lb/ft)"
470 print "-------------------------"
480 for j = 1 to n
490 print j,r(j),t(j)
500 next j
510 for a = 1 to 1000
520 next a
530 print
540 print
550 print "If data is correct as displayed, enter 1 to continue"
560 print "If data is incorrect enter 2 to make corrections"
570 input "1 or 2: ";i
580 if i > 1 then 100
590 cls
600 goto 640
610 cls
620 print "Note: It will be necessary to re-enter all gearing & tire info."
630 print
640 print "Input Transmission Ratio Information"
650 print "------------------------------------"
660 print
670 print "Please enter information as requested."
680 print
690 input "Number of forward gears: ";g
700 for t = 1 to g
710 if t = 1 then 750
720 if t = 2 then 790
730 if t = 3 then 830
740 if t > 3 then 870
750 print
760 print "First gear ratio: "
770 input g(1)
780 goto 900
790 print
800 print "Second gear ratio: "
810 input g(2)
820 goto 900
830 print
840 print "Third gear ratio: "
850 input g(3)
860 goto 900
870 print
880 print t;"th gear ratio: "
890 input g(t)
900 next t
910 cls
920 print "Input differential ratio"
930 print "------------------------"
940 print
950 print "Differential ratio: "
960 input d
970 cls
980 print "Input tire diameter"
990 print "-------------------"
1000 print
1010 print "Tire diameter (inches): "
1020 input t1
1030 cls
1040 print "Please check that the following input data is entered correctly."
1050 for a = 1 to 1000
1060 next a
1070 print
1080 print
1090 for b = 1 to g
1100 print "Gear ";b;" is ";g(b);":1"
1110 print
1120 next b
1130 print "Differential ratio is ";d;":1"
1140 print
1150 print "Tire diameter is ";t1;" inches"
1160 print
1170 for a = 1 to 1000
1180 next a
1190 print "If data is correct as displayed, enter 1 to continue"
1200 print "If data is incorrect, enter 2 to make corrections."
1210 input "1 or 2: ";i
1220 if i > 1 then 610
1230 cls
1240 print "For maximum torque at front wheels, make upshifts as follows:"
1250 print "-------------------------------------------------------------"
1260 print
1270 for f = 1 to (g-1)
1280 g1 = g(f)
1290 g2 = g(f+1)
1300 for u = r(1) to r(n) step 20
1310 for c = 1 to (n-1)
1320 if u >= r(c) and u < r(c+1) then 1340
1330 next c
1340 t2 = t(c)+(t(c+1)-t(c))*((u-r(c))/(r(c+1)-r(c)))
1350 t3 = t2*g1*d
1360 u2 = u*(g(f+1)/g(f))
1370 if u2 < r(1) then 1480
1380 for k = 1 to (n-1)
1390 if u2 >= r(k) and u2 < r(k+1) then 1410
1400 next k
1410 t5 = t(k)+(t(k+1))*((u2-r(k))/(r(k+1)-r(k)))
1420 t4 = t5*g2*d
1430 if t3 < t4 then 1450
1440 goto 1500
1450 print "Make ";f;"-";(f+1);" shift at ";u;" rpm."
1460 print
1470 goto 1520
1480 next u
1490 u = u-20
1500 if u = r(n) then 1450
1510 goto 1480
1520 next f
1530 print
1540 print "END OF OUTPUT"
1550 end