kstars
#include <ksmoon.h>
Public Member Functions | |
KSMoon () | |
KSMoon (const KSMoon &o) | |
~KSMoon () | |
virtual KSMoon * | clone () const |
virtual bool | findGeocentricPosition (const KSNumbers *num, const KSPlanetBase *) |
virtual void | findPhase (const KSSun *Sun=0) |
short int | getIPhase () |
virtual SkyObject::UID | getUID () const |
double | illum () const |
virtual bool | loadData () |
QString | phaseName () const |
Public Member Functions inherited from KSPlanetBase | |
KSPlanetBase (const QString &s=i18n("unnamed"), const QString &image_file=QString(), const QColor &c=Qt::white, double pSize=0) | |
virtual | ~KSPlanetBase () |
double | angSize () const |
QColor & | color () |
const dms & | ecLat () const |
void | EclipticToEquatorial (const dms *Obliquity) |
const dms & | ecLong () const |
void | EquatorialToEcliptic (const dms *Obliquity) |
void | findPosition (const KSNumbers *num, const dms *lat=0, const dms *LST=0, const KSPlanetBase *Earth=0) |
const dms & | helEcLat () const |
const dms & | helEcLong () const |
const QImage & | image () |
void | init (const QString &s, const QString &image_file, const QColor &c, double pSize) |
bool | isMajorPlanet () const |
virtual double | labelOffset () const |
virtual double | pa () const |
dms | phase () |
double | physicalSize () const |
double | rearth () const |
double | rsun () const |
void | setAngularSize (double size) |
void | setColor (const QColor &c) |
void | setEcLat (dms elat) |
void | setEcLong (dms elong) |
void | setPA (double p) |
void | setPhysicalSize (double size) |
void | setRearth (double r) |
void | setRearth (const KSPlanetBase *Earth) |
void | setRsun (double r) |
virtual void | updateCoords (KSNumbers *num, bool includePlanets=true, const dms *lat=0, const dms *LST=0, bool forceRecompute=false) |
Public Member Functions inherited from TrailObject | |
TrailObject (int t=TYPE_UNKNOWN, dms r=dms(0.0), dms d=dms(0.0), float m=0.0, const QString &n=QString()) | |
TrailObject (int t, double r, double d, float m=0.0, const QString &n=QString()) | |
virtual | ~TrailObject () |
void | addToTrail () |
void | clearTrail () |
void | clipTrail () |
void | drawTrail (SkyPainter *skyp) const |
bool | hasTrail () const |
const QList< SkyPoint > & | trail () const |
void | updateTrail (dms *LST, const dms *lat) |
Public Member Functions inherited from 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()) | |
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 () |
bool | hasAuxInfo () |
bool | hasLongName () const |
bool | hasName () const |
bool | hasName2 () const |
QStringList & | ImageList () |
QStringList & | ImageTitle () |
QStringList & | InfoList () |
QStringList & | InfoTitle () |
bool | isSolarSystem () 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 () |
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 () |
Public Member Functions inherited from SkyPoint | |
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) |
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]) |
Additional Inherited Members | |
Public Types inherited from KSPlanetBase | |
enum | Planets { MERCURY =0, VENUS =1, MARS =2, JUPITER =3, SATURN =4, URANUS =5, NEPTUNE =6, PLUTO =7, SUN =8, MOON =9, UNKNOWN_PLANET } |
Public Types inherited from SkyObject | |
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 |
Static Public Member Functions inherited from KSPlanetBase | |
static KSPlanetBase * | createPlanet (int n) |
Static Public Member Functions inherited from TrailObject | |
static void | clearTrailsExcept (SkyObject *o) |
Static Public Member Functions inherited from SkyObject | |
static QString | typeName (const int t) |
Static Public Member Functions inherited from SkyPoint | |
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 inherited from KSPlanetBase | |
static QVector< QColor > | planetColor |
Static Public Attributes inherited from TrailObject | |
static const int | MaxTrail = 400 |
Static Public Attributes inherited from SkyObject | |
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 Public Attributes inherited from SkyPoint | |
static const double | altCrit = -1.0 |
Protected Member Functions inherited from KSPlanetBase | |
void | findPA (const KSNumbers *num) |
virtual void | findPhase () |
UID | solarsysUID (UID type) const |
Protected Member Functions inherited from SkyObject | |
void | setMag (float m) |
void | setMag (const QString &band, const double mag) |
void | setName (const QString &name) |
void | setName2 (const QString &name2=QString()) |
Protected Member Functions inherited from SkyPoint | |
void | precess (const KSNumbers *num) |
Protected Attributes inherited from KSPlanetBase | |
EclipticPosition | ep |
EclipticPosition | helEcPos |
QImage | m_image |
double | Phase |
double | Rearth |
Protected Attributes inherited from TrailObject | |
QList< SkyPoint > | Trail |
Protected Attributes inherited from SkyObject | |
QSharedDataPointer< AuxInfo > | info |
QString | LongName |
QString | Name |
QString | Name2 |
Protected Attributes inherited from SkyPoint | |
long double | lastPrecessJD |
Static Protected Attributes inherited from KSPlanetBase | |
static const UID | UID_SOL_ASTEROID = 1 |
static const UID | UID_SOL_BIGOBJ = 0 |
static const UID | UID_SOL_COMET = 2 |
Static Protected Attributes inherited from TrailObject | |
static QSet< TrailObject * > | trailObjects |
Static Protected Attributes inherited from SkyObject | |
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
A subclass of SkyObject that provides information needed for the Moon.
Specifically, KSMoon provides a moon-specific findPosition() function. Also, there is a method findPhase(), which returns the lunar phase as a floating-point number between 0.0 and 1.0. Provides necessary information about the Moon.
- Version
- 1.0
Constructor & Destructor Documentation
KSMoon::KSMoon | ( | ) |
KSMoon::KSMoon | ( | const KSMoon & | o | ) |
Copy constructor.
Definition at line 73 of file ksmoon.cpp.
KSMoon::~KSMoon | ( | ) |
Destructor (empty).
Definition at line 84 of file ksmoon.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 from TrailObject.
Definition at line 79 of file ksmoon.cpp.
|
virtual |
Reimplemented from KSPlanetBase, this function employs unique algorithms for estimating the lunar coordinates.
Finding the position of the moon is much more difficult than the other planets. For one thing, the Moon is a lot closer, so we can detect smaller deviations in its orbit. Also, the Earth has a significant effect on the Moon's orbit, and their interaction is complex and nonlinear. As a result, the positions as calculated by findPosition() are only accurate to about 10 arcseconds (10 times less precise than the planets' positions!) moon-specific coordinate finder
- Parameters
-
num KSNumbers pointer for the target date/time
- Note
- we don't use the Earth pointer here
Implements KSPlanetBase.
Definition at line 147 of file ksmoon.cpp.
|
virtual |
Determine the phase angle of the moon, and assign the appropriate moon image.
- Parameters
-
Sun a KSSun pointer with coordinates updated to the time of computation. If not supplied, the findByName() method will be used to find the sun.
- Note
- Overrides KSPlanetBase::findPhase()
Definition at line 243 of file ksmoon.cpp.
|
inline |
|
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 from SkyObject.
Definition at line 281 of file ksmoon.cpp.
|
inline |
|
virtual |
QString KSMoon::phaseName | ( | ) | const |
- Returns
- a short string describing the moon's phase
Definition at line 256 of file ksmoon.cpp.
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:22 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.