Kstars
deepstarcomponent.cpp
2 SPDX-FileCopyrightText: 2008 Akarsh Simha Thomas Kabelmann <akarshsimha@gmail.com, thomas.kabelmann@gmx.de>
32DeepStarComponent::DeepStarComponent(SkyComposite *parent, QString fileName, float trigMag, bool staticstars)
33 : ListComponent(parent), m_reindexNum(J2000), triggerMag(trigMag), m_FaintMagnitude(-5.0), staticStars(staticstars),
64 qCCritical(KSTARS) << "Error reading header of catalog file " << dataFileName << ": " << starReader.getErrorNumber()
97 qCWarning(KSTARS) << "HTM Level in shallow star data file and HTM Level in m_skyMesh do not match. EXPECT TROUBLE!";
99 // JM 2012-12-05: Breaking into 2 loops instead of one previously with multiple IF checks for recordSize
100 // While the CPU branch prediction might not suffer any penalties since the branch prediction after a few times
101 // should always gets it right. It's better to do it this way to avoid any chances since the compiler might not optimize it.
111 qCCritical(KSTARS) << "ERROR: Could not allocate new StarBlock to hold shallow unnamed stars for trixel "
122 qCCritical(KSTARS) << "ERROR: Could not read StarData structure for star #" << j << " under trixel #"
162 qCCritical(KSTARS) << "Could not allocate new StarBlock to hold shallow unnamed stars for trixel "
219 qDebug() << Q_FUNC_INFO << "Could not open HD Index file. Search by HD numbers for deep stars will not work.";
287 // If we are to hide the fainter stars (eg: while slewing), we set the magnitude limit to hideStarsMag.
293 // qDebug() << Q_FUNC_INFO << "Mesh size = " << m_skyMesh->size() << "; drawID = " << m_skyMesh->drawID();
320 qCWarning(KSTARS) << "markNext failed in trixel" << currentRegion << "while marking block" << i;
335 // NOTE: We are guessing that the last 1.5/16 magnitudes in the catalog are just additions and the star catalog
336 // is actually supposed to reach out continuously enough only to mag m_FaintMagnitude * ( 1 - 1.5/16 )
337 // TODO: Is there a better way? We may have to change the magnitude tolerance if the catalog changes
352 // qCWarning(KSTARS) << "SBL::fillToMag( " << maglim << " ) failed for trixel " << currentRegion;
360 // REMARK: The following should never carry state, except for const parameters like updateID and maglim
361 std::function<void(std::shared_ptr<StarBlock>)> mapFunction = [&updateID, &maglim](std::shared_ptr<StarBlock> myBlock)
396 // DEBUG: Uncomment to identify problems with Star Block Factory / preservation of Magnitude Order in the LRU Cache
405 qDebug() << Q_FUNC_INFO << "Spent " << dms::seconds_in_trig << " seconds doing " << trig_calls_here
410 qDebug() << Q_FUNC_INFO << "CachedDms constructor calls so far: " << CachingDms::cachingdms_constructor_calls;
411 qDebug() << Q_FUNC_INFO << "Caching has prevented " << CachingDms::cachingdms_delta << " redundant trig function calls";
415 qDebug() << Q_FUNC_INFO << "Spent " << StarObject::updateCoordsCpuTime << " seconds updating " << StarObject::starsUpdated
435 qCWarning(KSTARS) << "Header read error for deep star catalog " << dataFileName << "!! Disabling it!";
456 qCWarning(KSTARS) << "Could not create HTMesh of level " << htm_level << " for catalog " << dataFileName
552bool DeepStarComponent::starsInAperture(QList<StarObject *> &list, const SkyPoint ¢er, float radius, float maglim)
644 qCWarning(KSTARS) << "Trixel " << trixel << ": ERROR: Block" << i << "is unlinked in LRU Cache";
FILE * getFileHandle() const
Get the file handle corresponding to the currently open file.
Definition binfilehelper.h:109
bool readHeader()
Read the header and index table from the file and fill up the QVector s with the entries.
Definition binfilehelper.cpp:250
FILE * openFile(const QString &fileName)
WARNING: This function may not be compatible in other locales, because it calls QString::toAscii.
Definition binfilehelper.cpp:72
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:552
void draw(SkyPainter *skyp) override
Draw the object on the SkyMap skyp a pointer to the SkyPainter to use.
Definition deepstarcomponent.cpp:231
void update(KSNumbers *num) override
Update the sky position(s) of this component.
Definition deepstarcomponent.cpp:226
StarObject * findByHDIndex(int HDnum)
Definition deepstarcomponent.cpp:482
SkyObject * objectNearest(SkyPoint *p, double &maxrad) override
Definition deepstarcomponent.cpp:494
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
void reset() const
sets the count back to zero so you can use this iterator to iterate again over the same result set.
Definition MeshIterator.h:40
SkyComposite is a kind of container class for SkyComponent objects.
Definition skycomposite.h:30
static SkyMesh * Instance()
returns the default instance of SkyMesh or null if it has not yet been created.
Definition skymesh.cpp:39
Provides all necessary information about an object in the sky: its coordinates, name(s),...
Definition skyobject.h:50
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:919
A factory that creates StarBlocks and recycles them in an LRU Cache.
Definition starblockfactory.h:22
void JITupdate()
added for JIT updates from both StarComponent and ConstellationLines
Definition starobject.cpp:526
char spchar() const
Returns just the first character of the spectral type string.
Definition starobject.cpp:554
qint64 elapsed() const const
qint64 restart()
void start()
void append(QList< T > &&value)
void blockingMap(Iterator begin, Iterator end, MapFunctor &&function)
A 16-byte structure that holds star data for really faint stars.
Definition nomadbinfile2mysql.h:27
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:53:02 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:53:02 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.