Commit 05d18e60 authored by Andrea Orlati's avatar Andrea Orlati Committed by GitHub
Browse files

fix issue #553: three keywords added to the main header: 'Subscan LonOffset,...

fix issue #553: three keywords added to the main header: 'Subscan LonOffset, SubScan LatOffset, SubScan OffsetFrame' (#555)
parent 4da6a1a7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/
	issue #504 - added credits clause (regarding INAF data ownership) to fits files headers
   issue #518 - KBand receivers cryo temperature read wrongly with connection problems. More information:
    https://github.com/discos/discos/issues/518#issuecomment-590838480
   issue #530 - New Fitszilla versione 1.21 online. The subscan offsets related keywords added to the primary header.

## Fixed
    issue #518 - In case of communication error we set a dummy value (100000) for the temperature properties, and the related timestamp keeps the value of the last communication timestamp.
+11 −1
Original line number Diff line number Diff line
@@ -647,7 +647,7 @@ module Antenna {
		void getObservedHorizontal(in ACS::Time timestamp,in ACS::TimeInterval duration,out double az,out double el);
		
		/**
		 * This method should only be used internally to know the user offsets currently commanded
		 * This method should only be used internally to know the offsets currently commanded. i.e. the sum of all offset types
		 * @throw CORBA::SystemExcpetion
		 * @param azOff user offset for the azimuth (radians)
		 * @param elOff user offset for the elevation (radians)
@@ -658,6 +658,16 @@ module Antenna {
		 */
		void getAllOffsets(out double azOff,out double elOff,out double raOff,out double decOff,out double lonOff,out double latOff);

		/**
		 * This method should only be used internally to know the scan offsets currently commanded
		 * @throw CORBA::SystemException
		 * @param lonOff user offset for the longitude (radians)
		 * @param latOff user offset for the latitude (radians)
		 * @param offFrame reference frame of the offsets
		 */
		void getScanOffsets(out double lonOff, out double latOff,out TCoordinateFrame offFrame);
		
		
		/**
		 * This method is used internally to know the scan axis/direction os the presently commanded scan
		 * @param axis indicates which axis is currently involved by the present scan
+28 −0
Original line number Diff line number Diff line
@@ -19,6 +19,34 @@ namespace Antenna {
 */
class Definitions {
public:
	static bool map(const char *str,TCoordinateFrame& frame) {
		if (strcasecmp(str,"EQ")==0) {
			frame=Antenna::ANT_EQUATORIAL;
			return true;
		}
		else if (strcasecmp(str,"HOR")==0) {
			frame=Antenna::ANT_HORIZONTAL;
			return true;
		}
		else if (strcasecmp(str,"GAL")==0) {
			frame=Antenna::ANT_GALACTIC;
			return true;
		}
		else {
			return false;
		}
	}
	static const char *map(const TCoordinateFrame& frame) {
		if (frame==Antenna::ANT_EQUATORIAL) {
			return "EQ";
		}
		if (frame==Antenna::ANT_HORIZONTAL) {
			return "HOR";
		}
		else { // Antenna::ANT_GALACTIC
			return "GAL";
		}
	}
	static bool map(const char *str,TsubScanGeometry& geometry) {
		if (strcasecmp(str,"LAT")==0) {
			geometry=Antenna::SUBSCAN_CONSTLAT;
+27 −0
Original line number Diff line number Diff line

#include "AntennaModule.h"


#define FRAME_TEST1 "HOR"
#define FRAME_TEST2 "DUMMY"

int main(int argc, char *argv[])
{
	Antenna::TCoordinateFrame frame;
	printf("galactic frame: %s\n",(const char *)Antenna::Definitions::map(Antenna::ANT_GALACTIC));
	printf("equatorial frame: %s\n",(const char *)Antenna::Definitions::map(Antenna::ANT_EQUATORIAL));
	printf("horizontal frame: %s\n",(const char *)Antenna::Definitions::map(Antenna::ANT_HORIZONTAL));
	if (Antenna::Definitions::map(FRAME_TEST1,frame)) {
		printf("%s maps to %s\n",FRAME_TEST1,(const char *)Antenna::Definitions::map(frame));
	}
	else {
		printf("Conversion Error: %s\n",(const char *)FRAME_TEST1);
	}
	if (Antenna::Definitions::map(FRAME_TEST2,frame)) {
		printf("%s maps to %s\n",FRAME_TEST2,(const char *)Antenna::Definitions::map(frame));
	}
	else {
		printf("Conversion Error: %s\n",(const char *)FRAME_TEST2);
	}
	return 0;
}
+4 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ MAKE_PDF = ON
# C programs (public and local)
# -----------------------------
EXECUTABLES     =
EXECUTABLES_L   = TestReceivers TestManagement #TestAntenna
EXECUTABLES_L   = TestReceivers TestManagement TestAntenna

TestReceivers_OBJECTS = ReceiversModule
TestReceivers_LIBS= baci maci
@@ -45,6 +45,9 @@ TestReceivers_LIBS= baci maci
TestManagement_OBJECTS = ManagementModule
TestManagement_LIBS= ManagementErrors baci maci

TestAntenna_OBJECTS = AntennaModule
TestAntenna_LIBS= baci maci

#
# <brief description of xxxxx program>
xxxxx_OBJECTS   =	
Loading