When just "db" used, the behaviour is clear.
But does "zeroDb" affect this behaviour?
When a instantaneous measurement falls below "zeroDb" limit, does "mag" value go to 0 inmediately or just when "db" is exceeded?
Let's focus in the next example.
- Last reported value of "mag"=3A.
Imagine the measurement going up or down very slowly.
When instantaneous measurement ("instMag" in advance) starts going down from 3A to 0.5A, is "mag" updated to value 0 when "instMag"=2A (zeroDb) or when "instMag"=1A (3A-db=1A)?
What happends when the instantaneous measurement rises above "zeroDb" limit? Does "mag" value go to a non 0 value inmediately or just when "db" is exceeded?
Generating "mag" changes just considering "zeroDb" limit will lead into many changes (data change reports for example) if "instMag" is around "zeroDb" value...
As long as -zeroDb < instMag < zeroDb mag is set to zero (0), and db is irrelevant. In your example, mag is set to zero when instMag goes below 2A, irregardless of db. If instMag goes above 2A, mag is set to this value, and the value transmitted immediately. From that point on again dB needs to be considered, possibly also for the instMag value leading again to a zero suppression.
Observe that the purpose of zeroDb shall be to suppress many change reports around zero due to inaccurate measurements. If it does not do this, it is mostly wrongly configured. Therefore having for zeroDb the same value as for db is normally not realistic. If oscillation around the zeroDb value is an issue, zeroDb might also be set to zero.