kstars
#include <skyobject.h>

Public Types | |
enum | TYPE { STAR =0, CATALOG_STAR =1, PLANET =2, OPEN_CLUSTER =3, GLOBULAR_CLUSTER =4, GASEOUS_NEBULA =5, PLANETARY_NEBULA =6, SUPERNOVA_REMNANT =7, GALAXY =8, COMET =9, ASTEROID =10, CONSTELLATION =11, MOON =12, ASTERISM =13, GALAXY_CLUSTER =14, DARK_NEBULA =15, QUASAR =16, MULT_STAR =17, RADIO_SOURCE =18, SATELLITE =19, SUPERNOVA =20, TYPE_UNKNOWN } |
typedef qint64 | UID |
Public Member Functions | |
SkyObject (int t=TYPE_UNKNOWN, dms r=dms(0.0), dms d=dms(0.0), float m=0.0, const QString &n=QString(), const QString &n2=QString(), const QString &lname=QString()) | |
SkyObject (int t, double r, double d, float m=0.0, const QString &n=QString(), const QString &n2=QString(), const QString &lname=QString()) | |
virtual | ~SkyObject () |
virtual SkyObject * | clone () const |
virtual UID | getUID () const |
bool | hasAuxInfo () |
bool | hasLongName () const |
bool | hasName () const |
bool | hasName2 () const |
QStringList & | ImageList () |
QStringList & | ImageTitle () |
QStringList & | InfoList () |
QStringList & | InfoTitle () |
bool | isSolarSystem () const |
virtual double | labelOffset () const |
virtual QString | labelString () const |
virtual QString | longname (void) const |
float | mag (void) const |
float | mag (const QString &band) const |
QString | messageFromTitle (const QString &imageTitle) |
virtual QString | name (void) const |
QString | name2 (void) const |
QString & | notes () |
virtual double | pa () const |
SkyPoint | recomputeCoords (const KStarsDateTime &dt, const GeoLocation *geo=0) |
QTime | riseSetTime (const KStarsDateTime &dt, const GeoLocation *geo, bool rst, bool exact=true) |
dms | riseSetTimeAz (const KStarsDateTime &dt, const GeoLocation *geo, bool rst) |
QTime | riseSetTimeUT (const KStarsDateTime &dt, const GeoLocation *geo, bool rst, bool exact=true) |
void | saveUserLog (const QString &newLog) |
void | setLongName (const QString &longname=QString()) |
void | setNotes (QString _notes) |
void | setType (int t) |
void | showPopupMenu (KSPopupMenu *pmenu, const QPoint &pos) |
dms | transitAltitude (const KStarsDateTime &dt, const GeoLocation *geo) |
QTime | transitTime (const KStarsDateTime &dt, const GeoLocation *geo) |
QTime | transitTimeUT (const KStarsDateTime &dt, const GeoLocation *geo) |
QString | translatedLongName () const |
QString | translatedName () const |
QString | translatedName2 () const |
int | type (void) const |
QString | typeName () const |
QString & | userLog () |
![]() | |
SkyPoint (const dms &r, const dms &d) | |
SkyPoint (double r, double d) | |
SkyPoint () | |
virtual | ~SkyPoint () |
void | aberrate (const KSNumbers *num) |
void | addEterms (void) |
const dms & | alt () const |
dms | altRefracted () const |
dms | angularDistanceTo (const SkyPoint *sp, double *const positionAngle=0) const |
void | apparentCoord (long double jd0, long double jdf) |
const dms & | az () const |
void | B1950ToJ2000 (void) |
bool | bendlight () |
bool | checkBendLight () |
bool | checkCircumpolar (const dms *gLat) |
const dms & | dec () const |
const dms & | dec0 () const |
SkyPoint | deprecess (const KSNumbers *num, long double epoch=J2000) |
void | Equatorial1950ToGalactic (dms &galLong, dms &galLat) |
void | EquatorialToHorizontal (const dms *LST, const dms *lat) |
SkyPoint | Eterms (void) |
void | findEcliptic (const dms *Obliquity, dms &EcLong, dms &EcLat) |
void | GalacticToEquatorial1950 (const dms *galLong, const dms *galLat) |
void | HorizontalToEquatorial (const dms *LST, const dms *lat) |
void | J2000ToB1950 (void) |
SkyPoint | moveAway (const SkyPoint &from, double dist) |
void | nutate (const KSNumbers *num) |
bool | operator== (SkyPoint &p) |
void | precessFromAnyEpoch (long double jd0, long double jdf) |
const dms & | ra () const |
const dms & | ra0 () const |
void | set (const dms &r, const dms &d) |
void | setAlt (dms alt) |
void | setAlt (double alt) |
void | setAz (dms az) |
void | setAz (double az) |
void | setDec (dms d) |
void | setDec (double d) |
void | setDec0 (dms d) |
void | setDec0 (double d) |
void | setFromEcliptic (const dms *Obliquity, const dms &EcLong, const dms &EcLat) |
void | setRA (dms r) |
void | setRA (double r) |
void | setRA0 (dms r) |
void | setRA0 (double r) |
void | subtractEterms (void) |
virtual void | updateCoords (KSNumbers *num, bool includePlanets=true, const dms *lat=0, const dms *LST=0, bool forceRecompute=false) |
double | vGeocentric (double vhelio, long double jd) |
double | vGeoToVHelio (double vgeo, long double jd) |
double | vHeliocentric (double vlsr, long double jd) |
double | vHelioToVlsr (double vhelio, long double jd) |
double | vREarth (long double jd0) |
double | vRSite (double vsite[3]) |
double | vRSun (long double jd) |
double | vTopocentric (double vgeo, double vsite[3]) |
double | vTopoToVGeo (double vtopo, double vsite[3]) |
Static Public Member Functions | |
static QString | typeName (const int t) |
![]() | |
static double | refract (const double alt) |
static dms | refract (const dms alt) |
static double | refractionCorr (double alt) |
static double | unrefract (const double alt) |
static dms | unrefract (const dms alt) |
Static Public Attributes | |
static const UID | invalidUID = ~0 |
static const UID | UID_DEEPSKY = 2 |
static const UID | UID_GALAXY = 1 |
static const UID | UID_SOLARSYS = 3 |
static const UID | UID_STAR = 0 |
![]() | |
static const double | altCrit = -1.0 |
Protected Member Functions | |
void | setMag (float m) |
void | setMag (const QString &band, const double mag) |
void | setName (const QString &name) |
void | setName2 (const QString &name2=QString()) |
![]() | |
void | precess (const KSNumbers *num) |
Protected Attributes | |
QSharedDataPointer< AuxInfo > | info |
QString | LongName |
QString | Name |
QString | Name2 |
![]() | |
long double | lastPrecessJD |
Static Protected Attributes | |
static QString | emptyString |
static QString | starString = QString("star") |
static QString | unnamedObjectString = QString(I18N_NOOP("unnamed object")) |
static QString | unnamedString = QString(I18N_NOOP("unnamed")) |
Detailed Description
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.
Information about an object in the sky.
- Version
- 1.0
Definition at line 46 of file skyobject.h.
Member Typedef Documentation
typedef qint64 SkyObject::UID |
Type for Unique object IDenticator.
Each object has unique ID (UID). For different objects UIDs must be different.
Definition at line 53 of file skyobject.h.
Member Enumeration Documentation
enum SkyObject::TYPE |
The type classification of the SkyObject.
Definition at line 108 of file skyobject.h.
Constructor & Destructor Documentation
|
explicit |
Constructor.
Set SkyObject data according to arguments.
- Parameters
-
t Type of object r catalog Right Ascension d catalog Declination m magnitude (brightness) n Primary name n2 Secondary name lname Long name (common name)
Definition at line 50 of file skyobject.cpp.
SkyObject::SkyObject | ( | int | t, |
double | r, | ||
double | d, | ||
float | m = 0.0 , |
||
const QString & | n = QString() , |
||
const QString & | n2 = QString() , |
||
const QString & | lname = QString() |
||
) |
Constructor.
Set SkyObject data according to arguments. Differs from above function only in data type of RA and Dec.
- Parameters
-
t Type of object r catalog Right Ascension d catalog Declination m magnitude (brightness) n Primary name n2 Secondary name lname Long name (common name)
Definition at line 63 of file skyobject.cpp.
|
virtual |
Destructor (empty)
Definition at line 81 of file skyobject.cpp.
Member Function Documentation
|
virtual |
Create copy of object.
This method is virtual copy constructor. It allows for safe copying of objects. In other words, KSPlanet object stored in SkyObject pointer will be copied as KSPlanet. Each subclass of SkyObject MUST implement clone method.
- Returns
- pointer to newly allocated object. Caller takes full responsibility for deallocating it.
Reimplemented in StarObject, DeepSkyObject, KSComet, KSAsteroid, KSPlanet, KSPluto, KSMoon, TrailObject, and KSSun.
Definition at line 76 of file skyobject.cpp.
|
virtual |
Return UID for object.
This method should be reimplemented in all concrete subclasses. Implementation for SkyObject just returns invalidUID. It's required SkyObject is not an abstract class.
Reimplemented in StarObject, DeepSkyObject, KSComet, KSAsteroid, KSPlanet, KSMoon, and KSSun.
Definition at line 484 of file skyobject.cpp.
|
inline |
|
inline |
Definition at line 272 of file skyobject.h.
|
inline |
Definition at line 268 of file skyobject.h.
|
inline |
Definition at line 270 of file skyobject.h.
|
inline |
- Returns
- a reference to a QStringList storing a list of Image URLs associated with this SkyObject
Definition at line 299 of file skyobject.h.
|
inline |
- Returns
- a reference to a QStringList storing a list of Image Titles associated with this SkyObject
Definition at line 304 of file skyobject.h.
|
inline |
- Returns
- a reference to a QStringList storing a list of Information Links associated with this SkyObject
Definition at line 309 of file skyobject.h.
|
inline |
- Returns
- a reference to a QStringList storing a list of Information Link Titles associated with this SkyObject
Definition at line 314 of file skyobject.h.
|
inline |
|
virtual |
- Returns
- the pixel distance for offseting the object's name label
- Note
- overridden in StarObject, DeepSkyObject, KSPlanetBase
Reimplemented in StarObject, KSPlanetBase, and DeepSkyObject.
Definition at line 474 of file skyobject.cpp.
|
virtual |
- Returns
- the string used to label the object on the map In the default implementation, this just returns translatedName() Overridden by StarObject.
Reimplemented in StarObject, and DeepSkyObject.
Definition at line 470 of file skyobject.cpp.
|
inlinevirtual |
- Returns
- object's common (long) name
Reimplemented in StarObject.
Definition at line 140 of file skyobject.h.
|
inline |
- Returns
- object's magnitude
Definition at line 182 of file skyobject.h.
|
inline |
- Returns
- object's magnitude in given band. NaN if magnitude unavailable.
- Parameters
-
band a string specifying which spectral band to look for
Definition at line 188 of file skyobject.h.
QString SkyObject::messageFromTitle | ( | const QString & | imageTitle | ) |
Given the Image title from a URL file, try to convert it to an image credit string.
Definition at line 374 of file skyobject.cpp.
|
inlinevirtual |
- Returns
- object's primary name.
Reimplemented in StarObject, and Supernova.
Definition at line 124 of file skyobject.h.
|
inline |
- Returns
- object's secondary name
Definition at line 132 of file skyobject.h.
|
inline |
Definition at line 321 of file skyobject.h.
|
inlinevirtual |
- Returns
- the object's position angle. This is overridden in KSPlanetBase and DeepSkyObject; for all other SkyObjects, this returns 0.0.
Reimplemented in KSPlanetBase, and DeepSkyObject.
Definition at line 194 of file skyobject.h.
SkyPoint SkyObject::recomputeCoords | ( | const KStarsDateTime & | dt, |
const GeoLocation * | geo = 0 |
||
) |
The coordinates for the object on date dt are computed and returned, but the object's internal coordinates are not permanently modified.
- Returns
- the coordinates of the selected object for the time given by jd
- Parameters
-
dt date/time for which the coords will be computed. geo pointer to geographic location (used for solar system only)
Definition at line 296 of file skyobject.cpp.
QTime SkyObject::riseSetTime | ( | const KStarsDateTime & | dt, |
const GeoLocation * | geo, | ||
bool | rst, | ||
bool | exact = true |
||
) |
Determine the time at which the point will rise or set.
Because solar system objects move across the sky, it is necessary to iterate on the solution. We compute the rise/set time for the object's current position, then compute the object's position at that time. Finally, we recompute then rise/set time for the new coordinates. Further iteration is not necessary, even for the most swiftly-moving object (the Moon).
- Returns
- the local time that the object will rise
- Parameters
-
dt current UT date/time geo current geographic location rst If true, compute rise time. If false, compute set time. exact If true, use a second iteration for more accurate time
Definition at line 105 of file skyobject.cpp.
dms SkyObject::riseSetTimeAz | ( | const KStarsDateTime & | dt, |
const GeoLocation * | geo, | ||
bool | rst | ||
) |
- Returns
- the Azimuth time when the object will rise or set. This function recomputes set or rise UT times.
- Parameters
-
dt target date/time geo GeoLocation object rst Boolen. If true will compute rise time. If false will compute set time.
Definition at line 192 of file skyobject.cpp.
QTime SkyObject::riseSetTimeUT | ( | const KStarsDateTime & | dt, |
const GeoLocation * | geo, | ||
bool | rst, | ||
bool | exact = true |
||
) |
- Returns
- the UT time when the object will rise or set
- Parameters
-
dt target date/time geo pointer to Geographic location rst Boolean. If true will compute rise time. If false will compute set time. exact If true, use a second iteration for more accurate time
Definition at line 135 of file skyobject.cpp.
void SkyObject::saveUserLog | ( | const QString & | newLog | ) |
Save new user log text.
Definition at line 412 of file skyobject.cpp.
void SkyObject::setLongName | ( | const QString & | longname = QString() | ) |
Set the object's long name.
- Parameters
-
longname the object's long name.
Definition at line 92 of file skyobject.cpp.
|
inlineprotected |
Set the object's sorting magnitude.
- Parameters
-
m the object's magnitude.
Definition at line 409 of file skyobject.h.
|
protected |
Set the object's magnitude in a particular band.
- Parameters
-
band the band (U, B, V, R, I, J, K etc.) mag the object's (apparent) magnitude.
|
inlineprotected |
Set the object's primary name.
- Parameters
-
name the object's primary name
Definition at line 419 of file skyobject.h.
|
inlineprotected |
Set the object's secondary name.
- Parameters
-
name2 the object's secondary name.
Definition at line 423 of file skyobject.h.
|
inline |
Definition at line 323 of file skyobject.h.
|
inline |
Set the object's type identifier to the argument.
- Parameters
-
t the object's type identifier (e.g., "SkyObject::PLANETARY_NEBULA")
- See also
- enum TYPE
Definition at line 171 of file skyobject.h.
void SkyObject::showPopupMenu | ( | KSPopupMenu * | pmenu, |
const QPoint & | pos | ||
) |
Show Type-specific popup menu.
Oveloading is done in the function initPopupMenu
Definition at line 83 of file skyobject.cpp.
dms SkyObject::transitAltitude | ( | const KStarsDateTime & | dt, |
const GeoLocation * | geo | ||
) |
- Returns
- the altitude of the object at the moment it transits the meridian.
- Parameters
-
dt target date/time geo pointer to the geographic location
Definition at line 245 of file skyobject.cpp.
QTime SkyObject::transitTime | ( | const KStarsDateTime & | dt, |
const GeoLocation * | geo | ||
) |
The same iteration technique described in riseSetTime() is used here.
- Returns
- the local time that the object will transit the meridian.
- Parameters
-
dt target date/time geo pointer to the geographic location
Definition at line 241 of file skyobject.cpp.
QTime SkyObject::transitTimeUT | ( | const KStarsDateTime & | dt, |
const GeoLocation * | geo | ||
) |
- Returns
- the universal time that the object will transit the meridian.
- Parameters
-
dt target date/time geo pointer to the geographic location
Definition at line 221 of file skyobject.cpp.
|
inline |
- Returns
- object's common (long) name, translated to local language.
Definition at line 145 of file skyobject.h.
|
inline |
- Returns
- object's primary name, translated to local language.
Definition at line 129 of file skyobject.h.
|
inline |
- Returns
- object's secondary name, translated to local language.
Definition at line 135 of file skyobject.h.
|
inline |
|
static |
- Returns
- A translated string indicating the type name for a given type number
- Parameters
-
t The type number
- Note
- Note the existence of a SkyObject::typeName( void ) method that is not static and returns the type of this object.
Definition at line 319 of file skyobject.cpp.
QString SkyObject::typeName | ( | void | ) | const |
- Returns
- the type name for this object
- Note
- This just calls the static method by the same name, with the appropriate type number. See SkyObject::typeName( const int )
Definition at line 370 of file skyobject.cpp.
|
inline |
- Returns
- a reference to a QString storing the users' log for this SkyObject
Definition at line 319 of file skyobject.h.
Member Data Documentation
|
staticprotected |
Definition at line 431 of file skyobject.h.
|
protected |
Definition at line 428 of file skyobject.h.
|
static |
|
protected |
Definition at line 425 of file skyobject.h.
|
protected |
Definition at line 425 of file skyobject.h.
|
protected |
Definition at line 425 of file skyobject.h.
|
staticprotected |
Definition at line 434 of file skyobject.h.
|
static |
Definition at line 58 of file skyobject.h.
|
static |
Definition at line 57 of file skyobject.h.
|
static |
Definition at line 59 of file skyobject.h.
|
static |
Kind of UID.
Definition at line 56 of file skyobject.h.
|
staticprotected |
Definition at line 433 of file skyobject.h.
|
staticprotected |
Definition at line 432 of file skyobject.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.