12 fName = name ? name :
"TPointStar";
13 fTitle = title ? title :
"A set of TPoints";
17 fStarAz(saz*TMath::DegToRad()),
18 fStarEl(sel*TMath::DegToRad()),
19 fRawAz(raz*TMath::DegToRad()),
20 fRawEl(rel*TMath::DegToRad()), fMag(-25)
60 const double x = cos(
fRawEl) * cos(fStarEl) * cos(fStarAz-
fRawAz);
61 const double y = sin(
fRawEl) * sin(fStarEl);
63 const Double_t d = x + y;
68 const Double_t e1 = 45./3600*TMath::DegToRad() /4 * 0.5;
71 const Double_t e2 = 360./16384*TMath::DegToRad()/4 * 0.5;
73 const Double_t e11 = sin(del)+cos(
fRawEl)*sin(fStarEl)*(1-cos(daz));
74 const Double_t e12 = cos(
fRawEl)*cos(fStarEl)*sin(daz);
76 const Double_t e21 = -sin(del)+sin(
fRawEl)*cos(fStarEl)*(1-cos(daz));
77 const Double_t e22 = -cos(
fRawEl)*cos(fStarEl)*sin(daz);
79 const Double_t err1 = sqrt(1-d*d);
80 const Double_t err2 = (e11*e11 + e12*e12)*e1*e1;
81 const Double_t err3 = (e21*e21 + e22*e22)*e2*e2;
83 *err = sqrt(err2+err3)/err1 * TMath::RadToDeg();
86 const Double_t dist = acos(d);
87 return dist * TMath::RadToDeg();
98 }
while (str[0]==
'#');
101 Int_t n = sscanf(str.Data(),
"%f %f %f %f %*f %*f %*f %*f %*f %*f %f", v, v+1, v+2, v+3, &
mag);
104 cout <<
"Read: ERROR - Not enough numbers" << endl;
107 set.fMag = n<5 ? -25 :
mag;
109 set.fStarAz = v[0]*TMath::DegToRad();
110 set.fStarEl = v[1]*TMath::DegToRad();
112 set.fRawAz = v[2]*TMath::DegToRad();
113 set.fRawEl = v[3]*TMath::DegToRad();
120 res =
set.GetResidual(&err);
121 cout <<
"Read: " << v[0] <<
" " << v[1] <<
" : " << v[2] <<
" " << v[3] <<
" : " << v[2]-v[0] <<
" " << v[3]-v[1] <<
" : " << res <<
" " << err <<
" " << err/res << endl;
129 out <<
Form(
"%8.3f",
set.
fStarAz*TMath::RadToDeg()) <<
" ";
130 out <<
Form(
"%7.3f",
set.
fStarEl*TMath::RadToDeg()) <<
" ";
131 out <<
Form(
"%8.3f",
set.
fRawAz*TMath::RadToDeg()) <<
" ";
132 out <<
Form(
"%7.3f",
set.
fRawEl*TMath::RadToDeg()) <<
" ";
Double_t GetStarZd() const
friend std::ostream & operator<<(std::ostream &fout, TPointStar &set)
TPointStar(const char *name, const char *title=0)
void Init(const char *name=0, const char *title=0)
Double_t GetResidual(Double_t *err=0) const
ZdAz CorrectBack(const ZdAz &zdaz) const
AltAz GetStarAltAz() const
Double_t GetRawZd() const
AltAz GetRawAltAz() const
void Adjust(const MPointing &bend)
Double_t GetStarAz() const
Double_t GetRawAz() const
Double_t GetStarEl() const
Double_t GetRawEl() const
void AdjustBack(const MPointing &bend)
friend std::istream & operator>>(std::istream &fin, TPointStar &set)