[rates]

The [rates] section enables a series of rates to be defined which are calculated on a specified interval. The rates are computed as per-second values. Each rate is specified in the following form:

<target attribute name>=<source attribute name>,<time period in milliseconds>

Where:

  • <target attribute name> is either the name of an internal attribute (e.g. rpmdot) or the name of a new attribute to be created which will hold the rate value.
  • <source attribute name> is the name of the attribute from which the rate is to be calculated
  • <time period in milliseconds> is the time between which samples of the source attribute are to be taken in order to compute the rate.

Rates are computed using the following calculation:

(current value - previous value) / period * 1000

Where current value is the value at the time the rate is being calculated, and previous value will be the value at approximately period milliseconds ago. The actual period used is the measured time between the two samples.

The minimum period possible is around 5 milliseconds, but it is not recommended that you go below 100 milliseconds really. This should be plenty for most purposes.

Example:

[rates]
newattribute=rusefi.tps1,200
rpmdot=rpm,100
mapdot=rusefi.map,100

This example specifies the following:

  • A new attribute called newattribute is calculated from the rusefi.tps1 attribute at a time period of 200ms (i.e. approximately 5hz). In this particular example the source attribute of rusefi.tps1 is being populated over CANBus from a RusEFI platform using the dbccanbus datamode and a dbcnamespace of rusefi. If the tps1 attribute is a throttle percentage, then the units of the resulting rates would be in %/second.
  • The internal attribute of rpmdot is being populated with a rate calculated from the rpm internal attribute with a time period of 100ms. The resulting rate is in units of RPM/sec.
  • the internal attribute of mapdot is being populated with a rate calculated from the rusefi.map attribute with a period of 100ms (10hz approximately). The resulting units would be kpa/sec.

The attributes newattribute, rpmdot, and mapdot can all be used on a ValueGauge or any other gauge which requires an attribute setting (within reason of course! You wouldn’t use them on an engine maps gauge for example).

Note that rate values can pretty high in some scenarios, such as a rapid opening of the throttle.