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

Last change on this file since 4580 was 4076, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 1.8 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 MAstroCatalog *fAstro;
28
29 double fPixSize; // [rad/pix] size of one pixel
30 double fSinAngle;
31 double fCosAngle;
32
33 float fLimitMag; // [M] limiting magnitude for display
34
35 AltAz fAltAz; // [rad]
36 RaDec fRaDec; // [rad]
37
38 static void DrawCross(byte *img, const int x, const int y);
39 static void DrawCircle(int color, byte *img, int xx, int yy, int size);
40
41 void SetRaDec(const RaDec &radec);
42 void SetAltAz(const AltAz &altaz);
43
44public:
45 StarCatalog(MObservatory::LocationName_t key);
46 virtual ~StarCatalog();
47
48 void GetImg(byte *img, byte *cimg, MStarList &list) const;
49 void PaintImg(unsigned char *buf, int w, int h);
50
51 const AltAz GetAltAz() const { return fAltAz*kRad2Deg; }
52 const ZdAz GetZdAz() const { return ZdAz(kPiDiv2-fAltAz.Alt(), fAltAz.Az())*kRad2Deg; }
53 const RaDec GetRaDec() const { return fRaDec*kRad2Deg; }
54
55 void SetPixSize(const double pixsize);
56 void SetLimitMag(const float mag);
57 void SetRotationAngle(const float angle) { fSinAngle = sin(angle/kRad2Deg); fCosAngle = cos(angle/kRad2Deg); }
58 void Reload();
59
60 double GetPixSize() const;
61
62 AltAz CalcAltAzFromPix(Double_t pixx, Double_t pixy) const;
63
64 virtual void SetMjd(double mjd);
65
66 void SetPointing(double mjd, const RaDec &radec)
67 {
68 SetMjd(mjd); SetRaDec(radec);
69 }
70
71 void CalcStars(MStarList &list) const;
72 static void DrawStars(MStarList &list, byte *img);
73
74 ClassDef(StarCatalog, 0)
75};
76
77#endif
Note: See TracBrowser for help on using the repository browser.