sky_coord.h
1 /***************************************************************************
2  *
3  * Copyright (C) 1999 by Russell Edwards
4  * Licensed under the Academic Free License version 2.1
5  *
6  ***************************************************************************/
7 // psrchive/Util/genutil/sky_coord.h
8 
9 #ifndef __SKY_COORD_H
10 #define __SKY_COORD_H
11 
12 
13 #include "Angle.h"
14 
16 
19 class sky_coord : public AnglePair
20 {
21  public:
22  sky_coord ();
23 
24  sky_coord (const std::string& astr);
25  sky_coord (const sky_coord & co);
26 
27  sky_coord (const AnglePair & co);
28 
29  sky_coord& operator= (const AnglePair & co)
30  { AnglePair::operator=(co); return *this; }
31 
32  sky_coord (const Angle & a1, const Angle & a2);
33  sky_coord (const double d1, const double d2);
34 
35  const sky_coord& setJRaDecMS(long int ra, long int dec);
36 
37  const sky_coord& setGalactic(AnglePair &gal);
38 
39  AnglePair getGalactic() const;
40 
41  AnglePair & getRaDec() { return *this; }
42 
43  Angle & ra() { return angle1; }
44  Angle & dec() { return angle2; }
45 
46  // const versions
47  const AnglePair & getRaDec() const { return *this; }
48  const Angle & ra() const { return angle1; }
49  const Angle & dec() const { return angle2; }
50 
51  private:
52 
54  void init ();
55 
56 };
57 
59 std::ostream& operator<< (std::ostream& ostr, const sky_coord& coord);
60 
62 std::istream& operator>> (std::istream& istr, sky_coord& coord);
63 
65 sky_coord hmsdms (const std::string& ra, const std::string& dec);
66 
67 #endif //SKY_COORD_H
A convenient exception handling class.
Definition: Error.h:54
const Observatory * observatory(const std::string &telescope_name)
Return the Observatory data given the telescope name.
Definition: Observatory.C:130
static const Site * location(const std::string &antenna)
Get the location of the named antenna.
Definition: Site_location.C:22
AnglePair class : useful for sky positions.
Definition: Angle.h:165
Class for dealing with angular info.
Definition: Angle.h:27
const std::string get_message() const
Get the error message.
Definition: Error.C:133
Class for sky coordinates.
Definition: sky_coord.h:19
Site coordinates.
Definition: Site.h:25

Generated using doxygen 1.8.17