kstars
starcomponent.cpp
Go to the documentation of this file.
96 bool StarComponent::addDeepStarCatalogIfExists( const QString &fileName, float trigMag, bool staticstars ) {
98 m_DeepStarComponents.append( new DeepStarComponent( parent(), fileName, trigMag, staticstars ) );
112 if( !addDeepStarCatalogIfExists( "tycho2.dat" , 8.0 ) && !addDeepStarCatalogIfExists( "deepstars.dat", 8.0 ) )
206 // float maglim = ( 2.000 + 2.444 * Options::memUsage() / 10.0 ) * ( lgz - lgmin ) + Options::magLimitDrawStarZoomOut();
214 (A better formula is available here: http://www.astro.uu.nl/~strous/AA/en/antwoorden/magnituden.html
216 We want to keep the star density on screen a constant. This is directly proportional to the number of stars
217 and directly proportional to the area on screen. The area is in turn inversely proportional to the square
219 0.45 * maglim + 0.95 - 2 * log( ZoomFactor ) - log( Star Density ) - log( Some proportionality constant )
220 hence the formula. We've gathered together all the constants and set it to 3.5, so as to set the minimum
226 // Reducing the slope w.r.t zoom factor to avoid the extremely fast increase in star density with zoom
393 kDebug() << "Error reading namedstars.dat header : " << dataReader.getErrorNumber() << " : " << dataReader.getError() << endl;
398 kDebug() << "Error reading starnames.dat header : " << nameReader.getErrorNumber() << " : " << nameReader.getError() << endl;
425 kDebug() << "WARNING: HTM Level in shallow star data file and HTM Level in m_skyMesh do not match. EXPECT TROUBLE" << endl;
432 kDebug() << "FILE FORMAT ERROR: Could not read starData structure for star #" << j << " under trixel #" << trixel << endl;
443 kDebug() << "ERROR: fread() call on nameFile failed in trixel " << trixel << " star " << j << endl;
502 // Overrides ListComponent::findByName() to include genetive name and HD index also in the search
600 // TODO: Should we multiply rBest by a factor < 1, so that we give higher priority to named stars?
611 void StarComponent::starsInAperture( QList<StarObject*> &list, const SkyPoint ¢er, float radius, float maglim )
617 m_skyMesh->intersect( center.ra0().Degrees(), center.dec0().Degrees(), radius, (BufNum) OBJ_NEAREST_BUF );
687 printf( "Memory use due to visible unnamed stars = %8.2f MB\n", ( sizeof( StarObject ) * nStars / 1048576.0 ) );
689 printf( "Memory use due to StarBlocks in SBF = %8d bytes\n", sizeof( StarBlock ) * m_StarBlockFactory.getBlockCount() );
717 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).
void JITupdate()
added for JIT updates from both StarComponent and ConstellationLines
Definition: starobject.cpp:317
bool append(Trixel trixel, StarObject *star, double pm)
Definition: highpmstarlist.cpp:46
Stores and manages unnamed stars, most of which are dynamically loaded into memory.
Definition: deepstarcomponent.h:49
static double reindexInterval(double pm)
returns the reindex interval (in centuries!) for the given magnitude of proper motion (in milliarcsec...
Definition: starobject.cpp:49
void setNames(QString name, QString name2)
Sets the name, genetive name, and long name.
Definition: starobject.cpp:225
virtual SkyObject * objectNearest(SkyPoint *p, double &maxrad)
Find the SkyObject nearest the given SkyPoint.
Definition: starcomponent.cpp:571
An abstract parent class, to be inherited by SkyComponents that store a QList of SkyObjects.
Definition: listcomponent.h:36
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
virtual void objectsInArea(QList< SkyObject * > &list, const SkyRegion ®ion)
Searches the region(s) and appends the SkyObjects found to the list of sky objects.
Definition: starcomponent.cpp:514
QPointF toScreen(const SkyPoint *o, bool oRefract=true, bool *onVisibleHemisphere=0) const
This is exactly the same as toScreenVec but it returns a QPointF.
Definition: projector.cpp:93
static bool testFileExists(const QString &fileName)
Checks if a file exists.
Definition: binfilehelper.cpp:56
This class provides utility functions to handle binary data files in the format prescribed by KStars...
Definition: binfilehelper.h:52
FILE * openFile(const QString &fileName)
WARNING: This function may not be compatible in other locales, because it calls QString::toAscii.
Definition: binfilehelper.cpp:69
i18nc("string from libindi, used in the config dialog","100x")
void draw(SkyPainter *skyp)
Draw the object on the SkyMap skyp a pointer to the SkyPainter to use.
Definition: starcomponent.cpp:232
Definition: highpmstarlist.h:40
SkyComposite is a kind of container class for SkyComponent objects.
Definition: skycomposite.h:43
static StarComponent * Create(SkyComposite *)
Create an instance of StarComponent.
Definition: starcomponent.cpp:86
virtual void update(KSNumbers *num)
Update the sky positions of this component.
Definition: starcomponent.cpp:124
Definition: skylabel.h:28
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
double pmMagnitude()
returns the magnitude of the proper motion correction in milliarcsec/year
Definition: starobject.h:180
static double starLabelDensity()
Get Relative density for star name labels and/or magnitudes.
Definition: Options.h:2664
There are several time-dependent values used in position calculations, that are not specific to an ob...
Definition: ksnumbers.h:43
SkyObject * findByHDIndex(int HDnum)
Find stars by HD catalog index.
Definition: starcomponent.cpp:526
Definition: skymesh.h:54
void 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: starcomponent.cpp:611
void init(const starData *stardata)
Initializes a StarObject to given data.
Definition: starobject.cpp:133
void setPen(const QPen &pen)
sets the pen used for drawing labels on the sky.
Definition: skylabeler.cpp:173
bool drawNameLabel(SkyObject *obj, const QPointF &_p)
Tries to draw a label for an object.
Definition: skylabeler.cpp:151
virtual void emitProgressText(const QString &message)
Emit signal about progress.
Definition: skycomponent.cpp:35
The purpose of this class is to prevent labels from overlapping.
Definition: skylabeler.h:112
Definition: skyobject.h:108
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
dms angularDistanceTo(const SkyPoint *sp, double *const positionAngle=0) const
Computes the angular distance between two SkyObjects.
Definition: skypoint.cpp:608
virtual SkyObject * findStarByGenetiveName(const QString name)
Definition: starcomponent.cpp:498
virtual SkyObject * findByName(const QString &name)
Find stars by name (including genetive name)
Definition: starcomponent.cpp:503
static bool showStarMagnitudes()
Get Label star magnitudes in the sky map?
Definition: Options.h:2196
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:21 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:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.