FACT++  1.0
bool ConnectionDrive::ProcessTpointReport ( const string &  line)
inline

Definition at line 194 of file cosyctrl.cc.

References Drive::DimTPoint::fCenterMag, Drive::DimTPoint::fCenterX, Drive::DimTPoint::fCenterY, Drive::DimTPoint::fDec, Drive::DimTPoint::fFeedbackAz, Drive::DimTPoint::fFeedbackZd, Drive::DimTPoint::fNominalAz, Drive::DimTPoint::fNominalZd, Drive::DimTPoint::fNumLeds, Drive::DimTPoint::fNumRings, Drive::DimTPoint::fPointingAz, Drive::DimTPoint::fPointingZd, Drive::DimTPoint::fRa, Drive::DimTPoint::fRealMag, Drive::DimTPoint::fStarMag, Drive::DimTPoint::fStarX, Drive::DimTPoint::fStarY, mag, and type.

195  {
196  istringstream stream(line);
197 
198  uint16_t status1;
199  stream >> status1;
200  const Time t1 = ReadTime(stream);
201 
202  uint16_t status2;
203  stream >> status2;
204  /*const Time t2 =*/ ReadTime(stream);
205 
206  char type;
207  stream >> type;
208  if (type != 'T')
209  return false;
210 
211  double az1, alt1, az2, alt2, ra, dec, dzd, daz;
212  stream >> az1 >> alt1 >> az2 >> alt2 >> ra >> dec >> dzd >> daz;
213 
214  // c: center, s:start
215  double mjd, cmag, smag, cx, cy, sx, sy;
216  stream >> mjd >> cmag >> smag >> cx >> cy >> sx >> sy;
217 
218  int nled, nring, nstar, ncor;
219  stream >> nled >> nring >> nstar >> ncor;
220 
221  double bright, mag;
222  stream >> bright >> mag;
223 
224  string name;
225  stream >> name;
226 
227  if (stream.fail())
228  return false;
229 
230  DimTPoint tpoint;
231 
232  tpoint.fRa = ra;
233  tpoint.fDec = dec;
234 
235  tpoint.fNominalZd = 90-alt1-dzd;
236  tpoint.fNominalAz = az1 +daz;
237 
238  tpoint.fPointingZd = 90-alt1;
239  tpoint.fPointingAz = az1;
240 
241  tpoint.fFeedbackZd = 90-alt2;
242  tpoint.fFeedbackAz = az2;
243 
244  tpoint.fNumLeds = nled;
245  tpoint.fNumRings = nring;
246 
247  tpoint.fCenterX = cx;
248  tpoint.fCenterY = cy;
249  tpoint.fCenterMag = cmag;
250 
251  tpoint.fStarX = sx;
252  tpoint.fStarY = sy;
253  tpoint.fStarMag = smag;
254 
255  tpoint.fRealMag = mag;
256 
257  UpdateTPoint(t1, tpoint, name);
258 
259  return true;
260  }
Adds some functionality to boost::posix_time::ptime for our needs.
Definition: Time.h:30
float mag
Definition: HeadersSQM.h:89
static Time ReadTime(istream &in)
Definition: cosyctrl.cc:93
int type
uint16_t fNumRings
Definition: HeadersDrive.h:74
virtual void UpdateTPoint(const Time &, const DimTPoint &, const string &)
Definition: cosyctrl.cc:75
uint16_t fNumLeds
Definition: HeadersDrive.h:73