source: trunk/MagicSoft/Mars/mpointing/MPointingPos.cc@ 4651

Last change on this file since 4651 was 3666, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 2.6 KB
Line 
1/* ======================================================================== *\
2!
3! *
4! * This file is part of MARS, the MAGIC Analysis and Reconstruction
5! * Software. It is distributed to you in the hope that it can be a useful
6! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
7! * It is distributed WITHOUT ANY WARRANTY.
8! *
9! * Permission to use, copy, modify and distribute this software and its
10! * documentation for any purpose is hereby granted without fee,
11! * provided that the above copyright notice appear in all copies and
12! * that both that copyright notice and this permission notice appear
13! * in supporting documentation. It is provided "as is" without express
14! * or implied warranty.
15! *
16!
17!
18! Author(s): Thomas Bretz, 11/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
19!
20! Copyright: MAGIC Software Development, 2000-2004
21!
22!
23\* ======================================================================== */
24
25/////////////////////////////////////////////////////////////////////////////
26//
27// MPointingPos
28//
29// In this container we store the corrected pointing position of the
30// telscope. The pointing coordinates are read into MReportDrive together
31// with its time.
32//
33// MPointingPosCalc afterwards calculates corrections and checks for the
34// cosistency of the coordinates. The result (the real coordinates)
35// are stored in this container. No further correction should be necessary
36// using MPointingPos.
37//
38// If you need the rotation angle of the starfield in the camera you can
39// get it from here.
40//
41/////////////////////////////////////////////////////////////////////////////
42#include "MPointingPos.h"
43
44#include "MTime.h"
45#include "MObservatory.h"
46#include "MAstroSky2Local.h"
47
48ClassImp(MPointingPos);
49
50using namespace std;
51
52// --------------------------------------------------------------------------
53//
54// Get the corresponding rotation angle of the sky coordinate system
55// seen with an Alt/Az telescope calculated from the stored local
56// (Zd/Az) coordinates.
57//
58// For more information see MAstro::RotationAngle
59//
60Double_t MPointingPos::RotationAngle(const MObservatory &o) const
61{
62 return o.RotationAngle(fZd*TMath::DegToRad(), fAz*TMath::DegToRad());
63}
64
65// --------------------------------------------------------------------------
66//
67// Get the corresponding rotation angle of the sky coordinate system
68// seen with an Alt/Az telescope calculated from the stored sky
69// (Ra/Dec) coordinates.
70//
71// For more information see MAstro::RotationAngle
72//
73Double_t MPointingPos::RotationAngle(const MObservatory &o, const MTime &t) const
74{
75 return MAstroSky2Local(t, o).RotationAngle(GetRaRad(), GetDecRad());
76}
Note: See TracBrowser for help on using the repository browser.