Last change
on this file since 745 was 738, checked in by tbretz, 24 years ago |
*** empty log message ***
|
-
Property svn:executable
set to
*
|
File size:
1.3 KB
|
Line | |
---|
1 | #ifndef MCOSY_H
|
---|
2 | #define MCOSY_H
|
---|
3 |
|
---|
4 | #include "coord.h"
|
---|
5 | #include "msgqueue.h"
|
---|
6 | #include "network.h"
|
---|
7 |
|
---|
8 | #define kDEG ((char)0xb0) // Linux 'ø'
|
---|
9 |
|
---|
10 | #define WM_PRESET 0x1000
|
---|
11 | #define WM_POSITION 0x1001
|
---|
12 | #define WM_TRACK 0x1002
|
---|
13 | #define WM_STOP 0x1003
|
---|
14 | #define WM_POLARIS 0x1004
|
---|
15 |
|
---|
16 | class ShaftEncoder;
|
---|
17 | class Macs;
|
---|
18 | class MGCosy;
|
---|
19 |
|
---|
20 | class MCosy : public Network, public MsgQueue
|
---|
21 | {
|
---|
22 | private:
|
---|
23 | ShaftEncoder *fAlt1;
|
---|
24 | ShaftEncoder *fAlt2;
|
---|
25 | ShaftEncoder *fAz;
|
---|
26 |
|
---|
27 | Macs *fMac1;
|
---|
28 | Macs *fMac2;
|
---|
29 |
|
---|
30 | MGCosy *fWin;
|
---|
31 |
|
---|
32 | pthread_t *fTxThrd;
|
---|
33 |
|
---|
34 | ZdAz fOffset; // Tracking Offset between SE and calc-pos [re]
|
---|
35 | RaDec fRaDec; // Position to track
|
---|
36 | int fTracking; // Flag for present tracking action
|
---|
37 |
|
---|
38 | static void *MapTalkThread(void *arg);
|
---|
39 |
|
---|
40 | ZdAz GetSePos(); // [se]
|
---|
41 | ZdAz GetRePos();
|
---|
42 |
|
---|
43 | void TalkThread();
|
---|
44 | int SetPosition(const ZdAz &dst);
|
---|
45 |
|
---|
46 | void TerminateApp();
|
---|
47 |
|
---|
48 | void TrackPosition(const RaDec &dst); // ra, dec [rad]
|
---|
49 |
|
---|
50 | int StopWaitingForSDO();
|
---|
51 |
|
---|
52 | public:
|
---|
53 | MCosy(const char *dev, const int baud, ostream &out=cout);
|
---|
54 | ~MCosy();
|
---|
55 |
|
---|
56 | void Start();
|
---|
57 | void Stop();
|
---|
58 |
|
---|
59 | void *Proc(int msg, void *mp);
|
---|
60 |
|
---|
61 | static ZdAz CorrectTarget(const ZdAz &src, const ZdAz &dst);
|
---|
62 | static ZdAz RaDec2ZdAz(const double mjd, const RaDec &pos, const RaDec &pm=RaDec(0,0));
|
---|
63 | };
|
---|
64 |
|
---|
65 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.