Stellarium 0.15.2
CCD.hpp
1 /*
2  * Copyright (C) 2010 Timothy Reaves
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
17  */
18 
19 #ifndef CCD_HPP_
20 #define CCD_HPP_
21 
22 #include <QObject>
23 #include <QString>
24 #include <QSettings>
25 
26 class Telescope;
27 class Lens;
28 
30 class CCD : public QObject
31 {
32  Q_OBJECT
33  Q_PROPERTY(QString name READ name WRITE setName)
34  Q_PROPERTY(int resolutionX READ resolutionX WRITE setResolutionX)
35  Q_PROPERTY(int resolutionY READ resolutionY WRITE setResolutionY)
36  Q_PROPERTY(double chipWidth READ chipWidth WRITE setChipWidth)
37  Q_PROPERTY(double chipHeight READ chipHeight WRITE setChipHeight)
38  Q_PROPERTY(double pixelWidth READ pixelWidth WRITE setPixelWidth)
39  Q_PROPERTY(double pixelHeight READ pixelHeight WRITE setPixelHeight)
40  Q_PROPERTY(double chipRotAngle READ chipRotAngle WRITE setChipRotAngle)
41  Q_PROPERTY(int binningX READ binningX WRITE setBinningX)
42  Q_PROPERTY(int binningY READ binningY WRITE setBinningY)
43  Q_PROPERTY(double hasOAG READ hasOAG WRITE setHasOAG)
44  Q_PROPERTY(double prismHeight READ prismHeight WRITE setPrismHeight)
45  Q_PROPERTY(double prismWidth READ prismWidth WRITE setPrismWidth)
46  Q_PROPERTY(double prismDistance READ prismDistance WRITE setPrismDistance)
47  Q_PROPERTY(double prismPosAngle READ prismPosAngle WRITE setPrismPosAngle)
48 
49 public:
50  CCD();
51  Q_INVOKABLE CCD(const QObject& other);
52  virtual ~CCD();
53  static CCD* ccdFromSettings(QSettings* theSettings, int ccdIndex);
54  void writeToSettings(QSettings * settings, const int index);
55  static CCD* ccdModel();
56 
57  QString name() const;
58  void setName(QString name);
59  int getCCDID();
60  int resolutionX() const;
61  void setResolutionX(int resolution);
62  int resolutionY() const;
63  void setResolutionY(int resolution);
64  double chipWidth() const;
65  void setChipWidth(double width);
66  double chipHeight() const;
67  void setChipHeight(double height);
68  double pixelWidth() const;
69  void setPixelWidth(double width);
70  double pixelHeight() const;
71  void setPixelHeight(double height);
72  double chipRotAngle() const;
73  void setChipRotAngle(double angle);
74  int binningX() const;
75  void setBinningX(int binning);
76  int binningY() const;
77  void setBinningY(int binning);
78  bool hasOAG() const;
79  void setHasOAG(bool oag);
80  double prismDistance() const;
81  void setPrismDistance(double distance);
82  double prismHeight() const;
83  void setPrismHeight(double height);
84  double prismWidth() const;
85  void setPrismWidth(double width);
86  double prismPosAngle() const;
87  void setPrismPosAngle(double angle);
88 
93  double getActualFOVx(Telescope *telescope, Lens *lens) const;
94  double getActualFOVy(Telescope *telescope, Lens *lens) const;
95  double getInnerOAGRadius(Telescope *telescope, Lens *lens) const;
96  double getOuterOAGRadius(Telescope *telescope, Lens *lens) const;
97  double getOAGActualFOVx(Telescope *telescope, Lens *lens) const;
98  QMap<int, QString> propertyMap();
99 private:
100  QString m_name;
102  int m_resolutionX;
104  int m_resolutionY;
106  double m_chipWidth;
108  double m_chipHeight;
110  double m_pixelWidth;
112  double m_pixelHeight;
114  double m_chipRotAngle;
116  int m_binningX;
118  int m_binningY;
120  bool m_has_oag;
122  double m_oag_prismHeight;
124  double m_oag_prismWidth;
126  double m_oag_prismDistance;
128  double m_oag_prismPosAngle;
129 };
130 
131 
132 #endif /* CCD_HPP_ */
double getActualFOVx(Telescope *telescope, Lens *lens) const
The formula for this calculation comes from the Yerkes observatory.
Definition: CCD.hpp:30
Definition: Lens.hpp:31