|
Last change
on this file since 845 was 808, checked in by tbretz, 25 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 | #define WM_WAIT 0x1005
|
|---|
| 16 |
|
|---|
| 17 | class ShaftEncoder;
|
|---|
| 18 | class Macs;
|
|---|
| 19 | class MGCosy;
|
|---|
| 20 |
|
|---|
| 21 | class MCosy : public Network, public MsgQueue
|
|---|
| 22 | {
|
|---|
| 23 | private:
|
|---|
| 24 | ShaftEncoder *fAlt1;
|
|---|
| 25 | ShaftEncoder *fAlt2;
|
|---|
| 26 | ShaftEncoder *fAz;
|
|---|
| 27 |
|
|---|
| 28 | Macs *fMac1;
|
|---|
| 29 | Macs *fMac2;
|
|---|
| 30 | Macs *fMac3;
|
|---|
| 31 |
|
|---|
| 32 | MGCosy *fWin;
|
|---|
| 33 |
|
|---|
| 34 | pthread_t *fTxThrd;
|
|---|
| 35 |
|
|---|
| 36 | ZdAz fOffset; // Tracking Offset between SE and calc-pos [re]
|
|---|
| 37 | RaDec fRaDec; // Position to track
|
|---|
| 38 | int fTracking; // Flag for present tracking action
|
|---|
| 39 |
|
|---|
| 40 | static void *MapTalkThread(void *arg);
|
|---|
| 41 |
|
|---|
| 42 | ZdAz GetSePos(); // [se]
|
|---|
| 43 | ZdAz GetRePos();
|
|---|
| 44 |
|
|---|
| 45 | void TalkThread();
|
|---|
| 46 | int SetPosition(const ZdAz &dst);
|
|---|
| 47 |
|
|---|
| 48 | void TerminateApp();
|
|---|
| 49 |
|
|---|
| 50 | void TrackPosition(const RaDec &dst); // ra, dec [rad]
|
|---|
| 51 |
|
|---|
| 52 | int StopWaitingForSDO();
|
|---|
| 53 |
|
|---|
| 54 | public:
|
|---|
| 55 | MCosy(const char *dev, const int baud, ostream &out=cout);
|
|---|
| 56 | ~MCosy();
|
|---|
| 57 |
|
|---|
| 58 | void Start();
|
|---|
| 59 | void Stop();
|
|---|
| 60 |
|
|---|
| 61 | void *Proc(int msg, void *mp);
|
|---|
| 62 |
|
|---|
| 63 | static ZdAz CorrectTarget(const ZdAz &src, const ZdAz &dst);
|
|---|
| 64 | // static ZdAz RaDec2ZdAz(const double mjd, const RaDec &pos, const RaDec &pm=RaDec(0,0));
|
|---|
| 65 | };
|
|---|
| 66 |
|
|---|
| 67 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.