Recent Changes - Search:

Participantes

Proyectos

Cursos

Bitacoras

Support

upload Folder

edit SideBar

Johanna


DIRECTION FINDING

algunas funciones y parametros de algortimos de Gurgel

Variables globales:

  • >>iant = i antenna
  • >>mt= number of samples by chirp #(samples) NSER
  • >>Nchirp = number of chirps #(samples) NFFT
  • >>isweep = length chirp #(segundos)
  • >>nran = range cell
  • >>NORD = true_North
  • >>NST default=2. Number of WERA sites (radial files)
  • >>FREQ radar frequency in MHz
  • >>DT sampling time or chirp length
  • >>DF spectral line distance
  • >>NFTL number of frequencies in Doppler spectrum. Often 512NST default=2. Number of WERA sites (radial files)

Read_RAW_Data:

  • >> Read_RAW_Data(IUN,BUFFER,LNGBUF,ISWEEP)
  • >> IUN= unit number #
  • >> BUFFER = array to be filled with data # sweeplength*2 (because of I/Q)
  • >> LNGBUF= length of a chirp
  • >> ISWEEP= Number of the chirp # (1:NSER)
  • >> BUFFER(1:2*mt, isweep,iant) #isweep=2048, mt=384 for compress data

Header_sort:

  • >> Freq
  • >> NORD
  • >> T_chirp
  • >> F_bragg
  • >> iun_phase = unit for reading
  • >> ist = pointer to site number in params.cfg
  • >> ARR1 = 1rs antenna of array
  • >> ARR2 = last antenna of array
  • >> Nst = wera site
  • >> Gain (nant,nran) = gain
  • >> Pcorr(nant,nran) = phase correction

wera4_dir: This program reads Wera raw data files(.SORT) and calculates radial components from a 4-antenna square-array

  • >>window ='r' # constand gain/no window
  • >>NMAX=20000 #array size of sorting
  • >>MTL = number of fractional series for overlap
  • >>ITL = counter for fractional series
  • >>MFF_TL = exponent of the FFT
  • >>FEN_FFT_TL = window function for FFT
  • >>F_BRAGG_TOPO = frequency of the bragg lines
  • >>NLAUF = number sections
  • >>IWG1= section from degrees
  • >>IWG2= section to degree
  • >>NFTL = 512 # FracSer
  • >>SHIFT=8 #shift between fractional series
  • >>SHIFT_M = NFTL/4 #shift for averaging 75% overlap
  • >> read CFG # read parameters for params.cfg (SQA1..4, ANG1, ANG2, lat, lon)
  • >> read Sort file (Read_RAW_Data(IUN,BUFFER,LNGBUF,ISWEEP))
  • >> read header_wera (iun_sort, HEAD, NSER,NANT_SORT,ERR))
  • >> read header_SORT (FREQ,NORD,T_chirp,F_bragg,RHF, RAN_OFF)
  • >> search_site_Number(LAt_site,Lon_site,IST, ERR_site) #IST(pointer to site number in params.cfg)
  • >> calculate number of frac-series
  • >> calculate sections from geographical angles
  • >> read_Fullcal (Nant_sort,Nran,Iun_gain,Header,Gain,Pcorr,gain_calib)
  • >> read WERA phase (AL,PH(1,I), PH(2,I),PH(3,I), PH(4,I) #I don't Know where is this file
  • >> win_FFT(window,NFTL,FEN_FFT_TL) #window function for FFT
  • >> GAUSS(WIn_sort,Ga_sort) #Gauss window for sorting
  • >> Define_Speclines_TL #convert SIGNAL and NOISE frequences to spectral line number
  • >>loop through range cells
  for Iran=1:1:NRAN
  IANT=SQA1; and the same for the other 4 antennas
   call READ_DATEN_IEEE_2D(IUN,NANT_SORT,NSER,NANT,ARRAY,LENGTH,COMPLEX_BUF,IRAN,IANT,ERR)   %take I and Q and do complex
   COMPLEX_BUFF(I,IANT) = COMPLEX_BUFF(I,IANT)*exp(IE*Pcorr(IANT,IRAN));   
  for I=1:2*nser
    REAL_BUFF1(I) = REAL_BUFF1(I) * GAIN(1,IRAN) ;
    REAL_BUFF2(I) = REAL_BUFF2(I) * GAIN(2,IRAN) ;
    REAL_BUFF3(I) = REAL_BUFF3(I) * GAIN(3,IRAN) ;
    REAL_BUFF4(I) = REAL_BUFF4(I) * GAIN(4,IRAN) ;
  end 
  • >> S_TO_N_Hildebrand #Calculate Signal/Noise ratio
  • >> CALL PHDIFF #Calculate phase differences
  • >>
  • >>

Read_CFG: Read configuration file and load data into common block.

  • >>SQA1,...,SQA4 = antenna 1 of square array to antenna 4
  • >>ANG1 = Direction finding from degrees
  • >>ANG2 = Direction finding to degrees
  • >>ARRD = distance between elements (meters)
  • >> LAT and Long site
  • >> true north
  • >>RAN1 = Inner range
  • >>RAN2= Outer range

Read_Header_SORT:

  • >>FREQ,NORD,T_chirp,F_bragg,RHF, RAN_OFF,lat, lon
  • >> F_bragg = sqrt(9.81*freq/(300*pi))
  • >>nant_sort = antennas
  • >>nant_array = antennas
  • >>FREQ=frequency #Mhz
  • >>MT #samples
  • >>T_chirp #s
  • >>F_bragg #Hz
  • >>nran=Last RC #range cells
  • >>RHF=Rangeresol #km
  • >>RAN_OFF #RC
  • >>NORD=True_north #degrees

Read_FullCal: read_Fullcal (Nant_sort,Nran,Iun_gain,Header,Gain,Pcorr,gain_calib)

  • >>Fclk=DDs clock frequency
  • >>t_sweep =Duration of chirp
  • >> Gain(iant,iran) = 1.0 #default
  • >> Pcorr(iant,iran)= 0.0 #default

READ_DATEN_IEEE_2D: version for WERA with exchanging of I and Q READ_DATEN_IEEE_2D(IUN,NANT_SORT,NSER,NANT,ARRAY,LENGTH,COMPLEX_BUF,IRAN,IANT,ERR)

  • >>NANT_SORT #Number of antennas in the files data structure
  • >>NSER #Number of samples in the file
  • >>NANT_ARRAY #Number of antenna allocated in Complex_buff
  • >>COMPLEX_BUFF (LENGTH,NANT_ARRAY) # array to receive the data read
  • >>IRAN # selected range cell number (1 to NRAN)
  • >>IANT # selected antenna (1 to nant)
  • >>err # true, if ERROR reading file
  • >>I_in = real(complex_Buff (I, IANT))
  • >>Q_in = AIMAG(complex_Buff (I, IANT))
  • >>COMPLEX_BUFF (I,IANT) = CMPLX(Q_OUT,I_OUT)

SPEC_FLOAT: SUBROUTINE SPEC_FLOAT(NFFT,MFF,NFTL,ITL,WINDOW,REAL_BUFFER,U) SPEC_FLOAT(NFTL,MFF_TL,SHIFT,ITL,FEN_FFT_TL,REAL_BUFF1,V1);

  • >> NFTL = 512 # default
  • >> MFF_TL = NINT(1.442695041 * LOG(FLOAT(NFTL)))
  • >> SHIFT= 8 #default
  • >> ITL = counter for ITL = 1:NTL (NTL=193 #number of frac-series)
  • >> FEN_FFT_TL (NFTL) #windows
  • >> REAL_BUFF #data I and Q for antenana i
  • >> Vi #I don't understand what he do

S_TO_N_Hildebrand:

  • >>is_from_tl IBneg_TL - SIG_FEN_TL + 1. Lower and upper frequency indices for the Bragg peak search, delimited by the maximum radial currents.
  • >>in_from_tl Lower and upper frequency indices for the noise, delimited by F_NOISE_FEN.

PHDIF:

  1. Calculate phase differences, values range: -180 ... +180 degrees

SUBROUTINE PHDIFF(NFFT, V1, V2, V3, V4, is_from_tl, is_to_tl,PH21, PH32, PH43, PH14)

  • >>RE1 = V1(2*I-1);
  • >>IM1 = V1(2*I);
  • >>WI1 = atan2d(IM1,RE1) #same for other Vi
  • >> PH21(I) = WI2 - WI1;
  • >> if (PH21(I)< -180)
       PH21(I) = PH21(I) + 360;
       end    
    if (PH21(I)>180.0) 
       PH21(I) = PH21(I) - 360; 

SUCH_WIN_LSQ_S2N:
SUBROUTINE SUCH_WIN_LSQ_S2N(PD,S2N,PH,AL,WIN,E_min) % Input: % REAL*4 PD(4) !Phase differences % REAL*4 S2N(4) !Signal to noise (quaility) of phase differences % REAL*4 PH(4,360) !Phase differences to compare to % REAL*4 AL(360) !Angle of incidence for phase differences

% Output: % REAL*4 WIN !Angle of incidence found by LSQ % REAL*4 E_min !Minimum value of fit

Edit - History - Print - Recent Changes - Search
Page last modified on November 23, 2016, at 10:25 PM PST