FACT++  1.0
void PointingModel::Load ( const string &  name)
inline

Definition at line 197 of file drivectrl.cc.

References Tools::Trim().

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

198  {
199  /*
200  ! MMT 1987 July 8
201  ! T 36 7.3622 41.448 -0.0481
202  ! IA -37.5465 20.80602
203  ! IE -13.9180 1.25217
204  ! NPAE +7.0751 26.44763
205  ! CA -6.9149 32.05358
206  ! AN +0.5053 1.40956
207  ! AW -2.2016 1.37480
208  ! END
209  */
210 
211  ifstream fin(name);
212  if (!fin)
213  throw runtime_error("Cannot open file "+name+": "+strerror(errno));
214 
215  map<string,double> coeff;
216 
217  string buf;
218  while (getline(fin, buf))
219  {
220  buf = Tools::Trim(buf);
221 
222  vector<string> vec;
223  boost::split(vec, buf, boost::is_any_of(" "), boost::token_compress_on);
224  if (vec.size()<2)
225  continue;
226 
227  coeff[vec[0]] = atof(vec[1].c_str()) * M_PI/180;
228  }
229 
230  fIe = coeff["IE"]; // [rad] Index Error in Elevation
231  fIa = coeff["IA"]; // [rad] Index Error in Azimuth
232  fFlop = coeff["FLOP"]; // [rad] Vertical Sag
233  fNpae = coeff["NPAE"]; // [rad] Az-El Nonperpendicularity
234  fCa = coeff["CA"]; // [rad] Left-Right Collimation Error
235  fAn = coeff["AN"]; // [rad] Azimuth Axis Misalignment (N-S, 1st order)
236  fAw = coeff["AW"]; // [rad] Azimuth Axis Misalignment (E-W, 1st order)
237  fAn2 = coeff["AN2"]; // [rad] Azimuth Axis Misalignment (N-S, 2nd order)
238  fAw2 = coeff["AW2"]; // [rad] Azimuth Axis Misalignment (E-W, 2nd order)
239  fTf = coeff["TF"]; // [rad] Tube fluxture (sin)
240  fTx = coeff["TX"]; // [rad] Tube fluxture (tan)
241  fNrx = coeff["NRX"]; // [rad] Nasmyth rotator displacement, horizontal
242  fNry = coeff["NRY"]; // [rad] Nasmyth rotator displacement, vertical
243  fCrx = coeff["CRX"]; // [rad] Alt/Az Coude Displacement (N-S)
244  fCry = coeff["CRY"]; // [rad] Alt/Az Coude Displacement (E-W)
245  fEces = coeff["ECES"]; // [rad] Elevation Centering Error (sin)
246  fAces = coeff["ACES"]; // [rad] Azimuth Centering Error (sin)
247  fEcec = coeff["ECEC"]; // [rad] Elevation Centering Error (cos)
248  fAcec = coeff["ACEC"]; // [rad] Azimuth Centering Error (cos)
249  }
double fFlop
Definition: drivectrl.cc:177
double fNpae
Definition: drivectrl.cc:178
double fAcec
Definition: drivectrl.cc:193
double fEces
Definition: drivectrl.cc:190
double fEcec
Definition: drivectrl.cc:192
std::string Trim(const std::string &str)
Definition: tools.cc:68
double fAces
Definition: drivectrl.cc:191

+ Here is the call graph for this function:

+ Here is the caller graph for this function: