[Kstars-devel] Menu Support for HA Rey Constellations

James Bowlin bowlin at mindspring.com
Sat Nov 26 21:57:40 CET 2005


On Thursday 24 November 2005 01:58 am, Jason Harris wrote:
> Sounds great.  I basically agree with this approach, go for it :)

Okay, it's done.  The patch file is large (90k+) so I am going to
email it to Jason instead of posting it here.  Most of the bulk is
from the new clines-rey.dat and cnames-rey.dat files.  If anyone
else wants it, just let me know.  I will be glad to send it to you.
Please remember that this patch is for the 3.5 branch that I recently
checked out from the KDE SVN repository.

When I added the hidden star names I sped up the reading in of the
clines data by a factor of almost 10x.  The original code searched
a list of 13,000+ named objects for each line in clines*.dat.  I
created a new list of just named stars which has only 1,600 or so
entries.  That list can be destroyed after all the cline data files
have been read, but I don't know how to do this.  

I noticed a strange bug with the constellation names.  The bug occurs
the first time I switch between the Rey names and either the Latin
names or the abbreviated names.  After switching the names in the
Guides setup menu and then zooming or moving the skymap to cause a
redraw, all the constellation names are piled up at one spot.  I
think this spot is always just above the horizon over the "N" marking
North.  If I wait about 30 seconds and then cause another redraw,
the names then all jump to their proper positions.  I cannot imagine
how the changes I made could directly cause this behavior.

I've tracked this bug down to the  SkyMap::getXY() method inside of
skymap.cpp.  When the bug occurs, it gets the proper input from my
lists but produces a constant output of the one fixed point.  Here
is an example:

 Name        ra       dec          x   y 
 ---------   -------- --------    --- --
 ANDROMEDA:  0.715585 0.349066    108 68
 ANTLIA:    -0.558505 2.61799     108 68
 APUS:      -1.32645  4.18879     108 68

The ra and dec are those of the object sent to getYX(), the x, y values
are from the output of that method.  After 30 seconds the same ra and
dec values produce the correct x, y values.


I am not certain that the new files (cnames-rey.dat and clines-rey.dat)
will be installed properly by a "make install".  I made what seemed to
be the right changes to kstars.kdevprj by copying what was already
there for clines.dat and cnames.dat.  I was impressed by how clever
"make install" is.  For example, if I change hip001.dat and then
run "make install", it knows to install that file, but it doesn't
re-install all the data files that haven't changed.  The two new
files I created don't work this way so I have to manually copy them
to the proper subdirectory under $KDEDIR.

I double checked the star names I added that were needed to complete
the Rey constellations.  These are in the patch.  I am still working
on adding as many star names as I can find to hip001.dat.  I can
put these changes in a separate patch file (as well as a combined
patch file) once I am done making and checking them.

-- 
Peace, James


More information about the Kstars-devel mailing list