The intensity of gravity, g, is not a true constant, as it changes with altitude. In the following visual you can verify how its value varies at very different points, even inside the planet.

 

Licencia de Creative Commons Licencia Creative Commons Reconocimiento-No Comercial-Compartir Igual 3.0 España
logo INTEF
Ministerio de Educación, Cultura y Deporte