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

Last change on this file since 5877 was 4865, checked in by rwagner, 20 years ago
*** empty log message ***
File size: 3.4 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 *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 *fCaosWrite;
70 MGPopupMenu *fCaosPrint;
71 MGPopupMenu *fCaosAnalyse;
72 MGPopupMenu *fCaOs;
73
74 MGCoordinates *fCRaDec;
75 MGCoordinates *fCZdAz;
76
77 MGCoordinates *fPZdAz;
78 MGCoordinates *fDZdAz;
79 MGCoordinates *fSZdAz;
80
81 TGTextEntry *fPixSize;
82 TGTextEntry *fAngle;
83
84 TGLabel *fFps;
85 TGLabel *fPosZoom;
86 TGLabel *fSkyBright;
87
88 TGButton *fTPoint;
89
90 ZdAz fPos;
91 ZdAz fD;
92
93 StarCatalog *fSao;
94 MCosy *fCosy;
95 MCaos *fCaos;
96 MCaos *fStargCaos;
97 // MStargLeds *fStargLeds;
98 MStargHistograms *fStargHistograms;
99
100 RaDec *fRaDec;
101
102 TTimer *fTimer;
103 MTime fTime;
104
105 ofstream *fOutTp;
106
107 Int_t fDx;
108 Int_t fDy;
109
110 byte fIntRate;
111 int fWrtRate;
112
113 UInt_t fStatus;
114 Double_t fLastBright;
115
116 void SetPixSize(const double pixsize);
117 void Toggle(MGPopupMenu *p, UInt_t id);
118 //void GetCoordinates();
119 bool CalcTrackingError(Leds &, MStarList &, ZdAz &, MTime &);
120 //void CalcTrackingError(Leds &, MStarList &);
121 ZdAz TrackingError(TArrayF &alt, TArrayF &az, TArrayF &mag) const;
122 bool Interpolate(const unsigned long n, byte *img) const;
123 ZdAz FindStar(FilterLed &f, FilterLed &f2, Ring &center, MTime &t,
124 Double_t cut, Double_t box, Double_t scalefactor);
125
126 //void InitHists();
127 //void InitGraphs();
128 void InitGui(Int_t channel);
129
130 //void OpenFile();
131
132 //void ResetHists();
133 //void DisplayAnalysis();
134 void UpdatePosZoom();
135
136 Bool_t HandleTimer(TTimer *t);
137 //Bool_t HandleKey(Event_t* event);
138
139public:
140 MStarguider(MObservatory::LocationName_t obs, Int_t channel);
141 virtual ~MStarguider();
142
143 //void Update();
144
145 void Layout();
146 void CloseWindow();
147
148 Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
149
150 Bool_t HandleDoubleClick(Event_t *event);
151 //Bool_t HandleButton(Event_t *);
152
153 void SetPointingPosition(RaDec rd);
154 void SetCosy(MCosy *c) { fCosy = c; }
155
156 XY GetCoordinates() const;
157
158 //
159 // Execution of one frame - this function may be overloaded!
160 //
161 void ProcessFrame(const unsigned long n, byte *img, struct timeval *tm);
162
163 void Print(TString &str, Double_t deg) const;
164
165 ClassDef(MStarguider, 0)
166};
167
168#endif
169
170
Note: See TracBrowser for help on using the repository browser.