FACT++  1.0
ZdAz PointingModel::MountToSky ( const Encoder mnt) const
inline

Definition at line 317 of file drivectrl.cc.

References PointingModel::AltAz::alt, Local::az, PointingModel::AltAz::az, and Local::zd.

Referenced by StateMachineDrive< T, S >::UpdatePointingPosition().

318  {
319  AltAz p(M_PI/2-mnt.zd*M_PI/180, mnt.az*M_PI/180);
320 
321  const AltAz I(fIe, fIa);
322  p -= I;
323 
324  const AltAz FLOP(Sign(fFlop, p.alt), 0);
325  p -= FLOP;
326 
327  const AltAz AW1( fAw *sin(p.az), -fAw *cos(p.az) *tan(p.alt));
328  const AltAz AN1(-fAn *cos(p.az), -fAn *sin(p.az) *tan(p.alt));
329  const AltAz AW2( fAw2*sin(p.az*2), -fAw2*cos(p.az*2)*tan(p.alt));
330  const AltAz AN2(-fAn2*cos(p.az*2), -fAn2*sin(p.az*2)*tan(p.alt));
331  p -= AW1;
332  p -= AN1;
333  p -= AW2;
334  p -= AN2;
335 
336  const AltAz NPAE(0, -fNpae*tan(p.alt));
337  p -= NPAE;
338 
339  const AltAz CA(0, -fCa/cos(p.alt));
340  p -= CA;
341 
342  const AltAz TF(Sign(fTf*cos(p.alt), p.alt), 0);
343  const AltAz TX(Sign(fTx/tan(p.alt), p.alt), 0);
344  p -= TF;
345  //p -= TX;
346 
347  const AltAz CEC(-fEcec*cos(p.alt), -fAcec*cos(p.az));
348  const AltAz CES(-fEces*sin(p.alt), -fAces*sin(p.az));
349  p -= CEC;
350  p -= CES;
351 
352  const AltAz NRY(fNry*cos(p.alt), -fNry*tan(p.alt));
353  const AltAz NRX(fNrx*sin(p.alt), -fNrx);
354  p -= NRY;
355  p -= NRX;
356 
357  const AltAz CRY(-fCry*cos(p.az-p.alt), -fCry*sin(p.az-p.alt)/cos(p.alt));
358  const AltAz CRX(-fCrx*sin(p.az-p.alt), fCrx*cos(p.az-p.alt)/cos(p.alt));
359  p -= CRY;
360  p -= CRX;
361 
362  return ZdAz(M_PI/2-p.alt, p.az);
363  }
double zd
Definition: drivectrl.cc:51
double fFlop
Definition: drivectrl.cc:177
double fNpae
Definition: drivectrl.cc:178
double az
Definition: drivectrl.cc:52
double Sign(double val, double alt) const
Definition: drivectrl.cc:263
double fAcec
Definition: drivectrl.cc:193
double fEces
Definition: drivectrl.cc:190
double fEcec
Definition: drivectrl.cc:192
Definition: MPointing.h:64
double fAces
Definition: drivectrl.cc:191

+ Here is the caller graph for this function: