Kstars
starcomponent.cpp
104bool StarComponent::addDeepStarCatalogIfExists(const QString &fileName, float trigMag, bool staticstars)
121 if (!addDeepStarCatalogIfExists("tycho2.dat", 8.0) && !addDeepStarCatalogIfExists("deepstars.dat", 8.0))
225 // float maglim = ( 2.000 + 2.444 * Options::memUsage() / 10.0 ) * ( lgz - lgmin ) + Options::magLimitDrawStarZoomOut();
235 We want to keep the star density on screen a constant. This is directly proportional to the number of stars
236 and directly proportional to the area on screen. The area is in turn inversely proportional to the square
238 0.45 * maglim + 0.95 - 2 * log( ZoomFactor ) - log( Star Density ) - log( Some proportionality constant )
239 hence the formula. We've gathered together all the constants and set it to 3.5, so as to set the minimum
245 // Reducing the slope w.r.t zoom factor to avoid the extremely fast increase in star density with zoom
430 qCWarning(KSTARS) << "Error reading namedstars.dat header : " << dataReader.getErrorNumber() << " : "
437 qCWarning(KSTARS) << "Error reading starnames.dat header : " << nameReader.getErrorNumber() << " : "
474 << "HTM Level in shallow star data file and HTM Level in m_skyMesh do not match. EXPECT TROUBLE"
483 qCCritical(KSTARS) << "FILE FORMAT ERROR: Could not read StarData structure for star #" << j << " under trixel #"
500 qCCritical(KSTARS) << "ERROR: fread() call on nameFile failed in trixel " << trixel << " star " << j;
721void StarComponent::starsInAperture(QList<StarObject *> &list, const SkyPoint ¢er, float radius, float maglim)
727 m_skyMesh->intersect(center.ra0().Degrees(), center.dec0().Degrees(), radius, static_cast<BufNum>(OBJ_NEAREST_BUF));
803 printf( "Memory use due to visible unnamed stars = %8.2f MB\n", ( sizeof( StarObject ) * nStars / 1048576.0 ) );
805 printf( "Memory use due to StarBlocks in SBF = %8d bytes\n", sizeof( StarBlock ) * m_StarBlockFactory.getBlockCount() );
825 qDebug() << Q_FUNC_INFO << "Trixel " << trixel << ": ERROR: faintMag of prev block = " << faintMag
830 qDebug() << Q_FUNC_INFO << "Trixel " << trixel << ": ERROR: Block" << i << "is unlinked in LRU Cache";
833 qDebug() << Q_FUNC_INFO << "Trixel " << trixel << ": ERROR: SBF LRU Cache linked list seems to be broken at before block " << i;
This class provides utility functions to handle binary data files in the format prescribed by KStars.
Definition binfilehelper.h:39
static bool testFileExists(const QString &fileName)
Checks if a file exists.
Definition binfilehelper.cpp:57
long getDataOffset() const
Returns the offset at which the data begins.
Definition binfilehelper.h:175
bool readHeader()
Read the header and index table from the file and fill up the QVector s with the entries.
Definition binfilehelper.cpp:250
unsigned int getRecordCount(int id) const
Returns the number of records under the given index ID.
Definition binfilehelper.h:123
FILE * openFile(const QString &fileName)
WARNING: This function may not be compatible in other locales, because it calls QString::toAscii.
Definition binfilehelper.cpp:72
Stores and manages unnamed stars, most of which are dynamically loaded into memory.
Definition deepstarcomponent.h:32
void intersect(double ra, double dec, double radius, BufNum bufNum=0)
NOTE: The intersect() routines below are all used to find the trixels needed to cover a geometric obj...
Definition HTMesh.cpp:104
Holds a list of stars with high proper motion along with the trixel each star is currently located in...
Definition highpmstarlist.h:29
There are several time-dependent values used in position calculations, that are not specific to an ob...
Definition ksnumbers.h:43
An abstract parent class, to be inherited by SkyComponents that store a QList of SkyObjects.
Definition listcomponent.h:24
MeshIterator is a very lightweight class used to iterate over the result set of an HTMesh intersectio...
Definition MeshIterator.h:21
The Projector class is the primary class that serves as an interface to handle projections.
Definition projector.h:58
QPointF toScreen(const SkyPoint *o, bool oRefract=true, bool *onVisibleHemisphere=nullptr) const
This is exactly the same as toScreenVec but it returns a QPointF.
Definition projector.cpp:93
SkyComposite is a kind of container class for SkyComponent objects.
Definition skycomposite.h:30
The purpose of this class is to prevent labels from overlapping.
Definition skylabeler.h:99
void setPen(const QPen &pen)
sets the pen used for drawing labels on the sky.
Definition skylabeler.cpp:197
bool drawNameLabel(SkyObject *obj, const QPointF &_p, const qreal padding_factor=1)
Tries to draw a label for an object.
Definition skylabeler.cpp:161
static SkyMesh * Instance()
returns the default instance of SkyMesh or null if it has not yet been created.
Definition skymesh.cpp:39
void setKSNumbers(KSNumbers *num)
sets the time for indexing StarObjects and CLines.
Definition skymesh.h:145
Trixel indexStar(StarObject *star)
returns the trixel that contains the star at the set time with proper motion taken into account but n...
Definition skymesh.cpp:79
Provides all necessary information about an object in the sky: its coordinates, name(s),...
Definition skyobject.h:42
virtual bool drawPointSource(const SkyPoint *loc, float mag, char sp='A')=0
Draw a point source (e.g., a star).
dms angularDistanceTo(const SkyPoint *sp, double *const positionAngle=nullptr) const
Computes the angular distance between two SkyObjects.
Definition skypoint.cpp:899
void EquatorialToHorizontal(const CachingDms *LST, const CachingDms *lat)
Determine the (Altitude, Azimuth) coordinates of the SkyPoint from its (RA, Dec) coordinates,...
Definition skypoint.cpp:77
void update(KSNumbers *num) override
Update the sky positions of this component.
Definition starcomponent.cpp:133
void draw(SkyPainter *skyp) override
Draw the object on the SkyMap skyp a pointer to the SkyPainter to use.
Definition starcomponent.cpp:251
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:721
StarObject * findByHDIndex(int HDnum)
Find stars by HD catalog index.
Definition starcomponent.cpp:614
SkyObject * objectNearest(SkyPoint *p, double &maxrad) override
Find the SkyObject nearest the given SkyPoint.
Definition starcomponent.cpp:671
void appendListObject(SkyObject *object)
Append a star to the Object List.
Definition starcomponent.cpp:579
static StarComponent * Create(SkyComposite *)
Create an instance of StarComponent.
Definition starcomponent.cpp:92
void drawLabels()
draw all the labels in the prioritized LabelLists and then clear the LabelLists.
Definition starcomponent.cpp:372
void objectsInArea(QList< SkyObject * > &list, const SkyRegion ®ion) override
Searches the region(s) and appends the SkyObjects found to the list of sky objects.
Definition starcomponent.cpp:602
static double reindexInterval(double pm)
returns the reindex interval (in centuries!) for the given magnitude of proper motion (in milliarcsec...
Definition starobject.cpp:46
void JITupdate()
added for JIT updates from both StarComponent and ConstellationLines
Definition starobject.cpp:526
void setNames(const QString &name, const QString &name2)
Sets the name, genetive name, and long name.
Definition starobject.cpp:231
char spchar() const
Returns just the first character of the spectral type string.
Definition starobject.cpp:554
double pmMagnitude() const
returns the magnitude of the proper motion correction in milliarcsec/year
Definition starobject.h:199
void init(const StarData *stardata)
Initializes a StarObject to given data.
Definition starobject.cpp:133
QString gname(bool useGreekChars=true) const
Returns the genetive name of the star.
Definition starobject.cpp:559
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
QString name(GameStandardAction id)
KIOCORE_EXPORT QStringList list(const QString &fileClass)
char * data()
const_iterator constBegin() const const
const_iterator constEnd() const const
iterator insert(const Key &key, const T &value)
T value(const Key &key) const const
void append(QList< T > &&value)
const_reference at(qsizetype i) const const
void clear()
void push_back(parameter_type value)
qsizetype size() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QString arg(Args &&... args) const const
QString fromLatin1(QByteArrayView str)
bool isEmpty() const const
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
QByteArray toLocal8Bit() const const
QString toLower() const const
SkipEmptyParts
void raise()
void show()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.