GammaLib 2.1.0.dev
Loading...
Searching...
No Matches
GSkyDir.cpp File Reference

Sky direction class implementation. More...

#include <cstdlib>
#include <cmath>
#include "GException.hpp"
#include "GTools.hpp"
#include "GSkyDir.hpp"
#include "GTime.hpp"
#include "GMatrix.hpp"
#include "GVector.hpp"

Go to the source code of this file.

Macros

#define G_POSANG   "GSkyDir::posang(GSkyDir&, std::string&)"
 
#define G_SET   "GSkyDir::set(std::string&)"
 Set sky direction from coordinate string.
 

Functions

bool operator== (const GSkyDir &a, const GSkyDir &b)
 Equality operator.
 
bool operator!= (const GSkyDir &a, const GSkyDir &b)
 Non equality operator.
 

Detailed Description

Sky direction class implementation.

Author
Juergen Knoedlseder

Definition in file GSkyDir.cpp.

Macro Definition Documentation

◆ G_POSANG

#define G_POSANG   "GSkyDir::posang(GSkyDir&, std::string&)"

Definition at line 41 of file GSkyDir.cpp.

Referenced by GSkyDir::posang().

◆ G_SET

#define G_SET   "GSkyDir::set(std::string&)"

Set sky direction from coordinate string.

Parameters
[in]coordCoordinate string.

Sets sky direction from coordinate string.

In addition, names of a few emblematic sources are translated into a sky direction using CDS coordinates. The following names are implement (case insensitive):

  • "Crab" (l=184.5574843227357, b=-5.7843392171240)
  • "Vela" (l=263.55197071, b=-2.78725587)
  • "CygX-1" (l=71.3349982655144, b=3.0668346317201)

Definition at line 332 of file GSkyDir.cpp.

Function Documentation

◆ operator!=()

bool operator!= ( const GSkyDir & a,
const GSkyDir & b )

Non equality operator.

Parameters
[in]aFirst sky direction.
[in]bSecond sky direction.

Definition at line 1644 of file GSkyDir.cpp.

◆ operator==()

bool operator== ( const GSkyDir & a,
const GSkyDir & b )

Equality operator.

Parameters
[in]aFirst sky direction.
[in]bSecond sky direction.

Compare two sky directions. If the coordinate is at the pole, the Right Ascension or Longitude value is irrelevant.

Comparisons are done dependent on the available coordinate system. This speeds up things and avoids unnecessary coordinate transformations.

Definition at line 1580 of file GSkyDir.cpp.