FACT++  1.0
Encoder PointingModel::SkyToMount ( AltAz  p)
inline

Definition at line 271 of file drivectrl.cc.

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

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

272  {
273  const AltAz CRX(-fCrx*sin(p.az-p.alt), fCrx*cos(p.az-p.alt)/cos(p.alt));
274  const AltAz CRY(-fCry*cos(p.az-p.alt), -fCry*sin(p.az-p.alt)/cos(p.alt));
275  p += CRX;
276  p += CRY;
277 
278  const AltAz NRX(fNrx*sin(p.alt), -fNrx);
279  const AltAz NRY(fNry*cos(p.alt), -fNry*tan(p.alt));
280  p += NRX;
281  p += NRY;
282 
283  const AltAz CES(-fEces*sin(p.alt), -fAces*sin(p.az));
284  const AltAz CEC(-fEcec*cos(p.alt), -fAcec*cos(p.az));
285  p += CES;
286  p += CEC;
287 
288  const AltAz TX(Sign(fTx/tan(p.alt), p.alt), 0);
289  const AltAz TF(Sign(fTf*cos(p.alt), p.alt), 0);
290  //p += TX;
291  p += TF;
292 
293  const AltAz CA(0, -fCa/cos(p.alt));
294  p += CA;
295 
296  const AltAz NPAE(0, -fNpae*tan(p.alt));
297  p += NPAE;
298 
299  const AltAz AW2( fAw2*sin(p.az*2), -fAw2*cos(p.az*2)*tan(p.alt));
300  const AltAz AN2(-fAn2*cos(p.az*2), -fAn2*sin(p.az*2)*tan(p.alt));
301  const AltAz AW1( fAw *sin(p.az), -fAw *cos(p.az) *tan(p.alt));
302  const AltAz AN1(-fAn *cos(p.az), -fAn *sin(p.az) *tan(p.alt));
303  p += AW2;
304  p += AN2;
305  p += AW1;
306  p += AN1;
307 
308  const AltAz FLOP(Sign(fFlop, p.alt), 0);
309  p += FLOP;
310 
311  const AltAz I(fIe, fIa);
312  p += I;
313 
314  return Encoder(90 - p.alt*180/M_PI, p.az *180/M_PI);
315  }
double fFlop
Definition: drivectrl.cc:177
double fNpae
Definition: drivectrl.cc:178
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
double fAces
Definition: drivectrl.cc:191

+ Here is the caller graph for this function: