KSEarthShadow
#include <ksearthshadow.h>
Public Types | |
enum | ECLIPSE_TYPE { PARTIAL , FULL_PENUMBRA , FULL_UMBRA , NONE } |
Public Types inherited from KSPlanetBase | |
enum | Planets { MERCURY = 0 , VENUS = 1 , MARS = 2 , JUPITER = 3 , SATURN = 4 , URANUS = 5 , NEPTUNE = 6 , SUN = 7 , MOON = 8 , EARTH_SHADOW = 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 , NUMBER_OF_KNOWN_TYPES = 21 , TYPE_UNKNOWN = 255 } |
typedef qint64 | UID |
Public Member Functions | |
KSEarthShadow (const KSMoon *moon, const KSSun *sun, const KSPlanet *earth) | |
void | calculateShadowRadius () |
double | findAngularSize () final override |
bool | findGeocentricPosition (const KSNumbers *, const KSPlanetBase *Earth=nullptr) override |
void | findMagnitude (const KSNumbers *) override |
void | findPhase () override |
ECLIPSE_TYPE | getEclipseType () |
double | getPenumbraAngSize () const |
double | getUmbraAngSize () const |
bool | isInEclipse () |
bool | loadData () override |
bool | shouldUpdate () |
void | updateCoords () |
void | updateCoords (const KSNumbers *num, bool includePlanets=true, const CachingDms *lat=nullptr, const CachingDms *LST=nullptr, bool forceRecompute=false) override |
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) | |
~KSPlanetBase () override=default | |
double | angSize () const |
QColor & | color () |
const dms & | ecLat () const |
void | EclipticToEquatorial (const CachingDms *Obliquity) |
const dms & | ecLong () const |
void | EquatorialToEcliptic (const CachingDms *Obliquity) |
void | findPosition (const KSNumbers *num, const CachingDms *lat=nullptr, const CachingDms *LST=nullptr, const KSPlanetBase *Earth=nullptr) |
const dms & | helEcLat () const |
const dms & | helEcLong () const |
const QImage & | image () const |
void | init (const QString &s, const QString &image_file, const QColor &c, double pSize) |
bool | isMajorPlanet () const |
double | labelOffset () const override |
double | pa () const override |
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 (const KSPlanetBase *Earth) |
void | setRearth (double r) |
void | setRsun (double r) |
void | updateCoords (const KSNumbers *num, bool includePlanets=true, const CachingDms *lat=nullptr, const CachingDms *LST=nullptr, bool forceRecompute=false) override |
Public Member Functions inherited from TrailObject | |
TrailObject (int t, double r, double d, float m=0.0, const QString &n=QString()) | |
TrailObject (int t=TYPE_UNKNOWN, dms r=dms(0.0), dms d=dms(0.0), float m=0.0, const QString &n=QString()) | |
void | addToTrail (const QString &label=QString()) |
void | clearTrail () |
void | clipTrail () |
TrailObject * | clone () const override |
void | drawTrail (SkyPainter *skyp) const |
bool | hasTrail () const |
void | initPopupMenu (KSPopupMenu *pmenu) override |
const QList< SkyPoint > & | trail () const |
void | updateTrail (dms *LST, const dms *lat) |
Public Member Functions inherited from SkyObject | |
SkyObject (int t, double r, double d, float m=0.0, const QString &n=QString(), const QString &n2=QString(), const QString &lname=QString()) | |
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()) | |
virtual | ~SkyObject () override=default |
virtual UID | getUID () const |
bool | hashBeenUpdated () |
bool | hasLongName () const |
bool | hasName () const |
bool | hasName2 () const |
bool | isSolarSystem () const |
virtual QString | labelString () const |
virtual QString | longname (void) const |
float | mag () const |
QString | messageFromTitle (const QString &imageTitle) const |
virtual QString | name (void) const |
QString | name2 (void) const |
SkyPoint | recomputeCoords (const KStarsDateTime &dt, const GeoLocation *geo=nullptr) const |
SkyPoint | recomputeHorizontalCoords (const KStarsDateTime &dt, const GeoLocation *geo) const |
QTime | riseSetTime (const KStarsDateTime &dt, const GeoLocation *geo, bool rst, bool exact=true) const |
dms | riseSetTimeAz (const KStarsDateTime &dt, const GeoLocation *geo, bool rst) const |
QTime | riseSetTimeUT (const KStarsDateTime &dt, const GeoLocation *geo, bool rst, bool exact=true) const |
void | setLongName (const QString &longname=QString()) |
void | setType (int t) |
void | showPopupMenu (KSPopupMenu *pmenu, const QPoint &pos) |
dms | transitAltitude (const KStarsDateTime &dt, const GeoLocation *geo) const |
QTime | transitTime (const KStarsDateTime &dt, const GeoLocation *geo) const |
QTime | transitTimeUT (const KStarsDateTime &dt, const GeoLocation *geo) const |
QString | translatedLongName () const |
QString | translatedName () const |
QString | translatedName2 () const |
int | type (void) const |
QString | typeName () const |
Public Member Functions inherited from SkyPoint | |
SkyPoint () | |
SkyPoint (const CachingDms &r, const CachingDms &d) | |
SkyPoint (const dms &r, const dms &d) | |
SkyPoint (double r, double d) | |
void | aberrate (const KSNumbers *num, bool reverse=false) |
void | addEterms (void) |
double | airmass () const |
const dms & | alt () const |
dms | altRefracted () const |
dms | angularDistanceTo (const SkyPoint *sp, double *const positionAngle=nullptr) const |
void | apparentCoord (long double jd0, long double jdf) |
const dms & | az () const |
void | B1950ToJ2000 (void) |
bool | bendlight () |
SkyPoint | catalogueCoord (long double jdf) |
bool | checkBendLight () |
bool | checkCircumpolar (const dms *gLat) const |
const CachingDms & | dec () const |
const CachingDms & | dec0 () const |
SkyPoint | deprecess (const KSNumbers *num, long double epoch=J2000) |
void | Equatorial1950ToGalactic (dms &galLong, dms &galLat) |
void | EquatorialToHorizontal (const CachingDms *LST, const CachingDms *lat) |
void | EquatorialToHorizontal (const dms *LST, const dms *lat) |
SkyPoint | Eterms (void) |
void | findEcliptic (const CachingDms *Obliquity, dms &EcLong, dms &EcLat) |
void | GalacticToEquatorial1950 (const dms *galLong, const dms *galLat) |
long double | getLastPrecessJD () const |
void | HorizontalToEquatorial (const dms *LST, const dms *lat) |
bool | isValid () const |
void | J2000ToB1950 (void) |
double | maxAlt (const dms &lat) const |
double | minAlt (const dms &lat) const |
SkyPoint | moveAway (const SkyPoint &from, double dist) const |
void | nutate (const KSNumbers *num, const bool reverse=false) |
bool | operator== (SkyPoint &p) const |
dms | parallacticAngle (const CachingDms &LST, const CachingDms &lat) |
void | precessFromAnyEpoch (long double jd0, long double jdf) |
const CachingDms & | ra () const |
const CachingDms & | ra0 () const |
void | set (const dms &r, const dms &d) |
void | setAlt (dms alt) |
void | setAlt (double alt) |
void | setAltRefracted (dms alt_apparent) |
void | setAltRefracted (double alt_apparent) |
void | setAz (dms az) |
void | setAz (double az) |
void | setDec (const CachingDms &d) |
void | setDec (dms d) |
void | setDec (double d) |
void | setDec0 (const CachingDms &d) |
void | setDec0 (dms d) |
void | setDec0 (double d) |
void | setFromEcliptic (const CachingDms *Obliquity, const dms &EcLong, const dms &EcLat) |
void | setRA (const CachingDms &r) |
void | setRA (dms &r) |
void | setRA (double r) |
void | setRA0 (CachingDms r) |
void | setRA0 (dms r) |
void | setRA0 (double r) |
void | subtractEterms (void) |
virtual void | updateCoordsNow (const KSNumbers *num) |
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 | |
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 dms | findAltitude (const SkyPoint *p, const KStarsDateTime &dt, const GeoLocation *geo, const double hour=0) |
static dms | refract (const dms alt, bool conditional=true) |
static double | refract (const double alt, bool conditional=true) |
static double | refractionCorr (double alt) |
static SkyPoint | timeTransformed (const SkyPoint *p, const KStarsDateTime &dt, const GeoLocation *geo, const double hour=0) |
static dms | unrefract (const dms alt, bool conditional=true) |
static double | unrefract (const double alt, bool conditional=true) |
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 |
static bool | implementationIsLibnova = false |
Protected Member Functions inherited from KSPlanetBase | |
void | findPA (const KSNumbers *num) |
UID | solarsysUID (UID type) const |
Protected Member Functions inherited from SkyObject | |
void | setMag (float m) |
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 {NaN::d} |
double | Rearth {NaN::d} |
Protected Attributes inherited from TrailObject | |
QList< QString > | m_TrailLabels |
QList< SkyPoint > | Trail |
Protected Attributes inherited from SkyObject | |
bool | has_been_updated = true |
QString | LongName |
QString | Name |
QString | Name2 |
Protected Attributes inherited from SkyPoint | |
long double | lastPrecessJD { 0 } |
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 |
Detailed Description
A class that manages the calculation of the earths shadow (in moon distance) as a 'virtual' skyobject.
KSMoon is responsible for coordinating this object. While a rather unusual measure, this method ensures that unnecessary calculations are avoided.
- Version
- 1.0
Definition at line 27 of file ksearthshadow.h.
Member Enumeration Documentation
◆ ECLIPSE_TYPE
The ECLIPSE_TYPE enum describes the quality of an eclipse.
Definition at line 45 of file ksearthshadow.h.
Constructor & Destructor Documentation
◆ KSEarthShadow()
- Note
- The three parameters must be supplied to avoid initialization order problems. This class may be generalized to any three bodies if it becomes necessary in the future. This class is relatively cheap, so it's save to create new instances instead of reusing an existing one.
Definition at line 10 of file ksearthshadow.cpp.
Member Function Documentation
◆ calculateShadowRadius()
void KSEarthShadow::calculateShadowRadius | ( | ) |
Updates umbra and penumbra radius from the positions of the three bodies.
Definition at line 71 of file ksearthshadow.cpp.
◆ findAngularSize()
|
inlinefinaloverridevirtual |
angSize
- Returns
- the angular size (penumbra) in arc minutes
Reimplemented from KSPlanetBase.
Definition at line 109 of file ksearthshadow.h.
◆ findGeocentricPosition()
|
overridevirtual |
find the object's current geocentric equatorial coordinates (RA and Dec) This function is pure virtual; it must be overloaded by subclasses.
This function is private; it is called by the public function findPosition() which also includes the figure-of-the-earth correction, localizeCoords().
- Parameters
-
num pointer to current KSNumbers object Earth pointer to planet Earth (needed to calculate geocentric coords)
- Returns
- true if position was successfully calculated.
Implements KSPlanetBase.
Definition at line 45 of file ksearthshadow.cpp.
◆ findMagnitude()
|
inlineoverridevirtual |
Computes the visual magnitude for the major planets.
- Parameters
-
num pointer to a ksnumbers object. Needed for the saturn rings contribution to saturn's magnitude.
Implements KSPlanetBase.
Definition at line 116 of file ksearthshadow.h.
◆ findPhase()
|
inlineoverridevirtual |
Determine the phase of the planet.
Reimplemented from KSPlanetBase.
Definition at line 121 of file ksearthshadow.h.
◆ getEclipseType()
KSEarthShadow::ECLIPSE_TYPE KSEarthShadow::getEclipseType | ( | ) |
eclipse
- Returns
- The eclipse type.
- See also
- KSEarthShadow::ECLIPSE_TYPE
Definition at line 26 of file ksearthshadow.cpp.
◆ getPenumbraAngSize()
|
inline |
- Returns
- The angular radius of the penumbra.
Definition at line 100 of file ksearthshadow.h.
◆ getUmbraAngSize()
|
inline |
- Returns
- The angular radius of the umbra.
Definition at line 92 of file ksearthshadow.h.
◆ isInEclipse()
bool KSEarthShadow::isInEclipse | ( | ) |
isInEclipse - a slim version of getEclipseType()
- Returns
- Whether the earth shadow eclipses the moon.
Definition at line 20 of file ksearthshadow.cpp.
◆ loadData()
|
inlineoverridevirtual |
Implements KSPlanetBase.
Definition at line 117 of file ksearthshadow.h.
◆ shouldUpdate()
bool KSEarthShadow::shouldUpdate | ( | ) |
The earths shadow on the moon appears only at new moon so calculating it on other occasions is rather pointless.
- Returns
- whether to update the shadow or not
Definition at line 15 of file ksearthshadow.cpp.
◆ updateCoords() [1/2]
void KSEarthShadow::updateCoords | ( | ) |
Update the RA/DEC of the shadow.
Definition at line 58 of file ksearthshadow.cpp.
◆ updateCoords() [2/2]
|
overridevirtual |
Update the Coordinates of the shadow.
In truth it finds the sun and calls KSEarthShadow::updateCoords(const KSSun *)
Reimplemented from SkyPoint.
Definition at line 52 of file ksearthshadow.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.