20.11.2014 Views

Proyecto REX-2X - Radio Observatorio de Jicamarca

Proyecto REX-2X - Radio Observatorio de Jicamarca

Proyecto REX-2X - Radio Observatorio de Jicamarca

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

MyGRCParam.FixRCP.m_fTXA=0.0f;<br />

MyGRCParam.FixRCP.m_fTXB=0.0f;<br />

MyGRCParam.FixRCP.m_nNum_Windows=1;<br />

MyGRCParam.FixRCP.m_nNum_Taus=0;<br />

MyGRCParam.FixRCP.m_nCo<strong>de</strong>Type=CODE_NONE;<br />

MyGRCParam.FixRCP.m_nLine6_Function=NONE;<br />

MyGRCParam.FixRCP.m_nLine5_Function=NONE;<br />

MyGRCParam.FixRCP.m_fCLOCK=8.00f;<br />

MyGRCParam.FixRCP.m_nPrePulseBefore=0;<br />

MyGRCParam.FixRCP.m_nPrePulseAfter=0;<br />

MyGRCParam.FixRCP.m_sRango_IPP[0]='\0';<br />

MyGRCParam.FixRCP.m_sRango_TXA[0]='\0';<br />

MyGRCParam.FixRCP.m_sRango_TXB[0]='\0';<br />

//Initialize the rest of GlobalRCParam<br />

MyGRCParam.Dyn_sfAcqH0=new float[MyGRCParam.FixRCP.m_nNum_Windows];<br />

MyGRCParam.Dyn_sfAcqDH=new float[MyGRCParam.FixRCP.m_nNum_Windows];<br />

MyGRCParam.Dyn_snAcqNSA=new unsigned long[MyGRCParam.FixRCP.m_nNum_Windows];<br />

MyGRCParam.Dyn_sfAcqH0[0]=0;<br />

MyGRCParam.Dyn_sfAcqDH[0]=0;<br />

MyGRCParam.Dyn_snAcqNSA[0]=0;<br />

//Initilize the ProcessParam into GlobalPParam<br />

MyGPParam.FixPP.m_nHea<strong>de</strong>r_PP_Length=40+12;<br />

MyGPParam.FixPP.m_nExperimentType=EXP_RAWDATA;<br />

MyGPParam.FixPP.m_nSizeOfDataBlock=0;<br />

MyGPParam.FixPP.m_nFFTorProfilesperBlock=0;<br />

MyGPParam.FixPP.m_nDataBlocksperFile=1;<br />

MyGPParam.FixPP.m_nData_Windows=1;<br />

MyGPParam.FixPP.m_nProcessFlags=FLAG_DATATYPE_SHORT;<br />

MyGPParam.FixPP.m_nCoherentIntegrations=0;<br />

MyGPParam.FixPP.m_nIncoherentIntegrations=0;<br />

MyGPParam.FixPP.m_nTotalSpectra=0;<br />

//Initilize the rest of GlobalPParam<br />

MyGPParam.Dyn_sfDataH0=new float[MyGPParam.FixPP.m_nData_Windows];<br />

MyGPParam.Dyn_sfDataDH=new float[MyGPParam.FixPP.m_nData_Windows];<br />

MyGPParam.Dyn_snDataNSA=new unsigned long[MyGPParam.FixPP.m_nData_Windows];<br />

MyGPParam.Dyn_sfDataH0[0]=0;<br />

MyGPParam.Dyn_sfDataDH[0]=0;<br />

MyGPParam.Dyn_snDataNSA[0]=0;<br />

}<br />

void MyHea<strong>de</strong>r::FillBasicParameters(float IPP,float H0,float DH,unsigned long NChannels,<br />

unsigned long Profiles,unsigned long<br />

Samples,<br />

unsigned long NTX)<br />

{ MySystemParam.m_nSamples=Samples;<br />

MySystemParam.m_nProfiles=MyGPParam.FixPP.m_nFFTorProfilesperBlock=Profiles;//Estoes para<br />

un bloque por archivo<br />

MySystemParam.m_nChannels=NChannels;<br />

MyGRCParam.FixRCP.m_fIPP=IPP;<br />

MyGRCParam.FixRCP.m_nNTX=NTX;<br />

MyGRCParam.Dyn_sfAcqH0[0]=MyGPParam.Dyn_sfDataH0[0]=H0;<br />

MyGRCParam.Dyn_sfAcqDH[0]=MyGPParam.Dyn_sfDataDH[0]=DH;<br />

MyGRCParam.Dyn_snAcqNSA[0]=MyGPParam.Dyn_snDataNSA[0]=Samples;<br />

MyGPParam.FixPP.m_nSizeOfDataBlock=2*NChannels*Profiles*Samples*NTX*sizeof(short);<br />

}<br />

int MyHea<strong>de</strong>r::SaveHea<strong>de</strong>r(FILE *MyFile)<br />

{ size_t BytesWritten=0;<br />

size_t m_WByte;<br />

_ftime32_s(&MyBasicHea<strong>de</strong>r.FullTime);//Get the hour<br />

//***************************************************<br />

//Save 24Bytes of Basic Hea<strong>de</strong>r each variable<br />

m_WByte=4;<br />

BytesWritten+=fwrite(&MyBasicHea<strong>de</strong>r.nHea<strong>de</strong>rlength,1,m_WByte,MyFile);<br />

m_WByte=2;<br />

BytesWritten+=fwrite(&MyBasicHea<strong>de</strong>r.nHea<strong>de</strong>rVer,1,m_WByte,MyFile);<br />

m_WByte=4;<br />

BytesWritten+=fwrite(&MyBasicHea<strong>de</strong>r.nBlockCounter,1,m_WByte,MyFile);<br />

//Saving Timeb Struct<br />

m_WByte=4;<br />

BytesWritten+=fwrite(&MyBasicHea<strong>de</strong>r.FullTime.time,1,m_WByte,MyFile);<br />

44

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!