Measure percentage with maxHeight instead of depth. Depth is the height where the sensor is mounted