Commit 269f56a6 authored by Reza  ANSARI's avatar Reza ANSARI
Browse files

Ajout fonctions pour acceder aux positions des antennes / baselines ds la...

Ajout fonctions pour acceder aux positions des antennes / baselines ds la classe P4Coords , Reza 20/12/2018
parent b83bf4ca
......@@ -617,9 +617,29 @@ ostream& P4AnaParams::Print(ostream& os) const
//coords de paon4 en degres decimaux [antenne centrale]
static double paon_lat = 47.3820 ; // 47deg 22' 55.1''
static double paon_lon = 2.19964; // 2deg 11' 58.7''
#define PAON4NBANT 4
static double paon4_posx[PAON4NBANT]={0., -5.994, 4.38, 4.383};
static double paon4_posy[PAON4NBANT]={0., 0.001, -5.997, 5.996};
static double paon4_posz[PAON4NBANT]={0., 0., 0., 0.};
double P4Coords::getLon(){return(paon_lon);}
double P4Coords::getLat(){return(paon_lat);}
Vector3d P4Coords::getAntennaPosition(sa_size_t num)
{
if ((num<1)||(num>4)) throw ParmError("P4Coords::getAntennaPosition() out of range antenna position <1 or>4 !");
return Vector3d(paon4_posx[num],paon4_posy[num],paon4_posz[num]);
}
Vector3d P4Coords::getBaseline(sa_size_t num1, sa_size_t num2)
{
if ((num1<1)||(num1>4)) throw ParmError("P4Coords::getBaseline() out of range antenna position num1 <1 or>4 !");
if ((num2<1)||(num2>4)) throw ParmError("P4Coords::getBaseline() out of range antenna position num2 <1 or>4 !");
return Vector3d(paon4_posx[num2]-paon4_posx[num1],paon4_posy[num2]-paon4_posy[num1],paon4_posz[num2]-paon4_posz[num1]);
}
double P4Coords::RAFromTimeTU(TimeStamp const & tu)
{
// Compute RA from TU-time , using the old code from EROS in SOPHYA
......
......@@ -20,6 +20,7 @@
#include "sopnamsp.h"
#include "pexceptions.h"
#include "timestamp.h"
#include "unitvector.h"
//---------------------------------------------------------------------------------
//---- Classe definition de bande de frequence, frequence centrale et largeur
......@@ -234,19 +235,40 @@ inline ostream& operator << (ostream& os, P4AnaParams const& a)
//---------------------------------------------------------
//--------------------- class P4Coords --------------------
//! Class to provide geometric / spatial information about PAON-4 instrument.
/*! \brief Class to provide geometric / spatial information about PAON-4 instrument.
PAON4 reference coordinate system
4 antennae 1,2,3,4
\verbatim
N
| 4
.
W- 2 . 1 -E
.
| 3
S
Origin, Antenna 1 (coord 0,0,0) in principle, coincides with array longitude - latitude
X-axis : from West -> East
Y-axis : from South -> North
Z-axis : toward zenith, positive increasing height
\endverbatim
*/
class P4Coords{
public :
//! static method returning PAON4 (central antenna) longitude in decimal degrees (positive -> east)
static double getLon();
//! static method returning PAON4 (central antenna) latitude in decimal degrees (positive -> north)
static double getLat();
//! return the antenna position for antenna \b num (1..4) in the PAON4 coordinate system
static Vector3d getAntennaPosition(sa_size_t num);
//! return the antenna pair baseline from num1 -> num2
static Vector3d getBaseline(sa_size_t num1, sa_size_t num2);
//! static method Converting a TU time into RA (Right Ascension sky coordinates) in decimal degrees (uses old EROS code in SOPHYA, datime.h)
static double RAFromTimeTU(TimeStamp const & tu);
//! static method Converting a TU time into RA (Right Ascension sky coordinates) in decimal degrees (uses Xephem code through XAstroPack, seems to have an error)
static double RAFromTimeTUXE(TimeStamp const & tu);
};
//! Class to facilitate projection into RA map
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment