kstars
#include <skypoint.h>

Public Member Functions | |
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) |
virtual void | updateCoords (KSNumbers *num, bool includePlanets=true, const dms *lat=0, const dms *LST=0, bool forceRecompute=false) |
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]) |
Static Public Member Functions | |
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 | |
static const double | altCrit = -1.0 |
Protected Member Functions | |
void | precess (const KSNumbers *num) |
Protected Attributes | |
long double | lastPrecessJD |
Detailed Description
The sky coordinates of a point in the sky.
The coordinates are stored in both Equatorial (Right Ascension, Declination) and Horizontal (Azimuth, Altitude) coordinate systems. Provides set/get functions for each coordinate angle, and functions to convert between the Equatorial and Horizon coordinate systems.
Because the coordinate values change slowly over time (due to precession, nutation), the "catalog coordinates" are stored (RA0, Dec0), which were the true coordinates on Jan 1, 2000. The true coordinates (RA, Dec) at any other epoch can be found from the catalog coordinates using updateCoords(). Stores dms coordinates for a point in the sky. for converting between coordinate systems.
- Version
- 1.0
Definition at line 50 of file skypoint.h.
Constructor & Destructor Documentation
Default constructor: Sets RA, Dec and RA0, Dec0 according to arguments.
Does not set Altitude or Azimuth.
- Parameters
-
r Right Ascension d Declination
Definition at line 57 of file skypoint.h.
|
inlineexplicit |
Alternate constructor using double arguments, for convenience.
It behaves essentially like the default constructor.
- Parameters
-
r Right Ascension, expressed as a double d Declination, expressed as a double
- Note
- This also sets RA0 and Dec0
Definition at line 70 of file skypoint.h.
SkyPoint::SkyPoint | ( | ) |
Default constructor.
Sets nonsense values for RA, Dec etc
Definition at line 37 of file skypoint.cpp.
|
virtual |
Empty destructor.
Definition at line 52 of file skypoint.cpp.
Member Function Documentation
void SkyPoint::aberrate | ( | const KSNumbers * | num | ) |
Determine the effects of aberration for this SkyPoint.
- Parameters
-
num pointer to KSNumbers object containing current values of time-dependent variables.
Definition at line 287 of file skypoint.cpp.
void SkyPoint::addEterms | ( | void | ) |
Coordinates in the FK4 catalog include the effect of aberration due to the ellipticity of the orbit of the Earth.
Coordinates in the FK5 catalog do not include these terms. In order to convert from B1950 (FK4) to actual mean places one has to use this function.
Definition at line 592 of file skypoint.cpp.
|
inline |
- Returns
- a pointer to the current Altitude.
Definition at line 180 of file skypoint.h.
dms SkyPoint::altRefracted | ( | ) | const |
- Returns
- refracted altitude. This function uses Option::useRefraction to determine whether refraction correction should be aplied
Definition at line 754 of file skypoint.cpp.
Computes the angular distance between two SkyObjects.
The algorithm to compute this distance is: cos(distance) = sin(d1)*sin(d2) + cos(d1)*cos(d2)*cos(a1-a2) where a1,d1 are the coordinates of the first object and a2,d2 are the coordinates of the second object. However this algorithm is not accurate when the angular separation is small. Meeus provides a different algorithm in page 111 which we implement here.
- Parameters
-
sp SkyPoint to which distance is to be calculated positionAngle if a non-null pointer is passed, the position angle from this SkyPoint to sp is computed and stored at the location
- Returns
- dms angle representing angular separation.
Definition at line 608 of file skypoint.cpp.
void SkyPoint::apparentCoord | ( | long double | jd0, |
long double | jdf | ||
) |
Computes the apparent coordinates for this SkyPoint for any epoch, accounting for the effects of precession, nutation, and aberration.
Similar to updateCoords(), but the starting epoch need not be J2000, and the target epoch need not be the present time.
- Parameters
-
jd0 Julian Day which identifies the original epoch jdf Julian Day which identifies the final epoch
Definition at line 433 of file skypoint.cpp.
|
inline |
- Returns
- a pointer to the current Azimuth.
Definition at line 177 of file skypoint.h.
void SkyPoint::B1950ToJ2000 | ( | void | ) |
Exact precession from Besselian epoch 1950 to epoch J2000.
The coordinates referred to the first epoch are in the FK4 catalog, while the latter are in the Fk5 one. Reference: Smith, C. A.; Kaplan, G. H.; Hughes, J. A.; Seidelmann, P. K.; Yallop, B. D.; Hohenkerk, C. Y. Astronomical Journal, vol. 97, Jan. 1989, p. 265-279 This transformation requires 4 steps:
- Correct E-terms
- Precess from B1950 to 1984, January 1st, 0h, using Newcomb expressions
- Add zero point correction in right ascension for 1984
- Precess from 1984, January 1st, 0h to J2000
Definition at line 480 of file skypoint.cpp.
bool SkyPoint::bendlight | ( | ) |
Correct for the effect of "bending" of light around the sun for positions near the sun.
General Relativity tells us that a photon with an impact parameter b is deflected through an angle 1.75" (Rs / b) where Rs is the solar radius.
- Returns
- : true if the light was bent, false otherwise
Definition at line 272 of file skypoint.cpp.
bool SkyPoint::checkBendLight | ( | ) |
Check if this sky point is close enough to the sun for gravitational lensing to be significant.
Definition at line 258 of file skypoint.cpp.
bool SkyPoint::checkCircumpolar | ( | const dms * | gLat | ) |
Check if this point is circumpolar at the given geographic latitude.
Definition at line 750 of file skypoint.cpp.
|
inline |
- Returns
- a pointer to the current Declination.
Definition at line 174 of file skypoint.h.
|
inline |
- Returns
- a pointer to the catalog Declination.
Definition at line 168 of file skypoint.h.
Obtain a Skypoint with RA0 and Dec0 set from the RA, Dec of this skypoint.
Also set the RA0, Dec0 of this SkyPoint if not set already.
Definition at line 190 of file skypoint.cpp.
Computes galactic coordinates from equatorial coordinates referred to epoch 1950.
RA and Dec are, therefore assumed to be B1950 coordinates.
Definition at line 442 of file skypoint.cpp.
Determine the (Altitude, Azimuth) coordinates of the SkyPoint from its (RA, Dec) coordinates, given the local sidereal time and the observer's latitude.
- Parameters
-
LST pointer to the local sidereal time lat pointer to the geographic latitude
Definition at line 55 of file skypoint.cpp.
SkyPoint SkyPoint::Eterms | ( | void | ) |
Determine the E-terms of aberration In the past, the mean places of stars published in catalogs included the contribution to the aberration due to the ellipticity of the orbit of the Earth.
These terms, known as E-terms were almost constant, and in the newer catalogs (FK5) are not included. Therefore to convert from FK4 to FK5 one has to compute these E-terms.
Definition at line 577 of file skypoint.cpp.
Determine the Ecliptic coordinates of the SkyPoint, given the Julian Date.
The ecliptic coordinates are returned as reference arguments (since they are not stored internally)
Definition at line 137 of file skypoint.cpp.
Computes equatorial coordinates referred to 1950 from galactic ones referred to epoch B1950.
RA and Dec are, therefore assumed to be B1950 coordinates.
Definition at line 461 of file skypoint.cpp.
Determine the (RA, Dec) coordinates of the SkyPoint from its (Altitude, Azimuth) coordinates, given the local sidereal time and the observer's latitude.
- Parameters
-
LST pointer to the local sidereal time lat pointer to the geographic latitude
Definition at line 102 of file skypoint.cpp.
void SkyPoint::J2000ToB1950 | ( | void | ) |
Exact precession from epoch J2000 Besselian epoch 1950.
The coordinates referred to the first epoch are in the FK4 catalog, while the latter are in the Fk5 one. Reference: Smith, C. A.; Kaplan, G. H.; Hughes, J. A.; Seidelmann, P. K.; Yallop, B. D.; Hohenkerk, C. Y. Astronomical Journal, vol. 97, Jan. 1989, p. 265-279 This transformation requires 4 steps:
- Precess from J2000 to 1984, January 1st, 0h
- Add zero point correction in right ascension for 1984
- Precess from 1984, January 1st, 0h, to B1950 using Newcomb expressions
- Correct E-terms
Definition at line 527 of file skypoint.cpp.
Find the SkyPoint obtained by moving distance dist (arcseconds) away from the givenSkyPoint.
- Parameters
-
dist Distance to move through in arcseconds from The SkyPoint to move away from
Definition at line 230 of file skypoint.cpp.
void SkyPoint::nutate | ( | const KSNumbers * | num | ) |
Determine the effects of nutation for this SkyPoint.
- Parameters
-
num pointer to KSNumbers object containing current values of time-dependent variables.
Definition at line 202 of file skypoint.cpp.
|
inline |
Definition at line 365 of file skypoint.h.
|
protected |
Precess this SkyPoint's catalog coordinates to the epoch described by the given KSNumbers object.
- Parameters
-
num pointer to a KSNumbers object describing the target epoch.
Definition at line 166 of file skypoint.cpp.
void SkyPoint::precessFromAnyEpoch | ( | long double | jd0, |
long double | jdf | ||
) |
General case of precession.
It precess from an original epoch to a final epoch. In this case RA0, and Dec0 from SkyPoint object represent the coordinates for the original epoch and not for J2000, as usual.
- Parameters
-
jd0 Julian Day which identifies the original epoch jdf Julian Day which identifies the final epoch
Definition at line 356 of file skypoint.cpp.
|
inline |
- Returns
- a pointer to the current Right Ascension.
Definition at line 171 of file skypoint.h.
|
inline |
- Returns
- a pointer to the catalog Right Ascension.
Definition at line 165 of file skypoint.h.
|
static |
Apply refraction correction to altitude.
- Parameters
-
alt altitude to be corrected, in degrees
- Returns
- altitude after refraction correction, in degrees
Definition at line 765 of file skypoint.cpp.
Apply refraction correction to altitude.
Overloaded method using dms provided for convenience
Definition at line 482 of file skypoint.h.
|
static |
Calculate refraction correction.
Parameter and return value are in degrees
Definition at line 761 of file skypoint.cpp.
Sets RA, Dec and RA0, Dec0 according to arguments.
Does not set Altitude or Azimuth.
- Parameters
-
r Right Ascension d Declination
- Note
- This function also sets RA0 and Dec0 to the same values, so call at your own peril!
Definition at line 46 of file skypoint.cpp.
|
inline |
|
inline |
Overloaded member function, provided for convenience.
It behaves essentially like the above function.
- Parameters
-
alt Altitude, expressed as a double.
Definition at line 147 of file skypoint.h.
|
inline |
|
inline |
Overloaded member function, provided for convenience.
It behaves essentially like the above function.
- Parameters
-
az Azimuth, expressed as a double.
Definition at line 158 of file skypoint.h.
|
inline |
Sets Dec, the current Declination.
- Parameters
-
d Declination.
Definition at line 130 of file skypoint.h.
|
inline |
Overloaded member function, provided for convenience.
It behaves essentially like the above function.
- Parameters
-
d Declination, expressed as a double.
Definition at line 136 of file skypoint.h.
|
inline |
Sets Dec0, the catalog Declination.
- Parameters
-
d catalog Declination.
Definition at line 108 of file skypoint.h.
|
inline |
Overloaded member function, provided for convenience.
It behaves essentially like the above function.
- Parameters
-
d Declination, expressed as a double.
Definition at line 114 of file skypoint.h.
Set the current (RA, Dec) coordinates of the SkyPoint, given pointers to its Ecliptic (Long, Lat) coordinates, and to the current obliquity angle (the angle between the equator and ecliptic).
Definition at line 151 of file skypoint.cpp.
|
inline |
Sets RA, the current Right Ascension.
- Parameters
-
r Right Ascension.
Definition at line 119 of file skypoint.h.
|
inline |
Overloaded member function, provided for convenience.
It behaves essentially like the above function.
- Parameters
-
r Right Ascension, expressed as a double.
Definition at line 125 of file skypoint.h.
|
inline |
Sets RA0, the catalog Right Ascension.
- Parameters
-
r catalog Right Ascension.
Definition at line 97 of file skypoint.h.
|
inline |
Overloaded member function, provided for convenience.
It behaves essentially like the above function.
- Parameters
-
r Right Ascension, expressed as a double.
Definition at line 103 of file skypoint.h.
void SkyPoint::subtractEterms | ( | void | ) |
Coordinates in the FK4 catalog include the effect of aberration due to the ellipticity of the orbit of the Earth.
Coordinates in the FK5 catalog do not include these terms. In order to convert from FK5 coordinates to B1950 (FK4) one has to use this function.
Definition at line 600 of file skypoint.cpp.
|
static |
Remove refraction correction.
- Parameters
-
alt altitude from which refraction correction must be removed, in degrees
- Returns
- altitude without refraction correction, in degrees
Definition at line 778 of file skypoint.cpp.
Remove refraction correction.
Overloaded method using dms provided for convenience
Definition at line 489 of file skypoint.h.
|
virtual |
Determine the current coordinates (RA, Dec) from the catalog coordinates (RA0, Dec0), accounting for both precession and nutation.
- Parameters
-
num pointer to KSNumbers object containing current values of time-dependent variables. includePlanets does nothing in this implementation (see KSPlanetBase::updateCoords()). lat does nothing in this implementation (see KSPlanetBase::updateCoords()). LST does nothing in this implementation (see KSPlanetBase::updateCoords()). forceRecompute reapplies precession, nutation and aberration even if the time passed since the last computation is not significant.
Reimplemented in StarObject, and KSPlanetBase.
Definition at line 317 of file skypoint.cpp.
double SkyPoint::vGeocentric | ( | double | vhelio, |
long double | jd | ||
) |
Computes the radial velocity of a source referred to the center of the earth from the radial velocity referred to the solar system barycenter.
- Parameters
-
vhelio radial velocity of the source referred to the barycenter of the solar system in km/s jd Epoch expressed as julian day to which the source coordinates refer to.
- Returns
- Radial velocity of the source referred to the center of the Earth in km/s
Definition at line 719 of file skypoint.cpp.
double SkyPoint::vGeoToVHelio | ( | double | vgeo, |
long double | jd | ||
) |
Computes the radial velocity of a source referred to the solar system barycenter from the velocity referred to the center of the earth.
- Parameters
-
vgeo radial velocity of the source referred to the center of the Earth [km/s] jd Epoch expressed as julian day to which the source coordinates refer to.
- Returns
- Radial velocity of the source referred to the solar system barycenter in km/s
Definition at line 724 of file skypoint.cpp.
double SkyPoint::vHeliocentric | ( | double | vlsr, |
long double | jd | ||
) |
Computes the radial velocity of a source referred to the solar system barycenter from the radial velocity referred to the Local Standard of Rest, aka known as VLSR.
To compute it we need the coordinates of the source the VLSR and the epoch for the source coordinates.
- Parameters
-
vlsr radial velocity of the source referred to the LSR in km/s jd Epoch expressed as julian day to which the source coordinates refer to.
- Returns
- Radial velocity of the source referred to the barycenter of the solar system in km/s
Definition at line 673 of file skypoint.cpp.
double SkyPoint::vHelioToVlsr | ( | double | vhelio, |
long double | jd | ||
) |
Computes the radial velocity of a source referred to the Local Standard of Rest, also known as VLSR from the radial velocity referred to the solar system barycenter.
- Parameters
-
vhelio radial velocity of the source referred to the LSR in km/s jd Epoch expressed as julian day to which the source coordinates refer to.
- Returns
- Radial velocity of the source referred to the barycenter of the solar system in km/s
Definition at line 678 of file skypoint.cpp.
double SkyPoint::vREarth | ( | long double | jd0 | ) |
Computes the velocity of any object projected on the direction of the source.
- Parameters
-
jd0 Julian day for which we compute the direction of the source
- Returns
- velocity of the Earth projected on the direction of the source kms-1
Definition at line 683 of file skypoint.cpp.
double SkyPoint::vRSite | ( | double | vsite[3] | ) |
Computes the velocity of any object (oberver's site) projected on the direction of the source.
- Parameters
-
vsite velocity of that object in cartesian coordinates
- Returns
- velocity of the object projected on the direction of the source kms-1
Definition at line 729 of file skypoint.cpp.
double SkyPoint::vRSun | ( | long double | jd | ) |
Computes the velocity of the Sun projected on the direction of the source.
- Parameters
-
jd Epoch expressed as julian day to which the source coordinates refer to.
- Returns
- Radial velocity of the source referred to the barycenter of the solar system in km/s
Definition at line 634 of file skypoint.cpp.
double SkyPoint::vTopocentric | ( | double | vgeo, |
double | vsite[3] | ||
) |
Computes the radial velocity of a source referred to the observer site on the surface of the earth from the geocentric velovity and the velocity of the site referred to the center of the Earth.
- Parameters
-
vgeo radial velocity of the source referred to the center of the earth in km/s vsite Velocity at which the observer moves referred to the center of the earth.
- Returns
- Radial velocity of the source referred to the observer's site in km/s
Definition at line 745 of file skypoint.cpp.
double SkyPoint::vTopoToVGeo | ( | double | vtopo, |
double | vsite[3] | ||
) |
Computes the radial velocity of a source referred to the center of the Earth from the radial velocity referred to an observer site on the surface of the earth.
- Parameters
-
vtopo radial velocity of the source referred to the observer's site in km/s vsite Velocity at which the observer moves referred to the center of the earth.
- Returns
- Radial velocity of the source referred the center of the earth in km/s
Definition at line 740 of file skypoint.cpp.
Member Data Documentation
|
static |
Critical height for atmospheric refraction corrections.
Below this, the height formula produces meaningles results and the correction value is just interpolated.
Definition at line 496 of file skypoint.h.
|
protected |
Definition at line 505 of file skypoint.h.
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:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.