Changeset 9522 for trunk/MagicSoft/Cosy/main
- Timestamp:
- 12/01/09 10:57:14 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/main/MTracking.cc
r9516 r9522 219 219 { 220 220 if (fTrackType<0) 221 sla.Set(fTrackPos );221 sla.Set(fTrackPos/TMath::DegToRad()); 222 222 else 223 223 sla.SetPlanet((ePlanets_t)fTrackType); 224 224 225 if (fCosy->fStarguider) 226 fCosy->fStarguider->SetPointingPosition(sla.GetRaDec()); 225 // if (fCosy->fStarguider) 226 // fCosy->fStarguider->SetPointingPosition(sla.GetRaDec()); 227 228 // gLog << all << "=====> " << (int)(&sla==&fSlalib) << " " << fTrackType << " MJD=" << Form("%.13f", sla.GetMjd()) << " HA=" << sla.GetHourAngle() << " Alpha=" << sla.GetAlpha() << " fTrackPos.Ra()=" << fTrackPos.Ra() << " fTrackPos.Dec()=" << fTrackPos.Dec() << " Alt=" << sla.GetZdAzRad().Zd() << " Az=" << sla.GetZdAzRad().Az() << endl; 227 229 } 228 230 … … 232 234 UpdateSlalib(fSlalib); 233 235 234 fCosy->fRaDec = fSlalib.GetRaDec ();236 fCosy->fRaDec = fSlalib.GetRaDecRad(); 235 237 fCosy->fHourAngle = fSlalib.GetHourAngle(); 236 238 } … … 244 246 bool MTracking::Move() 245 247 { 246 const RaDec &dst = fSlalib.GetRaDec(); 247 248 ZdAz dest = fSlalib.GetZdAz();//fSlalib.CalcZdAz(dst); 249 248 const RaDec &dst = fSlalib.GetRaDecRad(); 249 250 ZdAz dest = fSlalib.GetZdAzRad();//fSlalib.CalcZdAz(dst); 251 252 if (fTrackType<0) 253 gLog << all << fSlalib.GetTime() << ": Tracking Planet" << endl; 250 254 gLog << all << fSlalib.GetTime() << ": Track Position " << dst.Ra()*kRad2Deg/15 << "h, " << dst.Dec()*kRad2Deg <<"deg" << endl; 251 255 … … 275 279 void MTracking::TrackPosition(const RaDec &dst) 276 280 { 281 282 // gLog << all << "=====> dst.Ra()=" << dst.Ra() << " dst.Dec()=" << dst.Dec() << " (deg?)" << endl; 283 277 284 fTrackPos = dst; 278 285 fTrackType = -1; … … 317 324 //fCosy->fRaDec = fSlalib.GetRaDec(); 318 325 319 ZdAz pos = fSlalib.GetZdAz ();//fSlalib.CalcZdAz(fSlalib.GetRaDec());326 ZdAz pos = fSlalib.GetZdAzRad();//fSlalib.CalcZdAz(fSlalib.GetRaDec()); 320 327 321 328 // Some output … … 355 362 // Request Target position for Now+dt 356 363 // 357 UpdateSlalib( );364 UpdateSlalib(dt); 358 365 //fCosy->fRaDec = fSlalib.GetRaDec(); 359 366 … … 361 368 // Request nominal position for this time in the future (To+dt) 362 369 // 363 const ZdAz pointing = fSlalib.GetZdAz (); //fSlalib.CalcZdAz(fSlalib.GetRaDec()); // [rad]370 const ZdAz pointing = fSlalib.GetZdAzRad(); //fSlalib.CalcZdAz(fSlalib.GetRaDec()); // [rad] 364 371 ZdAz dest = fCosy->AlignTrackingPos(pointing); // fix ambiguity 365 372 … … 452 459 gLog << inf2 << "- Tracking Thread started (" << MTime(-1) << ")" << endl; 453 460 454 SlaPlanets sla(fSlalib.GetObservatoryKey()); 461 //SlaPlanets sla(fSlalib.GetObservatoryKey()); 462 SlaPlanets sla(MObservatory::kMagic1); 463 // gLog << all << "====> KEYS " << (int)fSlalib.GetObservatoryKey() << " " << (int)sla.GetObservatoryKey() << " " << (int)fCosy->fObservatory << endl; 455 464 456 465 UpdateSlalib(sla); … … 498 507 UpdateSlalib(sla, mjdzd); 499 508 500 ZdAz dummy = sla.GetZdAz ();//sla.CalcZdAz(radec, mjdzd);509 ZdAz dummy = sla.GetZdAzRad();//sla.CalcZdAz(radec, mjdzd); 501 510 dummy = fCosy->AlignTrackingPos(dummy); 502 511 fCosy->fZdAzSoll.Zd(dummy.Zd()); … … 509 518 UpdateSlalib(sla, mjdaz); 510 519 511 ZdAz dummy = sla.GetZdAz ();//sla.CalcZdAz(radec, mjdaz);520 ZdAz dummy = sla.GetZdAzRad();//sla.CalcZdAz(radec, mjdaz); 512 521 dummy = fCosy->AlignTrackingPos(dummy); 513 522 fCosy->fZdAzSoll.Az(dummy.Az());
Note:
See TracChangeset
for help on using the changeset viewer.