Timeline for Orbits using Newtons laws
Current License: CC BY-SA 3.0
20 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 26, 2017 at 22:48 | history | tweeted | twitter.com/StackAstronomy/status/868237351121809408 | ||
May 22, 2017 at 20:51 | vote | accept | GR00G0 | ||
May 19, 2017 at 20:39 | comment | added | GR00G0 | Also, Ido know how to solve in keplerian elements, i just dont want to use it while in physics mode, so I can simulate effects of a rocket burn better, that by converting between kepler and cartesian | |
May 19, 2017 at 20:29 | comment | added | GR00G0 | So what I could do is during physics time(normal delta time where everything happens at realtime, I can use semi-implict euler, and as soon as I switch to faster time, i convert position and velocity to kepler elements and calculate it with kepler laws? It makes sense that larger deltatime values result in less accurate calculations, but could that be the reason that the orbit slowly falls down? | |
May 19, 2017 at 20:01 | comment | added | scrappedcola | Search stackoverflow for "numerically solving kepler's equation". One of the solutions I found helpful for this is: stackoverflow.com/questions/5287814/…. The js program at the bottom is a very nice step through to solving the equations using an iterative method. | |
May 19, 2017 at 19:50 | answer | added | David Hammen | timeline score: 7 | |
May 19, 2017 at 16:13 | comment | added | PM 2Ring | If you're getting unexpectedly huge numbers then you may have a mistake somewhere with your units, eg using seconds where you should have days or years. And with Euler integration you do need tiny time steps. IIRC, doing Mars with Euler the orbit won't even close up unless delta t is around a day or smaller. | |
May 19, 2017 at 16:06 | comment | added | PM 2Ring | So you need a better integrator, preferably one that's symplectiic (conserves energy) like leapfrog or verlet. Lots of people use and recommend Runge-Kutta methods, but they aren't so suitable for pure gravity sims because they aren't symplectic. | |
May 19, 2017 at 15:54 | comment | added | PM 2Ring | The process you describe is called Euler integration. It's the most basic numerical integration method, and notoriously bad. Even if you make the time step tiny it's performance is poor, especially if the orbit is eccentric. | |
May 19, 2017 at 15:00 | review | Close votes | |||
May 25, 2017 at 3:01 | |||||
May 19, 2017 at 0:28 | comment | added | user21 | Everytime I've tried this, I've ended up using too large a DeltaTime. Try a smaller value and see if things get better. | |
May 18, 2017 at 19:01 | comment | added | AtmosphericPrisonEscape | Write down the formula you hack into the computer. | |
May 18, 2017 at 18:49 | comment | added | GR00G0 | I am not sure what you mean | |
May 18, 2017 at 18:45 | comment | added | AtmosphericPrisonEscape | We might solve your problem easier if you'd just post which discretization you tell the computer to do. | |
May 18, 2017 at 18:05 | history | edited | James K | CC BY-SA 3.0 |
added 16 characters in body
|
May 18, 2017 at 18:05 | comment | added | GR00G0 | But that leaves me with a huge number as the velocity vector wich I add to position | |
May 18, 2017 at 18:01 | comment | added | AtmosphericPrisonEscape | You first want to multiply your gravity vector with dt and then add this number to the velocity vector. Otherwise you're not solving Newton's ODE. | |
May 18, 2017 at 17:56 | comment | added | James K | This might be too broad. The question on "how to integrate a second order ode" could easily fill several books. However, with small step size there shouldn't be too much wobbling, so there may be bugs in your code. If not then investigate verlet integration, and Runge-Kutta methods. There are several existing implementations that can be searched for and compared with yours. | |
May 18, 2017 at 17:07 | review | First posts | |||
May 19, 2017 at 12:06 | |||||
May 18, 2017 at 16:59 | history | asked | GR00G0 | CC BY-SA 3.0 |