Files
astronomy/generate/gravsim/pluto_gravsim.h
Don Cross 4e6cb282f5 Use original Pluto gravsim with finer time steps.
I'm getting much better accuracy sticking with my original
gravity simulator, just with smaller time increments, than
I was with the Runge-Kutta 4 method. The PlutoStateTable
gets a bit larger (51 state vectors instead of 41), but the
accuracy is so much higher.

Removed the Runge-Kutta code because I won't be going back to it.
2021-11-12 16:22:14 -05:00

29 lines
844 B
C

/*
pluto_gravsim.h - Don Cross <cosinekitty@gmail.com>
https://github.com/cosinekitty/astronomy
Constants that tune the gravitational simulation of Pluto's orbit.
*/
#ifndef __ASTRONOMY_PLUTO_GRAVSIM_H
#define __ASTRONOMY_PLUTO_GRAVSIM_H
#define PLUTO_NUM_STATES 51
#define PLUTO_TT1 (-730000) /* 0001-04-30T12:00:00.000Z */
#define PLUTO_TT2 (+730000) /* 3998-09-03T12:00:00.000Z */
#if ((PLUTO_TT2 - PLUTO_TT1) % (PLUTO_NUM_STATES - 1)) != 0
#error PLUTO_TIME_STEP ratio must be an integer.
#endif
#define PLUTO_TIME_STEP ((PLUTO_TT2 - PLUTO_TT1) / (PLUTO_NUM_STATES - 1))
#define PLUTO_DT 146
#if PLUTO_TIME_STEP % PLUTO_DT != 0
#error Invalid combination of Pluto time step, time increment.
#endif
#define PLUTO_NSTEPS ((PLUTO_TIME_STEP / PLUTO_DT) + 1)
#endif