Precision measurement of gravity with cold atoms in an optical lattice and comparison with a classical gravimeter