Compensating or correcting for variations in velocity of sound