Work with the delta calculation
- Last UpdatedApr 24, 2025
- 1 minute read
The following methods are used to calculate a delta.
To calculate the delta
Method 1: If the new counter is higher than the previous (last good) counter
-
To find the volume delta, minus the new counter from the previous counter.
-
Apply the reasonability criteria.
Method 2: If the new counter is less than the previous counter being used
There are three possible reasons why a good, new counter is less than the previous counter:
-
A counter rollover has occurred. The counter reached a fixed maximum and then began counting again from zero.
-
A counter reset has occurred. The counter began counting again from zero without having reached any fixed maximum.
-
The counter went backwards due to a flow reversal.
Assessing the counter and the volume delta is done as follows. The rollover applied in this example is the configured Input Rollover.
-
Calculate a delta applying the rollover. Delta = (rollover โ prior counter) + new counter.
-
A rollover occurred and the delta calculated in step 1 is used if the following happens:
-
The delta is less than half the size of the rollover.
-
The delta is reasonable.
-
-
A counter reversal occurred if the following happens:
-
The delta is greater than or equal to half the size of the rollover.
-
The delta is reasonable. In this case the delta used is the delta calculated is step 1 minus the rollover.
Note: This delta will be negative.
-
-
A counter reset occurred if the following happens:
-
Assuming a delta equal to the new counter, the delta is reasonable and will be used.
-
-
If steps 1โ4 fail, the delta is considered unreasonable.