• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • skyobjects
skyobject.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  skyobject.cpp - K Desktop Planetarium
3  -------------------
4  begin : Sun Feb 11 2001
5  copyright : (C) 2001 by Jason Harris
6  email : jharris@30doradus.org
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #include "skyobject.h"
19 
20 #include <iostream>
21 
22 #include <kglobal.h>
23 #include <kstandarddirs.h>
24 #include <QPainter>
25 #include <QTextStream>
26 #include <QFile>
27 #include <QFontMetricsF>
28 
29 #include "starobject.h" //needed in saveUserLog()
30 #include "ksnumbers.h"
31 #include "kspopupmenu.h"
32 #include "dms.h"
33 #include "geolocation.h"
34 #include "kstarsdatetime.h"
35 #include "kstarsdata.h"
36 #include "Options.h"
37 #include "skycomponents/skylabeler.h"
38 
39 QString SkyObject::emptyString;
40 QString SkyObject::unnamedString = QString(I18N_NOOP("unnamed"));
41 QString SkyObject::unnamedObjectString = QString(I18N_NOOP("unnamed object"));
42 QString SkyObject::starString = QString("star");
43 
44 const SkyObject::UID SkyObject::invalidUID = ~0;
45 const SkyObject::UID SkyObject::UID_STAR = 0;
46 const SkyObject::UID SkyObject::UID_GALAXY = 1;
47 const SkyObject::UID SkyObject::UID_DEEPSKY = 2;
48 const SkyObject::UID SkyObject::UID_SOLARSYS = 3;
49 
50 SkyObject::SkyObject( int t, dms r, dms d, float m,
51  const QString &n, const QString &n2,
52  const QString &lname )
53  : SkyPoint( r, d),
54  info()
55 {
56  setType( t );
57  sortMagnitude = m;
58  setName(n);
59  setName2(n2);
60  setLongName(lname);
61 }
62 
63 SkyObject::SkyObject( int t, double r, double d, float m,
64  const QString &n, const QString &n2,
65  const QString &lname )
66  : SkyPoint( r, d),
67  info()
68 {
69  setType( t );
70  sortMagnitude = m;
71  setName(n);
72  setName2(n2);
73  setLongName(lname);
74 }
75 
76 SkyObject* SkyObject::clone() const
77 {
78  return new SkyObject(*this);
79 }
80 
81 SkyObject::~SkyObject() {}
82 
83 void SkyObject::showPopupMenu( KSPopupMenu *pmenu, const QPoint &pos ) {
84  initPopupMenu( pmenu );
85  pmenu->popup( pos );
86 }
87 
88 void SkyObject::initPopupMenu( KSPopupMenu *pmenu ) {
89  pmenu->createEmptyMenu( this );
90 }
91 
92 void SkyObject::setLongName( const QString &longname ) {
93  if ( longname.isEmpty() ) {
94  if ( hasName() )
95  LongName = name();
96  else if ( hasName2() )
97  LongName = name2();
98  else
99  LongName.clear();
100  } else {
101  LongName = longname;
102  }
103 }
104 
105 QTime SkyObject::riseSetTime( const KStarsDateTime &dt, const GeoLocation *geo, bool rst, bool exact ) {
106 
107  // If this object does not rise or set, return an invalid time
108  SkyPoint p = recomputeCoords( dt, geo );
109  if( p.checkCircumpolar( geo->lat() ) )
110  return QTime();
111 
112  //First of all, if the object is below the horizon at date/time dt, adjust the time
113  //to bring it above the horizon
114  KStarsDateTime dt2 = dt;
115  dms lst(geo->GSTtoLST( dt.gst() ));
116  p.EquatorialToHorizontal( &lst, geo->lat() );
117  if ( p.alt().Degrees() < 0.0 ) {
118  if ( p.az().Degrees() < 180.0 ) { //object has not risen yet
119  dt2 = dt.addSecs( 12.*3600. ); // Move forward 12 hours, to a time when it has already risen
120  } else { //object has already set
121  dt2 = dt.addSecs( -12.*3600. ); // Move backward 12 hours, to a time when it has not yet set
122  }
123  }
124  // The addition / subtraction of 12 hours ensures that we always
125  // compute the _closest_ rise time and the _closest_ set time to
126  // the current time.
127 
128  QTime rstUt = riseSetTimeUT( dt2, geo, rst, exact );
129  if ( ! rstUt.isValid() )
130  return QTime();
131 
132  return geo->UTtoLT( KStarsDateTime( dt2.date(), rstUt ) ).time();
133 }
134 
135 QTime SkyObject::riseSetTimeUT( const KStarsDateTime &dt, const GeoLocation *geo, bool riseT, bool exact ) {
136  // First trial to calculate UT
137  QTime UT = auxRiseSetTimeUT( dt, geo, &ra(), &dec(), riseT );
138 
139  // We iterate once more using the calculated UT to compute again
140  // the ra and dec for that time and hence the rise/set time.
141  // Also, adjust the date by +/- 1 day, if necessary
142 
143  // By adding this +/- 1 day, we are double-checking that the
144  // reported rise-time is the _already_ (last) risen time, and that
145  // the reported set-time is the _future_ (next) set time
146  //
147  // However, issues with this are taken care of in
148  // SkyObject::riseSetTime()
149 
150  KStarsDateTime dt0 = dt;
151  dt0.setTime( UT );
152  if ( riseT && dt0 > dt ) {
153  dt0 = dt0.addDays( -1 );
154  } else if ( ! riseT && dt0 < dt ) {
155  dt0 = dt0.addDays( 1 );
156  }
157 
158  SkyPoint sp = recomputeCoords( dt0, geo );
159  UT = auxRiseSetTimeUT( dt0, geo, &sp.ra(), &sp.dec(), riseT );
160 
161  if ( exact ) {
162  // We iterate a second time (For the Moon the second iteration changes
163  // aprox. 1.5 arcmin the coordinates).
164  dt0.setTime( UT );
165  sp = recomputeCoords( dt0, geo );
166  UT = auxRiseSetTimeUT( dt0, geo, &sp.ra(), &sp.dec(), riseT );
167  }
168 
169  return UT;
170 }
171 
172 QTime SkyObject::auxRiseSetTimeUT( const KStarsDateTime &dt, const GeoLocation *geo,
173  const dms *righta, const dms *decl, bool riseT) {
174  dms LST = auxRiseSetTimeLST( geo->lat(), righta, decl, riseT );
175  return dt.GSTtoUT( geo->LSTtoGST( LST ) );
176 }
177 
178 dms SkyObject::auxRiseSetTimeLST( const dms *gLat, const dms *righta, const dms *decl, bool riseT ) {
179  dms h0 = elevationCorrection();
180  double H = approxHourAngle ( &h0, gLat, decl );
181  dms LST;
182 
183  if ( riseT )
184  LST.setH( 24.0 + righta->Hours() - H/15.0 );
185  else
186  LST.setH( righta->Hours() + H/15.0 );
187 
188  return LST.reduce();
189 }
190 
191 
192 dms SkyObject::riseSetTimeAz( const KStarsDateTime &dt, const GeoLocation *geo, bool riseT ) {
193  dms Azimuth;
194  double AltRad, AzRad;
195  double sindec, cosdec, sinlat, coslat, sinHA, cosHA;
196  double sinAlt, cosAlt;
197 
198  QTime UT = riseSetTimeUT( dt, geo, riseT );
199  KStarsDateTime dt0 = dt;
200  dt0.setTime( UT );
201  SkyPoint sp = recomputeCoords( dt0, geo );
202 
203  dms LST = auxRiseSetTimeLST( geo->lat(), &sp.ra0(), &sp.dec0(), riseT );
204  dms HourAngle = dms( LST.Degrees() - sp.ra0().Degrees() );
205 
206  geo->lat()->SinCos( sinlat, coslat );
207  dec().SinCos( sindec, cosdec );
208  HourAngle.SinCos( sinHA, cosHA );
209 
210  sinAlt = sindec*sinlat + cosdec*coslat*cosHA;
211  AltRad = asin( sinAlt );
212  cosAlt = cos( AltRad );
213 
214  AzRad = acos( ( sindec - sinlat*sinAlt )/( coslat*cosAlt ) );
215  if ( sinHA > 0.0 ) AzRad = 2.0*dms::PI - AzRad; // resolve acos() ambiguity
216  Azimuth.setRadians( AzRad );
217 
218  return Azimuth;
219 }
220 
221 QTime SkyObject::transitTimeUT( const KStarsDateTime &dt, const GeoLocation *geo ) {
222  dms LST = geo->GSTtoLST( dt.gst() );
223 
224  //dSec is the number of seconds until the object transits.
225  dms HourAngle = dms( LST.Degrees() - ra().Degrees() );
226  int dSec = int( -3600.*HourAngle.Hours() );
227 
228  //dt0 is the first guess at the transit time.
229  KStarsDateTime dt0 = dt.addSecs( dSec );
230 
231  //recompute object's position at UT0 and then find
232  //transit time of this refined position
233  SkyPoint sp = recomputeCoords( dt0, geo );
234 
235  HourAngle = dms ( LST.Degrees() - sp.ra().Degrees() );
236  dSec = int( -3600.*HourAngle.Hours() );
237 
238  return dt.addSecs( dSec ).time();
239 }
240 
241 QTime SkyObject::transitTime( const KStarsDateTime &dt, const GeoLocation *geo ) {
242  return geo->UTtoLT( KStarsDateTime( dt.date(), transitTimeUT( dt, geo ) ) ).time();
243 }
244 
245 dms SkyObject::transitAltitude( const KStarsDateTime &dt, const GeoLocation *geo ) {
246  KStarsDateTime dt0 = dt;
247  dt0.setTime( transitTimeUT( dt, geo ) );
248  SkyPoint sp = recomputeCoords( dt0, geo );
249 
250  double delta = 90 - geo->lat()->Degrees() + sp.dec().Degrees();
251  if( delta > 90 )
252  delta = 180 - delta;
253  return dms(delta);
254 }
255 
256 double SkyObject::approxHourAngle( const dms *h0, const dms *gLat, const dms *dec ) {
257 
258  double sh0 = sin ( h0->radians() );
259  double r = (sh0 - sin( gLat->radians() ) * sin(dec->radians() ))
260  / (cos( gLat->radians() ) * cos( dec->radians() ) );
261 
262  double H = acos( r )/dms::DegToRad;
263 
264  return H;
265 }
266 
267 dms SkyObject::elevationCorrection(void) {
268 
269  /* The atmospheric refraction at the horizon shifts altitude by
270  * - 34 arcmin = 0.5667 degrees. This value changes if the observer
271  * is above the horizon, or if the weather conditions change much.
272  *
273  * For the sun we have to add half the angular sie of the body, since
274  * the sunset is the time the upper limb of the sun disappears below
275  * the horizon, and dawn, when the upper part of the limb appears
276  * over the horizon. The angular size of the sun = angular size of the
277  * moon = 31' 59''.
278  *
279  * So for the sun the correction is = -34 - 16 = 50 arcmin = -0.8333
280  *
281  * This same correction should be applied to the moon however parallax
282  * is important here. Meeus states that the correction should be
283  * 0.7275 P - 34 arcmin, where P is the moon's horizontal parallax.
284  * He proposes a mean value of 0.125 degrees if no great accuracy
285  * is needed.
286  */
287 
288  if ( name() == "Sun" || name() == "Moon" )
289  return dms(-0.8333);
290  // else if ( name() == "Moon" )
291  // return dms(0.125);
292  else // All sources point-like.
293  return dms(-0.5667);
294 }
295 
296 SkyPoint SkyObject::recomputeCoords( const KStarsDateTime &dt, const GeoLocation *geo ) {
297  //store current position
298  SkyPoint original = *this;
299 
300  // compute coords for new time jd
301  KSNumbers num( dt.djd() );
302  if ( isSolarSystem() && geo ) {
303  dms LST = geo->GSTtoLST( dt.gst() );
304  updateCoords( &num, true, geo->lat(), &LST );
305  } else {
306  updateCoords( &num );
307  }
308 
309  //the coordinates for the date dt:
310  SkyPoint sp = *this;
311 
312  // restore original coords
313  setRA( original.ra().Hours() );
314  setDec( original.dec().Degrees() );
315 
316  return sp;
317 }
318 
319 QString SkyObject::typeName( int t ) {
320 
321  switch( t ) {
322  case STAR:
323  return i18n( "Star" );
324  case CATALOG_STAR:
325  return i18n( "Catalog Star" );
326  case PLANET:
327  return i18n( "Planet" );
328  case OPEN_CLUSTER:
329  return i18n( "Open Cluster" );
330  case GLOBULAR_CLUSTER:
331  return i18n( "Globular Cluster" );
332  case GASEOUS_NEBULA:
333  return i18n( "Gaseous Nebula" );
334  case PLANETARY_NEBULA:
335  return i18n( "Planetary Nebula" );
336  case SUPERNOVA_REMNANT:
337  return i18n( "Supernova Remnant" );
338  case GALAXY:
339  return i18n( "Galaxy" );
340  case COMET:
341  return i18n( "Comet" );
342  case ASTEROID:
343  return i18n( "Asteroid" );
344  case CONSTELLATION:
345  return i18n( "Constellation" );
346  case MOON:
347  return i18n( "Moon" );
348  case GALAXY_CLUSTER:
349  return i18n( "Galaxy Cluster" );
350  case SATELLITE:
351  return i18n( "Satellite" );
352  case SUPERNOVA:
353  return i18n( "Supernova" );
354  case RADIO_SOURCE:
355  return i18n("Radio Source");
356  case ASTERISM:
357  return i18n( "Asterism" );
358  case DARK_NEBULA:
359  return i18n( "Dark Nebula" );
360  case QUASAR:
361  return i18n( "Quasar" );
362  case MULT_STAR:
363  return i18n( "Multiple Star" );
364  default:
365  return i18n( "Unknown Type" );
366  }
367 
368 }
369 
370 QString SkyObject::typeName() const {
371  return typeName( Type );
372 }
373 
374 QString SkyObject::messageFromTitle( const QString &imageTitle ) {
375  QString message = imageTitle;
376 
377  //HST Image
378  if ( imageTitle == i18n( "Show HST Image" ) || imageTitle.contains("HST") ) {
379  message = i18n( "%1: Hubble Space Telescope, operated by STScI for NASA [public domain]", longname() );
380 
381  //Spitzer Image
382  } else if ( imageTitle.contains( i18n( "Show Spitzer Image" ) ) ) {
383  message = i18n( "%1: Spitzer Space Telescope, courtesy NASA/JPL-Caltech [public domain]", longname() );
384 
385  //SEDS Image
386  } else if ( imageTitle == i18n( "Show SEDS Image" ) ) {
387  message = i18n( "%1: SEDS, http://www.seds.org [free for non-commercial use]", longname() );
388 
389  //Kitt Peak AOP Image
390  } else if ( imageTitle == i18n( "Show KPNO AOP Image" ) ) {
391  message = i18n( "%1: Advanced Observing Program at Kitt Peak National Observatory [free for non-commercial use; no physical reproductions]", longname() );
392 
393  //NOAO Image
394  } else if ( imageTitle.contains( i18n( "Show NOAO Image" ) ) ) {
395  message = i18n( "%1: National Optical Astronomy Observatories and AURA [free for non-commercial use]", longname() );
396 
397  //VLT Image
398  } else if ( imageTitle.contains( "VLT" ) ) {
399  message = i18n( "%1: Very Large Telescope, operated by the European Southern Observatory [free for non-commercial use; no reproductions]", longname() );
400 
401  //All others
402  } else if ( imageTitle.startsWith( i18n( "Show" ) ) ) {
403  message = imageTitle.mid( imageTitle.indexOf( " " ) + 1 ); //eat first word, "Show"
404  message = longname() + ": " + message;
405  }
406 
407  return message;
408 }
409 
410 //TODO: Should create a special UserLog widget that encapsulates the "default"
411 //message in the widget when no log exists (much like we do with dmsBox now)
412 void SkyObject::saveUserLog( const QString &newLog ) {
413  QFile file;
414  QString logs; //existing logs
415 
416  //Do nothing if:
417  //+ new log is the "default" message
418  //+ new log is empty
419  if ( newLog == (i18n("Record here observation logs and/or data on %1.", name())) || newLog.isEmpty() )
420  return;
421 
422  // header label
423  QString KSLabel ="[KSLABEL:" + name() + ']';
424  //However, we can't accept a star name if it has a greek letter in it:
425  if ( type() == STAR ) {
426  StarObject *star = (StarObject*)this;
427  if ( name() == star->gname() )
428  KSLabel = "[KSLABEL:" + star->gname( false ) + ']'; //"false": spell out greek letter
429  }
430 
431  file.setFileName( KStandardDirs::locateLocal( "appdata", "userlog.dat" ) ); //determine filename in local user KDE directory tree.
432  if ( file.open( QIODevice::ReadOnly)) {
433  QTextStream instream(&file);
434  // read all data into memory
435  logs = instream.readAll();
436  file.close();
437  }
438 
439  //Remove old log entry from the logs text
440  if ( ! userLog().isEmpty() ) {
441  int startIndex, endIndex;
442  QString sub;
443 
444  startIndex = logs.indexOf(KSLabel);
445  sub = logs.mid (startIndex);
446  endIndex = sub.indexOf("[KSLogEnd]");
447 
448  logs.remove(startIndex, endIndex + 11);
449  }
450 
451  //append the new log entry to the end of the logs text
452  logs.append( KSLabel + '\n' + newLog + "\n[KSLogEnd]\n" );
453 
454  //Open file for writing
455  if ( !file.open( QIODevice::WriteOnly ) ) {
456  kDebug() << i18n( "Cannot write to user log file" );
457  return;
458  }
459 
460  //Write new logs text
461  QTextStream outstream(&file);
462  outstream << logs;
463 
464  //Set the log text in the object itself.
465  userLog() = newLog;
466 
467  file.close();
468 }
469 
470 QString SkyObject::labelString() const {
471  return translatedName();
472 }
473 
474 double SkyObject::labelOffset() const {
475  return SkyLabeler::ZoomOffset();
476 }
477 
478 AuxInfo *SkyObject::getAuxInfo() {
479  if( !info )
480  info = new AuxInfo;
481  return &(*info);
482 }
483 
484 SkyObject::UID SkyObject::getUID() const
485 {
486  return invalidUID;
487 }
SkyObject::riseSetTimeAz
dms riseSetTimeAz(const KStarsDateTime &dt, const GeoLocation *geo, bool rst)
Definition: skyobject.cpp:192
SkyObject::transitAltitude
dms transitAltitude(const KStarsDateTime &dt, const GeoLocation *geo)
Definition: skyobject.cpp:245
SkyPoint::ra
const dms & ra() const
Definition: skypoint.h:171
SkyPoint::dec0
const dms & dec0() const
Definition: skypoint.h:168
SkyObject::UID_GALAXY
static const UID UID_GALAXY
Definition: skyobject.h:57
KSPopupMenu
The KStars Popup Menu.
Definition: kspopupmenu.h:43
SkyPoint::az
const dms & az() const
Definition: skypoint.h:177
SkyObject::LongName
QString LongName
Definition: skyobject.h:425
SkyObject::DARK_NEBULA
Definition: skyobject.h:111
SkyObject::translatedName
QString translatedName() const
Definition: skyobject.h:129
SkyObject::emptyString
static QString emptyString
Definition: skyobject.h:431
KStarsDateTime::GSTtoUT
QTime GSTtoUT(dms GST) const
Convert a given Greenwich Sidereal Time to Universal Time (=Greenwich Mean Time). ...
Definition: kstarsdatetime.cpp:176
skyobject.h
KStarsDateTime::addDays
KStarsDateTime addDays(int nd) const
Modify the Date/Time by adding a number of days.
Definition: kstarsdatetime.h:117
SkyObject::PLANET
Definition: skyobject.h:108
SkyObject::longname
virtual QString longname(void) const
Definition: skyobject.h:140
SkyObject::invalidUID
static const UID invalidUID
Invalid UID.
Definition: skyobject.h:62
dms::Degrees
const double & Degrees() const
Definition: dms.h:98
SkyObject::setLongName
void setLongName(const QString &longname=QString())
Set the object's long name.
Definition: skyobject.cpp:92
SkyObject::riseSetTime
QTime riseSetTime(const KStarsDateTime &dt, const GeoLocation *geo, bool rst, bool exact=true)
Determine the time at which the point will rise or set.
Definition: skyobject.cpp:105
SkyObject::~SkyObject
virtual ~SkyObject()
Destructor (empty)
Definition: skyobject.cpp:81
SkyObject::saveUserLog
void saveUserLog(const QString &newLog)
Save new user log text.
Definition: skyobject.cpp:412
SkyObject::SUPERNOVA_REMNANT
Definition: skyobject.h:109
SkyObject::GALAXY
Definition: skyobject.h:109
SkyPoint::updateCoords
virtual void updateCoords(KSNumbers *num, bool includePlanets=true, const dms *lat=0, const dms *LST=0, bool forceRecompute=false)
Determine the current coordinates (RA, Dec) from the catalog coordinates (RA0, Dec0), accounting for both precession and nutation.
Definition: skypoint.cpp:317
SkyObject::UID_STAR
static const UID UID_STAR
Kind of UID.
Definition: skyobject.h:56
KSPopupMenu::createEmptyMenu
void createEmptyMenu(SkyPoint *nullObj)
Create a popup menu for empty sky.
Definition: kspopupmenu.cpp:124
SkyObject::transitTime
QTime transitTime(const KStarsDateTime &dt, const GeoLocation *geo)
The same iteration technique described in riseSetTime() is used here.
Definition: skyobject.cpp:241
SkyObject::ASTERISM
Definition: skyobject.h:110
SkyPoint::ra0
const dms & ra0() const
Definition: skypoint.h:165
SkyObject::COMET
Definition: skyobject.h:110
KStarsDateTime::setTime
void setTime(const QTime &t)
Assign the Time according to a QTime object.
Definition: kstarsdatetime.cpp:133
geolocation.h
SkyObject::UID_DEEPSKY
static const UID UID_DEEPSKY
Definition: skyobject.h:58
SkyObject::SkyObject
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())
Constructor.
Definition: skyobject.cpp:50
AuxInfo
Stores Users' Logs and QStringLists of URLs for images and webpages regarding an object in the sky...
Definition: auxinfo.h:34
dms.h
SkyObject::RADIO_SOURCE
Definition: skyobject.h:111
SkyLabeler::ZoomOffset
static double ZoomOffset()
returns the zoom dependent label offset.
Definition: skylabeler.cpp:71
SkyObject::unnamedString
static QString unnamedString
Definition: skyobject.h:432
kspopupmenu.h
SkyObject::labelString
virtual QString labelString() const
Definition: skyobject.cpp:470
SkyPoint
The sky coordinates of a point in the sky.
Definition: skypoint.h:50
SkyObject::unnamedObjectString
static QString unnamedObjectString
Definition: skyobject.h:433
SkyObject::GALAXY_CLUSTER
Definition: skyobject.h:111
SkyPoint::checkCircumpolar
bool checkCircumpolar(const dms *gLat)
Check if this point is circumpolar at the given geographic latitude.
Definition: skypoint.cpp:750
GeoLocation
Contains all relevant information for specifying a location on Earth: City Name, State/Province name...
Definition: geolocation.h:39
SkyObject::starString
static QString starString
Definition: skyobject.h:434
SkyObject::getUID
virtual UID getUID() const
Return UID for object.
Definition: skyobject.cpp:484
GeoLocation::GSTtoLST
dms GSTtoLST(const dms &gst) const
Definition: geolocation.h:230
SkyObject::messageFromTitle
QString messageFromTitle(const QString &imageTitle)
Given the Image title from a URL file, try to convert it to an image credit string.
Definition: skyobject.cpp:374
KStarsDateTime::djd
long double djd() const
Definition: kstarsdatetime.h:145
KStarsDateTime::addSecs
KStarsDateTime addSecs(double s) const
Definition: kstarsdatetime.cpp:127
SkyObject::UID
qint64 UID
Type for Unique object IDenticator.
Definition: skyobject.h:53
SkyObject::showPopupMenu
void showPopupMenu(KSPopupMenu *pmenu, const QPoint &pos)
Show Type-specific popup menu.
Definition: skyobject.cpp:83
KStarsDateTime
Extension of KDateTime for KStars KStarsDateTime can represent the date/time as a Julian Day...
Definition: kstarsdatetime.h:45
SkyObject::SATELLITE
Definition: skyobject.h:112
SkyObject::MOON
Definition: skyobject.h:110
SkyObject::isSolarSystem
bool isSolarSystem() const
Definition: skyobject.h:197
ksnumbers.h
SkyObject::transitTimeUT
QTime transitTimeUT(const KStarsDateTime &dt, const GeoLocation *geo)
Definition: skyobject.cpp:221
SkyObject::setName2
void setName2(const QString &name2=QString())
Set the object's secondary name.
Definition: skyobject.h:423
SkyObject::labelOffset
virtual double labelOffset() const
Definition: skyobject.cpp:474
dms
An angle, stored as degrees, but expressible in many ways.
Definition: dms.h:42
SkyObject::setType
void setType(int t)
Set the object's type identifier to the argument.
Definition: skyobject.h:171
SkyObject::typeName
QString typeName() const
Definition: skyobject.cpp:370
SkyPoint::dec
const dms & dec() const
Definition: skypoint.h:174
dms::Hours
double Hours() const
Definition: dms.h:125
SkyObject::info
QSharedDataPointer< AuxInfo > info
Definition: skyobject.h:428
SkyPoint::EquatorialToHorizontal
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
Options.h
SkyObject::name2
QString name2(void) const
Definition: skyobject.h:132
QTextStream
KSNumbers
There are several time-dependent values used in position calculations, that are not specific to an ob...
Definition: ksnumbers.h:43
SkyObject::hasName
bool hasName() const
Definition: skyobject.h:268
SkyObject::clone
virtual SkyObject * clone() const
Create copy of object.
Definition: skyobject.cpp:76
GeoLocation::lat
const dms * lat() const
Definition: geolocation.h:79
SkyObject::recomputeCoords
SkyPoint 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 coordi...
Definition: skyobject.cpp:296
SkyObject::type
int type(void) const
Definition: skyobject.h:164
NaN::d
const double d
Definition: nan.h:35
PI
#define PI
Definition: satellite.cpp:43
SkyObject::CONSTELLATION
Definition: skyobject.h:110
starobject.h
SkyObject::PLANETARY_NEBULA
Definition: skyobject.h:109
SkyObject::hasName2
bool hasName2() const
Definition: skyobject.h:270
SkyObject::MULT_STAR
Definition: skyobject.h:111
SkyObject::ASTEROID
Definition: skyobject.h:110
SkyObject::SUPERNOVA
Definition: skyobject.h:112
kstarsdatetime.h
SkyPoint::setRA
void setRA(dms r)
Sets RA, the current Right Ascension.
Definition: skypoint.h:119
SkyPoint::setDec
void setDec(dms d)
Sets Dec, the current Declination.
Definition: skypoint.h:130
GeoLocation::UTtoLT
KStarsDateTime UTtoLT(const KStarsDateTime &ut) const
Definition: geolocation.h:233
kstarsdata.h
SkyObject::GASEOUS_NEBULA
Definition: skyobject.h:109
SkyObject::setName
void setName(const QString &name)
Set the object's primary name.
Definition: skyobject.h:419
SkyObject::riseSetTimeUT
QTime riseSetTimeUT(const KStarsDateTime &dt, const GeoLocation *geo, bool rst, bool exact=true)
Definition: skyobject.cpp:135
skylabeler.h
SkyPoint::alt
const dms & alt() const
Definition: skypoint.h:180
SkyObject::name
virtual QString name(void) const
Definition: skyobject.h:124
SkyObject::GLOBULAR_CLUSTER
Definition: skyobject.h:108
GeoLocation::LSTtoGST
dms LSTtoGST(const dms &lst) const
Definition: geolocation.h:231
SkyObject::QUASAR
Definition: skyobject.h:111
StarObject::gname
QString gname(bool useGreekChars=true) const
Returns the genetive name of the star.
Definition: starobject.cpp:349
StarObject
This is a subclass of SkyObject.
Definition: starobject.h:41
KStarsDateTime::gst
dms gst() const
Definition: kstarsdatetime.cpp:138
SkyObject::STAR
Definition: skyobject.h:108
SkyObject
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
SkyObject::CATALOG_STAR
Definition: skyobject.h:108
SkyObject::OPEN_CLUSTER
Definition: skyobject.h:108
SkyObject::UID_SOLARSYS
static const UID UID_SOLARSYS
Definition: skyobject.h:59
SkyObject::userLog
QString & userLog()
Definition: skyobject.h:319
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

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal