Compensating or correcting for variations in pressure, density or temperature