Changeset 8825 for trunk/MagicSoft/Cosy/main
- Timestamp:
- 01/24/08 09:26:36 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/main/MTracking.cc
r8814 r8825 1 1 #include "MTracking.h" 2 3 #include "MLogManip.h" 2 4 3 5 #include "macs.h" … … 52 54 // 53 55 if (fCosy->HasError()) 54 gLog << "Errorwhile requesting re pos from Macs (SDO #6004)" << endl;56 gLog << err << "ERROR - while requesting re pos from Macs (SDO #6004)" << endl; 55 57 56 58 return false; … … 93 95 // 94 96 if (fCosy->HasError()) 95 gLog << "Errorwhile setting tracking velocity (SDO #3006)" << endl;97 gLog << err << "ERROR - while setting tracking velocity (SDO #3006)" << endl; 96 98 97 99 return kFALSE; … … 223 225 { 224 226 vt->Az(maxtrack*vraz*4*sgn(vcalc.Az())); 225 gLog << "Warning: Azimuth speed limit (" << maxtrack*100 << "%) exceeded (" << fabs(vt->Az()) << " > " << maxtrack*vraz << ")... limited." << endl;227 gLog << warn << "Warning: Azimuth speed limit (" << maxtrack*100 << "%) exceeded (" << fabs(vt->Az()) << " > " << maxtrack*vraz << ")... limited." << endl; 226 228 gLog << "Vcalc: " << vcalc.Zd() << " " << vcalc.Az() << "re/min" <<endl; 227 229 rc=kTRUE; … … 230 232 { 231 233 vt->Zd(maxtrack*vrzd*4*sgn(vcalc.Zd())); 232 gLog << "Warning: Altitude speed limit (" << maxtrack*100 << "%) exceeded (" << fabs(vt->Zd()) <<" > " << maxtrack*vrzd << ")... limited." << endl;234 gLog << warn << "Warning: Altitude speed limit (" << maxtrack*100 << "%) exceeded (" << fabs(vt->Zd()) <<" > " << maxtrack*vrzd << ")... limited." << endl; 233 235 gLog << "Vcalc: " << vcalc.Zd() << " " << vcalc.Az() << "re/min" <<endl; 234 236 rc=kTRUE; … … 247 249 { 248 250 // Conversion factor from se to re 249 const XY re = fCosy->kGearTot/fCosy->kResSE; //[re/se] 251 //const XY re = fCosy->kGearTot/fCosy->kResSE; //[re/se] 252 const XY re = Div(fCosy->kGearTot, fCosy->kResSE); //[re/se] 250 253 251 254 // Check wether moving direction has changed … … 329 332 ZdAz dest = sla.CalcZdAz(dst); 330 333 331 gLog << sla.GetTime() << ": Track Position " << dst.Ra()*kRad2Deg/15 << "h, " << dst.Dec()*kRad2Deg <<"deg" << endl;334 gLog << all << sla.GetTime() << ": Track Position " << dst.Ra()*kRad2Deg/15 << "h, " << dst.Dec()*kRad2Deg <<"deg" << endl; 332 335 333 336 // If the star is culminating behind the zenith (South) we want to … … 338 341 { 339 342 // align az from -180/180 to 0/360 340 gLog << "Star culminating behind zenith: Adding 360deg to Azimuth " << dest.Az()*kRad2Deg << endl;343 gLog << inf2 << "Star culminating behind zenith: Adding 360deg to Azimuth " << dest.Az()*kRad2Deg << endl; 341 344 dest.Az(dest.Az() + TMath::TwoPi()); 342 345 } … … 347 350 if (!SetPosition(dest, kTRUE)) 348 351 { 349 gLog << "Error:Cannot start tracking, positioning failed." << endl;352 gLog << err << "ERROR - Cannot start tracking, positioning failed." << endl; 350 353 return; 351 354 } … … 385 388 386 389 // Some output 387 XY xy( Rad2Deg(dst.Ra())*24/360, Rad2Deg(dst.Dec()));388 gLog << sla.GetTime() << " - Start Tracking: Ra=" << xy.X() << "h Dec=";390 XY xy(TMath::RadToDeg()*dst.Ra()*24/360, TMath::RadToDeg()*dst.Dec()); 391 gLog << all << sla.GetTime() << " - Start Tracking: Ra=" << xy.X() << "h Dec="; 389 392 gLog << xy.Y() << "\xb0 @ Zd=" << pos.Zd()*kRad2Deg <<"deg Az=" << pos.Az()*kRad2Deg <<"deg" << endl; 390 393 … … 469 472 if (LimitSpeed(&v, sla)) 470 473 { 471 gLog << "vt: " << v.Zd() << " " << v.Az() << "re/min" << endl;474 gLog << dbg << "vt: " << v.Zd() << " " << v.Az() << "re/min" << endl; 472 475 gLog << "Dest: " << dest.Zd() << " " << dest.Az() << endl; 473 476 } … … 487 490 if (vt.Zd()>.9*fCosy->fMac1->GetVelRes() || vt.Az()>.9*fCosy->fMac2->GetVelRes()) 488 491 { 489 gLog << "Error:Tracking speed faster than 90% of possible maximum velocity." << endl;492 gLog << err << "ERROR - Tracking speed faster than 90% of possible maximum velocity." << endl; 490 493 break; 491 494 } … … 532 535 fCosy->StopMovement(); 533 536 534 gLog << sla.GetTime() << " - Tracking stopped @ Zd=";537 gLog << all << sla.GetTime() << " - Tracking stopped @ Zd="; 535 538 gLog << fCosy->fZdAzSoll.Zd()*TMath::RadToDeg() <<"deg Az="; 536 539 gLog << fCosy->fZdAzSoll.Az()*TMath::RadToDeg() <<"deg" << endl; … … 548 551 return 3; 549 552 550 gLog << "- Tracking Thread started (" << MTime(-1) << ")" << endl;553 gLog << inf2 << "- Tracking Thread started (" << MTime(-1) << ")" << endl; 551 554 552 555 //const XY re2se = fCosy->kGearTot/fCosy->kResSE; //[re/se] … … 648 651 } 649 652 650 gLog << "- Tracking Thread done. (" << MTime(-1) << ")" << endl;653 gLog << inf2 << "- Tracking Thread done. (" << MTime(-1) << ")" << endl; 651 654 return 0; 652 655 }
Note:
See TracChangeset
for help on using the changeset viewer.