AEM 30-71XX Infinity Stand-Alone Programmable Engine Mangement System Full Manual User Manual
Page 68
62
© 2014 AEM Performance Electronics
Infinity User Manual
// Two-way interpolation fill using the selection edges
table_math_15 = "(cell(sl, iy) * (1 - sx / (sr - sl)) + cell(sr, iy) * (sx / (sr - sl)) + cell(ix, sb) * (1 -
sy / (st - sb)) + cell(ix, st) * (sy / (st - sb))) / 2"
// Simple interpolation fill in X direction for 1D Tables
table_math_16 = "cell(sl, 0) * (1 - sx / (sr - sl)) + cell(sr, 0) * (sx / (sr - sl))"
Valid math operators and keywords include the following:
Syntax
Description
pi
3.14159…
e
2.71828…
+
Addition
-
Subtraction
*
Multiplication
/
Division
^
Exponent
%
Modulus
sqrt(a)
Square root
abs(a)
Absolute value
log(a)
Natural log
log10(a)
Log base 10
sin(a)
Sine (a in radians)
cos(a)
Cosine (a in radians)
tan(a)
Tangent (a in radians)
asin(a)
Arc-sine (result in radians)
acos(a)
Arc-cosine (result in radians)
atan(a)
Arc-tangent (result in radians)
floor(a)
Round a down to the nearest integer
ceil(a)
Round a up to the nearest integer
min(a,b)
Smaller of a and b
max(a,b)
Larger or a and b
clamp(a,b,c)
Value of a, clamped between b and c, where b < c
For manipulating tables…