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
20class Mount : public Reference::Able
21{
22
23public:
24
26 Mount ();
27
29 virtual ~Mount ();
30
32 void set_source_coordinates (const sky_coord& coords);
33
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
64protected:
65
68
71
73 double latitude;
74
76 double longitude;
77
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
Class for representing modified Julian dates with high precision.
Definition MJD.h:23
Matrix< 3, 3, double > observatory_basis
Basis pointing to observatory in celestial reference frame.
Definition Mount.h:91
virtual double get_vertical() const =0
Get the vertical angle (rotation about the line of sight)
double get_local_sidereal_time() const
Get the LST in radians.
Definition Mount.C:96
double get_hour_angle() const
Get the hour_angle in radians.
Definition Mount.C:82
double lst
The LST in radians.
Definition Mount.h:82
void set_observatory_longitude(double longitude)
Set the longitude of the observatory in radians East of Greenwich.
Definition Mount.C:47
double latitude
The latitude of the observatory in radians.
Definition Mount.h:73
Matrix< 3, 3, double > source_basis
Basis pointing to source in celestial reference frame.
Definition Mount.h:88
virtual std::string get_name() const =0
Get the name of the mount.
virtual ~Mount()
Destructor.
Definition Mount.C:23
void set_source_coordinates(const sky_coord &coords)
Set the coordinates of the source.
Definition Mount.C:27
double right_ascension
The right ascension of the source in radians.
Definition Mount.h:70
void set_local_sidereal_time(double rad)
Set the LST in radians.
Definition Mount.C:89
void set_hour_angle(double rad)
Set the hour_angle in radians.
Definition Mount.C:75
virtual void build() const
Lazily evaluate lst and hour_angle.
Definition Mount.C:102
double declination
The declination of the source in radians.
Definition Mount.h:67
void set_epoch(const MJD &epoch)
Set the epoch in Modified Julian Days.
Definition Mount.C:59
MJD epoch
The epoch.
Definition Mount.h:79
Mount()
Default constructor.
Definition Mount.C:15
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:156
double longitude
The latitude of the observatory in radians East of Greenwich.
Definition Mount.h:76
void set_observatory_latitude(double latitude)
Set the latitude of the observatory in radians.
Definition Mount.C:35
bool get_built() const
Return true when outputs reflect inputs.
Definition Mount.C:150
double hour_angle
The hour angle in radians.
Definition Mount.h:85
Manages Reference::To references to the instance.
Definition ReferenceAble.h:35
Class for sky coordinates.
Definition sky_coord.h:20

Generated using doxygen 1.14.0