Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.apo.nmsu.edu/Telescopes/TCC/html/tcs_astrom_8cc_source.html
Дата изменения: Tue Sep 15 02:25:37 2015
Дата индексирования: Sun Apr 10 01:51:14 2016
Кодировка:

Поисковые слова: m 8
lsst.tcc: src/tcsAstrom.cc Source File
lsst.tcc  1.2.2-3-g89ecb63
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
tcsAstrom.cc
Go to the documentation of this file.
1 #include <sstream>
2 #include <stdexcept>
3 #include "coordConv/physConst.h"
4 #include "tcc/telConst.h"
5 #include "tcc/tcsAstrom.h"
6 #include "tcc/tcsShim.h"
7 
8 namespace tcc {
9 
11  double wavelen
12  ) {
13  int stat;
14 
15  /* Mount tracking frame */
16  stat = tcsIast(
17  AZEL_TOPO, /* type of coordinate system */
18  0, /* equinox */
19  wavelen / coordConv::AngstromsPerMicron, /* wavelength (micrometres) */
20  &m_ast);
21  if (stat != 0) {
22  std::ostringstream os;
23  os << "tcsIast mount error: " << stat;
24  throw std::runtime_error(os.str());
25  }
26 
27  /* Rotator tracking frame */
28  stat = tcsIast(
29  AZEL_TOPO, /* type of coordinate system */
30  0, /* equinox */
31  wavelen / coordConv::AngstromsPerMicron, /* wavelength (micrometres) */
32  &r_ast);
33  if (stat != 0) {
34  std::ostringstream os;
35  os << "tcsIast rot error: " << stat;
36  throw std::runtime_error(os.str());
37  }
38  };
39 
41  TARG &tar,
42  coordConv::PVTCoord const &obsPos,
43  double tai
44  ) const {
45  coordConv::PVT obsPVT[2];
46  obsPos.getSphPVT(obsPVT[0], obsPVT[1]);
47 
48  double dumv;
49  double tcsPos[2];
50  for (int i = 0; i < 2; ++i) {
51  bool isAz = (i == 0) && (m_ast.cosys == AZEL_TOPO);
52  tcspk::tcsFromPVT(tcsPos[i], dumv, obsPVT[i], tai, isAz);
53  }
54  int stat = tcsItar (
55  tcsPos[0], tcsPos[1],
56  &tar);
57  if (stat != 0) {
58  std::ostringstream os;
59  os << "tcsItar error: " << stat;
60  throw std::runtime_error(os.str());
61  }
62  }
63 
64  std::string TcsAstrom::__repr__() const {
65  std::ostringstream os;
66  os << *this;
67  return os.str();
68  }
69 
70  std::ostream &operator<<(std::ostream &os, TcsAstrom const &tcsAstrom) {
71  os << "# TcsAstrom" << std::endl;
72 
73  os << "m_ast # ASTROM struct for the object" << std::endl;
74  os << tcsAstrom.m_ast;
75  os << "r_ast: ASTROM struct for the rotator" << std::endl;
76  os << tcsAstrom.r_ast;
77 
78  return os;
79  }
80 }
bool tcsFromPVT(double &pos, double &vel, coordConv::PVT const &pvt, double tai, bool isAz=false)
Definition: tcsShim.cc:12
ASTROM r_ast
rotator astrometry information
Definition: tcsAstrom.h:32
ASTROM m_ast
mount astrometry information
Definition: tcsAstrom.h:31
TcsAstrom(double wavelen)
Definition: tcsAstrom.cc:10
std::ostream & operator<<(std::ostream &os, ChebyshevPolynomial const &cheby)
Definition: cheby.cc:12
void initTarget(TARG &tar, coordConv::PVTCoord const &obsPos, double tai) const
Definition: tcsAstrom.cc:40
std::string __repr__() const
Definition: tcsAstrom.cc:64
double tai()
Definition: tai.cc:7