[Kstars-devel] UID for skyobjects proposal

Khudyakov Alexey alexey.skladnoy at gmail.com
Mon Jul 6 23:35:34 CEST 2009


Hello

This is proposal for UIDs for SkyObject. 


1. UID size. UID could be either 32-bit or 64-bit. I propose 64-bit UIDs. 
===========================================

32-bit UIDs with 4 bit used to store object type could hold as many 268*10^6 
stars or star down to ~17-18m assuming tight packing. However current star 
catalogues already passed this mark. And even if this could seem distant 

Second point. If we will construct UIDs from RA/dec/mag 32 bits are not 
adequate at all. It's simple not big enough. 

2. UID structure 
==========

bits 60:63 - object type. 
bits 0:59 - exact meaning depends on object type 

Object type:
1 - star. For stars hash could be constructed from RA, Dec and mag. Main 
advantage of this approach is that it doesn't require any modifications of 
data. So it make experiments easy. It could be changed later if required. 

Actually all object which not belong to Solar System could use this kind of 
hash. 

2 - galaxy. I think they should be separate from other deep-skies because of 
they numbers. 
3 - other deep-skies.

4 - Solar System object.
  bits 52-59 - type of object in solar system
  bits 32-51 - reserved. Should be equal to zero. 
  bits 0-32   - Object number 

Number for Big planets, Moon, Sun and Pluto could be coded by hands. 
Asteroids have unique number assigned to them by IAU. Don't know about comets.


3. Invalid UID and SkyObject objects
=======================

It's not possible to sensibly define UID for object of SkyObject class. So I 
propose to define UID = 0 to be invalid and assign it to all objects of 
SkyObject class (not its subclasses). 


4. Implementation
============

I think it's better UIDs interface with virtual functions.

--
  Khudyakov Alexey



More information about the Kstars-devel mailing list