• 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
skypoint.h
Go to the documentation of this file.
1 /***************************************************************************
2  skypoint.h - K Desktop Planetarium
3  -------------------
4  begin : Sun Feb 11 2001
5  copyright : (C) 2001-2005 by Jason Harris
6  email : jharris@30doradus.org
7  copyright : (C) 2004-2005 by Pablo de Vicente
8  email : p.devicente@wanadoo.es
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  ***************************************************************************/
19 
20 #ifndef SKYPOINT_H_
21 #define SKYPOINT_H_
22 
23 
24 #include <QList>
25 
26 #include "kstars/dms.h"
27 #include "kstars/kstarsdatetime.h"
28 
29 class KSNumbers;
30 class KSSun;
31 
50 class SkyPoint {
51 public:
57  SkyPoint( const dms& r, const dms& d ) :
58  lastPrecessJD( J2000 ), RA0(r), Dec0(d),
59  RA(r), Dec(d)
60  {}
61 
62 
69  //FIXME: this (*15.0) thing is somewhat hacky.
70  explicit SkyPoint( double r, double d ) :
71  lastPrecessJD( J2000 ), RA0(r*15.0), Dec0(d), RA(r*15.0), Dec(d)
72  {}
73 
77  SkyPoint();
78 
80  virtual ~SkyPoint();
81 
85 
92  void set( const dms& r, const dms& d );
93 
97  inline void setRA0( dms r ) { RA0 = r; }
98 
103  inline void setRA0( double r ) { RA0.setH( r ); }
104 
108  inline void setDec0( dms d ) { Dec0 = d; }
109 
114  inline void setDec0( double d ) { Dec0.setD( d ); }
115 
119  inline void setRA( dms r ) { RA = r; }
120 
125  inline void setRA( double r ) { RA.setH( r ); }
126 
130  inline void setDec( dms d ) { Dec = d; }
131 
136  inline void setDec( double d ) { Dec.setD( d ); }
137 
141  inline void setAlt( dms alt ) { Alt = alt; }
142 
147  inline void setAlt( double alt ) { Alt.setD( alt ); }
148 
152  inline void setAz( dms az ) { Az = az; }
153 
158  inline void setAz( double az ) { Az.setD( az ); }
159 
163 
165  inline const dms& ra0() const { return RA0; }
166 
168  inline const dms& dec0() const { return Dec0; }
169 
171  inline const dms& ra() const { return RA; }
172 
174  inline const dms& dec() const { return Dec; }
175 
177  inline const dms& az() const { return Az; }
178 
180  inline const dms& alt() const { return Alt; }
181 
185  dms altRefracted() const;
186 
190 
197  void EquatorialToHorizontal( const dms* LST, const dms* lat );
198 
205  void HorizontalToEquatorial( const dms* LST, const dms* lat );
206 
211  void findEcliptic( const dms *Obliquity, dms &EcLong, dms &EcLat );
212 
217  void setFromEcliptic( const dms *Obliquity, const dms& EcLong, const dms& EcLat );
218 
223  void Equatorial1950ToGalactic(dms &galLong, dms &galLat);
224 
229  void GalacticToEquatorial1950(const dms* galLong, const dms* galLat);
230 
234 
244  virtual void updateCoords( KSNumbers *num, bool includePlanets=true, const dms *lat=0, const dms *LST=0, bool forceRecompute = false );
245 
253  void apparentCoord(long double jd0, long double jdf);
254 
259  void nutate(const KSNumbers *num);
260 
265  bool checkBendLight();
266 
276  bool bendlight();
277 
283  SkyPoint deprecess( const KSNumbers *num, long double epoch=J2000 );
284 
289  void aberrate(const KSNumbers *num);
290 
297  void precessFromAnyEpoch(long double jd0, long double jdf);
298 
306  SkyPoint Eterms(void);
307 
320  void B1950ToJ2000(void);
321 
334  void J2000ToB1950(void);
335 
341  void addEterms(void);
342 
348  void subtractEterms(void);
349 
363  dms angularDistanceTo(const SkyPoint *sp, double * const positionAngle = 0) const;
364 
365  inline bool operator == ( SkyPoint &p ) { return ( ra() == p.ra() && dec() == p.dec() ); }
366 
372  double vRSun(long double jd);
373 
383  double vHeliocentric(double vlsr, long double jd);
384 
392  double vHelioToVlsr(double vhelio, long double jd);
393 
398  double vREarth(long double jd0);
399 
408  double vGeocentric(double vhelio, long double jd);
409 
418  double vGeoToVHelio(double vgeo, long double jd);
419 
425  double vRSite(double vsite[3]);
426 
435  double vTopocentric(double vgeo, double vsite[3]);
436 
444  double vTopoToVGeo(double vtopo, double vsite[3]);
445 
453  SkyPoint moveAway( const SkyPoint &from, double dist );
454 
458  bool checkCircumpolar( const dms *gLat );
459 
461  static double refractionCorr( double alt );
462 
468  static double refract(const double alt);
469 
475  static double unrefract(const double alt);
476 
482  static inline dms refract(const dms alt) { return dms( refract( alt.Degrees() ) ); }
483 
489  static inline dms unrefract(const dms alt) { return dms( unrefract( alt.Degrees() ) ); }
490 
496  static const double altCrit;
497 
498 protected:
503  void precess(const KSNumbers *num);
504 
505  long double lastPrecessJD; // JD at which the last coordinate update (see updateCoords) for this SkyPoint was done
506 
507 private:
508  dms RA0, Dec0; //catalog coordinates
509  dms RA, Dec; //current true sky coordinates
510  dms Alt, Az;
511  static KSSun *m_Sun;
512 };
513 
514 #endif
SkyPoint::vHelioToVlsr
double vHelioToVlsr(double vhelio, long double jd)
Computes the radial velocity of a source referred to the Local Standard of Rest, also known as VLSR f...
Definition: skypoint.cpp:678
SkyPoint::deprecess
SkyPoint deprecess(const KSNumbers *num, long double epoch=J2000)
Obtain a Skypoint with RA0 and Dec0 set from the RA, Dec of this skypoint.
Definition: skypoint.cpp:190
SkyPoint::Eterms
SkyPoint Eterms(void)
Determine the E-terms of aberration In the past, the mean places of stars published in catalogs inclu...
Definition: skypoint.cpp:577
SkyPoint::checkBendLight
bool checkBendLight()
Check if this sky point is close enough to the sun for gravitational lensing to be significant...
Definition: skypoint.cpp:258
SkyPoint::ra
const dms & ra() const
Definition: skypoint.h:171
SkyPoint::refract
static dms refract(const dms alt)
Apply refraction correction to altitude.
Definition: skypoint.h:482
SkyPoint::set
void set(const dms &r, const dms &d)
Sets RA, Dec and RA0, Dec0 according to arguments.
Definition: skypoint.cpp:46
SkyPoint::dec0
const dms & dec0() const
Definition: skypoint.h:168
SkyPoint::apparentCoord
void apparentCoord(long double jd0, long double jdf)
Computes the apparent coordinates for this SkyPoint for any epoch, accounting for the effects of prec...
Definition: skypoint.cpp:433
SkyPoint::az
const dms & az() const
Definition: skypoint.h:177
SkyPoint::aberrate
void aberrate(const KSNumbers *num)
Determine the effects of aberration for this SkyPoint.
Definition: skypoint.cpp:287
KSSun
Child class of KSPlanetBase; encapsulates information about the Sun.
Definition: kssun.h:31
SkyPoint::altCrit
static const double altCrit
Critical height for atmospheric refraction corrections.
Definition: skypoint.h:496
SkyPoint::nutate
void nutate(const KSNumbers *num)
Determine the effects of nutation for this SkyPoint.
Definition: skypoint.cpp:202
SkyPoint::J2000ToB1950
void J2000ToB1950(void)
Exact precession from epoch J2000 Besselian epoch 1950.
Definition: skypoint.cpp:527
SkyPoint::setDec0
void setDec0(double d)
Overloaded member function, provided for convenience.
Definition: skypoint.h:114
SkyPoint::refract
static double refract(const double alt)
Apply refraction correction to altitude.
Definition: skypoint.cpp:765
SkyPoint::findEcliptic
void findEcliptic(const dms *Obliquity, dms &EcLong, dms &EcLat)
Determine the Ecliptic coordinates of the SkyPoint, given the Julian Date.
Definition: skypoint.cpp:137
SkyPoint::setAz
void setAz(dms az)
Sets Az, the Azimuth.
Definition: skypoint.h:152
dms::Degrees
const double & Degrees() const
Definition: dms.h:98
SkyPoint::SkyPoint
SkyPoint(double r, double d)
Alternate constructor using double arguments, for convenience.
Definition: skypoint.h:70
SkyPoint::vRSite
double vRSite(double vsite[3])
Computes the velocity of any object (oberver's site) projected on the direction of the source...
Definition: skypoint.cpp:729
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
SkyPoint::precess
void precess(const KSNumbers *num)
Precess this SkyPoint's catalog coordinates to the epoch described by the given KSNumbers object...
Definition: skypoint.cpp:166
SkyPoint::ra0
const dms & ra0() const
Definition: skypoint.h:165
dms.h
SkyPoint
The sky coordinates of a point in the sky.
Definition: skypoint.h:50
SkyPoint::checkCircumpolar
bool checkCircumpolar(const dms *gLat)
Check if this point is circumpolar at the given geographic latitude.
Definition: skypoint.cpp:750
SkyPoint::operator==
bool operator==(SkyPoint &p)
Definition: skypoint.h:365
SkyPoint::moveAway
SkyPoint moveAway(const SkyPoint &from, double dist)
Find the SkyPoint obtained by moving distance dist (arcseconds) away from the givenSkyPoint.
Definition: skypoint.cpp:230
SkyPoint::refractionCorr
static double refractionCorr(double alt)
Calculate refraction correction.
Definition: skypoint.cpp:761
SkyPoint::SkyPoint
SkyPoint()
Default constructor.
Definition: skypoint.cpp:37
SkyPoint::HorizontalToEquatorial
void HorizontalToEquatorial(const dms *LST, const dms *lat)
Determine the (RA, Dec) coordinates of the SkyPoint from its (Altitude, Azimuth) coordinates, given the local sidereal time and the observer's latitude.
Definition: skypoint.cpp:102
SkyPoint::GalacticToEquatorial1950
void GalacticToEquatorial1950(const dms *galLong, const dms *galLat)
Computes equatorial coordinates referred to 1950 from galactic ones referred to epoch B1950...
Definition: skypoint.cpp:461
SkyPoint::~SkyPoint
virtual ~SkyPoint()
Empty destructor.
Definition: skypoint.cpp:52
SkyPoint::setFromEcliptic
void setFromEcliptic(const dms *Obliquity, const dms &EcLong, const dms &EcLat)
Set the current (RA, Dec) coordinates of the SkyPoint, given pointers to its Ecliptic (Long...
Definition: skypoint.cpp:151
SkyPoint::addEterms
void addEterms(void)
Coordinates in the FK4 catalog include the effect of aberration due to the ellipticity of the orbit o...
Definition: skypoint.cpp:592
dms
An angle, stored as degrees, but expressible in many ways.
Definition: dms.h:42
SkyPoint::unrefract
static dms unrefract(const dms alt)
Remove refraction correction.
Definition: skypoint.h:489
SkyPoint::dec
const dms & dec() const
Definition: skypoint.h:174
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
SkyPoint::SkyPoint
SkyPoint(const dms &r, const dms &d)
Default constructor: Sets RA, Dec and RA0, Dec0 according to arguments.
Definition: skypoint.h:57
SkyPoint::altRefracted
dms altRefracted() const
Definition: skypoint.cpp:754
SkyPoint::setDec
void setDec(double d)
Overloaded member function, provided for convenience.
Definition: skypoint.h:136
SkyPoint::vGeoToVHelio
double vGeoToVHelio(double vgeo, long double jd)
Computes the radial velocity of a source referred to the solar system barycenter from the velocity re...
Definition: skypoint.cpp:724
SkyPoint::subtractEterms
void subtractEterms(void)
Coordinates in the FK4 catalog include the effect of aberration due to the ellipticity of the orbit o...
Definition: skypoint.cpp:600
KSNumbers
There are several time-dependent values used in position calculations, that are not specific to an ob...
Definition: ksnumbers.h:43
SkyPoint::setRA
void setRA(double r)
Overloaded member function, provided for convenience.
Definition: skypoint.h:125
SkyPoint::vHeliocentric
double vHeliocentric(double vlsr, long double jd)
Computes the radial velocity of a source referred to the solar system barycenter from the radial velo...
Definition: skypoint.cpp:673
SkyPoint::setRA0
void setRA0(dms r)
Sets RA0, the catalog Right Ascension.
Definition: skypoint.h:97
NaN::d
const double d
Definition: nan.h:35
SkyPoint::vGeocentric
double vGeocentric(double vhelio, long double jd)
Computes the radial velocity of a source referred to the center of the earth from the radial velocity...
Definition: skypoint.cpp:719
J2000
#define J2000
Definition: kstarsdatetime.h:21
SkyPoint::vREarth
double vREarth(long double jd0)
Computes the velocity of any object projected on the direction of the source.
Definition: skypoint.cpp:683
SkyPoint::setRA0
void setRA0(double r)
Overloaded member function, provided for convenience.
Definition: skypoint.h:103
SkyPoint::precessFromAnyEpoch
void precessFromAnyEpoch(long double jd0, long double jdf)
General case of precession.
Definition: skypoint.cpp:356
SkyPoint::unrefract
static double unrefract(const double alt)
Remove refraction correction.
Definition: skypoint.cpp:778
SkyPoint::setAz
void setAz(double az)
Overloaded member function, provided for convenience.
Definition: skypoint.h:158
kstarsdatetime.h
SkyPoint::setAlt
void setAlt(dms alt)
Sets Alt, the Altitude.
Definition: skypoint.h:141
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
SkyPoint::setDec0
void setDec0(dms d)
Sets Dec0, the catalog Declination.
Definition: skypoint.h:108
SkyPoint::alt
const dms & alt() const
Definition: skypoint.h:180
SkyPoint::lastPrecessJD
long double lastPrecessJD
Definition: skypoint.h:505
dms::setD
void setD(const double &x)
Sets floating-point value of angle, in degrees.
Definition: dms.h:130
SkyPoint::Equatorial1950ToGalactic
void Equatorial1950ToGalactic(dms &galLong, dms &galLat)
Computes galactic coordinates from equatorial coordinates referred to epoch 1950. ...
Definition: skypoint.cpp:442
SkyPoint::vTopoToVGeo
double vTopoToVGeo(double vtopo, double vsite[3])
Computes the radial velocity of a source referred to the center of the Earth from the radial velocity...
Definition: skypoint.cpp:740
SkyPoint::angularDistanceTo
dms angularDistanceTo(const SkyPoint *sp, double *const positionAngle=0) const
Computes the angular distance between two SkyObjects.
Definition: skypoint.cpp:608
SkyPoint::vTopocentric
double vTopocentric(double vgeo, double vsite[3])
Computes the radial velocity of a source referred to the observer site on the surface of the earth fr...
Definition: skypoint.cpp:745
SkyPoint::B1950ToJ2000
void B1950ToJ2000(void)
Exact precession from Besselian epoch 1950 to epoch J2000.
Definition: skypoint.cpp:480
SkyPoint::vRSun
double vRSun(long double jd)
Computes the velocity of the Sun projected on the direction of the source.
Definition: skypoint.cpp:634
SkyPoint::bendlight
bool bendlight()
Correct for the effect of "bending" of light around the sun for positions near the sun...
Definition: skypoint.cpp:272
SkyPoint::setAlt
void setAlt(double alt)
Overloaded member function, provided for convenience.
Definition: skypoint.h:147
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