2 asking for user data – Innovate Motorsports LogWorks 3 User Manual
Page 113

LogWorks3_Manual_1.01.doc
- 113 -
10.2 Asking for user data
Example 2: Calculate Force (in lb force) from car mass (lb) and acceleration (in g)
? Enter vehicle weight in lb = m
? Enter acceleration in g = a
F = m * a
When you press the calculate button here, a dialog box will pop up that allows the user to enter
the values for his application.
If you want to suggest default values for a question, enter the default value in [ ] after the variable
name in the question line as in this example:
? Enter vehicle weight in lb = m[3000]
The formula calculator libraries (see chapter 7) always store the last entered user values in the
appropriate library entry so they don’t have to be entered every time they are used.
Formula Calculator allows using as many intermediate results as you want to make the
calculations clearer. The following example shows how.
Example 3: Calculate torque and horsepower from vehicle weight, acceleration, gear
ratios, tire diameter and rpm
#m is vehicle weight in lb
m = 3000
#a is acceleration in g
a = 0.4
F = m * a
#dia is tire diameter in inches
dia = 25
r = dia/(2*12) #calculate radius in feet
#final (differential) ratio
finaldrive = 4.53
#gear ratio of the gear in which the acceleration is measured
gear_ratio = 0.82
#and finally rpm
rpm = 4500
torque = F * r / (gear_ratio * finaldrive)
hp = torque * rpm / 5252
Or this time without fixed values, but a questionnaire that has to be filled out by the user