Moon gravity acceleration

Started by
2 comments, last by Dean Johnson 21 years, 9 months ago
Hello everyone I am very new to DirectX and Graphics API’s in general. I would have posted this in the beginner’s section but since it has to do with physics I thought it would be ok here. This is most likely really simple for you guys/girls so here it goes. I need an equation to calculate the fall to the earth. The ship can light boosters and try to slow or stop its decent. So if the ship starts to fall it will start to fall slowly and gain speed as its falls till it reaches a maximum velocity. I will also need to change the gravity so that the ship is pulled greater or lesser on other planets. Thanks a million
Advertisement
You might want to look at this (looks quite in depth) or this. Both found from searches in Articles & Resouces. Those links should be useful, and hopefully not too complicated.

Miles

[EDIT: messed up the html as usual ]

[edited by - Miles Clapham on July 11, 2002 2:38:54 PM]
Simply to the earch or do correct calculus in space?

for each planet do: direction = normalized(PosStar - PosShip) vShip += deltaTime * direction * 6.672*10^-11 * massStar / (distanceToStar ^ 2) 


where:
PosShip is the position of the ship
PosStar is the position of the actual star
deltaTime is the time you want to update for
massStar is the mass of the star in Kg
distanceToStar is the distance from the ship to the star in meters

that strange number (6.672*10^-11) is the gravity-constant.

to speed up you simply can ignore stars far away enough. (can''t say a number, you have to find out yourself)
-----The scheduled downtime is omitted cause of technical problems.
GREAT Thinks to both for the help. I am sure I might need more later but this will get me going. Too Bad I am at work right now and can''t play with my program to get it working right.

THANKS

This topic is closed to new replies.

Advertisement