255 GMatrix rot = (ry * rz).transpose();
262 double cos_theta =
std::cos(theta_rad);
263 double sin_theta =
std::sin(theta_rad);
264 GVector native(-cos_phi*sin_theta, sin_phi*sin_theta, cos_theta);
289 GVector vector(cosalt*cosaz, cosalt*sinaz, sinalt);
const double & alt(void) const
Return altitude angle in radians.
void rotate_deg(const double &phi, const double &theta)
Rotate horizontal direction by zenith and azimuth angle.
void clear(void)
Clear horizontal direction.
GVector abs(const GVector &vector)
Computes absolute of vector elements.
GVector cos(const GVector &vector)
Computes cosine of vector elements.
Generic matrix class definition.
void free_members(void)
Delete class members.
double m_az
azimuth in radians
double acos(const double &arg)
Computes acos by avoiding NaN due to rounding errors.
Horizontal (Alt/Az) direction class.
GHorizDir & operator=(const GHorizDir &dir)
Assignment operator.
void eulery(const double &angle)
Set Euler rotation matrix around y axis.
virtual ~GHorizDir(void)
Destructor.
GHorizDir(void)
Constructor.
void eulerz(const double &angle)
Set Euler rotation matrix around z axis.
void copy_members(const GHorizDir &dir)
Copy class members.
double dist(const GHorizDir &dir) const
Compute angular distance to horizontal direction in radians.
Vector class interface definition.
GVector asin(const GVector &vector)
Computes arcsin of vector elements.
std::string print(const GChatter &chatter=NORMAL) const
Print horizontal direction information.
GHorizDir * clone(void) const
Clone horizontal direction.
void altaz_deg(const double &alt, const double &az)
Set horizontal direction (degrees)
void init_members(void)
Initialise class members.
void altaz(const double &alt, const double &az)
Set horizontal direction (radians)
GVector sin(const GVector &vector)
Computes sine of vector elements.
double dist_deg(const GHorizDir &dir) const
Compute angular distance to horizontal direction in degrees.
Exception handler interface definition.
GVector celvector(void) const
Return horizontal direction as 3D vector.
double m_alt
altitude in radians
double atan2(const double &y, const double &x)
Compute arc tangens in radians.
const double & az(void) const
Return azimuth angle in radians.
Generic matrix class definition.
bool operator==(const GEnergy &a, const GEnergy &b)
Energy equality operator friend.
bool operator!=(const GEbounds &a, const GEbounds &b)
Energy boundaries inequality operator friend.
Mathematical function definitions.
Horizontal direction class interface definition.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.