mapping values

You might use the multimap - Arduino Playground - MultiMap - as I assume you have some non linear mapping for the ultrasonic sensors.