Changeset 9439 for trunk/MagicSoft/Cosy/main/MStarguider.cc
- Timestamp:
- 05/09/09 13:48:12 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/main/MStarguider.cc
r9435 r9439 1 #undef EXPERT2 1 #undef EXPERT 3 2 … … 307 306 308 307 fGStarg = new MGStarg(this, 235); 309 fGStarg->DrawText("0.75'", "1.50'", "3.00'", "Mispointing [min]");310 fGStarg->DrawHexagon();311 308 fGStarg->Move(530,596+5); 312 309 fList->Add(fGStarg); … … 342 339 343 340 fTPoint = new TGTextButton(this, "TPoint"); 344 fTPoint->Move(4, fMenu->GetDefaultHeight()+785); 341 //fTPoint->Move(4, fMenu->GetDefaultHeight()+785); 342 fTPoint->Move(170, fMenu->GetDefaultHeight()+785); 345 343 fTPoint->AllowStayDown(kTRUE); 346 344 AddFrame(fTPoint); 347 348 fStargTPoint = new TGTextButton(this, "StargTPoint"); 349 fStargTPoint->Move(170, fMenu->GetDefaultHeight()+785); 350 fStargTPoint->AllowStayDown(kTRUE); 351 AddFrame(fStargTPoint); 345 /* 346 fStargTPoint = new TGTextButton(this, "StargTPoint"); 347 fStargTPoint->Move(170, fMenu->GetDefaultHeight()+785); 348 fStargTPoint->AllowStayDown(kTRUE); 349 AddFrame(fStargTPoint); 350 */ 352 351 353 352 fFps = new TGLabel(this, "---fps"); … … 448 447 MapSubwindows(); 449 448 fTPoint->UnmapWindow(); 450 fStargTPoint->UnmapWindow();449 //fStargTPoint->UnmapWindow(); 451 450 fGStarg->UnmapWindow(); 452 451 fGNumStars->UnmapWindow(); … … 479 478 fOutTp(0), 480 479 fOutStargTp(0), 481 fOutRq(0),480 // fOutRq(0), 482 481 fDx((768-kZOOM)/2), 483 482 fDy((512-kZOOM)/2), 484 483 fStatus(MDriveCom::kStandby), 485 484 fRadius(200), 486 fTPointFromCC(0) 485 fTPointFromCC(-1), 486 fFindStarCut(3.0), fFindStarBox(70) 487 487 { 488 488 gLog << warn << " #### FIXME: Make MCaos Thread safe!" << endl; … … 557 557 558 558 fRadius = env.GetValue("Leds.Radius", fRadius); 559 560 fStarguiderW = env.GetValue("Starguider.Width", fStarguiderW); 561 fStarguiderH = env.GetValue("Starguider.Height", fStarguiderH); 562 fStarguiderX = env.GetValue("Starguider.X", fStarguiderX); 563 fStarguiderY = env.GetValue("Starguider.Y", fStarguiderY); 564 565 fSkyOffsetX = env.GetValue("Starguider.SkyOffsetX", fSkyOffsetX); 566 fSkyOffsetY = env.GetValue("Starguider.SkyOffsetY", fSkyOffsetY); 567 568 fFindStarBox = env.GetValue("FindStar.SizeBox", fFindStarBox); 569 fFindStarCut = env.GetValue("FindStar.CleaningLevel", fFindStarCut); 559 570 } 560 571 … … 583 594 delete fOutStargTp; 584 595 585 if (fOutRq)586 delete fOutRq;596 // if (fOutRq) 597 // delete fOutRq; 587 598 588 599 gLog << inf2 << "Camera Display destroyed." << endl; … … 649 660 } 650 661 662 /* 651 663 void MStarguider::ToggleFindStar() 652 664 { 653 665 if (fDisplay->IsEntryChecked(IDM_kFindStar) && fCosy) 654 666 fTPoint->MapWindow(); 655 667 else 656 668 { … … 659 671 } 660 672 } 661 673 */ 662 674 void MStarguider::ToggleStarguider() 663 675 { … … 671 683 fOperations->EnableEntry(IDM_kStargAnalysis); 672 684 673 fStargTPoint->MapWindow();685 //fStargTPoint->MapWindow(); 674 686 675 687 fPZdAz->MapWindow(); … … 703 715 SwitchOff(fChannel, IDM_kChannel2); 704 716 fChannel->CheckEntry(IDM_kChannel1); 705 706 717 } 707 718 else … … 709 720 fStatus = MDriveCom::kStandby; 710 721 711 fStargTPoint->UnmapWindow();712 fStargTPoint->SetDown(kFALSE);722 //fStargTPoint->UnmapWindow(); 723 //fStargTPoint->SetDown(kFALSE); 713 724 714 725 fPZdAz->UnmapWindow(); … … 772 783 MapSubwindows(); // maps everything, but we don't want that 773 784 fTPoint->UnmapWindow(); 774 fStargTPoint->UnmapWindow();785 //fStargTPoint->UnmapWindow(); 775 786 fGStarg->UnmapWindow(); 776 787 fGNumStars->UnmapWindow(); … … 863 874 //tpoint 864 875 SwitchOff(fDisplay, IDM_kFindStar); 865 ToggleFindStar();866 876 SwitchOff(fDisplay, IDM_kCaosFilter); 867 877 ToggleCaosFilter(); … … 874 884 875 885 //check needed items 876 fDisplay-> CheckEntry(IDM_kStretch);886 fDisplay->UnCheckEntry(IDM_kStretch); 877 887 fDisplay->CheckEntry(IDM_kStargCaosFilter); 878 888 fDisplay->CheckEntry(IDM_kStarguider); 879 889 ToggleStarguider(); 890 891 fTPoint->MapWindow(); 880 892 } 881 893 else … … 885 897 fDisplay->UnCheckEntry(IDM_kStargCaosFilter); 886 898 fDisplay->UnCheckEntry(IDM_kStarguider); 899 fTPoint->UnmapWindow(); 887 900 ToggleStarguider(); 888 901 … … 922 935 923 936 //checking needed items 924 fDisplay-> CheckEntry(IDM_kStretch);937 fDisplay->UnCheckEntry(IDM_kStretch); 925 938 fDisplay->CheckEntry(IDM_kCaosFilter); 926 939 ToggleCaosFilter(); 927 940 fDisplay->CheckEntry(IDM_kFindStar); 928 ToggleFindStar();941 fTPoint->MapWindow(); 929 942 } 930 943 else … … 946 959 ToggleCaosFilter(); 947 960 fDisplay->UnCheckEntry(IDM_kFindStar); 948 ToggleFindStar();961 fTPoint->UnmapWindow(); 949 962 } 950 963 return kTRUE; … … 956 969 case IDM_kFindStar: 957 970 Toggle(fDisplay, IDM_kFindStar); 958 ToggleFindStar();971 //ToggleFindStar(); 959 972 return kTRUE; 960 973 … … 1293 1306 #endif 1294 1307 1308 return fSao->CalcDeltaZdAzFromPix(mx, my)*TMath::RadToDeg(); 1309 /* 1295 1310 AltAz pos0 = fSao->CalcAltAzFromPix(768/2, 576/2)*kRad2Deg; 1296 1311 AltAz pos1 = fSao->CalcAltAzFromPix(768/2+mx, 576/2+my)*kRad2Deg; … … 1298 1313 pos1 -= pos0; 1299 1314 1300 return ZdAz(-pos1.Alt(), pos1.Az()); 1301 } 1302 1303 Int_t MStarguider::CalcTrackingError(Leds &leds, MStarList &stars, 1304 ZdAz &d, MTime &t, double &bright, Int_t &num) 1305 { 1315 ZdAz res2 = ZdAz(-pos1.Alt(), pos1.Az()); 1316 1317 return res1; 1318 */ 1319 } 1320 1321 Int_t MStarguider::CalcTrackingError(const Leds &leds, MStarList &stars, 1322 ZdAz &d, const MTime &t, const double &bright, 1323 Int_t &num, const Ring ¢er, Int_t numleds, Int_t numrings) 1324 { 1325 // Get tracking coordinates 1326 const XY xy = fCRaDec->GetCoordinates(); 1327 1306 1328 num = leds.GetEntries(); 1307 1329 if (num < 3) //was 1 1308 1330 { 1309 1331 gLog << warn << "Sorry, less than 3 detected spot in FOV!" << endl; 1310 fStargTPoint->SetDown(kFALSE); 1332 if (fTPoint->IsDown() && fCosy && fCosy->GetDriveCom()) 1333 fCosy->GetDriveCom()->SendTPoint(false, 'S', fTPointStarMag, fTPointStarName, AltAz(), ZdAz(), xy, 0, 0, t, center, Led(), numleds, numrings, num); // Report 1334 fTPoint->SetDown(kFALSE); 1311 1335 return 0; 1312 1336 } … … 1315 1339 { 1316 1340 gLog << warn << "Sorry, less than 3 stars in FOV!" << endl; 1317 fStargTPoint->SetDown(kFALSE); 1341 if (fTPoint->IsDown() && fCosy && fCosy->GetDriveCom()) 1342 fCosy->GetDriveCom()->SendTPoint(false, 'S', fTPointStarMag, fTPointStarName, AltAz(), ZdAz(), xy, 0, 0, t, center, Led(), numleds, numrings, num); // Report 1343 fTPoint->SetDown(kFALSE); 1318 1344 return 0; 1319 1345 } … … 1375 1401 if (numcor<1) 1376 1402 { 1377 fStargTPoint->SetDown(kFALSE); 1403 fTPoint->SetDown(kFALSE); 1404 if (fTPoint->IsDown() && fCosy && fCosy->GetDriveCom()) 1405 fCosy->GetDriveCom()->SendTPoint(false, 'S', fTPointStarMag, fTPointStarName, AltAz(), ZdAz(), xy, 0, 0, t, center, Led(), numleds, numrings, num, numcor); // Report 1378 1406 return 0; 1379 1407 } … … 1388 1416 1389 1417 // Check StargTPoint data set request 1390 if (!f StargTPoint->IsDown())1418 if (!fDisplay->IsEntryChecked(IDM_kStarguiderMode) || !fTPoint->IsDown()) 1391 1419 return numcor; 1392 f StargTPoint->SetDown(kFALSE);1420 fTPoint->SetDown(kFALSE); 1393 1421 1394 1422 // If no file open: open new file … … 1406 1434 } 1407 1435 1408 // Get tracking coordinates1409 const XY xy = fCRaDec->GetCoordinates();1410 1436 const RaDec rd(xy.X()*MAstro::HorToRad(), xy.Y()*TMath::DegToRad()); 1411 1437 … … 1430 1456 1431 1457 // Write real pointing position 1432 //cout << " Alt/Az: " << za0.Alt() << "° " << za0.Az() << "°" << endl;1433 1458 *fOutStargTp << setprecision(7) << za0.Az() << " " << za0.Alt() << " "; 1434 1459 1435 1460 // Write system pointing position 1436 //cout << " SE-Pos: " << 90-cpos.Zd() << "° " << cpos.Az() << "°" << endl;1437 1461 *fOutStargTp << fmod(cpos.Az()+360, 360) << " " << 90-cpos.Zd(); 1438 1462 … … 1440 1464 *fOutStargTp << " " << d.Zd() << " " << d.Az(); 1441 1465 *fOutStargTp << " " << setprecision(11) << t.GetMjd(); 1442 *fOutStargTp << " " << num; 1443 *fOutStargTp << " " << bright; 1466 *fOutStargTp << " " << setprecision(4) << center.GetMag(); 1467 *fOutStargTp << " " << star->GetMag(); 1468 *fOutStargTp << " " << center.GetX() << " " << center.GetY(); 1469 *fOutStargTp << " 0 0"; 1470 *fOutStargTp << " " << numleds << " " << numrings; 1471 *fOutStargTp << " " << num << " " << numcor << " " << bright; 1444 1472 *fOutStargTp << endl; 1445 1473 1474 gLog << all << "Starguider TPoint successfully taken." << endl; 1475 1446 1476 fTimeFromTp.Clear(); 1447 1477 1478 if (!fCosy) 1479 return numcor; 1480 1481 MDriveCom *com = fCosy->GetDriveCom(); 1482 if (!com) 1483 return numcor; 1484 1485 com->SendTPoint(true, 'S', fTPointStarMag, fTPointStarName, za0, cpos, xy, d.Zd(), d.Az(), t, center, Led(), numleds, numrings, num, numcor); // Report 1486 1448 1487 return numcor; 1449 1488 } 1450 1489 1451 void MStarguider::FindStar(FilterLed &f, FilterLed &f2, Ring ¢er, MTime &t) 1452 { 1490 void MStarguider::FindStar(const FilterLed &f, const FilterLed &f2, const Ring ¢er, const MTime &t, Int_t numleds, Int_t numrings) 1491 { 1492 // Get tracking coordinates 1493 const XY xy = fCRaDec->GetCoordinates(); // [h, deg] 1494 1495 if (center.GetX()<=0 && center.GetY()<=0) 1496 { 1497 gLog << warn << "Couldn't determine center of the camera." << endl; 1498 if (fTPoint->IsDown() && fCosy && fCosy->GetDriveCom()) 1499 fCosy->GetDriveCom()->SendTPoint(false, 'T', fTPointStarMag, fTPointStarName, AltAz(), ZdAz(), xy, 0, 0, t, center, Led(), numleds, numrings); // Report 1500 return; 1501 } 1502 1453 1503 // Try to find the star 1454 1504 Leds leds; … … 1459 1509 if (!star) 1460 1510 { 1461 if (fTPoint->IsDown()) 1462 { 1463 fTPoint->SetDown(kFALSE); 1464 gLog << warn << "No star found. Couldn't take a tpoint." << endl; 1465 } 1511 gLog << warn << "No star found." << endl; 1512 if (fTPoint->IsDown() && fCosy && fCosy->GetDriveCom()) 1513 fCosy->GetDriveCom()->SendTPoint(false, 'T', fTPointStarMag, fTPointStarName, AltAz(), ZdAz(), xy, 0, 0, t, center, Led(), numleds, numrings); // Report 1466 1514 return; 1467 1515 } … … 1470 1518 star->Print(); 1471 1519 f2.MarkPoint(star->GetX(), star->GetY(), 2<<2); 1520 1521 const RaDec rd(xy.X()*MAstro::HorToRad(), xy.Y()*TMath::DegToRad()); 1472 1522 1473 1523 // Initialize Star Catalog on the camera plane … … 1478 1528 ac.SetObservatory(*fSao); 1479 1529 ac.SetTime(t); 1480 1481 // Get tracking coordinates1482 const XY xy = fCRaDec->GetCoordinates(); // [h, deg]1483 const RaDec rd(xy.X()*MAstro::HorToRad(), xy.Y()*TMath::DegToRad());1484 1485 1530 ac.SetRaDec(rd.Ra(), rd.Dec()); 1486 1531 … … 1500 1545 1501 1546 // Check TPoint data set request 1502 if (!f TPoint->IsDown())1547 if (!fDisplay->IsEntryChecked(IDM_kTpointMode) || !fTPoint->IsDown()) 1503 1548 return; 1504 1505 fTPoint->SetDown(kFALSE);1506 1549 1507 1550 // If no file open: open new file … … 1539 1582 const ZdAz za1 = fCosy->GetSePos()*360; // [deg] 1540 1583 1584 1541 1585 // Write real pointing position 1542 1586 //cout << " Alt/Az: " << za0.Alt() << "° " << za0.Az() << "°" << endl; … … 1552 1596 *fOutTp << " " << setprecision(4) << center.GetMag(); 1553 1597 *fOutTp << " " << star->GetMag(); 1598 *fOutTp << " " << center.GetX() << " " << center.GetY(); 1599 *fOutTp << " " << star->GetX() << " " << star->GetY(); 1600 *fOutTp << " " << numleds << " " << numrings; 1601 *fOutTp << " 0 0 0"; 1554 1602 *fOutTp << endl; 1603 1604 gLog << all << "TPoint successfully taken." << endl; 1555 1605 /* 1556 1606 MLog &outrep = *fCosy->GetOutRep(); … … 1570 1620 1571 1621 // return zdaz; 1622 1623 if (!fCosy) 1624 return; 1625 1626 MDriveCom *com = fCosy->GetDriveCom(); 1627 if (!com) 1628 return; 1629 1630 com->SendTPoint(true, 'T', fTPointStarMag, fTPointStarName, za0, za1, xy, -dzd, -daz, t, center, *star, numleds, numrings); // Report 1572 1631 } 1573 1632 … … 1624 1683 } 1625 1684 1626 void MStarguider::StartStarguider() 1685 void MStarguider::StartTPoint(char *cmd) 1686 { 1687 fTPointStarName = "Dummy"; 1688 fTPointStarMag = 0; 1689 1690 TString str(cmd); 1691 1692 TObjArray *arr = str.Tokenize(' '); 1693 1694 if (arr->GetEntries()==2) 1695 { 1696 fTPointStarName = (*arr)[0]->GetName(); 1697 fTPointStarMag = atof((*arr)[1]->GetName()); 1698 } 1699 1700 delete arr; 1701 1702 if (fTPointFromCC<0) 1703 fTPointFromCC=0; 1704 } 1705 1706 void MStarguider::StartStarguider(bool on) 1627 1707 { 1628 1708 // Switch to starguider mode 1629 cout << " * Switching to Starguider mode" << endl; 1630 fMode->UnCheckEntry(IDM_kStarguiderMode); 1631 ProcessMessage(MK_MSG(kC_COMMAND, kCM_MENU), IDM_kStarguiderMode, 0); 1709 if (on) 1710 { 1711 cout << " * Switching Starguider mode on" << endl; 1712 fMode->UnCheckEntry(IDM_kStarguiderMode); 1713 ProcessMessage(MK_MSG(kC_COMMAND, kCM_MENU), IDM_kStarguiderMode, 0); 1714 } 1715 else 1716 { 1717 cout << " * Switching Starguider mode off" << endl; 1718 fMode->CheckEntry(IDM_kStarguiderMode); 1719 ProcessMessage(MK_MSG(kC_COMMAND, kCM_MENU), IDM_kStarguiderMode, 0); 1720 } 1721 } 1722 1723 Int_t MStarguider::GetStarguiderMode() const 1724 { 1725 return fMode->IsEntryChecked(IDM_kStarguiderMode) ? 1 : 2; 1726 1632 1727 } 1633 1728 1634 1729 Bool_t MStarguider::DoTPoint() 1635 1730 { 1731 if (fTPoint->IsDown() && fTPointFromCC<0) 1732 { 1733 fTPointFromCC = 0; 1734 fTPoint->SetDown(kFALSE); 1735 } 1736 1636 1737 if (fTPointFromCC<0) 1637 1738 return kTRUE; … … 1650 1751 1651 1752 case 2: 1753 case 3: 1652 1754 cout << " * Waiting one frame" << endl; 1653 1755 // Wait one frame 1654 1756 return kFALSE; 1655 1757 1656 case 3:1758 case 4: 1657 1759 cout << " * Taking TPoint" << endl; 1658 1760 fTPoint->SetDown(); // kTRUE 1659 1761 return kTRUE; 1660 1762 1661 case 4:1763 case 5: 1662 1764 if (!fTimeFromTp) // TPoint failed 1663 1765 break; … … 1669 1771 return kFALSE; 1670 1772 1671 case 5: 1773 case 6: 1774 case 7: 1672 1775 cout << " * Waiting one frame" << endl; 1673 1776 // Wait one frame 1674 1777 return kFALSE; 1675 1778 1676 case 6:1779 case 8: 1677 1780 cout << " * Taking Starguider TPoint" << endl; 1678 f StargTPoint->SetDown(); // kTRUE1781 fTPoint->SetDown(); // kTRUE 1679 1782 return kTRUE; 1680 1783 1681 case 7: 1682 cout << " * Send Report" << endl; 1784 // case 9: 1785 // cout << " * Send Report" << endl; 1786 // return kTRUE; 1787 1788 case 9: 1789 cout << " * Switching to TPoint mode" << endl; 1790 // Switch to tpoint mode 1791 fMode->UnCheckEntry(IDM_kTpointMode); 1792 ProcessMessage(MK_MSG(kC_COMMAND, kCM_MENU), IDM_kTpointMode, 0); 1683 1793 break; 1684 1794 } … … 1686 1796 // Send report 1687 1797 fTPointFromCC = -1; 1688 1798 /* 1689 1799 if (!fCosy) 1690 1800 return kTRUE; … … 1702 1812 //fNumStarsCorrelated = rc; 1703 1813 com->SendTPoint(fNumStarsCorrelated>0); 1704 1814 */ 1705 1815 return kTRUE; 1706 1816 } … … 1736 1846 if (!fWritePictures->IsEntryEnabled(IDM_kStart) && 1737 1847 (!(n%fWrtRate) || fWriteType->IsEntryChecked(IDM_kOnce))) 1738 { 1848 { 1739 1849 1740 1850 if (fFileType->IsEntryChecked(IDM_kPNG)) … … 1752 1862 f.Execute(); 1753 1863 1754 DoTPoint(); 1864 if (!DoTPoint()) 1865 return; 1755 1866 1756 1867 Int_t numleds = 0; … … 1758 1869 1759 1870 // Find Center of Camera for Caos and Tpoints 1760 Ring center(768/2, 576/2); 1871 // Ring center;//(-1, -1); 1872 Ring center(5, 5);//(-1, -1); 1761 1873 if (fDisplay->IsEntryChecked(IDM_kCaosFilter)) 1762 1874 { … … 1774 1886 1775 1887 // Find Star at Center---for Tpoint Procedure 1776 if (fDisplay->IsEntryChecked(IDM_kFindStar) && 1777 center.GetX()>0 && center.GetY()>0) 1888 if (fDisplay->IsEntryChecked(IDM_kFindStar)) 1778 1889 { 1779 1890 // Set search Paremeters (FIXME: Get them from user input!) 1780 f.SetCut( 3.0);1781 f.SetBox( 70);1782 1783 FindStar(f, f2, center, t );1891 f.SetCut(fFindStarCut); 1892 f.SetBox(fFindStarBox); 1893 1894 FindStar(f, f2, center, t, numleds, numrings); 1784 1895 } 1785 1896 … … 1788 1899 1789 1900 // Position corresponding to the camera center (53.2, 293.6) 1790 Ring sgcenter (53.2, 293.6); // Center of camera in SG picture [px]1901 Ring sgcenter;//(-1, -1); // Center of camera in SG picture [px] 1791 1902 1792 1903 // Find Center of Camera in Starfield Camera picture … … 1817 1928 fCZdAz->SetCoordinates(fSao->GetZdAz()); 1818 1929 1819 fSao->SetBox( 230); //Region of interest around center1930 fSao->SetBox(fStarguiderW, fStarguiderH); // 280 Region of interest around center 1820 1931 1821 1932 // If center of camera cannot be determined sgcenter is (0,0) 1822 1933 const Bool_t centerisvalid = sgcenter.GetX()>0 && sgcenter.GetY()>0; 1823 // if (centerisvalid)1824 // skycenter.SetXY(sgcenter.GetX() - 53.2,1825 // sgcenter.GetY() - 293.6);1826 1934 1827 1935 // We determine the ideal starfield using camera sagging info … … 1830 1938 // 53.2 and 293.6 are the "preliminary" camera center 1831 1939 // -9 and 28.5 are the offsets of the pointing position in the sky 1832 const XY off(sgcenter.GetX()- 53.2-9, 1833 sgcenter.GetY()-293.6+28.5); 1834 1835 // we obtain stars in the effective star FOV and draw them. 1836 // coordinates are video frame coords. 1837 MStarList stars; 1838 fSao->CalcStars(stars, 530, 292, TMath::FloorNint(off.X()), TMath::FloorNint(off.Y())); 1839 fSao->DrawStars(stars, cimg); 1840 1841 // Position around which the circles are drawn. 1842 const Ring skycenter(768/2-off.X(), 576/2+off.Y()); 1940 //const XY off(sgcenter.GetX()- 53.2-9, 1941 // sgcenter.GetY()-293.6+28.5); 1942 1943 // Skycenter 1944 const XY off(sgcenter.GetX() + fSkyOffsetX, 1945 sgcenter.GetY() + fSkyOffsetY); 1946 1947 MStarList stars; 1948 if (centerisvalid) 1949 { 1950 // we obtain stars in the effective star FOV and draw them. 1951 // coordinates are video frame coords. 1952 fSao->CalcStars(stars, fStarguiderX, fStarguiderY, off.X(), off.Y()); 1953 fSao->DrawStars(stars, cimg); 1954 } 1843 1955 1844 1956 // There are two corrections to the mispointing … … 1853 1965 1854 1966 Leds spots; 1855 f.SetBox(230);1967 f.SetBox(fStarguiderW, fStarguiderH); // 280 1856 1968 f.SetCut(cut); 1857 1969 1858 1970 double bright; 1859 f.ExecuteAndMark(spots, 530, 292, bright);1971 f.ExecuteAndMark(spots, fStarguiderX, fStarguiderY, bright); 1860 1972 1861 1973 ULong_t color; … … 1878 1990 1879 1991 Int_t numstars = 0; 1880 const Int_t rc = CalcTrackingError(spots, stars, fD, t, bright, numstars );1992 const Int_t rc = CalcTrackingError(spots, stars, fD, t, bright, numstars, sgcenter, numleds, numrings); 1881 1993 1882 1994 const Bool_t monitoring = brightnessisvalid && centerisvalid && fNumStarsCorrelated>2; … … 1907 2019 if (centerisvalid && fNumStarsCorrelated>2) 1908 2020 { 2021 // Position around which the circles are drawn. 2022 const Ring skycenter(off.X(), off.Y()); 2023 1909 2024 f2.DrawCircle(skycenter, 2.0, 0x0a); 1910 2025 … … 1917 2032 1918 2033 } //CalcStars 2034 2035 if (fTPoint->IsDown()) 2036 fTPoint->SetDown(kFALSE); 1919 2037 1920 2038 // Draw Circles around center of Camera … … 1948 2066 void MStarguider::UpdatePosZoom() 1949 2067 { 1950 MString txt; 2068 MString txt;/* 1951 2069 if (fDisplay->IsEntryChecked(IDM_kCatalog)) 1952 2070 { … … 1958 2076 txt.Form("(%d, %d) %.1fd/%.1fd", fDx, fDy, -aa.Alt(), aa.Az()-180); 1959 2077 } 1960 else 2078 else*/ 1961 2079 txt.Form("(%d, %d)", fDx, fDy); 1962 2080 fPosZoom->SetText(txt);
Note:
See TracChangeset
for help on using the changeset viewer.