Reliable tank level measurement in dairy application