TwiceAsNice
2019-02-18
|
The two coordinates of a point on the celestial sphere. More...
#include <SkyPoint.h>
Public Member Functions | |
SkyPoint () | |
default constructor: Sets Ra, Dec and Alt, Az to NAN More... | |
SkyPoint (const DMS &r, const DMS &d) | |
constructor: Sets m_ra, Dec and m_ra0, Dec0 according to arguments. More... | |
SkyPoint (const Nice::SkyPointVar &rd) | |
Bridge constructor: Sets m_ra, Dec and m_ra0, Dec0 according to argument SpkyPointVar. More... | |
SkyPoint (double r, double d) | |
Default constructor using double arguments, for convenience. More... | |
virtual | ~SkyPoint () |
Dtor. More... | |
operator Nice::SkyPointVar () const | |
Cast operator SkyPointVar. More... | |
bool | isValidRaDec () const |
Checks if its a valid radec Does not set Altitude or Azimuth. More... | |
bool | isValidAltAz () const |
Checks if its a valid AltAz Does not set RaDec. More... | |
void | set (const DMS &r, const DMS &d) |
Sets m_ra, Dec and m_ra0, Dec0 according to arguments. More... | |
void | set (double r, double d) |
Sets both coordinates. More... | |
void | setRa (const DMS &r) |
Sets the current Right Ascension. More... | |
void | setRa (double r) |
Sets the right ascension. More... | |
void | setDec (const DMS &d) |
Sets the current Declination. More... | |
void | setDec (double d) |
Sets the declination. More... | |
void | setAlt (const DMS &alt) |
Sets the Altitude. More... | |
void | setAlt (double alt) |
Sets the altitude. More... | |
void | setAz (const DMS &az) |
Sets the Azimuth. More... | |
void | setAz (double az) |
Sets the azimuth. More... | |
DMS | ra () const |
DMS | dec () const |
DMS | az () const |
DMS | alt () const |
const DMS & | ra_ref () const |
const DMS & | dec_ref () const |
const DMS & | az_ref () const |
const DMS & | alt_ref () const |
DMS | pang (const DMS &LST, const GeoLocation &site=GeoLocation()) const |
Compute the parallactic angle. More... | |
DMS | pang (const DMS &HourAngle, const DMS &lat) const |
Compute the parallactic angle. More... | |
DMS | pangDot (const DMS &LST, const GeoLocation &site=GeoLocation()) |
Compute the time derivative of the parallactic angle. More... | |
DMS | pangDot (const DMS &LST, const DMS &lat) |
Compute the time derivative of the parallactic angle. More... | |
void | EquatorialToHorizontal (const DMS &LST, const DMS &lat) |
Fix/compute the (Altitude, Azimuth) coordinates. More... | |
void | HorizontalToEquatorial (const DMS &LST, const DMS &lat) |
Determine the (m_ra, Dec) coordinates. More... | |
void | findEcliptic (const DMS &bliquity, DMS &EcLong, DMS &EcLat) |
Determine the Ecliptic coordinates of the SkyPoint, given the Julian Date. More... | |
void | setFromEcliptic (const DMS &Obliquity, const DMS &EcLong, const DMS &EcLat) |
Set the current (m_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). More... | |
void | Equatorial1950ToGalactic (DMS &galLong, DMS &galLat) |
Computes galactic coordinates from equatorial coordinates referred to epoch 1950. More... | |
void | GalacticToEquatorial1950 (const DMS &galLong, const DMS &galLat) |
Computes equatorial coordinates referred to 1950 from galactic ones referred to epoch B1950. More... | |
void | nutate (const Nice::SkyNumbers &num) |
Determine the effects of nutation for this SkyPoint. More... | |
void | aberrate (const Nice::SkyNumbers &num) |
Determine the effects of aberration for this SkyPoint. More... | |
SkyPoint | Eterms () |
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. More... | |
void | B1950ToJ2000 () |
Exact precession from Besselian epoch 1950 to epoch J2000. More... | |
void | J2000ToB1950 () |
Exact precession from epoch J2000 Besselian epoch 1950. More... | |
void | addEterms () |
Coordinates in the FK4 catalog include the effect of aberration due to the ellipticity of the orbit of the Earth. More... | |
void | subtractEterms (void) |
Coordinates in the FK4 catalog include the effect of aberration due to the ellipticity of the orbit of the Earth. More... | |
DMS | angularDistanceTo (const SkyPoint &sp) const |
Computes the angular distance between two SkyObjects. More... | |
bool | operator== (const SkyPoint &p) const |
double | vRSite (double vsite[3]) |
Computes the velocity of any object (oberver's site) projected on the direction of the source. More... | |
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 from the geocentric velovity and the velocity of the site referred to the center of the Earth. More... | |
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 referred to an observer site on the surface of the earth. More... | |
SkyPoint () | |
SkyPoint (const DMS &r, const DMS &d) | |
SkyPoint (const Nice::SkyPointVar &rd) | |
SkyPoint (double r, double d) | |
virtual | ~SkyPoint () |
operator Nice::SkyPointVar () const | |
bool | isValidRaDec () const |
bool | isValidAltAz () const |
void | set (const DMS &r, const DMS &d) |
void | set (double r, double d) |
void | setRa (const DMS &r) |
void | setRa (double r) |
void | setDec (const DMS &d) |
void | setDec (double d) |
void | setAlt (const DMS &alt) |
void | setAlt (double alt) |
void | setAz (const DMS &az) |
void | setAz (double az) |
DMS | ra () const |
DMS | dec () const |
DMS | az () const |
DMS | alt () const |
const DMS & | ra_ref () const |
const DMS & | dec_ref () const |
const DMS & | az_ref () const |
const DMS & | alt_ref () const |
DMS | pang (const DMS &LST, const GeoLocation &site=GeoLocation()) const |
DMS | pang (const DMS &HourAngle, const DMS &lat) const |
DMS | pangDot (const DMS &LST, const GeoLocation &site=GeoLocation()) |
DMS | pangDot (const DMS &LST, const DMS &lat) |
void | EquatorialToHorizontal (const DMS &LST, const DMS &lat) |
void | HorizontalToEquatorial (const DMS &LST, const DMS &lat) |
void | findEcliptic (const DMS &bliquity, DMS &EcLong, DMS &EcLat) |
void | setFromEcliptic (const DMS &Obliquity, const DMS &EcLong, const DMS &EcLat) |
void | Equatorial1950ToGalactic (DMS &galLong, DMS &galLat) |
void | GalacticToEquatorial1950 (const DMS &galLong, const DMS &galLat) |
void | nutate (const Nice::SkyNumbers &num) |
void | aberrate (const Nice::SkyNumbers &num) |
SkyPoint | Eterms () |
void | B1950ToJ2000 () |
void | J2000ToB1950 () |
void | addEterms () |
void | subtractEterms (void) |
DMS | angularDistanceTo (const SkyPoint &sp) const |
bool | operator== (const SkyPoint &p) const |
double | vRSite (double vsite[3]) |
double | vTopocentric (double vgeo, double vsite[3]) |
double | vTopoToVGeo (double vtopo, double vsite[3]) |
Static Public Member Functions | |
static double | ParAng (double _ha, double _dec, double _phi) |
compute the parallactic angle More... | |
static double | ParAng (double _ha, double _dec, double _phi) |
Protected Attributes | |
DMS | m_ra |
current true sky coordinate RA More... | |
DMS | m_dec |
current true sky coordinate DEC More... | |
DMS | m_alt |
current altitude More... | |
DMS | m_az |
current azimuth Apparently this is oriented with N=0, E=90, as LBTO does. More... | |
The two coordinates of a point on the celestial sphere.
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 (m_ra0, Dec0), which were the true coordinates on Jan 1, 2000. The true coordinates (m_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.
Nice::SkyPoint::SkyPoint | ( | ) |
default constructor: Sets Ra, Dec and Alt, Az to NAN
constructor: Sets m_ra, Dec and m_ra0, Dec0 according to arguments.
Does not set Altitude or Azimuth.
r | Right Ascension |
d | Declination |
Nice::SkyPoint::SkyPoint | ( | const Nice::SkyPointVar & | rd | ) |
Bridge constructor: Sets m_ra, Dec and m_ra0, Dec0 according to argument SpkyPointVar.
Does not set Altitude or Azimuth.
rd |
|
explicit |
Default constructor using double arguments, for convenience.
It behaves essentially like the default constructor.
r | Right Ascension, expressed as a double |
d | Declination, expressed as a double |
|
virtual |
Dtor.
Does nothing. Actually this is superfluous becuase the default dtor would work as a POD.
Nice::SkyPoint::SkyPoint | ( | ) |
Nice::SkyPoint::SkyPoint | ( | const Nice::SkyPointVar & | rd | ) |
|
explicit |
|
virtual |
void Nice::SkyPoint::aberrate | ( | const Nice::SkyNumbers & | num | ) |
Determine the effects of aberration for this SkyPoint.
num | pointer to SkyNumbers object containing current values of time-dependent variables. |
void Nice::SkyPoint::aberrate | ( | const Nice::SkyNumbers & | num | ) |
void Nice::SkyPoint::addEterms | ( | ) |
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.
void Nice::SkyPoint::addEterms | ( | ) |
Nice::DMS Nice::SkyPoint::alt | ( | ) | const |
DMS Nice::SkyPoint::alt | ( | ) | 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.
sp | SkyPoint to which distance is to be calculated |
Nice::DMS Nice::SkyPoint::az | ( | ) | const |
DMS Nice::SkyPoint::az | ( | ) | const |
void Nice::SkyPoint::B1950ToJ2000 | ( | ) |
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:
void Nice::SkyPoint::B1950ToJ2000 | ( | ) |
Nice::DMS Nice::SkyPoint::dec | ( | ) | const |
DMS Nice::SkyPoint::dec | ( | ) | const |
Computes galactic coordinates from equatorial coordinates referred to epoch 1950.
m_ra and Dec are, therefore assumed to be B1950 coordinates.
Fix/compute the (Altitude, Azimuth) coordinates.
There is no return value, because the coordinates are stored internally. Start from (m_ra, Dec) coordinates, given the local sidereal time and the observer's latitude.
LST | The local sidereal time |
lat | The geographic latitude |
Nice::SkyPoint Nice::SkyPoint::Eterms | ( | ) |
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.
SkyPoint Nice::SkyPoint::Eterms | ( | ) |
Computes equatorial coordinates referred to 1950 from galactic ones referred to epoch B1950.
m_ra and Dec are, therefore assumed to be B1950 coordinates.
Determine the (m_ra, Dec) coordinates.
There is no return value, because the coordinates are stored internally. Start from its (Altitude, Azimuth) coordinates, given the local sidereal time and the observer's latitude.
LST | the local sidereal time |
lat | the geographic latitude |
bool Nice::SkyPoint::isValidAltAz | ( | ) | const |
bool Nice::SkyPoint::isValidAltAz | ( | ) | const |
Checks if its a valid AltAz Does not set RaDec.
bool Nice::SkyPoint::isValidRaDec | ( | ) | const |
bool Nice::SkyPoint::isValidRaDec | ( | ) | const |
Checks if its a valid radec Does not set Altitude or Azimuth.
void Nice::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:
void Nice::SkyPoint::J2000ToB1950 | ( | ) |
void Nice::SkyPoint::nutate | ( | const Nice::SkyNumbers & | num | ) |
Determine the effects of nutation for this SkyPoint.
num | pointer to SkyNumbers object containing current values of time-dependent variables. |
void Nice::SkyPoint::nutate | ( | const Nice::SkyNumbers & | num | ) |
Nice::SkyPoint::operator Nice::SkyPointVar | ( | ) | const |
Cast operator SkyPointVar.
Nice::SkyPoint::operator Nice::SkyPointVar | ( | ) | const |
DMS Nice::SkyPoint::pang | ( | const DMS & | LST, |
const GeoLocation & | site = GeoLocation() |
||
) | const |
Nice::DMS Nice::SkyPoint::pang | ( | const DMS & | LST, |
const GeoLocation & | site = GeoLocation() |
||
) | const |
Compute the parallactic angle.
LST | local siderial time |
site | Observatory geographic location. The default argument is the LBT location on Mt Graham, AZ. |
Compute the parallactic angle.
HourAngle | The hour angle of the object. |
lat | The geographic latitude. |
DMS Nice::SkyPoint::pangDot | ( | const DMS & | LST, |
const GeoLocation & | site = GeoLocation() |
||
) |
Nice::DMS Nice::SkyPoint::pangDot | ( | const DMS & | LST, |
const GeoLocation & | site = GeoLocation() |
||
) |
Compute the time derivative of the parallactic angle.
LST | local siderial time |
site | Observatory geographic location. The default argument is the LBT location on Mt Graham, AZ. |
Compute the time derivative of the parallactic angle.
LST | local siderial time |
lat | The geographic latitude. |
|
static |
|
static |
compute the parallactic angle
ha | Hour angle of the star in radians. |
dec | Declination of the star in radians. |
phi | Geographic latitude of the observer in radians. |
DMS Nice::SkyPoint::ra | ( | ) | const |
Nice::DMS Nice::SkyPoint::ra | ( | ) | const |
Sets m_ra, Dec and m_ra0, Dec0 according to arguments.
Does not set Altitude or Azimuth.
r | Right Ascension |
d | Declination |
void Nice::SkyPoint::set | ( | double | r, |
double | d | ||
) |
Sets both coordinates.
r | Right Ascension in hours. |
d | Declination in degrees. |
void Nice::SkyPoint::set | ( | double | r, |
double | d | ||
) |
|
inline |
Sets the altitude.
alt | Altitude in degrees. |
|
inline |
|
inline |
|
inline |
Sets the azimuth.
az | Azimuth in degrees. |
Sets the current Declination.
d | Declination. |
|
inline |
Sets the declination.
d | Declination in degrees. |
|
inline |
void Nice::SkyPoint::setFromEcliptic | ( | const DMS & | Obliquity, |
const DMS & | EcLong, | ||
const DMS & | EcLat | ||
) |
Set the current (m_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).
void Nice::SkyPoint::setFromEcliptic | ( | const DMS & | Obliquity, |
const DMS & | EcLong, | ||
const DMS & | EcLat | ||
) |
Sets the current Right Ascension.
r | Right Ascension. |
|
inline |
|
inline |
Sets the right ascension.
r | Right Ascension in hours. |
void Nice::SkyPoint::subtractEterms | ( | void | ) |
void Nice::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.
double Nice::SkyPoint::vRSite | ( | double | vsite[3] | ) |
double Nice::SkyPoint::vRSite | ( | double | vsite[3] | ) |
Computes the velocity of any object (oberver's site) projected on the direction of the source.
vsite | velocity of that object in cartesian coordinates |
double Nice::SkyPoint::vTopocentric | ( | double | vgeo, |
double | vsite[3] | ||
) |
double Nice::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.
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. |
double Nice::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.
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. |
double Nice::SkyPoint::vTopoToVGeo | ( | double | vtopo, |
double | vsite[3] | ||
) |
|
protected |
current altitude
|
protected |
current azimuth Apparently this is oriented with N=0, E=90, as LBTO does.
|
protected |
current true sky coordinate DEC
|
protected |
current true sky coordinate RA