calculatorsimple1.yaml

An example of a RatatoskCalculator component, which generates a stream of integers called DecimalNumber which is in the range [-0.57, 0.57]. It then calculates the sine of these numbers, called SinNumber, and outputs DecimalNumber and SinNumber.

Options:
PeriodMs: 1000
Constants:
Incr: 0.1
InputSignals:
OutputSignals:
- { Type: DoubleVal, Topic: DecimalNumber, Partition: }
- { Type: DoubleVal, Topic: SinNumber, Partition: }
TempValues:
- Temp
Expressions:
- Temp = Temp + Incr
- Temp = (Temp>0.57)?-0.57:Temp
- DecimalNumber.val = Temp
- SinNumber.val = sin(DecimalNumber.val)