~georg-zotti/stellarium/refraction

« back to all changes in this revision

Viewing changes to plugins/Oculars/src/CCD.hpp

  • Committer: Georg Zotti
  • Date: 2011-02-18 12:37:55 UTC
  • mfrom: (4821.1.54 trunk)
  • Revision ID: georg.zotti@univie.ac.at-20110218123755-9wcuyyah7g0m1qs7
Merge-update from Trunk R4875

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * portions Copyright (C) 2010 Bernhard Reutner-Fischer
3
 
 * portions Copyright (C) 2010 Timothy Reaves
 
2
 * Copyright (C) 2010 Timothy Reaves
4
3
 *
5
4
 * This program is free software; you can redistribute it and/or
6
5
 * modify it under the terms of the GNU General Public License
32
31
        Q_PROPERTY(QString name READ name WRITE setName)
33
32
        Q_PROPERTY(int resolutionX READ resolutionX WRITE setResolutionX)
34
33
        Q_PROPERTY(int resolutionY READ resolutionY WRITE setResolutionY)
35
 
        Q_PROPERTY(float chipWidth READ chipWidth WRITE setChipWidth)
36
 
        Q_PROPERTY(float chipHeight READ chipHeight WRITE setChipHeight)
37
 
        Q_PROPERTY(float pixelWidth READ pixelWidth WRITE setPixelWidth)
38
 
        Q_PROPERTY(float pixelHeight READ pixelHeight WRITE setPixelHeight)
 
34
        Q_PROPERTY(double chipWidth READ chipWidth WRITE setChipWidth)
 
35
        Q_PROPERTY(double chipHeight READ chipHeight WRITE setChipHeight)
 
36
        Q_PROPERTY(double pixelWidth READ pixelWidth WRITE setPixelWidth)
 
37
        Q_PROPERTY(double pixelHeight READ pixelHeight WRITE setPixelHeight)
39
38
public:
40
39
        CCD();
41
40
        Q_INVOKABLE CCD(const QObject& other);
46
45
        QString name() const;
47
46
        void setName(QString name);
48
47
        int getCCDID();
49
 
        int resolutionX()  const;
 
48
        int resolutionX() const;
50
49
        void setResolutionX(int resolution);
51
 
        int resolutionY()  const;
 
50
        int resolutionY() const;
52
51
        void setResolutionY(int resolution);
53
 
        float chipWidth()  const;
54
 
        void setChipWidth(float width);
55
 
        float chipHeight()  const;
56
 
        void setChipHeight(float height);
57
 
        float pixelWidth()  const;
58
 
        void setPixelWidth(float width);
59
 
        float pixelHeight()  const;
60
 
        void setPixelHeight(float height);
 
52
        double chipWidth() const;
 
53
        void setChipWidth(double width);
 
54
        double chipHeight() const;
 
55
        void setChipHeight(double height);
 
56
        double pixelWidth() const;
 
57
        void setPixelWidth(double width);
 
58
        double pixelHeight() const;
 
59
        void setPixelHeight(double height);
61
60
 
62
 
        float getActualFOVx(Telescope *telescope) const;
63
 
        float getActualFOVy(Telescope *telescope) const;
 
61
        /**
 
62
          * The formula for this calculation comes from the Yerkes observatory.
 
63
          * fov degrees = 2PI/360degrees * chipDimension mm / telescope FL mm
 
64
          */
 
65
        double getActualFOVx(Telescope *telescope) const;
 
66
        double getActualFOVy(Telescope *telescope) const;
64
67
        QMap<int, QString> propertyMap();
65
68
private:
66
 
        int ccdID;
67
69
        QString m_name;
68
70
        //! total resolution width in pixels
69
71
        int m_resolutionX;
70
72
        //! total resolution height in pixels
71
73
        int m_resolutionY;
72
74
        //! chip width in millimeters
73
 
        float m_chipWidth;
 
75
        double m_chipWidth;
74
76
        //! chip height in millimeters
75
 
        float m_chipHeight;
 
77
        double m_chipHeight;
76
78
        //! height of 1 pixel in micron (micrometer)
77
 
        float m_pixelWidth;
 
79
        double m_pixelWidth;
78
80
        //! width of 1 pixel in micron (micrometer)
79
 
        float m_pixelHeight;
 
81
        double m_pixelHeight;
80
82
};
81
83
 
82
84