[Kstars-devel] question about KSUtils::lagrangeInterpolation()
Jason Harris
kstars at 30doradus.org
Sat May 15 12:03:40 CEST 2004
Hello,
The lagrangeInterpolation() function is used to determine the exact
moment at which an equinox or solstice occurs, by interpolating from 5
measurements of the Sun's ecliptic longitude (as determined at noon on
each of 5 days surrounding the target event).
However, as the function is written, the interpolated Julian Day number
is returned as a double, which is then recast as a 'long double'.
Since doubles have 10-digit precision, this means the solstice/equinox
times will only be accurate to +/1.5 minutes. I suggest we change
lagrangeInterpolation() so that it uses long doubles internally.
Alternatively, we could subtract the JD of one of the measured points
from each of them, so that ten digits would be sufficient precision.
What do you think?
regards,
Jason
--
KStars: A KDE Planetarium
http://edu.kde.org/kstars
More information about the Kstars-devel
mailing list