Changeset 2384 for trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc
- Timestamp:
- 10/15/03 17:28:35 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc
r2379 r2384 2 2 3 3 #include <iostream> 4 5 #include "coord.h" 6 #include "Slalib.h" 4 7 5 8 using namespace std; … … 31 34 return false; 32 35 } 36 37 void MDriveCom::Print(TString &str, Double_t deg) const 38 { 39 Char_t sgn; 40 UShort_t d, m, s; 41 42 Slalib::Deg2Dms(deg, sgn, d, m, s); 43 44 str += Form("%c %03d %02d %03d ", sgn, d, m, s); 45 } 46 47 bool MDriveCom::SendReport(UInt_t stat, RaDec rd, ZdAz so, ZdAz is, ZdAz er) 48 { 49 // so [rad] 50 // is [deg] 51 // er [rad] 52 53 so *= kRad2Deg; 54 er *= kRad2Deg; 55 56 // Set status flag 57 if (stat&kError) 58 SetStatus(0); 59 if (stat&kStopped) 60 SetStatus(1); 61 if (stat&kStopping || stat&kMoving) 62 SetStatus(3); 63 if (stat&kTracking) 64 SetStatus(4); 65 66 Timer t; 67 t.Now(); 68 69 TString str; 70 Print(str, rd.Ra()); // Ra 71 Print(str, rd.Dec()); // Dec 72 Print(str, 0); // HA 73 str += Form("%12.6f ", t.GetMjd()); // mjd 74 Print(str, so.Zd()); 75 Print(str, so.Az()); 76 Print(str, is.Zd()); 77 Print(str, is.Az()); 78 str += Form("%08.3f ", er.Zd()); 79 str += Form("%08.3f", er.Az()); 80 81 return Send(str); 82 }
Note:
See TracChangeset
for help on using the changeset viewer.