Stellarium 0.14.3
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(double hasOAG READ hasOAG WRITE setHasOAG)
42  Q_PROPERTY(double prismHeight READ prismHeight WRITE setPrismHeight)
43  Q_PROPERTY(double prismWidth READ prismWidth WRITE setPrismWidth)
44  Q_PROPERTY(double prismDistance READ prismDistance WRITE setPrismDistance)
45  Q_PROPERTY(double prismPosAngle READ prismPosAngle WRITE setPrismPosAngle)
46 public:
47  CCD();
48  Q_INVOKABLE CCD(const QObject& other);
49  virtual ~CCD();
50  static CCD* ccdFromSettings(QSettings* theSettings, int ccdIndex);
51  void writeToSettings(QSettings * settings, const int index);
52  static CCD* ccdModel();
53 
54  QString name() const;
55  void setName(QString name);
56  int getCCDID();
57  int resolutionX() const;
58  void setResolutionX(int resolution);
59  int resolutionY() const;
60  void setResolutionY(int resolution);
61  double chipWidth() const;
62  void setChipWidth(double width);
63  double chipHeight() const;
64  void setChipHeight(double height);
65  double pixelWidth() const;
66  void setPixelWidth(double width);
67  double pixelHeight() const;
68  void setPixelHeight(double height);
69  double chipRotAngle() const;
70  void setChipRotAngle(double angle);
71  bool hasOAG() const;
72  void setHasOAG(bool oag);
73  double prismDistance() const;
74  void setPrismDistance(double distance);
75  double prismHeight() const;
76  void setPrismHeight(double height);
77  double prismWidth() const;
78  void setPrismWidth(double width);
79  double prismPosAngle() const;
80  void setPrismPosAngle(double angle);
81 
86  double getActualFOVx(Telescope *telescope, Lens *lens) const;
87  double getActualFOVy(Telescope *telescope, Lens *lens) const;
88  double getInnerOAGRadius(Telescope *telescope, Lens *lens) const;
89  double getOuterOAGRadius(Telescope *telescope, Lens *lens) const;
90  double getOAGActualFOVx(Telescope *telescope, Lens *lens) const;
91  QMap<int, QString> propertyMap();
92 private:
93  QString m_name;
95  int m_resolutionX;
97  int m_resolutionY;
99  double m_chipWidth;
101  double m_chipHeight;
103  double m_pixelWidth;
105  double m_pixelHeight;
107  double m_chipRotAngle;
109  bool m_has_oag;
111  double m_oag_prismHeight;
113  double m_oag_prismWidth;
115  double m_oag_prismDistance;
117  double m_oag_prismPosAngle;
118 };
119 
120 
121 #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