Changeset 13936
- Timestamp:
- 05/27/12 11:03:30 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/smartfact.cc
r13932 r13936 25 25 #include "HeadersMCP.h" 26 26 #include "HeadersDrive.h" 27 #include "HeadersFeedback.h" 27 28 #include "HeadersRateScan.h" 28 29 #include "HeadersRateControl.h" … … 355 356 vector<float> fBiasControlVoltageVec; 356 357 358 float fBiasControlPowerTot; 357 359 float fBiasControlVoltageMed; 358 360 float fBiasControlCurrentMed; … … 367 369 string fDriveControlPointingAz; 368 370 string fDriveControlSourceName; 371 float fDriveControlMoonDist; 369 372 370 373 deque<float> fDriveControlTrackingDevHist; … … 564 567 if (!CheckDataSize(d, "Mcp:Configuration", 16, true)) 565 568 { 566 fMcpConfigurationState = -256;569 fMcpConfigurationState = 0; 567 570 fMcpConfigurationMaxTime = 0; 568 571 fMcpConfigurationMaxEvents = 0; … … 771 774 out << kHtmlWhite << '\t' << dev << '\n'; 772 775 776 fDriveControlMoonDist = -1; 777 773 778 Moon moon(-(17.+53./60+26.525/3600), 28.+45./60+42.462/3600); 774 779 if (moon.visible) … … 777 782 778 783 string col = kHtmlGreen; 779 if (angle< 35 || angle>145)784 if (angle<20 || angle>140) 780 785 col = kHtmlYellow; 781 if (angle< 25 || angle>155)786 if (angle<10 || angle>150) 782 787 col = kHtmlRed; 783 788 out << col << '\t' << setprecision(3) << angle << '\n'; 789 790 fDriveControlMoonDist = angle; 784 791 } 785 792 else … … 954 961 if (power_apd<1e-3) 955 962 power_apd = 0; 963 964 fBiasControlPowerTot = power_tot; 956 965 957 966 // Get the maximum of each patch … … 1569 1578 msg << "dimctrl offline<br/>"; 1570 1579 1580 if (fDriveControlMoonDist>155) 1581 msg << "Moon within the field-of-view of the cones<br/>"; 1582 if (fDriveControlMoonDist>=0 && fDriveControlMoonDist<3) 1583 msg << "Moon within the field-of-view of the camera<br/>"; 1584 1585 1571 1586 if (!fDimFeedback.state()==Feedback::State::kCalibrating && 1572 fDimBias .state()==BIAS::State::kVoltageOn &&1587 fDimBiasControl.state()==BIAS::State::kVoltageOn && 1573 1588 fBiasControlVoltageMed>3 && 1574 1589 fFeedbackCalibration.size()==0) … … 1638 1653 switch (fMcpConfigurationState) 1639 1654 { 1640 // kStateIdle 1641 case 5: out << "Idle [" << fMcpConfigurationName << "]"; break; 1642 // Configuring1 - Configuring3 1643 case 7: 1644 case 8: 1645 case 9: out << "Configuring [" << fMcpConfigurationName << "]"; break; 1646 // Configured 1647 case 10: out << "Configured [" << fMcpConfigurationName << "]"; break; 1648 // TriggerOn / Taking Data 1649 case 11: 1650 case 12: out << fMcpConfigurationName; break; 1655 case MCP::State::kIdle: 1656 out << "Idle [" << fMcpConfigurationName << "]"; 1657 break; 1658 case MCP::State::kConfiguring1: 1659 case MCP::State::kConfiguring2: 1660 case MCP::State::kConfiguring3: 1661 out << "Configuring [" << fMcpConfigurationName << "]"; 1662 break; 1663 case MCP::State::kConfigured: 1664 out << "Configured [" << fMcpConfigurationName << "]"; 1665 break; 1666 case MCP::State::kTriggerOn: 1667 case MCP::State::kTakingData: 1668 out << fMcpConfigurationName; 1669 if (fFadControlDrsRuns[2]>0) 1670 out << "(" << fFadControlDrsRuns[2] << ")"; 1671 break; 1651 1672 } 1652 1673 } … … 1673 1694 { 1674 1695 if (fMcpConfigurationState==MCP::State::kTakingData) 1675 evt << fFadControlNumEvents; 1696 { 1697 if (fFadControlNumEvents>2999) 1698 evt << floor(fFadControlNumEvents/1000) << 'k'; 1699 else 1700 evt << fFadControlNumEvents; 1701 } 1676 1702 } 1677 1703 … … 1707 1733 out << ']'; 1708 1734 } 1709 1710 if (fFadControlDrsRuns[2]>0)1711 out << " (" << fFadControlDrsRuns[2] << ")";1712 1735 } 1713 1736 else … … 1736 1759 //out << rc.name << '\t'; 1737 1760 out << fDriveControlPointingZd << '\t'; 1761 out << setprecision(2); 1738 1762 out << fDriveControlPointingAz << '\t'; 1739 1763 if (fDimDriveControl.state()==7) 1740 1764 { 1741 1765 out << fDriveControlSourceName << '\t'; 1742 out << setprecision(2);1743 1766 out << dev << '\n'; 1744 out << setprecision(3);1745 1767 } 1746 1768 else 1747 1769 out << "\t\n"; 1770 out << setprecision(3); 1748 1771 } 1749 1772 else … … 1796 1819 col = kHtmlRed; 1797 1820 1798 out << col << '\t' << fFtmControlTriggerRateCam << '\n'; 1821 out << col << '\t' << fFtmControlTriggerRateCam << '\t'; 1822 out << fFtmPatchThresholdMed << '\n'; 1799 1823 } 1800 1824 else … … 1853 1877 out << setprecision(3); 1854 1878 } 1855 out << (off ? 0 : fBiasControlVoltageMed) << '\n'; 1879 if (cal && fDimFeedback.state()!=Feedback::State::kCalibrating) 1880 out << setprecision(2) << fBiasControlPowerTot << " W" << setprecision(3); 1881 else 1882 out << (off ? 0 : fBiasControlVoltageMed); 1883 out << '\n'; 1856 1884 } 1857 1885 else … … 1902 1930 fPath("www/smartfact/data"), 1903 1931 fControlScriptDepth(0), 1932 fMcpConfigurationState(-256), 1904 1933 fMcpConfigurationMaxTime(0), 1905 1934 fMcpConfigurationMaxEvents(0),
Note:
See TracChangeset
for help on using the changeset viewer.