Float method for measuring liquid levels