Mount.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2008 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/Util/genutil/Mount.h
10 
11 #ifndef __Mount_H
12 #define __Mount_H
13 
14 #include "Reference.h"
15 #include "MJD.h"
16 #include "sky_coord.h"
17 #include "Matrix.h"
18 
20 class Mount : public Reference::Able
21 {
22 
23 public:
24 
26  Mount ();
27 
29  virtual ~Mount ();
30 
32  void set_source_coordinates (const sky_coord& coords);
33 
35  void set_observatory_latitude (double latitude);
36  double get_observatory_latitude () const;
37 
40  double get_observatory_longitude () const;
41 
43  void set_epoch (const MJD& epoch);
44  MJD get_epoch () const;
45 
47  void set_hour_angle (double rad);
48  double get_hour_angle () const;
49 
51  void set_local_sidereal_time (double rad);
52  double get_local_sidereal_time () const;
53 
55  virtual std::string get_name () const = 0;
56 
58  virtual double get_vertical () const = 0;
59 
61  virtual std::vector< std::pair<double,Mount*> >
62  slew_times (const sky_coord& coords);
63 
64 protected:
65 
67  double declination;
68 
70  double right_ascension;
71 
73  double latitude;
74 
76  double longitude;
77 
79  MJD epoch;
80 
82  mutable double lst;
83 
85  mutable double hour_angle;
86 
89 
92 
94  virtual void build () const;
95 
97  bool get_built () const;
98 
99 };
100 
101 #endif
void set_hour_angle(double rad)
Set the hour_angle in radians.
Definition: Mount.C:79
void set_observatory_latitude(double latitude)
Set the latitude of the observatory in radians.
Definition: Mount.C:39
double hour_angle
The hour angle in radians.
Definition: Mount.h:90
bool get_built() const
Return true when outputs reflect inputs.
Definition: Mount.C:163
double longitude
The latitude of the observatory in radians East of Greenwich.
Definition: Mount.h:81
Base class of antenna/telescope mount types.
Definition: Mount.h:20
void set_source_coordinates(const sky_coord &coords)
Set the coordinates of the source.
Definition: Mount.C:31
Vector.
Definition: Vector.h:22
double get_hour_angle() const
Get the hour_angle in radians.
Definition: Mount.C:86
A convenient exception handling class.
Definition: Error.h:54
virtual ~Mount()
Destructor.
Definition: Mount.C:27
virtual std::string get_name() const =0
Get the name of the mount.
void set_observatory_longitude(double longitude)
Set the longitude of the observatory in radians East of Greenwich.
Definition: Mount.C:51
Matrix< 3, 3, double > observatory_basis
Basis pointing to observatory in celestial reference frame.
Definition: Mount.h:96
void set_epoch(const MJD &epoch)
Set the epoch in Modified Julian Days.
Definition: Mount.C:63
Manages Reference::To references to the instance.
Definition: ReferenceAble.h:40
virtual std::vector< std::pair< double, Mount * > > slew_times(const sky_coord &coords)
Return all possible slew times and resulting telescope states.
Definition: Mount.C:169
double declination
The declination of the source in radians.
Definition: Mount.h:72
MJD epoch
The epoch.
Definition: Mount.h:84
virtual double get_vertical() const =0
Get the vertical angle (rotation about the line of sight)
double lst
The LST in radians.
Definition: Mount.h:87
double latitude
The latitude of the observatory in radians.
Definition: Mount.h:78
double get_local_sidereal_time() const
Get the LST in radians.
Definition: Mount.C:100
void set_local_sidereal_time(double rad)
Set the LST in radians.
Definition: Mount.C:93
Class for sky coordinates.
Definition: sky_coord.h:19
virtual void build() const
Lazily evaluate lst and hour_angle.
Definition: Mount.C:106
Mount()
Default constructor.
Definition: Mount.C:19
Matrix< 3, 3, double > source_basis
Basis pointing to source in celestial reference frame.
Definition: Mount.h:93
Class for representing modified Julian dates with high precision.
Definition: MJD.h:27
double right_ascension
The right ascension of the source in radians.
Definition: Mount.h:75

Generated using doxygen 1.8.17