diff --git a/MAC/APL/PAC/BeamServer/src/Beamlet2SubbandMap.h b/MAC/APL/PAC/BeamServer/src/Beamlet2SubbandMap.h deleted file mode 100644 index e65a4bf1f18034ee2e2b90f6f6732cbdd2de7b3e..0000000000000000000000000000000000000000 --- a/MAC/APL/PAC/BeamServer/src/Beamlet2SubbandMap.h +++ /dev/null @@ -1,84 +0,0 @@ -//# -*- mode: c++ -*- -//# -//# Beamlet2SubbandMap.h: FPGA firmware version information from the RSP board. -//# -//# Copyright (C) 2002-2004 -//# ASTRON (Netherlands Foundation for Research in Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl -//# -//# This program is free software; you can redistribute it and/or modify -//# it under the terms of the GNU General Public License as published by -//# the Free Software Foundation; either version 2 of the License, or -//# (at your option) any later version. -//# -//# This program is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License -//# along with this program; if not, write to the Free Software -//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//# -//# $Id$ - -#ifndef BEAMLET2SUBBANDMAP_H_ -#define BEAMLET2SUBBANDMAP_H_ - -#include <APL/RTCCommon/Marshalling.h> -#include <APL/RSP_Protocol/EPA_Protocol.ph> - -#include <complex> -#include <string> -#include <map> -#include <bitset> -#include <blitz/array.h> -#include <Common/LofarTypes.h> - -namespace LOFAR { - namespace BS_Protocol { - - class Beamlet2SubbandMap - { - public: - /** - * Constructors for a Beamlet2SubbandMap object. - * Currently the tv_usec part is always set to 0 irrespective - * of the value passed in. - */ - Beamlet2SubbandMap() { } - - /* Destructor for Beamlet2SubbandMap. */ - virtual ~Beamlet2SubbandMap() {} - - /* get references to the version arrays */ - std::map<uint16, uint16>& operator()(); - - public: - /*@{*/ - /** - * marshalling methods - */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); - /*@}*/ - - public: - /* other methods */ - std::bitset<EPA_Protocol::MEPHeader::N_SUBBANDS> getAsBitset() const; - - private: - /** - * Beamlet2SubbandMap - * - * map beamlet (first) to subband (second). - */ - std::map<uint16, uint16> m_beamlet2subband; - - }; - - inline std::map<uint16, uint16>& Beamlet2SubbandMap::operator()() { return m_beamlet2subband; } - }; -}; // namespace LOFAR -#endif /* BEAMLET2SUBBANDMAP_H_ */ diff --git a/MAC/APL/PAC/BeamServer/src/Pointing.h b/MAC/APL/PAC/BeamServer/src/Pointing.h deleted file mode 100644 index 4914af94d303f3f775dbe582289745dc5f5b3278..0000000000000000000000000000000000000000 --- a/MAC/APL/PAC/BeamServer/src/Pointing.h +++ /dev/null @@ -1,138 +0,0 @@ -//# ABSPointing.h: interface of the Pointing class -//# -//# Copyright (C) 2002-2004 -//# ASTRON (Netherlands Foundation for Research in Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl -//# -//# This program is free software; you can redistribute it and/or modify -//# it under the terms of the GNU General Public License as published by -//# the Free Software Foundation; either version 2 of the License, or -//# (at your option) any later version. -//# -//# This program is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License -//# along with this program; if not, write to the Free Software -//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//# -//# $Id$ - -#ifndef POINTING_H_ -#define POINTING_H_ - -#include <APL/RTCCommon/Timestamp.h> - -#include <AMCBase/Converter.h> -#include <AMCBase/SkyCoord.h> -#include <AMCBase/EarthCoord.h> -#include <AMCBase/TimeCoord.h> - -namespace LOFAR { - namespace BS_Protocol { - - /** - * Class with - */ - class Pointing - { - public: - /** - * A direction can have one of these three types. - */ - enum Type { - J2000 = 1, - AZEL = 2, - - /** - * The LOFAR station local coordinate system. - * For the definition of this coordinate system see [ref]. - */ - LOFAR_LMN = 3, - }; - - //@{ - /** - * Constructors and destructors for a pointing. - */ - Pointing(); - Pointing(double angle0, double angle1, RTC::Timestamp time, Type type); - virtual ~Pointing(); - //@} - - //@{ - /** - * 'set' methods to set the time and - * direction of a pointing. - */ - void setDirection(double angle0, double angle1); - void setTime(RTC::Timestamp time); - void setType(Type type); - //@} - - //@{ - /** - * Accessor methods. Get the time and - * direction of a pointing. - */ - double angle0() const; - double angle1() const; - RTC::Timestamp time() const; - bool isTimeSet() const; - //@} - - /** - * Get the type of pointing. - */ - Type getType() const; - - /** - * Convert pointing from J2000 or AZEL format to LMN format - * if it is not already in LMN format. - * param conv Pointer to the converter (must be != 0 for J2000 type). - * param pos Pointer to position on earth for conversion (must be != 0 for J2000 type). - */ - Pointing convertToLMN(AMC::Converter* conv, AMC::EarthCoord* pos); - - /** - * Compare the time of two pointings. - * Needed for priority queue of pointings. - */ - bool operator<(Pointing const & right) const; - - public: - /*@{*/ - /** - * marshalling methods - */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); - /*@}*/ - - private: - double m_angle0; - double m_angle1; - RTC::Timestamp m_time; - Type m_type; - }; - - inline void Pointing::setTime(RTC::Timestamp time) { m_time = time; } - inline void Pointing::setType(Type type) { m_type = type; } - inline void Pointing::setDirection(double angle0, double angle1) { m_angle0 = angle0; m_angle1 = angle1; } - inline RTC::Timestamp Pointing::time() const { return m_time; } - inline bool Pointing::isTimeSet() const { return !(0 == m_time.sec() && 0 == m_time.usec()); } - inline Pointing::Type Pointing::getType() const { return m_type; } - inline double Pointing::angle0() const { return m_angle0; } - inline double Pointing::angle1() const { return m_angle1; } - inline bool Pointing::operator<(Pointing const & right) const - { - // inverse priority, earlier times are at the front of the queue - return (m_time > right.m_time); - } - }; -}; - -#endif /* POINTING_H_ */