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

Last change on this file since 7772 was 7707, checked in by Daniela Dorner, 19 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 ToggleStargAnalysis();
127 void ToggleFindStar();
128 void ToggleStarguider();
129 void ToggleCaosFilter();
130 //void GetCoordinates();
131 Int_t CalcTrackingError(Leds &, MStarList &, ZdAz &, MTime &, double &bright, Int_t &num);
132 //void CalcTrackingError(Leds &, MStarList &);
133 ZdAz TrackingError(TArrayF &alt, TArrayF &az, TArrayF &mag, Int_t &num) const;
134 bool Interpolate(const unsigned long n, byte *img) const;
135
136 XY FindRoqueLamp(FilterLed &f, FilterLed &f2, Ring &CameraCenter, MTime &t,
137 Double_t cut, Double_t box, XY SearchCenter);
138
139 ZdAz FindStar(FilterLed &f, FilterLed &f2, Ring &center, MTime &t,
140 Double_t cut, Double_t box, Double_t scalefactor);
141
142 //void InitHists();
143 //void InitGraphs();
144 void InitGui(Int_t channel);
145
146 //void OpenFile();
147
148 //void ResetHists();
149 //void DisplayAnalysis();
150 void UpdatePosZoom();
151
152 Bool_t HandleTimer(TTimer *t);
153 //Bool_t HandleKey(Event_t* event);
154
155public:
156 MStarguider(MObservatory::LocationName_t obs, Int_t channel);
157 virtual ~MStarguider();
158
159 //void Update();
160
161 void Layout();
162 void CloseWindow();
163
164 Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
165
166 Bool_t HandleDoubleClick(Event_t *event);
167 //Bool_t HandleButton(Event_t *);
168
169 void SetPointingPosition(RaDec rd);
170 void SetCosy(MCosy *c) { fCosy = c; }
171
172 XY GetCoordinates() const;
173
174 //
175 // Execution of one frame - this function may be overloaded!
176 //
177 void ProcessFrame(const unsigned long n, byte *img, struct timeval *tm);
178
179 void Print(TString &str, Double_t deg) const;
180
181 ClassDef(MStarguider, 0)
182};
183
184#endif
185
186
Note: See TracBrowser for help on using the repository browser.