source: trunk/MagicSoft/Cosy/main/MStarguider.h@ 7788

Last change on this file since 7788 was 7785, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 3.9 KB
Line 
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
18class TArrayF;
19class TGLabel;
20class TGButton;
21class TString;
22
23class TTimer;
24
25class MGMenuBar;
26class MGPopupMenu;
27class TGTextEntry;
28
29class PixGetter;
30
31class MGImage;
32class MGCoordinates;
33
34class StarCatalog;
35class MStarList;
36class MCosy;
37class MCaos;
38// class MStargLeds;
39class MStargHistograms;
40class MGStarg;
41class FilterLed;
42class Ring;
43
44class Leds;
45
46class MStarguider : public PixClient, public TGMainFrame
47{
48private:
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 *fMode;
61 MGPopupMenu *fWritePictures;
62 MGPopupMenu *fFileType;
63 MGPopupMenu *fWriteType;
64 MGPopupMenu *fWriteRate;
65 MGPopupMenu *fInterpol;
66 MGPopupMenu *fSetup;
67 MGPopupMenu *fLimMag;
68 MGPopupMenu *fChannel;
69
70 MGPopupMenu *fOperations;
71
72 MGPopupMenu *fCaosWrite;
73 MGPopupMenu *fCaosPrint;
74 MGPopupMenu *fCaosAnalyse;
75 MGPopupMenu *fCaOs;
76
77 MGCoordinates *fCRaDec;
78 MGCoordinates *fCZdAz;
79
80 MGCoordinates *fPZdAz;
81 MGCoordinates *fDZdAz;
82 MGCoordinates *fSZdAz;
83
84 TGTextEntry *fPixSize;
85 TGTextEntry *fAngle;
86
87 TGLabel *fFps;
88 TGLabel *fPosZoom;
89 TGLabel *fSkyBright;
90
91 TGButton *fTPoint;
92 TGButton *fStargTPoint;
93
94 ZdAz fPos;
95 ZdAz fD;
96 AltAz fAltAzOffsetFromTp;
97
98 StarCatalog *fSao;
99 MCosy *fCosy;
100 MCaos *fCaos;
101 MCaos *fStargCaos;
102 // MStargLeds *fStargLeds;
103 MStargHistograms *fStargHistograms;
104
105 RaDec *fRaDec;
106
107 TTimer *fTimer;
108 MTime fTime;
109 MTime fTimeFromTp;
110
111 ofstream *fOutTp;
112 ofstream *fOutStargTp;
113 ofstream *fOutRq;
114
115 Int_t fDx;
116 Int_t fDy;
117
118 byte fIntRate;
119 int fWrtRate;
120
121 UInt_t fStatus;
122 Double_t fLastBright;
123
124 void SetPixSize(const double pixsize);
125 void Toggle(MGPopupMenu *p, UInt_t id);
126 void SwitchOff(MGPopupMenu *p, UInt_t id);
127 void ToggleStargAnalysis();
128 void ToggleFindStar();
129 void ToggleStarguider();
130 void ToggleCaosFilter();
131 //void GetCoordinates();
132 Int_t CalcTrackingError(Leds &, MStarList &, ZdAz &, MTime &, double &bright, Int_t &num);
133 //void CalcTrackingError(Leds &, MStarList &);
134 ZdAz TrackingError(TArrayF &alt, TArrayF &az, TArrayF &mag, Int_t &num) const;
135 bool Interpolate(const unsigned long n, byte *img) const;
136
137 XY FindRoqueLamp(FilterLed &f, FilterLed &f2, Ring &CameraCenter, MTime &t,
138 Double_t cut, Double_t box, XY SearchCenter);
139
140 ZdAz FindStar(FilterLed &f, FilterLed &f2, Ring &center, MTime &t,
141 Double_t cut, Double_t box, Double_t scalefactor);
142
143 //void InitHists();
144 //void InitGraphs();
145 void InitGui(Int_t channel);
146
147 //void OpenFile();
148
149 //void ResetHists();
150 //void DisplayAnalysis();
151 void UpdatePosZoom();
152
153 Bool_t HandleTimer(TTimer *t);
154 //Bool_t HandleKey(Event_t* event);
155
156public:
157 MStarguider(MObservatory::LocationName_t obs, Int_t channel);
158 virtual ~MStarguider();
159
160 //void Update();
161
162 void Layout();
163 void CloseWindow();
164
165 Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
166
167 Bool_t HandleDoubleClick(Event_t *event);
168 //Bool_t HandleButton(Event_t *);
169
170 void SetPointingPosition(RaDec rd);
171 void SetCosy(MCosy *c) { fCosy = c; }
172
173 XY GetCoordinates() const;
174
175 //
176 // Execution of one frame - this function may be overloaded!
177 //
178 void ProcessFrame(const unsigned long n, byte *img, struct timeval *tm);
179
180 void Print(TString &str, Double_t deg) const;
181
182 ClassDef(MStarguider, 0)
183};
184
185#endif
186
187
Note: See TracBrowser for help on using the repository browser.