[Kstars-devel] Index Out-of-Range error in HighPMStarList::reindex

Akarsh Simha akarshsimha at gmail.com
Thu Jul 10 22:53:27 CEST 2008


> I was wondering the same thing which is why I inquired about the RA
> and Dec that were causing the problem.  I would intercept the code 
> between the creation of the RA and Dec and the insertion into the 
> StarIndex and print out the RA and Dec if the index is out of range.

Thanks for the hint.

Was something that I had overlooked. The key to this problem was that
the convention for numbering trixels within KStars differs from that
on the binary files.

So we are actually working with 3 conventions for trixel Ids - one
within HTMesh, one within KStars and one within the binary files! I
want to reduce this to two, by making the binary files follow the
convention used within KStars. The thing preventing this is the MySQL
database sorting. Since we store trixels by name in the database, and
since "N" comes before "S" in the English alphabet, "N0000" will be
the first trixel on the file, but this is actually trixel #256 within
KStars!

The quick and easy solution to this is to use trixel Ids in the
database - this reduces a whole lot of code weight etc, but that would
spoil the readability.

I think I should go ahead and do this. But I want James' consent on
this, because it might lower the readability of the database
entries. Maybe we could instead add an additional column in the
database to store the Trixel IDs (the KStars convention :D) and use
that as the sorting key.

Regards
Akarsh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.kde.org/pipermail/kstars-devel/attachments/20080711/8ea30b52/attachment.pgp 


More information about the Kstars-devel mailing list