Jpp  debug
the software that should make you happy
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 289 of file JAstronomy.hh.

Constructor & Destructor Documentation

◆ JSourceLocation() [1/2]

JASTRONOMY::JSourceLocation::JSourceLocation ( )
inline

Default constructor.

Definition at line 295 of file JAstronomy.hh.

295  :
296  __declination (0.0),
297  __right_ascension(0.0)
298  {}

◆ JSourceLocation() [2/2]

JASTRONOMY::JSourceLocation::JSourceLocation ( const double  declination,
const double  right_ascension 
)
inline

Constructor.

Parameters
declinationdeclination
right_ascensionright ascension

Definition at line 307 of file JAstronomy.hh.

308  :
310  __right_ascension(right_ascension)
311  {}

Member Function Documentation

◆ getDeclination()

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

Definition at line 313 of file JAstronomy.hh.

313 { return __declination; }

◆ getRightAscension()

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

Definition at line 314 of file JAstronomy.hh.

314 { return __right_ascension; }

◆ getDeclinationJ2000()

double JASTRONOMY::JSourceLocation::getDeclinationJ2000 ( const double  t1) const
inline

Get declination in J2000.

Parameters
t1number of seconds since MJD

Definition at line 321 of file JAstronomy.hh.

322  {
323  double mjd = t1 / NUMBER_OF_SECONDS_PER_DAY;
324  double dec_j2000; double ra_j2000;
325  double &dec = const_cast<double&> (__declination);
326  double &ra = const_cast<double&> (__right_ascension);
327  correct_to_j2000(dec, ra, mjd, dec_j2000, ra_j2000, false);
328  const double const_dec_j2000 = dec_j2000;
329  return const_dec_j2000;
330  }
static const double NUMBER_OF_SECONDS_PER_DAY
Definition: JAstronomy.hh:95
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:193

◆ getRightAscensionJ2000()

double JASTRONOMY::JSourceLocation::getRightAscensionJ2000 ( const double  t1) const
inline

Get Right Ascension in J2000.

Parameters
t1number of seconds since MJD

Definition at line 337 of file JAstronomy.hh.

338  {
339  double mjd = t1 / NUMBER_OF_SECONDS_PER_DAY;
340  double dec_j2000; double ra_j2000;
341  double &dec = const_cast<double&> (__declination);
342  double &ra = const_cast<double&> (__right_ascension);
343  correct_to_j2000(dec, ra, mjd, dec_j2000, ra_j2000, false);
344  const double const_ra_j2000 = ra_j2000;
345  return const_ra_j2000;
346  }

Member Data Documentation

◆ __declination

double JASTRONOMY::JSourceLocation::__declination
protected

Definition at line 349 of file JAstronomy.hh.

◆ __right_ascension

double JASTRONOMY::JSourceLocation::__right_ascension
protected

Definition at line 350 of file JAstronomy.hh.


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