As a fellow physics geek mobile dev (eg. ThreeBody, Geodesic Asteroids) I gotta ask: how are you modelling the gravitational force?
Here is a part of the code (lua, LÖVE framework) : https://gist.github.com/psych0pat/2b7c8f52b9191f28ef8f
It's a bit dirty but it's working :)
Working code is a good thing. I tend to rat-hole on the physics stuff, since I have a background in it.