OK first you have to work out the distance of the centre of the spaceship from the centre of the planet. Use pythagorus for this e.g. radius = squareroot(x*x + y*y).
Then give the planet a Mass (M), make up a gravitational constant G, then the gravitational acceleration on the ship is (G*M)/(radius*radius). This assumes that the ship has no (or negligable) mass.
Now you have the gravitational acceleration it must be applied to the x and y intertia of your ship. But NOT just added on, it must be added on proportially to x and y. I think you can use Pythagorus for this too. You need to work out the ratio of x and y to the radius and multiply the gravitational acceleration by the ratio (which will be less than or equal to 1) . You might even be able to use sin and cos somehow (check this forum for a recent post on intertia EDIT: http://www.blitzbasic.com/Community/posts.php?topic=45268 but you need to know the angle so not much good!), but I have to go shopping now (cop out).
Good luck
Then give the planet a Mass (M), make up a gravitational constant G, then the gravitational acceleration on the ship is (G*M)/(radius*radius). This assumes that the ship has no (or negligable) mass.
Now you have the gravitational acceleration it must be applied to the x and y intertia of your ship. But NOT just added on, it must be added on proportially to x and y. I think you can use Pythagorus for this too. You need to work out the ratio of x and y to the radius and multiply the gravitational acceleration by the ratio (which will be less than or equal to 1) . You might even be able to use sin and cos somehow (check this forum for a recent post on intertia EDIT: http://www.blitzbasic.com/Community/posts.php?topic=45268 but you need to know the angle so not much good!), but I have to go shopping now (cop out).
Good luck