KSComet

Search for usage in LXR

#include <kscomet.h>

Inheritance diagram for KSComet:

Public Member Functions

 KSComet (const QString &s, const QString &image_file, double q, double e, dms i, dms w, dms N, double Tp, float M1, float M2, float K1, float K2)
 
 ~KSComet () override=default
 
KSCometclone () const override
 
float getAlbedo ()
 
dms getComaAngSize ()
 
float getDiameter ()
 
QString getDimensions ()
 
double getEarthMOID ()
 
float getNuclearMagnitudeParameter ()
 
float getNuclearSize ()
 
float getNuclearSlopeParameter ()
 
QString getOrbitClass ()
 
QString getOrbitID ()
 
double getPerihelion ()
 
long double getPerihelionJD ()
 
float getPeriod ()
 
float getRotationPeriod ()
 
float getTailSize ()
 
float getTotalMagnitudeParameter ()
 
float getTotalSlopeParameter ()
 
SkyObject::UID getUID () const override
 
bool isNEO ()
 
bool loadData () override
 
void setAlbedo (float albedo)
 
void setComaAngSize (double comaAngSize)
 
void setDiameter (float diam)
 
void setDimensions (QString dim)
 
void setEarthMOID (double earth_moid)
 
void setNEO (bool neo)
 
void setOrbitClass (QString orbit_class)
 
void setOrbitID (QString orbit_id)
 
void setPeriod (float per)
 
void setRotationPeriod (float rot_per)
 
void setTailSize (double tailsize)
 
- 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
 
QColorcolor ()
 
const dmsecLat () const
 
void EclipticToEquatorial (const CachingDms *Obliquity)
 
const dmsecLong () const
 
void EquatorialToEcliptic (const CachingDms *Obliquity)
 
void findPosition (const KSNumbers *num, const CachingDms *lat=nullptr, const CachingDms *LST=nullptr, const KSPlanetBase *Earth=nullptr)
 
const dmshelEcLat () const
 
const dmshelEcLong () const
 
const QImageimage () 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 ()
 
TrailObjectclone () 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
 
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 setName (const QString &name)
 
void setName2 (const QString &name2=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 dmsalt () const
 
dms altRefracted () const
 
dms angularDistanceTo (const SkyPoint *sp, double *const positionAngle=nullptr) const
 
void apparentCoord (long double jd0, long double jdf)
 
const dmsaz () const
 
void B1950ToJ2000 (void)
 
bool bendlight ()
 
SkyPoint catalogueCoord (long double jdf)
 
bool checkBendLight ()
 
bool checkCircumpolar (const dms *gLat) const
 
const CachingDmsdec () const
 
const CachingDmsdec0 () 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 CachingDmsra () const
 
const CachingDmsra0 () 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])
 

Protected Member Functions

bool findGeocentricPosition (const KSNumbers *num, const KSPlanetBase *Earth=nullptr) override
 
void findPhysicalParameters ()
 
- Protected Member Functions inherited from KSPlanetBase
virtual double findAngularSize ()
 
void findPA (const KSNumbers *num)
 
virtual void findPhase ()
 
UID solarsysUID (UID type) const
 
- Protected Member Functions inherited from SkyObject
void setMag (float m)
 
- Protected Member Functions inherited from SkyPoint
void precess (const KSNumbers *num)
 

Additional Inherited Members

- 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
 
- Static Public Member Functions inherited from KSPlanetBase
static KSPlanetBasecreatePlanet (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 QString typeShortName (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< QColorplanetColor
 
- 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 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< QStringm_TrailLabels
 
QList< SkyPointTrail
 
- 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 subclass of KSPlanetBase that implements comets.

The orbital elements are stored as private member variables, and it provides methods to compute the ecliptic coordinates for any time from the orbital elements.

All elements are in the heliocentric ecliptic J2000 reference frame.

Check here for full description: https://ssd.jpl.nasa.gov/?sb_elem#legend

The orbital elements are:

  • JD Epoch of element values
  • q perihelion distance (AU)
  • e eccentricity of orbit
  • i inclination angle (with respect to J2000.0 ecliptic plane)
  • w argument of perihelion (w.r.t. J2000.0 ecliptic plane)
  • N longitude of ascending node (J2000.0 ecliptic)
  • Tp time of perihelion passage (YYYYMMDD.DDD)
  • M1 comet total magnitude parameter
  • M2 comet nuclear magnitude parameter
  • K1 total magnitude slope parameter
  • K2 nuclear magnitude slope parameter
Author
Jason Harris
Version
1.1

Definition at line 43 of file kscomet.h.

Constructor & Destructor Documentation

◆ KSComet()

KSComet::KSComet ( const QString & s,
const QString & image_file,
double q,
double e,
dms i,
dms w,
dms N,
double Tp,
float M1,
float M2,
float K1,
float K2 )

Constructor.

Parameters
sthe name of the comet
image_filethe filename for an image of the comet
qthe perihelion distance of the comet's orbit (AU)
ethe eccentricity of the comet's orbit
ithe inclination angle of the comet's orbit
wthe argument of the orbit's perihelion
Nthe longitude of the orbit's ascending node
TpThe date of the most proximate perihelion passage (YYYYMMDD.DDD)
M1the comet total magnitude parameter
M2the comet nuclear magnitude parameter
K1the comet total magnitude slope parameter
K2the comet nuclear magnitude slope parameter

Definition at line 42 of file kscomet.cpp.

◆ ~KSComet()

KSComet::~KSComet ( )
overridedefault

Destructor (empty)

Member Function Documentation

◆ clone()

KSComet * KSComet::clone ( ) const
overridevirtual

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. There is no checking to ensure this, though.

Returns
pointer to newly allocated object. Caller takes full responsibility for deallocating it.

Reimplemented from SkyObject.

Definition at line 132 of file kscomet.cpp.

◆ findGeocentricPosition()

bool KSComet::findGeocentricPosition ( const KSNumbers * num,
const KSPlanetBase * Earth = nullptr )
overrideprotectedvirtual

Calculate the geocentric RA, Dec coordinates of the Comet.

Note
reimplemented from KSPlanetBase
Parameters
numtime-dependent values for the desired date
Earthplanet Earth (needed to calculate geocentric coords)
Returns
true if position was successfully calculated.

Implements KSPlanetBase.

Definition at line 156 of file kscomet.cpp.

◆ findPhysicalParameters()

void KSComet::findPhysicalParameters ( )
protected

Estimate physical parameters of the comet such as coma size, tail length and size of the nucleus.

Note
invoked from findGeocentricPosition in order

Definition at line 138 of file kscomet.cpp.

◆ getAlbedo()

float KSComet::getAlbedo ( )
inline
Returns
the comet's albedo

Definition at line 142 of file kscomet.h.

◆ getComaAngSize()

dms KSComet::getComaAngSize ( )
inline
Returns
the estimated angular size of the tail as a dms

Definition at line 109 of file kscomet.h.

◆ getDiameter()

float KSComet::getDiameter ( )
inline
Returns
the comet's diameter

Definition at line 148 of file kscomet.h.

◆ getDimensions()

QString KSComet::getDimensions ( )
inline
Returns
the comet's dimensions

Definition at line 154 of file kscomet.h.

◆ getEarthMOID()

double KSComet::getEarthMOID ( )
inline
Returns
the comet's earth minimum orbit intersection distance in km

Definition at line 118 of file kscomet.h.

◆ getNuclearMagnitudeParameter()

float KSComet::getNuclearMagnitudeParameter ( )
inline
Returns
the comet nuclear magnitude parameter

Definition at line 91 of file kscomet.h.

◆ getNuclearSize()

float KSComet::getNuclearSize ( )
inline
Returns
the estimated diameter of the nucleus in km

Definition at line 112 of file kscomet.h.

◆ getNuclearSlopeParameter()

float KSComet::getNuclearSlopeParameter ( )
inline
Returns
the nuclear magnitude slope parameter

Definition at line 97 of file kscomet.h.

◆ getOrbitClass()

QString KSComet::getOrbitClass ( )
inline
Returns
the comet's orbit class

Definition at line 130 of file kscomet.h.

◆ getOrbitID()

QString KSComet::getOrbitID ( )
inline
Returns
the comet's orbit solution ID

Definition at line 124 of file kscomet.h.

◆ getPerihelion()

double KSComet::getPerihelion ( )
inline

Returns Perihelion distance.

Returns
Perihelion distance

Definition at line 85 of file kscomet.h.

◆ getPerihelionJD()

long double KSComet::getPerihelionJD ( )
inline

Returns the Julian Day of Perihelion passage.

Returns
Julian Day of Perihelion Passage

Definition at line 79 of file kscomet.h.

◆ getPeriod()

float KSComet::getPeriod ( )
inline
Returns
the comet's period

Definition at line 166 of file kscomet.h.

◆ getRotationPeriod()

float KSComet::getRotationPeriod ( )
inline
Returns
the comet's rotation period

Definition at line 160 of file kscomet.h.

◆ getTailSize()

float KSComet::getTailSize ( )
inline
Returns
the estimated tail length in km

Definition at line 103 of file kscomet.h.

◆ getTotalMagnitudeParameter()

float KSComet::getTotalMagnitudeParameter ( )
inline
Returns
the comet total magnitude parameter

Definition at line 88 of file kscomet.h.

◆ getTotalSlopeParameter()

float KSComet::getTotalSlopeParameter ( )
inline
Returns
the total magnitude slope parameter

Definition at line 94 of file kscomet.h.

◆ getUID()

SkyObject::UID KSComet::getUID ( ) const
overridevirtual

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 354 of file kscomet.cpp.

◆ isNEO()

bool KSComet::isNEO ( )
inline
Returns
true if the comet is a near earth object

Definition at line 136 of file kscomet.h.

◆ loadData()

bool KSComet::loadData ( )
overridevirtual

Unused virtual function inherited from KSPlanetBase thus it's simply empty here.

Implements KSPlanetBase.

Definition at line 349 of file kscomet.cpp.

◆ setAlbedo()

void KSComet::setAlbedo ( float albedo)

Sets the comet's albedo.

Definition at line 308 of file kscomet.cpp.

◆ setComaAngSize()

void KSComet::setComaAngSize ( double comaAngSize)
inline

Sets the comet's apparent tail length in degrees.

Definition at line 106 of file kscomet.h.

◆ setDiameter()

void KSComet::setDiameter ( float diam)

Sets the comet's diameter.

Definition at line 313 of file kscomet.cpp.

◆ setDimensions()

void KSComet::setDimensions ( QString dim)

Sets the comet's dimensions.

Definition at line 318 of file kscomet.cpp.

◆ setEarthMOID()

void KSComet::setEarthMOID ( double earth_moid)

Sets the comet's earth minimum orbit intersection distance.

Definition at line 303 of file kscomet.cpp.

◆ setNEO()

void KSComet::setNEO ( bool neo)

Sets if the comet is a near earth object.

Definition at line 323 of file kscomet.cpp.

◆ setOrbitClass()

void KSComet::setOrbitClass ( QString orbit_class)

Sets the comet's orbit class.

Definition at line 328 of file kscomet.cpp.

◆ setOrbitID()

void KSComet::setOrbitID ( QString orbit_id)

Sets the comet's orbit solution ID.

Definition at line 333 of file kscomet.cpp.

◆ setPeriod()

void KSComet::setPeriod ( float per)

Sets the comet's period.

Definition at line 338 of file kscomet.cpp.

◆ setRotationPeriod()

void KSComet::setRotationPeriod ( float rot_per)

Sets the comet's rotation period.

Definition at line 343 of file kscomet.cpp.

◆ setTailSize()

void KSComet::setTailSize ( double tailsize)
inline

Sets the comet's tail length in km.

Definition at line 100 of file kscomet.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.