— 31 —
13. Math functions and constants
Floating point constants: High precision floating point constants:
M_PI = π = 3.14159... M_180P = 180 / π
M_2PI = 2 * π M_1800P = M_180P / 10
M_PI2 = π / 2 M_P180 = π / 180
Trigonometric functions:
FLOAT sin(x) FLOAT cos(x) FLOAT tan(x)
Where x argument is an angle in radians.
Inverse trigonometric functions:
FLOAT asin(y) FLOAT acos(y) FLOAT atan(y)
Returns an angle in radians. Note: feeding argument values outside of function domain yields zero.
Square root:
FLOAT sqrt(z)
Note: feeding negative value into
sqrt()
yields zero.
2-argument arctangent
FLOAT atan2(x,y)
Returns the angle on Euclidean plane, in radians, between the positive x axis and the ray to the point (x, y).
Note:
atan2(0,0)
yields zero.
14. Software Reset
Call
reset()
function to reboot the Bridge, it can be used to restart the program and reset both CAN interfaces,
for example, by reception of the particular CAN frame or by timer.
Summary of Contents for YDNB-07N
Page 46: ......