Changeset 9522 for trunk/MagicSoft
- Timestamp:
- 12/01/09 10:57:14 (15 years ago)
- Location:
- trunk/MagicSoft/Cosy
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/Changelog
r9517 r9522 1 1 -*-*- END -*-*- 2 2009/12/01 Thomas Bretz 3 4 * catalog/SlaStars.h: 5 - fixed unit of GetZdAz 6 - added GetZdAzRad and GetRaDecRad 7 8 * main/MTracking.cc: 9 - fixed unit of fTrackPos calling sla.Set 10 - don't distribute ra/dec to starguider it seems to be responsible 11 for crashes 12 - fixed units of getting coordinates from slalib 13 - keep calculating a future position in the tracking loop 14 - for the moment set the observatory key explicitly 15 (Mars doesn't store it) 16 17 * tcpip/MDriveCom.cc: 18 - fixed the number of expected arguments in CELEST command 19 20 21 2 22 2009/10/21 Thomas Bretz 3 23 4 24 * catalog/SlaPlanets.[h,cc]: 5 25 - Now derives from SlaStars 6 - new function to get the current sky position of a celestial object 26 - new function to get the current sky position of a celestial 27 object 7 28 8 29 * catalog/SlaStars.[h,cc]: -
trunk/MagicSoft/Cosy/catalog/SlaStars.h
r9516 r9522 26 26 27 27 // const AltAz GetAltAz() const { return fAltAz*360/D2PI; } 28 const ZdAz GetZdAz() const { return ZdAz(TMath::Pi()/2-fAltAz.Alt(), fAltAz.Az())*TMath::DegToRad(); } 28 const ZdAz GetZdAz() const { return ZdAz(TMath::Pi()/2-fAltAz.Alt(), fAltAz.Az())/TMath::DegToRad(); } 29 const ZdAz GetZdAzRad() const { return ZdAz(TMath::Pi()/2-fAltAz.Alt(), fAltAz.Az()); } 29 30 const RaDec GetRaDec() const { return fRaDec/TMath::DegToRad(); } 31 const RaDec GetRaDecRad() const { return fRaDec; } 30 32 const double GetHourAngle() const { return fHourAngle; } 31 33 -
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()); -
trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc
r9516 r9522 138 138 Float_t dra, ddec; 139 139 Int_t n=sscanf(str.Data(), "%d %f %f %n", &id, &dra, &ddec, &len); 140 if (n!= 1)140 if (n!=3) 141 141 { 142 142 gLog << warn << "WARNING - Not enough argmuents (CELEST)." << endl;
Note:
See TracChangeset
for help on using the changeset viewer.