medianFilter for ultrasonic sensor implemented