kstars
deepstarcomponent.cpp
Go to the documentation of this file.
44 DeepStarComponent::DeepStarComponent( SkyComposite *parent, QString fileName, float trigMag, bool staticstars ) :
71 kDebug() << "Error reading header of catalog file " << dataFileName << ": " << starReader.getErrorNumber() << ": " << starReader.getError() << endl;
99 kDebug() << "WARNING: HTM Level in shallow star data file and HTM Level in m_skyMesh do not match. EXPECT TROUBLE" << endl;
106 kDebug() << "ERROR: Could not allocate new StarBlock to hold shallow unnamed stars for trixel " << trixel << endl;
117 kDebug() << "ERROR: Could not read starData structure for star #" << j << " under trixel #" << trixel << endl;
141 kDebug() << "CODE ERROR: More unnamed static stars in trixel " << trixel << " than we allocated space for!" << endl;
163 kDebug() << "Could not open HD Index file. Search by HD numbers for deep stars will not work." << endl;
216 // If we are to hide the fainter stars (eg: while slewing), we set the magnitude limit to hideStarsMag.
239 StarBlock *prevBlock = ( ( i >= 1 ) ? m_starBlockList.at( currentRegion )->block( i - 1 ) : NULL );
260 // NOTE: We are guessing that the last 1.5/16 magnitudes in the catalog are just additions and the star catalog
261 // is actually supposed to reach out continuously enough only to mag m_FaintMagnitude * ( 1 - 1.5/16 )
262 // TODO: Is there a better way? We may have to change the magnitude tolerance if the catalog changes
265 if( !staticStars && !m_starBlockList.at( currentRegion )->fillToMag( maglim ) && maglim <= m_FaintMagnitude * ( 1 - 1.5/16 ) ) {
299 // DEBUG: Uncomment to identify problems with Star Block Factory / preservation of Magnitude Order in the LRU Cache
316 kDebug() << "WARNING: Failed to open deep star catalog " << dataFileName << ". Disabling it." << endl;
318 kDebug() << "WARNING: Header read error for deep star catalog " << dataFileName << "!! Disabling it!" << endl;
334 kDebug() << "Could not create HTMesh of level " << htm_level << " for catalog " << dataFileName << ". Skipping it.";
410 bool DeepStarComponent::starsInAperture( QList<StarObject *> &list, const SkyPoint ¢er, float radius, float maglim )
425 m_skyMesh->intersect( center.ra0().Degrees(), center.dec0().Degrees(), radius, (BufNum) OBJ_NEAREST_BUF );
491 kDebug() << "Trixel " << trixel << ": ERROR: SBF LRU Cache linked list seems to be broken at before block " << i << endl;
virtual bool drawPointSource(SkyPoint *loc, float mag, char sp= 'A')=0
Draw a point source (e.g., a star).
SkyObject * findByHDIndex(int HDnum)
Definition: deepstarcomponent.cpp:358
void draw(SkyPainter *skyp)
Draw the object on the SkyMap skyp a pointer to the SkyPainter to use.
Definition: deepstarcomponent.cpp:174
void JITupdate()
added for JIT updates from both StarComponent and ConstellationLines
Definition: starobject.cpp:317
float getBrightMag()
Return the magnitude of the brightest star in this StarBlock.
Definition: starblock.h:97
Holds a block of stars and various peripheral variables to mark its place in data structures...
Definition: starblock.h:38
bool markFirst(StarBlock *block)
Mark a StarBlock as most recently used and sync its drawID with the current drawID.
Definition: starblockfactory.cpp:79
bool starsInAperture(QList< StarObject * > &list, const SkyPoint ¢er, float radius, float maglim=-29)
Add to the given list, the stars from this component, that lie within the specified circular aperture...
Definition: deepstarcomponent.cpp:410
DeepStarComponent(SkyComposite *parent, QString fileName, float trigMag, bool staticstars=false)
Definition: deepstarcomponent.cpp:44
An abstract parent class, to be inherited by SkyComponents that store a QList of SkyObjects.
Definition: listcomponent.h:36
int getBlockCount()
Returns the total number of blocks in theis StarBlockList.
Definition: starblocklist.h:100
void intersect(double ra, double dec, double radius, BufNum bufNum=0)
finds the trixels that cover the specified circle
Definition: HTMesh.cpp:99
unsigned int getRecordCount(int id)
Returns the number of records under the given index ID.
Definition: binfilehelper.h:146
FILE * getFileHandle()
Get the file handle corresponding to the currently open file.
Definition: binfilehelper.h:132
void aperture(SkyPoint *center, double radius, MeshBufNum_t bufNum=DRAW_BUF)
finds the set of trixels that cover the circular aperture specified after first performing a reverse ...
Definition: skymesh.cpp:66
FILE * openFile(const QString &fileName)
WARNING: This function may not be compatible in other locales, because it calls QString::toAscii.
Definition: binfilehelper.cpp:69
A factory that creates StarBlocks and recycles them in an LRU Cache.
Definition: starblockfactory.h:32
SkyPoint * focus()
Retrieve the Focus point; the position on the sky at the center of the skymap.
Definition: skymap.h:120
void update(KSNumbers *num)
Update the sky positions of this component.
Definition: deepstarcomponent.cpp:170
virtual ~DeepStarComponent()
Definition: deepstarcomponent.cpp:149
SkyComposite is a kind of container class for SkyComponent objects.
Definition: skycomposite.h:43
static StarBlockFactory m_StarBlockFactory
Definition: deepstarcomponent.h:118
char spchar() const
Returns just the first character of the spectral type string.
Definition: starobject.cpp:344
void EquatorialToHorizontal(const dms *LST, const dms *lat)
Determine the (Altitude, Azimuth) coordinates of the SkyPoint from its (RA, Dec) coordinates, given the local sidereal time and the observer's latitude.
Definition: skypoint.cpp:55
Definition: skymesh.h:52
bool readHeader()
Read the header and index table from the file and fill up the QVector s with the entries.
Definition: binfilehelper.cpp:200
Definition: MeshIterator.h:22
There are several time-dependent values used in position calculations, that are not specific to an ob...
Definition: ksnumbers.h:43
Definition: skymesh.h:54
float getFaintMag()
Return the magnitude of the faintest star in this StarBlock.
Definition: starblock.h:104
int getStarCount()
Return the number of stars currently filled in this StarBlock.
Definition: starblock.h:110
bool markNext(StarBlock *after, StarBlock *block)
Rank a given StarBlock after another given StarBlock in the LRU list and sync its drawID with the cur...
Definition: starblockfactory.cpp:117
Maintains a list of StarBlocks that contain the stars lying in a single trixel.
Definition: starblocklist.h:36
SkyObject * objectNearest(SkyPoint *p, double &maxrad)
Definition: deepstarcomponent.cpp:370
bool fillToMag(float maglim)
Ensures that the list is loaded with stars to given magnitude limit.
Definition: starblocklist.cpp:66
Provides all necessary information about an object in the sky: its coordinates, name(s), type, magnitude, and QStringLists of URLs for images and webpages regarding the object.
Definition: skyobject.h:46
static void byteSwap(deepStarData *stardata)
Definition: deepstarcomponent.cpp:453
dms angularDistanceTo(const SkyPoint *sp, double *const positionAngle=0) const
Computes the angular distance between two SkyObjects.
Definition: skypoint.cpp:608
StarObject * addStar(const starData &data)
Initialize another star with data.
Definition: starblock.cpp:55
StarBlock * block(unsigned int i)
Returns the i-th block in this StarBlockList.
Definition: starblocklist.h:88
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.