I’m trying to port a script written in C (in which I have zero knowledge) into JavaScript or PHP. So far, I’ve been OK figuring out most of it, but there’s a function here that eludes me.
In the file https://raw.githubusercontent.com/Stellarium/stellarium/master/src/core/planetsephems/calc_interpolated_elements.c, the “main” function is CalcInterpolatedElements
, but then in its parameters we find void (*calc_func)(const double t,double elem[],void *user)
.
What is this (*calc_func) and what does it do? It seems like, at first, the function CalcInterpolatedElements
is called with empty arrays, which are… somewhat (?) populated (?) by (*calc_func)
from… I don’t know… Ugh!
Can someone please help?