[Kstars-devel] question about KSUtils::lagrangeInterpolation()
Pablo de Vicente
p.devicente at wanadoo.es
Sat May 15 23:08:41 CEST 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
El Sábado, 15 de Mayo de 2004 12:03, Jason Harris escribió:
> Hello,
Hi Jason,
>
> 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
Uff, I did not notice this when I wrote the code... That could explain why we
have an error of approx. 2 minutes for the Spring equinoxes.
> lagrangeInterpolation() so that it uses long doubles internally.
I think this is the simplest solution. The Julian Day is always used in KStars
as a long double and since the interpolation returns a Julian Day it should
return a long double.
Can you change it, Jason?.
>
> 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
regards,
Pablo.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFApobkSItUpHl6kJERAhp2AJ9Y8sDFz9CzWMMOaBAGLpEoUZ4lAACg4F2f
P5GEgqsvACtGsgb/MxCveKw=
=4OyN
-----END PGP SIGNATURE-----
More information about the Kstars-devel
mailing list