Changeset 6841 for trunk/MagicSoft/Cosy/tcpip
- Timestamp:
- 03/17/05 11:02:59 (20 years ago)
- Location:
- trunk/MagicSoft/Cosy/tcpip
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/tcpip/MCeCoCom.cc
r4865 r6841 32 32 // Remove the 30 tokens of the subsystem status 33 33 // table 12.1 p59 34 for (int i=0; i<3 0; i++)34 for (int i=0; i<31; i++) 35 35 str.Remove(0, str.First(' ')+1); 36 36 … … 38 38 float zd, az, dec, ra, temp, solar, wind, hum; 39 39 n=sscanf(str.Data(), 40 "%f %f %f %f %f %f %f %f %*f %*f % n",40 "%f %f %f %f %f %f %f %f %*f %*f %*s %*s %*s %*s %n", 41 41 &zd, &az, &dec, &ra, &temp, &solar, &wind, &hum, &len); 42 42 if (n!=8) … … 60 60 fWindSpeed = wind; 61 61 62 if (fWindSpeed> 30)62 if (fWindSpeed>50) 63 63 fAlarmCounter++; 64 64 else … … 136 136 if (fHumidity>80) 137 137 rc++; 138 if (fWindSpeed> 10)138 if (fWindSpeed>30) 139 139 rc++; 140 if (fWindSpeed> 20)140 if (fWindSpeed>40) 141 141 rc++; 142 if (fWindSpeed> 30)142 if (fWindSpeed>50) 143 143 rc++; 144 144 -
trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc
r4865 r6841 7 7 #include "MCosy.h" 8 8 #include "MString.h" 9 #include "Ring.h" 9 10 10 11 using namespace std; … … 62 63 //cout << "MDriveCom - TRACK... start." << endl; 63 64 fQueue->PostMsg(WM_TRACK, &rd, sizeof(rd)); 65 //cout << "MDriveCom - TRACK... done." << endl; 66 return true; 67 } 68 69 bool MDriveCom::CommandGRB(TString &str) 70 { 71 Double_t ra, dec; 72 if (!ReadPosition(str, ra, dec)) 73 { 74 cout << "ERROR - Reading position from GRB" << endl; 75 return false; 76 } 77 if (!str.IsNull()) 78 { 79 cout << "ERROR - Too many bytes in command GRB" << endl; 80 return false; 81 } 82 83 cout << "CC-COMMAND " << MTime(-1) << " GRB " << ra << "h " << dec << "d '" << str << "'" << endl; 84 85 ra *= 15; // h -> deg 86 87 RaDec rd[2] = { RaDec(ra, dec), RaDec(ra, dec) }; 88 89 //cout << "MDriveCom - TRACK... start." << endl; 90 fQueue->PostMsg(WM_GRB, &rd, sizeof(rd)); 64 91 //cout << "MDriveCom - TRACK... done." << endl; 65 92 return true; … … 113 140 if (cmd==(TString)"RADEC") 114 141 return CommandRADEC(str); 142 143 if (cmd==(TString)"GRB") 144 return CommandGRB(str); 115 145 116 146 if (cmd==(TString)"ZDAZ") … … 190 220 } 191 221 192 bool MDriveCom::SendStargReport(UInt_t stat, ZdAz miss )193 { 194 195 // miss [rad]222 bool MDriveCom::SendStargReport(UInt_t stat, ZdAz miss, ZdAz nompos, Ring center, Int_t n, Double_t bright, Double_t mjd) 223 { 224 // miss [deg] 225 // nompos [rad] 196 226 const MTime t(-1); 197 227 198 miss *= kRad2Deg; 228 miss *= 60; // [arcmin] 229 nompos *= kRad2Deg; // [deg] 199 230 200 231 // Set status flag … … 211 242 212 243 TString str; 213 str += txt.Print("%05.3f ", miss.Zd()); 214 str += txt.Print("%05.3f", miss.Az()); 244 str += txt.Print("%05.3f ", miss.Zd()); //[arcmin] 245 str += txt.Print("%05.3f ", miss.Az()); //[arcmin] 246 Print(str, nompos.Zd()); //[deg] 247 Print(str, nompos.Az()); //[deg] 248 str += txt.Print("%05.1f ", center.GetX()); //number 249 str += txt.Print("%05.1f ", center.GetY()); //number 250 str += txt.Print("%04d ", n); //number 251 str += txt.Print("%03.1f", bright); 252 str += txt.Print("%12.6f ", t.GetMjd()); // mjd 215 253 216 254 return Send("STARG-REPORT", str, kTRUE); -
trunk/MagicSoft/Cosy/tcpip/MDriveCom.h
r4865 r6841 9 9 class ZdAz; 10 10 class MsgQueue; 11 class Ring; 11 12 12 13 class MDriveCom : public MCeCoCom … … 22 23 23 24 bool CommandRADEC(TString &str); 25 bool CommandGRB(TString &str); 24 26 bool CommandZDAZ(TString &str); 25 27 … … 39 41 40 42 bool SendReport(UInt_t stat, RaDec rd, ZdAz so, ZdAz is, ZdAz er); 41 bool SendStargReport(UInt_t stat, ZdAz miss );43 bool SendStargReport(UInt_t stat, ZdAz miss, ZdAz nompos, Ring center, Int_t n, Double_t bright, Double_t mjd); 42 44 bool SendStatus(const char *stat); 43 45 };
Note:
See TracChangeset
for help on using the changeset viewer.