- #1
CyJackX
- 5
- 0
Homework Statement
So, I'm creating a 2d graphical simulation of orbiting bodies.
Right now I'm just working with 2 bodies, one stationary, but I would hope to extend this program to be able to include any number of moving bodies and have them interact accordingly.
After combing wikipedia's articles on orbiting bodies and this very helpful site,
http://www.braeunig.us/space/orbmech.htm"
I have not been able to come to a conclusion of what I need to do.
Very shortly after beginning my puzzling, I learned that the n-body problem is a terrifying ordeal, at least, to me. But, my quest is not for a purely accurate representation, but something that will be, ideally, computationally less intense.
The first thing that came to my mind was to calculate the Force of Gravity acceleration between the two bodies every time interval, then adjust their velocities and positions accordingly using the classic accelerated motion equations. This works, but naturally, because this calculates linear acceleration, essentially moving my object in a bunch of tiny straight lines that form an oval, it is very inaccurate unless dt starts approaching 0. Under this formula, I cannot hold an orbit for very long; it only takes several periods before the satellite falls into the stationary planet.
Ideally, what I had in mind BEFORE seeing the highly inaccurate results, I wanted the n-bodies to calculate their accelerations based on their gravitational pull to each other, then adjust their positions and velocity.
This, I believe, would give an acceleration to each particle that doesn't necessarily point to a specific body, and each instant this point would be changing as all the bodies realigned themselves again.
So, after all this backstory, my question is this:
How does one determine the next position of a satellite if they are given only the satellite's position, velocity, acceleration, and change in time? Assuming that the direction of acceleration will remain the same. (It won't, in actuality, because of all the moving bodies, but I believe that finding a formula that gives mini-curved paths instead of mini-linear paths will be more accurate.)
Homework Equations
F = GM1M2/r2
I'm just using the basic gravitational equation to determine accelerations.
I've been using standard uniform acceleration equations for the movements.
The Attempt at a Solution
See above. I'm sorry my explanation kind of eschewed the template, but I don't think it's the kind of question that most commonly gets asked here.
Last edited by a moderator: