how does gravity work in the solar system