Let's just look to the recorder to see the data. Look at the steering wheel angle and the steering wheel sign. The data is coming from the bus at regular intervals. We see that when we move the steering wheel from left to right, the sign changes from 0 to 1 and the angle shows the absolute deflection angle.
This is a good example to show how the mathematic channel could help. Let's create a new formula channel and think about how to create an absolute channel out of sign and angle. First of all, we need a real sign, like -1 for negative and +1 for positive values. Since we have only 0 and 1, we need to scale it. An algebraic way of doing it is to multiply it with 2 (we get 0 and 2) and subtract 1 (we get -1 and 1 for the input value of 0 and 1). Next we multiply this with the angle. Thus, the equation looks as follows:
"STWH_ANGLE" · ("STWH_SIGN" · 2 - 1)
Now let's add the resulting channel in the recorder. We see that the angle is negative when the blue curve (sign) is low and positive when the blue curve is high. The formula in DEWESoft has a useful feature in that it checks the input rate of the signals. If a signal is asynchronous (that means if it gets samples at irregular intervals), the output channel is also asynchronous. Since the two combined channels are coming from the same CAN message, they will have the same time stamp and we can combine them in a formula. This way, we can be sure that the output will have exactly the same speed and time stamps as the input channels.