Calculate the work done by the force of gravity