I've got a nice program I'm working on which simulates gravitational orbits however I'm having a lot of problems surrounding the use of time deltas. Where should they go, because where ever I put the * delta, adjusting it completely changes the orbit path(e.g. Flies of into space).
As for your last point, I have thought of that but I can't think of a solution. Is it the chronon problem that is cause the inconsistencies in relation to fps? or do I need to multiply more things by delta?
When I do these types of problems, I like to add dT as an argument. Then my callback timer will determine the value of dT when calling this function.
Now, in terms of where I´d put dT in this case: Certainly lines 12 and 13 need it. In those lines you are summing the acceleration. I think you mean to integrate it. remember: a = dv/dt; so dv = a*dt
Likewise: v = dx/dt; so dx = v*dt
That means that you certainly need it in lines 15 and 16 as well (which you already have).
Regarding the 0.01, don´t factor it in here. It isn´t part of the integration. Consider it only when calculating the dT so that no matter when you use delta, it will be correct. It certainly is not a problem to do this, especially since simulating the earth around the sun would otherwise take a year to compute, but you have to ensure that the same constant is applied everywhere and the only safe way to do that is at the source.