[Kstars-devel] Fwd: Plans for threading in KStars

Akarsh Simha akarshsimha at gmail.com
Sun Nov 13 12:21:14 UTC 2011


On Thu, Nov 10, 2011 at 12:08:04AM +0400, Alexey Khudyakov wrote:
> On 09.11.2011 21:18, Daniel-Marian Baboiu wrote:
> >On Wed, 2011-11-09 at 06:59 +0300, Aleksey Khudyakov wrote:
> >
> >>I think there is no need to work with Cartesian coordinates except when
> >>doing projections. Point on sphere could be represented as rotation which
> >>moves "north pole" (0,0,1) to the desired point on sphere.
> >
> >A rotation from north pole to desired point on sphere (using  quaternions
> >or something else) still involves calculating sincos for both latitude and
> >longitude (the quaternion requires sin and cos of half-angle of
> >rotation).
> 
> This is the case if location on sphere is stored as ??,?? pair. Then
> translation to quaternion form involve trigonometry. But if point
> position is stored as quaternion there is no trygonometry involved
> in sphere rotations.
> 
> There are no free cake and this representation eats 2x more memory
> (maybe it could be reduced to 1.5x). Also ra() & dec() accessors
> becomes expensive and involve trigonometry. They shouldn't appear in
> tight loops so its OK.

I think it's true that quarternions are equivalent to using Cartesian
coordinates (I'm thinking of them as a generalization of complex
numbers.).

I also think it's true that we stand to gain if we store the
equatorial coordinates themselves as quarternions, i.e. convert them
the moment we initialize a SkyPoint. But now, what I'm unsure about is
whether Precession, Nutation and all those corrections will like
quarternions. Maybe Jean Meeus' book has an answer.

Maybe Harry has some ideas here?

Regards
Akarsh


More information about the Kstars-devel mailing list