source: trunk/MagicSoft/Cosy/catalog/StarCatalog.h@ 6012

Last change on this file since 6012 was 4865, checked in by rwagner, 20 years ago
*** empty log message ***
File size: 2.0 KB
Line 
1#ifndef STARCATALOG_H
2#define STARCATALOG_H
3
4#ifndef ROOT_TROOT
5#include <TROOT.h>
6#endif
7#ifndef ROOT_GuiTypes
8#include <GuiTypes.h>
9#endif
10#ifndef SAOFILE_H
11#include "SaoFile.h"
12#endif
13#ifndef SLASTARS_H
14#include "SlaStars.h"
15#endif
16
17#include "coord.h"
18
19typedef unsigned char byte;
20
21class MStarList;
22class MAstroCatalog;
23
24class StarCatalog : public SlaStars
25{
26private:
27
28 int fW;
29 int fH;
30
31
32 MAstroCatalog *fAstro;
33
34 double fPixSize; // [rad/pix] size of one pixel
35 double fSinAngle;
36 double fCosAngle;
37
38 float fLimitMag; // [M] limiting magnitude for display
39
40 AltAz fAltAz; // [rad]
41 RaDec fRaDec; // [rad]
42
43 static void DrawCross(byte *img, const int x, const int y);
44 static void DrawCircle(int color, byte *img, int xx, int yy, int size);
45
46 void SetRaDec(const RaDec &radec);
47 void SetAltAz(const AltAz &altaz);
48
49 int fBox;
50
51public:
52 StarCatalog(MObservatory::LocationName_t key);
53 virtual ~StarCatalog();
54
55 void GetImg(byte *img, byte *cimg, MStarList &list) const;
56 void PaintImg(unsigned char *buf, int w, int h);
57
58 const AltAz GetAltAz() const { return fAltAz*kRad2Deg; }
59 const ZdAz GetZdAz() const { return ZdAz(kPiDiv2-fAltAz.Alt(), fAltAz.Az())*kRad2Deg; }
60 const RaDec GetRaDec() const { return fRaDec*kRad2Deg; }
61
62 void SetPixSize(const double pixsize);
63 void SetLimitMag(const float mag);
64 void SetRotationAngle(const float angle) { fSinAngle = sin(angle/kRad2Deg); fCosAngle = cos(angle/kRad2Deg); }
65 void Reload();
66
67 double GetPixSize() const;
68
69 AltAz CalcAltAzFromPix(Double_t pixx, Double_t pixy) const;
70
71 virtual void SetMjd(double mjd);
72
73 void SetPointing(double mjd, const RaDec &radec)
74 {
75 SetMjd(mjd); SetRaDec(radec);
76 }
77
78 void CalcStars(MStarList &list, int xc, int yc, int xo, int yo) const;
79 void CalcStars(MStarList &list);
80 static void DrawStars(MStarList &list, byte *img);
81
82 void SetBox(int box) { fBox = box; }
83
84 ClassDef(StarCatalog, 0)
85};
86
87#endif
Note: See TracBrowser for help on using the repository browser.