1 | #ifndef COSY_MStarguider
|
---|
2 | #define COSY_MStarguider
|
---|
3 |
|
---|
4 | #include "PixClient.h"
|
---|
5 | #include "MGImage.h"
|
---|
6 | #include "coord.h"
|
---|
7 |
|
---|
8 | #ifndef MARS_MObservatory
|
---|
9 | #include "MObservatory.h"
|
---|
10 | #endif
|
---|
11 | #ifndef MARS_MTime
|
---|
12 | #include "MTime.h"
|
---|
13 | #endif
|
---|
14 | #ifndef MARS_MGList
|
---|
15 | #include "MGList.h"
|
---|
16 | #endif
|
---|
17 |
|
---|
18 | class TArrayF;
|
---|
19 | class TGLabel;
|
---|
20 | class TGButton;
|
---|
21 | class TString;
|
---|
22 |
|
---|
23 | class TTimer;
|
---|
24 |
|
---|
25 | class MGMenuBar;
|
---|
26 | class MGPopupMenu;
|
---|
27 | class TGTextEntry;
|
---|
28 |
|
---|
29 | class PixGetter;
|
---|
30 |
|
---|
31 | class MGImage;
|
---|
32 | class MGCoordinates;
|
---|
33 |
|
---|
34 | class StarCatalog;
|
---|
35 | class MStarList;
|
---|
36 | class MCosy;
|
---|
37 | class MCaos;
|
---|
38 | // class MStargLeds;
|
---|
39 | class MStargHistograms;
|
---|
40 | class MGStarg;
|
---|
41 | class FilterLed;
|
---|
42 | class Ring;
|
---|
43 |
|
---|
44 | class Leds;
|
---|
45 |
|
---|
46 | class MStarguider : public PixClient, public TGMainFrame
|
---|
47 | {
|
---|
48 | private:
|
---|
49 | PixGetter *fGetter;
|
---|
50 |
|
---|
51 | MGList *fList;
|
---|
52 |
|
---|
53 | MGMenuBar *fMenu;
|
---|
54 | MGImage *fImage;
|
---|
55 | MGImage *fZoomImage;
|
---|
56 |
|
---|
57 | MGStarg *fGStarg;
|
---|
58 |
|
---|
59 | MGPopupMenu *fDisplay;
|
---|
60 | MGPopupMenu *fWritePictures;
|
---|
61 | MGPopupMenu *fFileType;
|
---|
62 | MGPopupMenu *fWriteType;
|
---|
63 | MGPopupMenu *fWriteRate;
|
---|
64 | MGPopupMenu *fInterpol;
|
---|
65 | MGPopupMenu *fSetup;
|
---|
66 | MGPopupMenu *fLimMag;
|
---|
67 | MGPopupMenu *fChannel;
|
---|
68 |
|
---|
69 | MGPopupMenu *fOperations;
|
---|
70 |
|
---|
71 | MGPopupMenu *fCaosWrite;
|
---|
72 | MGPopupMenu *fCaosPrint;
|
---|
73 | MGPopupMenu *fCaosAnalyse;
|
---|
74 | MGPopupMenu *fCaOs;
|
---|
75 |
|
---|
76 | MGCoordinates *fCRaDec;
|
---|
77 | MGCoordinates *fCZdAz;
|
---|
78 |
|
---|
79 | MGCoordinates *fPZdAz;
|
---|
80 | MGCoordinates *fDZdAz;
|
---|
81 | MGCoordinates *fSZdAz;
|
---|
82 |
|
---|
83 | TGTextEntry *fPixSize;
|
---|
84 | TGTextEntry *fAngle;
|
---|
85 |
|
---|
86 | TGLabel *fFps;
|
---|
87 | TGLabel *fPosZoom;
|
---|
88 | TGLabel *fSkyBright;
|
---|
89 |
|
---|
90 | TGButton *fTPoint;
|
---|
91 |
|
---|
92 | ZdAz fPos;
|
---|
93 | ZdAz fD;
|
---|
94 |
|
---|
95 | StarCatalog *fSao;
|
---|
96 | MCosy *fCosy;
|
---|
97 | MCaos *fCaos;
|
---|
98 | MCaos *fStargCaos;
|
---|
99 | // MStargLeds *fStargLeds;
|
---|
100 | MStargHistograms *fStargHistograms;
|
---|
101 |
|
---|
102 | RaDec *fRaDec;
|
---|
103 |
|
---|
104 | TTimer *fTimer;
|
---|
105 | MTime fTime;
|
---|
106 |
|
---|
107 | ofstream *fOutTp;
|
---|
108 | ofstream *fOutRq;
|
---|
109 |
|
---|
110 | Int_t fDx;
|
---|
111 | Int_t fDy;
|
---|
112 |
|
---|
113 | byte fIntRate;
|
---|
114 | int fWrtRate;
|
---|
115 |
|
---|
116 | UInt_t fStatus;
|
---|
117 | Double_t fLastBright;
|
---|
118 |
|
---|
119 | void SetPixSize(const double pixsize);
|
---|
120 | void Toggle(MGPopupMenu *p, UInt_t id);
|
---|
121 | //void GetCoordinates();
|
---|
122 | bool CalcTrackingError(Leds &, MStarList &, ZdAz &, MTime &);
|
---|
123 | //void CalcTrackingError(Leds &, MStarList &);
|
---|
124 | ZdAz TrackingError(TArrayF &alt, TArrayF &az, TArrayF &mag) const;
|
---|
125 | bool Interpolate(const unsigned long n, byte *img) const;
|
---|
126 |
|
---|
127 | XY FindRoqueLamp(FilterLed &f, FilterLed &f2, Ring &CameraCenter, MTime &t,
|
---|
128 | Double_t cut, Double_t box, XY SearchCenter);
|
---|
129 |
|
---|
130 | ZdAz FindStar(FilterLed &f, FilterLed &f2, Ring ¢er, MTime &t,
|
---|
131 | Double_t cut, Double_t box, Double_t scalefactor);
|
---|
132 |
|
---|
133 | //void InitHists();
|
---|
134 | //void InitGraphs();
|
---|
135 | void InitGui(Int_t channel);
|
---|
136 |
|
---|
137 | //void OpenFile();
|
---|
138 |
|
---|
139 | //void ResetHists();
|
---|
140 | //void DisplayAnalysis();
|
---|
141 | void UpdatePosZoom();
|
---|
142 |
|
---|
143 | Bool_t HandleTimer(TTimer *t);
|
---|
144 | //Bool_t HandleKey(Event_t* event);
|
---|
145 |
|
---|
146 | public:
|
---|
147 | MStarguider(MObservatory::LocationName_t obs, Int_t channel);
|
---|
148 | virtual ~MStarguider();
|
---|
149 |
|
---|
150 | //void Update();
|
---|
151 |
|
---|
152 | void Layout();
|
---|
153 | void CloseWindow();
|
---|
154 |
|
---|
155 | Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
|
---|
156 |
|
---|
157 | Bool_t HandleDoubleClick(Event_t *event);
|
---|
158 | //Bool_t HandleButton(Event_t *);
|
---|
159 |
|
---|
160 | void SetPointingPosition(RaDec rd);
|
---|
161 | void SetCosy(MCosy *c) { fCosy = c; }
|
---|
162 |
|
---|
163 | XY GetCoordinates() const;
|
---|
164 |
|
---|
165 | //
|
---|
166 | // Execution of one frame - this function may be overloaded!
|
---|
167 | //
|
---|
168 | void ProcessFrame(const unsigned long n, byte *img, struct timeval *tm);
|
---|
169 |
|
---|
170 | void Print(TString &str, Double_t deg) const;
|
---|
171 |
|
---|
172 | ClassDef(MStarguider, 0)
|
---|
173 | };
|
---|
174 |
|
---|
175 | #endif
|
---|
176 |
|
---|
177 |
|
---|