Changeset 14712
- Timestamp:
- 12/01/12 22:01:29 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/smartfact.cc
r14710 r14712 990 990 int HandleDriveTracking(const EventImp &d) 991 991 { 992 if (!CheckDataSize(d, "DriveControl:Tracking", 56))992 if (!CheckDataSize(d, "DriveControl:Tracking", 64)) 993 993 return GetCurrentState(); 994 994 … … 998 998 const double Az = d.Get<double>(4*8); 999 999 1000 const double zd = Zd * M_PI / 180; 1001 const double dzd = d.Get<double>(5*8) * M_PI / 180; 1002 const double daz = d.Get<double>(6*8) * M_PI / 180; 1003 1004 // Correct: 1005 // const double d = cos(del) - sin(zd+dzd)*sin(zd)*(1.-cos(daz)); 1006 1007 // Simplified: 1008 double dev = cos(dzd) - sin(zd+dzd)*sin(zd)*(1.-cos(daz)); 1009 dev = acos(dev) * 180 / M_PI * 3600; 1000 const double dev = d.Get<double>(7*8); 1010 1001 1011 1002 fDriveControlTrackingDevHist.push_back(dev); … … 2309 2300 "Sensor temperature exceeds outside temperature by more than 8°C"); 2310 2301 2311 newerr |= SetError(fFtmControlTriggerRateTooLow> 1&& fDimFtmControl.state()==FTM::State::kTriggerOn,2302 newerr |= SetError(fFtmControlTriggerRateTooLow>2 && fDimFtmControl.state()==FTM::State::kTriggerOn, 2312 2303 "Trigger rate below 1Hz while trigger switched on"); 2313 2304 … … 2514 2505 2515 2506 // ------------------ Drive ----------------- 2516 if (fDimDNS.online() && fDimDriveControl.state()>=Drive::State::kArmed) // Armed, Moving, Tracking 2507 if (fDimDNS.online() && fDimDriveControl.state()>=Drive::State::kArmed) // Armed, Moving, Tracking, OnTrack, Error 2517 2508 { 2518 2509 const uint32_t dev = fDriveControlTrackingDevHist.size()>0 ? round(fDriveControlTrackingDevHist.back()) : 0;
Note:
See TracChangeset
for help on using the changeset viewer.