Commit fa0dd265 authored by Sergio Poppi's avatar Sergio Poppi
Browse files

HolographyBackend: Offsets instead of target coordinate intoDXC outfile

parent bcc930a7
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -130,8 +130,10 @@ class DigitalXCorrelator(DXC__POA.DigitalXCorrelator, ACSComponent, ContainerSer
    def cleanUp(self):
        self.corr.disconnect()
        self.getLogger().logDebug("CleanUp")
        if not self.out_file.closed:
          
            self.closeFile()
            
        self.out_file.close()
        #ComponentLifecycle.cleanUp()
        
    def aboutToAbort(self):
@@ -255,6 +257,8 @@ class DigitalXCorrelator(DXC__POA.DigitalXCorrelator, ACSComponent, ContainerSer
            raise ComponentErrorsImpl.FileIOErrorExImpl()
    def closeFile(self):
        try:
          if not self.out_file.closed:
            
                 self.out_file.close()
        except IOError:
            self.getLogger().logDebug("Error in initialize: cannot close out_file")
+9 −2
Original line number Diff line number Diff line
@@ -317,6 +317,9 @@ void HolographyImpl::sendHeader() throw (CORBA::SystemException, BackendsErrors:
                        }
                }
     try {
     
                cout << "**Correlator OpenFile**"<< endl;
                m_correlator->openFile(m_filename.c_str());
                getSender()->startSend(FLOW_NUMBER,(const char*)&bkd,
                                sizeof(Backends::TMainHeader)+bkd.header.sections*sizeof(Backends::TSectionHeader));
        }
@@ -326,6 +329,10 @@ void HolographyImpl::sendHeader() throw (CORBA::SystemException, BackendsErrors:
                impl.log(LM_DEBUG);
                throw impl.getBackendsErrorsEx();
        }
        catch (BackendsErrors::BackendsErrorsExImpl& ex) {
                ex.log(LM_DEBUG);
                throw ex.getBackendsErrorsEx();         
        }
        catch (...) {
                _EXCPT(ComponentErrors::UnexpectedExImpl,impl,"HolographyImpl::sendHeader()");
                impl.log(LM_DEBUG);
@@ -349,8 +356,8 @@ void HolographyImpl::sendData(ACS::Time startTime) throw (CORBA::SystemException

        try{
        
                cout << "**Correlator OpenFile**"<< endl;
                m_correlator->openFile(m_filename.c_str());
//                 cout << "**Correlator OpenFile**"<< endl;
//                 m_correlator->openFile(m_filename.c_str());
                
         
     //           m_correlator->save_coeff(az,el);
+10 −2
Original line number Diff line number Diff line
@@ -38,6 +38,9 @@ void CSenderThread::onStop()
 
void CSenderThread::runLoop()
{

        double azeloff,eloff,raoff,decoff,lonoff,latoff;

	TIMEVALUE now;
	   double az,el;
	az=-99.;  // DUMMY values 
@@ -52,6 +55,11 @@ void CSenderThread::runLoop()
	{
	  	cout <<"ABOSS REFERENCED " << endl;
	IRA::CIRATools::getTime(now);
        
          
          
          
        m_antenna_boss->getAllOffsets(azeloff,eloff,raoff,decoff,lonoff,latoff); //   
	m_antenna_boss->getObservedHorizontal(now.value().value,0,az,el); // get az and el from bos

	}
@@ -63,7 +71,7 @@ void CSenderThread::runLoop()
#define PI 3.14159265358979323846
        az=az/PI*180.0;
        el=el/PI*180.0;
	m_dxc_correlator->save_coeff(az,el); 
	m_dxc_correlator->save_coeff(azeloff,eloff); 
	// AUTO_TRACE("CSenderThread::runLoop()");
	} catch (ACSErrTypeFPGACommunication::ACSErrTypeFPGACommunicationExImpl &ex)
	{
@@ -87,7 +95,7 @@ void CSenderThread::runLoop()
	
	}

	ACS_LOG(LM_FULL_INFO,"CSenderThread::runLoop()",(LM_INFO,"SenderThread runloop"));
	ACS_LOG(LM_FULL_INFO,"CSenderThread::runLoop()",(LM_DEBUG,"SenderThread runloop"));
	
	
}