What advice would you give to someone who would develop a new online n-body integrator MFD for use in Orbiter?

Advice for someone wanting to develop a new online n-body integrator? Here are some comments - assuming that the primary design ethos is high accuracy.

1. The specific 'kind' of integrator - whether a symplectic integrator or Runge Kutta - isn't hugely important so long as a suitable time-step size is chosen and one uses 'explicit' integrators. Generally, I use an explicit symplectic fourth-order integrator - see

http://www.orbiter-forum.com/showthread.php?t=35489
2. When far away from a gravitating body, it is sufficient to use a time-step of around 1 hour. If close to a gravitating body, then trajectories are much more highly curved, and a much small time-step is needed. Generally, I use a time step of 30 seconds close to a gravitating body.

3. The core of the n-body integrator is the force calculations. The force calculations need to use accurate positions of the planets and moons. If working in the Jupiter system, for example, an accurate model of the positions of Jupiter and the four Galilean moon (Callisto, Ganymede, Europa and Io) is necessary. One also needs to know the position of the Sun with high precision. With less precision, the position of other Solar System bodies - e.g., Saturn, Uranus and Neptune and so on - is also needed because, believe it or not, these bodies provide significance perturbations.

4. There are two basic ways of getting accurate planet/moon positions. The easiest - and fastest - way of doing this is to take a snap-shot of the state-vectors of these bodies from Orbiter at the start of the integration period. Then, co-integrate the position/velocities of these bodies - along with those of the spacecraft. Over time, around 30 days or so, the co-integration model's estimate of planet/moon positions begins to slip a little - perhaps by a few hundred km from Orbiter's ephemeris projections. But, generally speaking, it is good enough for integration periods of around 30 days or less. It becomes very accurate for integrations just a few days ahead.

5. The second way of calculating positions is even more accurate, but very slow in comparison with the co-integration technique: one uses the same ephemerides for planet/moon positions as used in Orbiter. To do this one can leverage the same planet moon dlls that Orbiter uses. Or one can write bespoke routines that employ the same ephemerides that Orbiter uses (e.g., for the Jovian system, VSOP87 and Galsat). For the Jupiter system, a set of bespoke routines 'C' can be found here:

http://www.orbiter-forum.com/showthread.php?t=36189. These routines produce the same planet/moon positions as Orbiter to with 20 metres or so, In effect, there is no error here, and then the only source of error is very slight variations in the numerical integration for the position of the spacecraft. And with a suitably small step-size, those errors cam almost entirely be eliminated.

6. High accuracy integrators of this kind are most useful for performing manoeuvres with systems such as the Jovian and Saturnian systems. Here, gravitation perturbations can be complex. TransX's two-body calculations are not very accurate because of various 3-body effects; and IMFDs performance in these domains seems less than stellar.