• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kstars

SkyPoint Class Reference

The sky coordinates of a point in the sky. More...

#include <skypoint.h>

Inheritance diagram for SkyPoint:

Inheritance graph
[legend]

List of all members.


Public Member Functions

void aberrate (const KSNumbers *num)
void addEterms (void)
const dms * alt () const
dms angularDistanceTo (SkyPoint *sp)
void apparentCoord (long double jd0, long double jdf)
const dms * az () const
void B1950ToJ2000 (void)
QString constellation (QPtrList< CSegment > &seglist, QPtrList< SkyObject > &cnames) const
const dms * dec () const
const dms * dec0 () const
void EclipticToEquatorial (const KSNumbers *num)
void Equatorial1950ToGalactic (dms &galLong, dms &galLat)
void EquatorialToEcliptic (const KSNumbers *num)
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)
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 (double r, double d)
void set (const dms *r, const dms *d)
void set (const dms &r, const dms &d)
void setAlt (double alt)
void setAlt (dms alt)
void setAz (double az)
void setAz (dms az)
void setDec (double d)
void setDec (dms d)
void setDec0 (double d)
void setDec0 (dms d)
void setFromEcliptic (const dms *Obliquity, const dms *EcLong, const dms *EcLat)
void setRA (double r)
void setRA (dms r)
void setRA0 (double r)
void setRA0 (dms r)
 SkyPoint (double r=0.0, double d=0.0)
 SkyPoint (const dms *r, const dms *d)
 SkyPoint (const dms &r, const dms &d)
void subtractEterms (void)
virtual void updateCoords (KSNumbers *num, bool includePlanets=true, const dms *lat=0, const dms *LST=0)
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])
virtual ~SkyPoint ()

Protected Member Functions

void precess (const KSNumbers *num)

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 51 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:
r Right Ascension
d Declination

Definition at line 58 of file skypoint.h.

SkyPoint::SkyPoint ( const dms *  r,
const dms *  d 
) [inline]

Alternate constructor using pointer arguments, for convenience.

It behaves essentially like the default constructor.

Parameters:
r Right Ascension pointer
d Declination pointer

Definition at line 65 of file skypoint.h.

SkyPoint::SkyPoint ( double  r = 0.0,
double  d = 0.0 
) [inline]

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

Definition at line 72 of file skypoint.h.

SkyPoint::~SkyPoint (  )  [virtual]

Empty destructor.

Definition at line 43 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 206 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 503 of file skypoint.cpp.

const dms* SkyPoint::alt (  )  const [inline]

Returns:
a pointer to the current Altitude.

Definition at line 218 of file skypoint.h.

dms SkyPoint::angularDistanceTo ( SkyPoint *  sp  ) 

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
Returns:
dms angle representing angular separation.

Definition at line 520 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.

No descriptions.

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 332 of file skypoint.cpp.

const dms* SkyPoint::az (  )  const [inline]

Returns:
a pointer to the current Azimuth.

Definition at line 214 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 387 of file skypoint.cpp.

QString SkyPoint::constellation ( QPtrList< CSegment > &  seglist,
QPtrList< SkyObject > &  cnames 
) const

Definition at line 540 of file skypoint.cpp.

const dms* SkyPoint::dec (  )  const [inline]

Returns:
a pointer to the current Declination.

Definition at line 210 of file skypoint.h.

const dms* SkyPoint::dec0 (  )  const [inline]

Returns:
a pointer to the catalog Declination.

Definition at line 202 of file skypoint.h.

void SkyPoint::EclipticToEquatorial ( const KSNumbers *  num  ) 

Convert Ecliptic logitude/latitude to Right Ascension/Declination.

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 344 of file skypoint.cpp.

void SkyPoint::EquatorialToEcliptic ( const KSNumbers *  num  ) 

Convert Right Ascension/Declination to Ecliptic logitude/latitude.

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.

Returns:
a pointer to the current galactic latitude.

a pointer to the current galactic longitude.

Parameters:
LST pointer to the local sidereal time
lat pointer to the geographic latitude

Definition at line 46 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 486 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 107 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 364 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:
LST pointer to the local sidereal time
lat pointer to the geographic latitude

Definition at line 72 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 435 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 177 of file skypoint.cpp.

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

Definition at line 390 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:
num pointer to a KSNumbers object describing the target epoch.

Definition at line 147 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 248 of file skypoint.cpp.

const dms* SkyPoint::ra (  )  const [inline]

Returns:
a pointer to the current Right Ascension.

Definition at line 206 of file skypoint.h.

const dms* SkyPoint::ra0 (  )  const [inline]

Sets Galactic Longitude.

Parameters:
glo Galactic Longitude.Overloaded member function, provided for convenience. It behaves essentially like the above function.
glo Galactic Longitude, expressed as a double.Sets Galactic Longitude.
gla Galactic Longitude.Overloaded member function, provided for convenience. It behaves essentially like the above function.
gla Galactic Longitude, expressed as a double.
Returns:
a pointer to the catalog Right Ascension.

Definition at line 198 of file skypoint.h.

void SkyPoint::set ( double  r,
double  d 
)

Overloaded member function, provided for convenience.

It behaves essentially like the above function.

Parameters:
r Right Ascension
d Declination

Definition at line 36 of file skypoint.cpp.

void SkyPoint::set ( const dms *  r,
const dms *  d 
) [inline]

Overloaded member function, provided for convenience.

It behaves essentially like the above function.

Parameters:
r Right Ascension
d Declination

Definition at line 95 of file skypoint.h.

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:
r Right Ascension
d Declination

Definition at line 29 of file skypoint.cpp.

void SkyPoint::setAlt ( double  alt  )  [inline]

Overloaded member function, provided for convenience.

It behaves essentially like the above function.

Parameters:
alt Altitude, expressed as a double.

Definition at line 157 of file skypoint.h.

void SkyPoint::setAlt ( dms  alt  )  [inline]

Sets Alt, the Altitude.

Parameters:
alt Altitude.

Definition at line 151 of file skypoint.h.

void SkyPoint::setAz ( double  az  )  [inline]

Overloaded member function, provided for convenience.

It behaves essentially like the above function.

Parameters:
az Azimuth, expressed as a double.

Definition at line 168 of file skypoint.h.

void SkyPoint::setAz ( dms  az  )  [inline]

Sets Az, the Azimuth.

Parameters:
az Azimuth.

Definition at line 162 of file skypoint.h.

void SkyPoint::setDec ( double  d  )  [inline]

Overloaded member function, provided for convenience.

It behaves essentially like the above function.

Parameters:
d Declination, expressed as a double.

Definition at line 146 of file skypoint.h.

void SkyPoint::setDec ( dms  d  )  [inline]

Sets Dec, the current Declination.

Parameters:
d Declination.

Definition at line 140 of file skypoint.h.

void SkyPoint::setDec0 ( double  d  )  [inline]

Overloaded member function, provided for convenience.

It behaves essentially like the above function.

Parameters:
d Declination, expressed as a double.

Definition at line 124 of file skypoint.h.

void SkyPoint::setDec0 ( dms  d  )  [inline]

Sets Dec0, the catalog Declination.

Parameters:
d catalog Declination.

Definition at line 118 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 124 of file skypoint.cpp.

void SkyPoint::setRA ( double  r  )  [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 135 of file skypoint.h.

void SkyPoint::setRA ( dms  r  )  [inline]

Sets RA, the current Right Ascension.

Parameters:
r Right Ascension.

Definition at line 129 of file skypoint.h.

void SkyPoint::setRA0 ( double  r  )  [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 113 of file skypoint.h.

void SkyPoint::setRA0 ( dms  r  )  [inline]

Sets RA0, the catalog Right Ascension.

Parameters:
r catalog Right Ascension.

Definition at line 107 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 512 of file skypoint.cpp.

void SkyPoint::updateCoords ( KSNumbers *  num,
bool  includePlanets = true,
const dms *  lat = 0,
const dms *  LST = 0 
) [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()).

Reimplemented in KSPlanetBase, and StarObject.

Definition at line 235 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 874 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 879 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 823 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 828 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 833 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 884 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 783 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 900 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 895 of file skypoint.cpp.


The documentation for this class was generated from the following files:
  • skypoint.h
  • skypoint.cpp

kstars

Skip menu "kstars"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal