Kstars
starobject.cpp
57 StarObject::StarObject(dms r, dms d, float m, const QString &n, const QString &n2, const QString &sptype, double pmra,
59 : SkyObject(SkyObject::STAR, r, d, m, n, n2, QString()), PM_RA(pmra), PM_Dec(pmdec), Parallax(par),
87 StarObject::StarObject(double r, double d, float m, const QString &n, const QString &n2, const QString &sptype,
89 : SkyObject(SkyObject::STAR, r, d, m, n, n2, QString()), PM_RA(pmra), PM_Dec(pmdec), Parallax(par),
118 : SkyObject(o), PM_RA(o.PM_RA), PM_Dec(o.PM_Dec), Parallax(o.Parallax), Multiplicity(o.Multiplicity),
258 void StarObject::updateCoords(const KSNumbers *num, bool, const CachingDms *, const CachingDms *, bool)
340 double dir0 = ((pm > 0) ? atan2(pmRA(), pmDec()) : atan2(-pmRA(), -pmDec())); // Bearing, in radian
363 dec = lat1; // Need variable lat1 because dec may refer to dec0, so cannot construct result in-place
456 double dir0 = ((pm > 0) ? atan2(pmRA(), pmDec()) : atan2(-pmRA(), -pmDec())); // Bearing, in radian
536 if (Options::alwaysRecomputeCoordinates() || (Options::useRelativistic() && checkBendLight()) ||
537 std::abs(lastPrecessJD - data->updateNum()->getJD()) >= 0.00069444) // Update is once per solar minute
539 // Short circuit right here, if recomputing coordinates is not required. NOTE: POTENTIALLY DANGEROUS
573 auto checkAndGreekify = [&code, gchar, alpha, &letter](const QString &abbrev, int unicodeOffset,
QString greekLetter(bool useGreekChars=true) const
Returns the greek letter portion of the star's genetive name.
Definition: starobject.cpp:567
QString number(int n, int base)
QString name(void) const override
If star is unnamed return "star" otherwise return the name.
Definition: starobject.h:130
QString nameLabel(bool drawName, bool drawMag) const
returns the name, the magnitude or both.
Definition: starobject.cpp:626
void setUsing_atan2(const double &y, const double &x)
Sets the angle using atan2()
Definition: cachingdms.cpp:62
a dms subclass that caches its sine and cosine values every time the angle is changed.
Definition: cachingdms.h:18
Definition: kspopupmenu.h:34
bool getIndexCoords(const KSNumbers *num, CachingDms &ra, CachingDms &dec)
Fills ra and dec with the coordinates of the star with the proper motion correction but without preci...
Definition: starobject.cpp:290
void SinCos(double &s, double &c) const
Get the sine and cosine together.
Definition: cachingdms.h:175
Definition: kstarsdata.h:71
void setNames(const QString &name, const QString &name2)
Sets the name, genetive name, and long name.
Definition: starobject.cpp:231
QByteArray toLatin1() const const
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 updateCoords(const KSNumbers *num, bool includePlanets=true, const CachingDms *lat=nullptr, const CachingDms *LST=nullptr, bool forceRecompute=false) override
Determine the current coordinates (RA, Dec) from the catalog coordinates (RA0, Dec0),...
Definition: starobject.cpp:258
QString gname(bool useGreekChars=true) const
Returns the genetive name of the star.
Definition: starobject.cpp:559
virtual void updateCoords(const KSNumbers *num, bool includePlanets=true, const CachingDms *lat=nullptr, const CachingDms *LST=nullptr, bool forceRecompute=false)
Determine the current coordinates (RA, Dec) from the catalog coordinates (RA0, Dec0),...
Definition: skypoint.cpp:582
QString i18n(const char *text, const TYPE &arg...)
void initPopupMenu(KSPopupMenu *pmenu) override
Initialize the popup menut.
Definition: starobject.cpp:249
QString toString(qlonglong i) const const
StarObject(dms r=dms(0.0), dms d=dms(0.0), float m=0.0, const QString &n=QString(), const QString &n2=QString(), const QString &sptype="--", double pmra=0.0, double pmdec=0.0, double par=0.0, bool mult=false, bool var=false, int hd=0)
Constructor.
Definition: starobject.cpp:57
void init(const StarData *stardata)
Initializes a StarObject to given data.
Definition: starobject.cpp:133
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const const
virtual void setRadians(const double &Rad)
Set angle according to the argument, in radians.
Definition: dms.h:333
char spchar() const
Returns just the first character of the spectral type string.
Definition: starobject.cpp:554
QString left(int n) const const
bool checkBendLight()
Check if this sky point is close enough to the sun for gravitational lensing to be significant.
Definition: skypoint.cpp:399
A 16-byte structure that holds star data for really faint stars.
Definition: nomadbinfile2mysql.h:26
double pmMagnitudeSquared() const
returns the square of the magnitude of the proper motion correction in (milliarcsec/year)^2
Definition: starobject.h:206
void JITupdate()
added for JIT updates from both StarComponent and ConstellationLines
Definition: starobject.cpp:526
const dms reduce() const
return the equivalent angle between 0 and 360 degrees.
Definition: dms.cpp:251
QString mid(int position, int n) const const
void setName2(const QString &name2=QString())
Set the object's secondary name.
Definition: skyobject.h:423
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 setLongName(const QString &longname=QString())
Set the object's long name.
Definition: skyobject.cpp:76
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Sep 29 2023 03:56:59 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Sep 29 2023 03:56:59 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.