• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
SkyPoint Class Reference

#include <skypoint.h>

Inheritance diagram for SkyPoint:
Inheritance graph
[legend]

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.

Author
Jason Harris
Version
1.0

Definition at line 50 of file skypoint.h.

Constructor & Destructor Documentation

SkyPoint::SkyPoint ( const dms &  r,
const dms &  d 
)
inline

Default constructor: Sets RA, Dec and RA0, Dec0 according to arguments.

Does not set Altitude or Azimuth.

Parameters
rRight Ascension
dDeclination

Definition at line 57 of file skypoint.h.

SkyPoint::SkyPoint ( double  r,
double  d 
)
inlineexplicit

Alternate constructor using double arguments, for convenience.

It behaves essentially like the default constructor.

Parameters
rRight Ascension, expressed as a double
dDeclination, 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.

SkyPoint::~SkyPoint ( )
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
numpointer 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.

const dms& SkyPoint::alt ( ) const
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.

dms SkyPoint::angularDistanceTo ( const SkyPoint *  sp,
double *const  positionAngle = 0 
) const

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
spSkyPoint to which distance is to be calculated
positionAngleif 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
jd0Julian Day which identifies the original epoch
jdfJulian Day which identifies the final epoch

Definition at line 433 of file skypoint.cpp.

const dms& SkyPoint::az ( ) const
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.

const dms& SkyPoint::dec ( ) const
inline
Returns
a pointer to the current Declination.

Definition at line 174 of file skypoint.h.

const dms& SkyPoint::dec0 ( ) const
inline
Returns
a pointer to the catalog Declination.

Definition at line 168 of file skypoint.h.

SkyPoint SkyPoint::deprecess ( const KSNumbers *  num,
long double  epoch = J2000 
)

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.

void SkyPoint::Equatorial1950ToGalactic ( dms &  galLong,
dms &  galLat 
)

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.

void SkyPoint::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.

Parameters
LSTpointer to the local sidereal time
latpointer 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.

void SkyPoint::findEcliptic ( const dms *  Obliquity,
dms &  EcLong,
dms &  EcLat 
)

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.

void SkyPoint::GalacticToEquatorial1950 ( const dms *  galLong,
const dms *  galLat 
)

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.

void SkyPoint::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.

Parameters
LSTpointer to the local sidereal time
latpointer 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.

SkyPoint SkyPoint::moveAway ( const SkyPoint &  from,
double  dist 
)

Find the SkyPoint obtained by moving distance dist (arcseconds) away from the givenSkyPoint.

Parameters
distDistance to move through in arcseconds
fromThe SkyPoint to move away from
Returns
a SkyPoint that is at the dist away from this SkyPoint in the direction away from from

Definition at line 230 of file skypoint.cpp.

void SkyPoint::nutate ( const KSNumbers *  num)

Determine the effects of nutation for this SkyPoint.

Parameters
numpointer to KSNumbers object containing current values of time-dependent variables.

Definition at line 202 of file skypoint.cpp.

bool SkyPoint::operator== ( SkyPoint &  p)
inline

Definition at line 365 of file skypoint.h.

void SkyPoint::precess ( const KSNumbers *  num)
protected

Precess this SkyPoint's catalog coordinates to the epoch described by the given KSNumbers object.

Parameters
numpointer 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
jd0Julian Day which identifies the original epoch
jdfJulian Day which identifies the final epoch

Definition at line 356 of file skypoint.cpp.

const dms& SkyPoint::ra ( ) const
inline
Returns
a pointer to the current Right Ascension.

Definition at line 171 of file skypoint.h.

const dms& SkyPoint::ra0 ( ) const
inline
Returns
a pointer to the catalog Right Ascension.

Definition at line 165 of file skypoint.h.

double SkyPoint::refract ( const double  alt)
static

Apply refraction correction to altitude.

Parameters
altaltitude to be corrected, in degrees
Returns
altitude after refraction correction, in degrees

Definition at line 765 of file skypoint.cpp.

static dms SkyPoint::refract ( const dms  alt)
inlinestatic

Apply refraction correction to altitude.

Overloaded method using dms provided for convenience

See also
SkyPoint::refract( const double alt )

Definition at line 482 of file skypoint.h.

double SkyPoint::refractionCorr ( double  alt)
static

Calculate refraction correction.

Parameter and return value are in degrees

Definition at line 761 of file skypoint.cpp.

void SkyPoint::set ( const dms &  r,
const dms &  d 
)

Sets RA, Dec and RA0, Dec0 according to arguments.

Does not set Altitude or Azimuth.

Parameters
rRight Ascension
dDeclination
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.

void SkyPoint::setAlt ( dms  alt)
inline

Sets Alt, the Altitude.

Parameters
altAltitude.

Definition at line 141 of file skypoint.h.

void SkyPoint::setAlt ( double  alt)
inline

Overloaded member function, provided for convenience.

It behaves essentially like the above function.

Parameters
altAltitude, expressed as a double.

Definition at line 147 of file skypoint.h.

void SkyPoint::setAz ( dms  az)
inline

Sets Az, the Azimuth.

Parameters
azAzimuth.

Definition at line 152 of file skypoint.h.

void SkyPoint::setAz ( double  az)
inline

Overloaded member function, provided for convenience.

It behaves essentially like the above function.

Parameters
azAzimuth, expressed as a double.

Definition at line 158 of file skypoint.h.

void SkyPoint::setDec ( dms  d)
inline

Sets Dec, the current Declination.

Parameters
dDeclination.

Definition at line 130 of file skypoint.h.

void SkyPoint::setDec ( double  d)
inline

Overloaded member function, provided for convenience.

It behaves essentially like the above function.

Parameters
dDeclination, expressed as a double.

Definition at line 136 of file skypoint.h.

void SkyPoint::setDec0 ( dms  d)
inline

Sets Dec0, the catalog Declination.

Parameters
dcatalog Declination.

Definition at line 108 of file skypoint.h.

void SkyPoint::setDec0 ( double  d)
inline

Overloaded member function, provided for convenience.

It behaves essentially like the above function.

Parameters
dDeclination, expressed as a double.

Definition at line 114 of file skypoint.h.

void SkyPoint::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, Lat) coordinates, and to the current obliquity angle (the angle between the equator and ecliptic).

Definition at line 151 of file skypoint.cpp.

void SkyPoint::setRA ( dms  r)
inline

Sets RA, the current Right Ascension.

Parameters
rRight Ascension.

Definition at line 119 of file skypoint.h.

void SkyPoint::setRA ( double  r)
inline

Overloaded member function, provided for convenience.

It behaves essentially like the above function.

Parameters
rRight Ascension, expressed as a double.

Definition at line 125 of file skypoint.h.

void SkyPoint::setRA0 ( dms  r)
inline

Sets RA0, the catalog Right Ascension.

Parameters
rcatalog Right Ascension.

Definition at line 97 of file skypoint.h.

void SkyPoint::setRA0 ( double  r)
inline

Overloaded member function, provided for convenience.

It behaves essentially like the above function.

Parameters
rRight 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.

double SkyPoint::unrefract ( const double  alt)
static

Remove refraction correction.

Parameters
altaltitude from which refraction correction must be removed, in degrees
Returns
altitude without refraction correction, in degrees

Definition at line 778 of file skypoint.cpp.

static dms SkyPoint::unrefract ( const dms  alt)
inlinestatic

Remove refraction correction.

Overloaded method using dms provided for convenience

See also
SkyPoint::unrefract( const double alt )

Definition at line 489 of file skypoint.h.

void SkyPoint::updateCoords ( KSNumbers *  num,
bool  includePlanets = true,
const dms *  lat = 0,
const dms *  LST = 0,
bool  forceRecompute = false 
)
virtual

Determine the current coordinates (RA, Dec) from the catalog coordinates (RA0, Dec0), accounting for both precession and nutation.

Parameters
numpointer to KSNumbers object containing current values of time-dependent variables.
includePlanetsdoes nothing in this implementation (see KSPlanetBase::updateCoords()).
latdoes nothing in this implementation (see KSPlanetBase::updateCoords()).
LSTdoes nothing in this implementation (see KSPlanetBase::updateCoords()).
forceRecomputereapplies 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
vhelioradial velocity of the source referred to the barycenter of the solar system in km/s
jdEpoch 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
vgeoradial velocity of the source referred to the center of the Earth [km/s]
jdEpoch 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
vlsrradial velocity of the source referred to the LSR in km/s
jdEpoch 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
vhelioradial velocity of the source referred to the LSR in km/s
jdEpoch 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
jd0Julian 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
vsitevelocity 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
jdEpoch 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
vgeoradial velocity of the source referred to the center of the earth in km/s
vsiteVelocity 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
vtoporadial velocity of the source referred to the observer's site in km/s
vsiteVelocity 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

const double SkyPoint::altCrit = -1.0
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.

long double SkyPoint::lastPrecessJD
protected

Definition at line 505 of file skypoint.h.


The documentation for this class was generated from the following files:
  • skypoint.h
  • skypoint.cpp
This file is part of the KDE documentation.
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.

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