GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GCOMBvc Class Reference

COMPTEL Solar System Barycentre Data class. More...

#include <GCOMBvc.hpp>

Inheritance diagram for GCOMBvc:
GBase

Public Member Functions

 GCOMBvc (void)
 Void constructor. More...
 
 GCOMBvc (const GCOMBvc &bvc)
 Copy constructor. More...
 
virtual ~GCOMBvc (void)
 Destructor. More...
 
GCOMBvcoperator= (const GCOMBvc &bvc)
 Assignment operator. More...
 
virtual void clear (void)
 Clear COMPTEL Solar System Barycentre Data. More...
 
virtual GCOMBvcclone (void) const
 Clone COMPTEL Solar System Barycentre Data. More...
 
virtual std::string classname (void) const
 Return class name. More...
 
virtual std::string print (const GChatter &chatter=NORMAL) const
 Print COMPTEL Solar System Barycentre Data. More...
 
const GTimetime (void) const
 Return time of Solar System Barycentre Data. More...
 
void time (const GTime &time)
 Set time of Solar System Barycentre Data. More...
 
const int & tjd (void) const
 Return Truncated Julian Days of Solar System Barycentre Data. More...
 
void tjd (const int &tjd)
 Set Truncated Julian Days of Solar System Barycentre Data. More...
 
const int & tics (void) const
 Return tics of Solar System Barycentre Data. More...
 
void tics (const int &tics)
 Set tics of Solar System Barycentre Data. More...
 
const GVectorssb (void) const
 Return Solar System Barycentre vector. More...
 
void ssb (const GVector &ssb)
 Set Solar System Barycentre vector. More...
 
const double & tdelta (void) const
 Return TDB-UTC time difference. More...
 
void tdelta (const double &tdelta)
 Set TDB-UTC time difference. More...
 
double tdelta (const GSkyDir &dir) const
 Return time difference between photon arrival time at CGRO and the Solar System Barycentre (SSB) More...
 
- Public Member Functions inherited from GBase
virtual ~GBase (void)
 Destructor. More...
 

Protected Member Functions

void init_members (void)
 Initialise class members. More...
 
void copy_members (const GCOMBvc &bvc)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 

Protected Attributes

GTime m_time
 Time for Solar System Barycentre Data. More...
 
int m_tjd
 TJD of Solar System Barycentre Data. More...
 
int m_tics
 Tics of Solar System Barycentre Data. More...
 
GVector m_ssb
 Solar System Barycentre vector in celestial system (micro seconds) More...
 
double m_tdelta
 Time difference TDB-UTC (sec) More...
 

Detailed Description

COMPTEL Solar System Barycentre Data class.

The class holds one record of a COMPTEL Solar System Barycentre Data file.

Definition at line 49 of file GCOMBvc.hpp.

Constructor & Destructor Documentation

GCOMBvc::GCOMBvc ( void  )

Void constructor.

Definition at line 53 of file GCOMBvc.cpp.

References init_members().

Referenced by clone().

GCOMBvc::GCOMBvc ( const GCOMBvc bvc)

Copy constructor.

Parameters
[in]bvcCOMPTEL Solar System Barycentre Data.

Definition at line 68 of file GCOMBvc.cpp.

References copy_members(), and init_members().

GCOMBvc::~GCOMBvc ( void  )
virtual

Destructor.

Definition at line 84 of file GCOMBvc.cpp.

References free_members().

Member Function Documentation

std::string GCOMBvc::classname ( void  ) const
inlinevirtual

Return class name.

Returns
String containing the class name ("GCOMBvc").

Implements GBase.

Definition at line 100 of file GCOMBvc.hpp.

void GCOMBvc::clear ( void  )
virtual

Clear COMPTEL Solar System Barycentre Data.

Implements GBase.

Definition at line 136 of file GCOMBvc.cpp.

References free_members(), and init_members().

GCOMBvc * GCOMBvc::clone ( void  ) const
virtual

Clone COMPTEL Solar System Barycentre Data.

Returns
Pointer to deep copy of COMPTEL Solar System Barycentre Data.

Implements GBase.

Definition at line 154 of file GCOMBvc.cpp.

References GCOMBvc().

void GCOMBvc::copy_members ( const GCOMBvc bvc)
protected

Copy class members.

Parameters
[in]bvcCOMPTEL Solar System Barycentre Data.

Definition at line 295 of file GCOMBvc.cpp.

References m_ssb, m_tdelta, m_tics, m_time, and m_tjd.

Referenced by GCOMBvc(), and operator=().

void GCOMBvc::free_members ( void  )
protected

Delete class members.

Definition at line 312 of file GCOMBvc.cpp.

Referenced by clear(), operator=(), and ~GCOMBvc().

void GCOMBvc::init_members ( void  )
protected

Initialise class members.

Definition at line 276 of file GCOMBvc.cpp.

References GTime::clear(), GVector::clear(), m_ssb, m_tdelta, m_tics, m_time, and m_tjd.

Referenced by clear(), GCOMBvc(), and operator=().

GCOMBvc & GCOMBvc::operator= ( const GCOMBvc bvc)

Assignment operator.

Parameters
[in]bvcCOMPTEL Solar System Barycentre Data.
Returns
COMPTEL Solar System Barycentre Data.

Definition at line 106 of file GCOMBvc.cpp.

References copy_members(), free_members(), and init_members().

std::string GCOMBvc::print ( const GChatter chatter = NORMAL) const
virtual

Print COMPTEL Solar System Barycentre Data.

Parameters
[in]chatterChattiness.
Returns
String containing COMPTEL Solar System Barycentre Data information.

Implements GBase.

Definition at line 238 of file GCOMBvc.cpp.

References m_tics, m_time, m_tjd, GTime::mjd(), gammalib::parformat(), SILENT, gammalib::str(), and GTime::utc().

const GVector & GCOMBvc::ssb ( void  ) const
inline

Return Solar System Barycentre vector.

Returns
Solar System Barycentre vector (micro seconds).

Returns the Solar System Barycentre vector in micro seconds. The vector is given in the celestial system. It's length specifies the light travel time in micro seconds.

Definition at line 205 of file GCOMBvc.hpp.

References m_ssb.

Referenced by GCOMBvcs::read(), and ssb().

void GCOMBvc::ssb ( const GVector ssb)
inline

Set Solar System Barycentre vector.

Parameters
[in]ssbSolar System Barycentre vector (micro seconds).

Set the Solar System Barycentre vector in micro seconds. The vector is defined in the celestial system. It's length specifies the light travel time in micro seconds.

Definition at line 221 of file GCOMBvc.hpp.

References m_ssb, and ssb().

const double & GCOMBvc::tdelta ( void  ) const
inline

Return TDB-UTC time difference.

Returns
TDB-UTC time difference (s).

Returns the TDB-UTC time difference in seconds.

Definition at line 236 of file GCOMBvc.hpp.

References m_tdelta.

Referenced by GCOMBvcs::read(), and tdelta().

void GCOMBvc::tdelta ( const double &  tdelta)
inline

Set TDB-UTC time difference.

Parameters
[in]tdeltaTDB-UTC time difference (s).

Set the TDB-UTC time difference.

Definition at line 250 of file GCOMBvc.hpp.

References m_tdelta, and tdelta().

double GCOMBvc::tdelta ( const GSkyDir dir) const

Return time difference between photon arrival time at CGRO and the Solar System Barycentre (SSB)

Parameters
[in]dirSource position.
Returns
Time difference between photon arrival times (s)

Returns the time difference between photon arrival time at CGRO and the Solar System Barycentre (SSB). The arrival time at the SSB is computed by adding the time difference to the photon arrival time as measured by COMPTEL

\[ T_{\rm SSB} = T_{\rm CGRO} + \Delta T \]

The routine implements the algorithm PUL-AL-004 and is inspried from the COMPASS code evpbin02.pulssb.f.

It computes

\[ \Delta T = \Delta T_{\rm travel} - \Delta T_{\rm rel} + \Delta T_{\rm BVC} \]

where

\[ \Delta T_{\rm travel} = \left( \vec{SSB} \cdot \vec{n} \right) \times 10^{-6} \]

is the light travel time in seconds between CGRO and the SSB, with \(\vec{SSB}\) being the vector going from the SSB to CGRO, specified using the GCOMBvc::ssb() method, and \(\vec{n}\) is the normalised vector of the source position, provided by the GSkyDir::celvector() method,

\[ \Delta T_{\rm rel} = -2 R \log \left( 1 + \frac{\Delta T_{\rm travel}}{|\vec{SSB}| * 10^{-6}} \right) \]

is the relativistic delay due to the Sun in seconds, with \(R=0.49254909 \times 10^{-5}\) s, and \(\Delta T_{\rm BVC}\) is the difference in seconds due to the time unit conversion as specified by the GCOMBvc::tdelta() method.

Definition at line 207 of file GCOMBvc.cpp.

References GSkyDir::celvector(), log(), m_ssb, norm(), and tdelta().

const int & GCOMBvc::tics ( void  ) const
inline

Return tics of Solar System Barycentre Data.

Returns
Tics of Solar System Barycentre Data.

Returns the tics of the Solar System Barycentre Data.

Definition at line 174 of file GCOMBvc.hpp.

References m_tics.

Referenced by GCOMBvcs::read(), and tics().

void GCOMBvc::tics ( const int &  tics)
inline

Set tics of Solar System Barycentre Data.

Parameters
[in]ticsTics of Solar System Barycentre Data.

Set the tics of the Solar System Barycentre Data.

Definition at line 188 of file GCOMBvc.hpp.

References m_tics, and tics().

const GTime & GCOMBvc::time ( void  ) const
inline

Return time of Solar System Barycentre Data.

Returns
Time of Solar System Barycentre Data.

Returns the time of the Solar System Barycentre Data. The time is defined as the mid-point of the corresponding superpacket.

Definition at line 115 of file GCOMBvc.hpp.

References m_time.

Referenced by GCOMBvcs::read(), and time().

void GCOMBvc::time ( const GTime time)
inline

Set time of Solar System Barycentre Data.

Parameters
[in]timeTime of Solar System Barycentre Data.

Set the time of the Solar System Barycentre Data. The time is defined as the mid-point of the corresponding superpacket.

Definition at line 130 of file GCOMBvc.hpp.

References m_time, and time().

const int & GCOMBvc::tjd ( void  ) const
inline

Return Truncated Julian Days of Solar System Barycentre Data.

Returns
Truncated Julian Days of Solar System Barycentre Data.

Returns the Truncated Julian Days of Solar System Barycentre Data.

Definition at line 145 of file GCOMBvc.hpp.

References m_tjd.

Referenced by GCOMBvcs::read(), and tjd().

void GCOMBvc::tjd ( const int &  tjd)
inline

Set Truncated Julian Days of Solar System Barycentre Data.

Parameters
[in]tjdTruncated Julian Days of Solar System Barycentre Data.

Set the Truncated Julian Days of the Solar System Barycentre Data.

Definition at line 159 of file GCOMBvc.hpp.

References m_tjd, and tjd().

Member Data Documentation

GVector GCOMBvc::m_ssb
protected

Solar System Barycentre vector in celestial system (micro seconds)

Definition at line 89 of file GCOMBvc.hpp.

Referenced by copy_members(), init_members(), ssb(), and tdelta().

double GCOMBvc::m_tdelta
protected

Time difference TDB-UTC (sec)

Definition at line 90 of file GCOMBvc.hpp.

Referenced by copy_members(), init_members(), and tdelta().

int GCOMBvc::m_tics
protected

Tics of Solar System Barycentre Data.

Definition at line 88 of file GCOMBvc.hpp.

Referenced by copy_members(), init_members(), print(), and tics().

GTime GCOMBvc::m_time
protected

Time for Solar System Barycentre Data.

Definition at line 86 of file GCOMBvc.hpp.

Referenced by copy_members(), init_members(), print(), and time().

int GCOMBvc::m_tjd
protected

TJD of Solar System Barycentre Data.

Definition at line 87 of file GCOMBvc.hpp.

Referenced by copy_members(), init_members(), print(), and tjd().


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