stability of an exponential moving average
How about initializing the compensation factor so that it doesn't have to do the convergence from an undefined state?

UltrasonicRecorder(int referenceValue, Input referenceInput) :
    _referenceValue(referenceValue),
    _referenceInput(referenceInput)
{
    _compensation = 1.0; // This!
}


Edit: Your EWMA is correct. Your woes of compounding errors are unfounded. As you always "move towards" the measurement value, any compounding errors will be limited. In fact the compound error will at any point in time be less than:

(sum{i=0,infty} (1-delta)^i)*ULP(ANALOG_VALUE_RANGE) ~ 2^-(52-12) / delta ~ 10^-6