derive a formula for the mass of a planet in terms of its radius r , the acceleration due to gravity at its surface gp , and the gravitational constant g .