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

Поисковые слова: ion drive
lsst.tcc: include/tcc/tcsShim.h Source File
lsst.tcc  1.2.2-3-g89ecb63
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
tcsShim.h
Go to the documentation of this file.
1 #pragma once
2 /*
3 Definitions for the shim subroutines to the TCSpk library.
4 
5 Items defined here should only be needed to call TCSpk code; never in the TCC's public API.
6 
7 Use standard TCC units:
8 - degrees
9 - seconds (absolute time in MJD seconds)
10 - C
11 - etc.
12 
13 Input velocities as well as positions; this code performs the extrapolation.
14 This code must also handle the great circle offset for ObjOff.
15 
16 Input normal earth orientation block. Let this code interpolate.
17 
18 Pass in TAI for which a position is wanted.
19 
20 Handle wrap externally, as well as all recognition that "this is a new target".
21 */
22 
23 /*
24 Run basic pointing calculation
25 
26 Would it make any sense to add parameters to allow coordinate conversion?
27 Or is that a different subroutine?
28 
29 Coordinate conversions would include:
30 - given a guide star position in CCD coordinates, compute the sky coordinate of the star;
31  the Inst block has guide probe info, so this might work already
32 - given a guide star position in CCD coordinates and the known sky coordinates of that guide star
33  compute pointing error. This could be done via a separate obj field for guide stars or an additional block,
34  or just write a different subroutine. In fact this routine could call a more general coordinate converter.
35 - test a new position: already supported; just call it and see if it's in range
36 - given a position, predict the rotator angle.
37 -
38 */
39 #include <iostream>
40 #include <string>
41 #include "tcs.h"
42 #include "coordConv/coordConv.h"
43 #include "tcc/basics.h"
44 #include "tcc/earth.h"
45 #include "tcc/instPos.h"
46 #include "tcc/weath.h"
47 
48 namespace tcc {
49 namespace tcspk {
50 
51  double const FL = 1.0;
52  int const JBP = 0;
53  double const RNoGo = 0.0;
54 
69  bool tcsFromPVT(double &pos, double &vel, coordConv::PVT const &pvt, double tai, bool isAz=false);
70 
80  void pvtFromTCS(coordConv::PVT &pvt, double posArr[2], double tai, double deltaTAI, bool isAz=false);
81 
85  inline double rotTcsFromPhys(double rotPhys, tcc::InstPosition const &instPos) {
86  return coordConv::wrapCtr(180.0 + instPos.getRotAzMechConst() - rotPhys) * coordConv::RadPerDeg;
87  }
88 
92  inline double rotPhysFromTcs(double rotTcs, tcc::InstPosition const &instPos) {
93  return coordConv::wrapCtr(180.0 + instPos.getRotAzMechConst() - (rotTcs / coordConv::RadPerDeg));
94  }
95 
96 }
97  std::ostream &operator<<(std::ostream &os, ASTROM const &astrom);
98 
99  std::ostream &operator<<(std::ostream &os, FLDOR const &fldor);
100 
101  std::ostream &operator<<(std::ostream &os, PORIG const &porig);
102 
103  std::ostream &operator<<(std::ostream &os, SITE const &site);
104 
105  std::ostream &operator<<(std::ostream &os, TARG const &targ);
106 
107  std::ostream &operator<<(std::ostream &os, TIMEO const &timeo);
108 
109  std::ostream &operator<<(std::ostream &os, TSCOPE const &tscope);
110 
114  template <typename T>
115  std::string formatCArr(T const arr[], int n);
116 
124  template <typename T, int ROWS, int COLS>
125  std::string formatCMat(T const mat[ROWS][COLS]);
126 
127 }
bool tcsFromPVT(double &pos, double &vel, coordConv::PVT const &pvt, double tai, bool isAz=false)
Definition: tcsShim.cc:12
double getRotAzMechConst() const
Definition: instPos.h:77
double const FL
focal length: 1.0 means focal plane coordinates are in radians
Definition: tcsShim.h:51
int const JBP
false: the telescope never goes below the horizon or beyond 90 alt
Definition: tcsShim.h:52
void pvtFromTCS(coordConv::PVT &pvt, double posArr[2], double tai, double deltaTAI, bool isAz=false)
Definition: tcsShim.cc:28
std::string formatCArr(T const arr[], int n)
std::ostream & operator<<(std::ostream &os, ChebyshevPolynomial const &cheby)
Definition: cheby.cc:12
double rotTcsFromPhys(double rotPhys, tcc::InstPosition const &instPos)
Definition: tcsShim.h:85
double const RNoGo
zone of automatic pole avoidances; 0.0 to not use
Definition: tcsShim.h:53
double tai()
Definition: tai.cc:7
double rotPhysFromTcs(double rotTcs, tcc::InstPosition const &instPos)
Definition: tcsShim.h:92
std::string formatCMat(T const mat[ROWS][COLS])
Definition: tcsShim.cc:154