QP  0.7-SNAPSHOT
Control software for the ??SRT telescope
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
position.h
1 #ifndef POSITION_H_LOADED
2 #define POSITION_H_LOADED 1
3 
4 #if PROVARINO
5 #include <ostream>
6 #endif
7 
8 #include "astrotime.h"
9 
15 class Position {
16  public:
33  enum System {
34  _Natural,
35  TopoPolar,
36  AzAlt,
37  EqPolar,
38  HADec,
39  RADec,
40  Geog,
41  Velocity,
42  _Null,
43  };
44 
45  private:
46  double lon_;
47  double lat_;
48  System system_;
49  double obs_lat_;
50  double obs_lmst_;
51 
52  public:
53 
54  Position();
55  Position(double lon, double lat,
56  System system,
57  System into_system=_Natural);
58 
64  double lon(void) const { return lon_; }
65 
67  double lat(void) const { return lat_; }
68 
72  System system(void) const { return system_; }
73 
75  static Position get_null(void) { return Position(0, 0, _Null); }
77  bool is_null_p(void) const { return system_ == _Null; }
78 
79  void set_observatory(const Position&);
80  void set_reftime(const AstroTime&);
81  Position to_system(System into_system) const;
82 };
83 
84 
85 #if PROVARINO
86 std::ostream& operator<<(std::ostream& strm, const Position& pos);
87 #endif
88 
89 #endif /* POSITION_H_LOADED */
Encapsulates a few time properties which are astronomically relevant.
Definition: astrotime.h:17
static Position get_null(void)
Return a 'null' Position, which can be used as a sentinel value.
Definition: position.h:75
System system(void) const
The coordinate system in which this position is expressed.
Definition: position.h:72
double lon(void) const
The azimuthal coordinate.
Definition: position.h:64
void set_reftime(const AstroTime &)
Set the reference time, for a subsequent call to to_system.
Definition: position.cpp:230
The Position class allows us to represent positions on the celestial sphere (or on Earth...
Definition: position.h:15
Position to_system(System into_system) const
Return another Position, in the given system.
Definition: position.cpp:243
void set_observatory(const Position &)
Set the observatory position, for a subsequent call to to_system.
Definition: position.cpp:217
System
The known coordinate systems.
Definition: position.h:33
double lat(void) const
The latitudinal coordinate.
Definition: position.h:67
bool is_null_p(void) const
Test if the Position is a 'null' one.
Definition: position.h:77