Hey,
I've been messing around with Celestia for a while now, and I think it's quite impressive. I recently programmed a little program for my TI-86 calculator that would simulate two particles of different masses and how they would interact given a position and a starting velocity.
I used newton's law of universal gravitation, which seems to work quite nicely, but I'm having trouble understanding the application of Keplerian orbits. I know Keplerian orbits are composed of the conic sections, but I've gotten some orbits in my program that don't seem to be uniformly elliptical or of a determined shape.
For example, if I set one particle to have a great mass, lets say 5x10^10 and the other to have a mass of 20, and they are five units apart, and the large particle is stationary, and the small particle starts out with a velocity of about .5 perpendicular to the direction of the large body, then the small particle orbits around a few times, but its orbit seems to rotate and expand for each rotation, which certainly is not explained with Keplerian orbits. Do orbits have to be in the shape of a conic section when there are only two bodies?
Do you think this discrepency can be explained because of the limit on the precision for values on my calculator? There are only 14 decimal digits per floating point value allowed.
I can show you the source code if any of you are familiar with it. Its very very similar to BASIC.
Thanks.
Question about orbital mechanics
-
Topic authorLiquidscript
- Posts: 8
- Joined: 13.01.2003
- With us: 21 years 10 months
- Location: Arizona
-
- Developer
- Posts: 1863
- Joined: 21.11.2002
- With us: 22 years
Sounds like you need to shorten your recalculation interval. If this is too long, then your particle is not going to behave in a Newtonian way, because you're not picking up significant changes in gravitational force/direction between calculations.
Try keeping everything else the same but shortening your recalculation interval tenfold, and see what happens to the shape of the orbits - if that's the problem, you should see them tighten towards ellipses.
Grant
Try keeping everything else the same but shortening your recalculation interval tenfold, and see what happens to the shape of the orbits - if that's the problem, you should see them tighten towards ellipses.
Grant
-
Topic authorLiquidscript
- Posts: 8
- Joined: 13.01.2003
- With us: 21 years 10 months
- Location: Arizona
It's great to know other people besides me are doing crazy things with a calculator ! I've done the same thing using Qbasic, but I started off with the basic code (having only one mass moving) on my calculator (it couldn't handle both masses moving, not enough computational power (well enough, but mind-numbingly slow)). Of course the computer is much faster, you can watch planets twirl around each other....
I've been beaten to giving advice, as grathutchison has already said it !
(Mad Boris)
I've been beaten to giving advice, as grathutchison has already said it !
(Mad Boris)
-
- Developer
- Posts: 1863
- Joined: 21.11.2002
- With us: 22 years