It appears to me you could get what you want by simply integrating the signal for a fixed amount of time AFTER the initial rising edge of the area in question. The result of the integration will give you a single value that will be a function of the distance. A simple calibration process will let you determine the values resulting from no target, a target touching the sensor, and any other points of interest in-between. Assuming a reasonable sample rate relative to the signal frequency, the integration itself will have the effect of filtering the signal, so no additional filtering should be needed.
1 Like