Jpp  18.3.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
JASTRONOMY::JSourceLocation Class Reference

Location of astrophysical source. More...

#include <JAstronomy.hh>

Public Member Functions

 JSourceLocation ()
 Default constructor. More...
 
 JSourceLocation (const double declination, const double right_ascension)
 Constructor. More...
 
const double & getDeclination () const
 
const double & getRightAscension () const
 
double getDeclinationJ2000 (const double t1) const
 Get declination in J2000. More...
 
double getRightAscensionJ2000 (const double t1) const
 Get Right Ascension in J2000. More...
 

Protected Attributes

double __declination
 
double __right_ascension
 

Detailed Description

Location of astrophysical source.

Definition at line 287 of file JAstronomy.hh.

Constructor & Destructor Documentation

JASTRONOMY::JSourceLocation::JSourceLocation ( )
inline

Default constructor.

Definition at line 293 of file JAstronomy.hh.

293  :
294  __declination (0.0),
295  __right_ascension(0.0)
296  {}
JASTRONOMY::JSourceLocation::JSourceLocation ( const double  declination,
const double  right_ascension 
)
inline

Constructor.

Parameters
declinationdeclination
right_ascensionright ascension

Definition at line 305 of file JAstronomy.hh.

306  :
308  __right_ascension(right_ascension)
309  {}

Member Function Documentation

const double& JASTRONOMY::JSourceLocation::getDeclination ( ) const
inline

Definition at line 311 of file JAstronomy.hh.

311 { return __declination; }
const double& JASTRONOMY::JSourceLocation::getRightAscension ( ) const
inline

Definition at line 312 of file JAstronomy.hh.

312 { return __right_ascension; }
double JASTRONOMY::JSourceLocation::getDeclinationJ2000 ( const double  t1) const
inline

Get declination in J2000.

Parameters
t1number of seconds since MJD

Definition at line 319 of file JAstronomy.hh.

320  {
321  double mjd = t1 / NUMBER_OF_SECONDS_PER_DAY;
322  double dec_j2000; double ra_j2000;
323  double &dec = const_cast<double&> (__declination);
324  double &ra = const_cast<double&> (__right_ascension);
325  correct_to_j2000(dec, ra, mjd, dec_j2000, ra_j2000, false);
326  const double const_dec_j2000 = dec_j2000;
327  return const_dec_j2000;
328  }
static const double NUMBER_OF_SECONDS_PER_DAY
Definition: JAstronomy.hh:93
void correct_to_j2000(double &in_dec, double &in_ra, double &mjd, double &out_dec, double &out_ra, bool reverse=false)
Convert (Dec, RA) to J2000.
Definition: JAstronomy.hh:191
double JASTRONOMY::JSourceLocation::getRightAscensionJ2000 ( const double  t1) const
inline

Get Right Ascension in J2000.

Parameters
t1number of seconds since MJD

Definition at line 335 of file JAstronomy.hh.

336  {
337  double mjd = t1 / NUMBER_OF_SECONDS_PER_DAY;
338  double dec_j2000; double ra_j2000;
339  double &dec = const_cast<double&> (__declination);
340  double &ra = const_cast<double&> (__right_ascension);
341  correct_to_j2000(dec, ra, mjd, dec_j2000, ra_j2000, false);
342  const double const_ra_j2000 = ra_j2000;
343  return const_ra_j2000;
344  }
static const double NUMBER_OF_SECONDS_PER_DAY
Definition: JAstronomy.hh:93
void correct_to_j2000(double &in_dec, double &in_ra, double &mjd, double &out_dec, double &out_ra, bool reverse=false)
Convert (Dec, RA) to J2000.
Definition: JAstronomy.hh:191

Member Data Documentation

double JASTRONOMY::JSourceLocation::__declination
protected

Definition at line 347 of file JAstronomy.hh.

double JASTRONOMY::JSourceLocation::__right_ascension
protected

Definition at line 348 of file JAstronomy.hh.


The documentation for this class was generated from the following file: