/* header table of the MU radar */ #ifndef ___header_h #define ___header_h #include /* uint */ #include "define.h" typedef struct { uint lnblk; /* Length of a data block */ uint ntblk; /* Number of total blocks */ /* (Header, spectra & parameters) */ uint ndblk; /* Number of data blocks (Spectra only) */ uint lnseg; /* Length of segment */ uint lnhead; /* Length of record header */ uint nhblk; /* Number of header blocks */ char prgnam[8]; /* Data taking (Signal processing) program name (8 bytes) */ char ldtime[24]; /* Parameter file load time (24 bytes) */ uint nprog; /* Data taking program number */ /* (since control program started) (not use) */ char recsta[24]; /* Record start time [DD-MMM-YYYY hh:mm:ss.ss] */ char recend[12]; /* Record end time [hh:mm:ss.ss] */ uint irec; /* Record number */ /* (since observation program started) */ uint itrec; /* Total record number */ /* (since control program started) (not use) */ uint mobs; /* Observation mode */ /* 0: Raw data */ /* 1: FFT-spectra only */ /* 11: FFT-parameters only */ /* 21: FFT-spectra & parameters */ /* 2: SAD-CCFs */ /* 12: SAD-parameters */ /* 22: SAD-CCFs & parameters */ /* 3: iono.-ACFs */ /* 13: iono.-ACFs & power */ /* 23: (remove meteor) */ /* 4: power profile */ /* 14: power (remove meteor) */ /* 5: FFT-complex spectra */ /* 6: Coherence */ /* 99: Unknown */ uint mhead1; /* Usage of each header 1 (units of height) */ /* 0 (or 1000): 1 micro s */ /* 250: 250 ns */ /* 500: 500 ns */ uint mhead2; /* Usage of each header 2 */ /* 0: none */ /* 1: FFT type (no DC) */ /* 11: FFT type (DC) */ /* 2: SAD type */ uint ndata; /* Maximum number of data points in all combined channels (or ACF lags) */ uint nrdata; /* Number of result data */ uint ntseg; /* Number of total segments */ uint nhigh; /* Number of height points */ uint nbeam; /* Number of beam directions */ uint nchan; /* Number of combined channels */ uint nccf; /* Number of data in same height */ uint ipp; /* IPP (micro s) */ uint jstart; /* Sample start time (micro s) */ uint jsint; /* Sample interval (micro s) */ uint ncoh; /* Maximum number of coherent integrations in all combined channels */ uint nicoh; /* Number of incoherent integrations */ uint mtype; /* Data type (FFT-mode) */ /* 0: spectra only */ /* 1: spectra & parameters */ /* 2: 1 & power */ /* 11: parameters only (real-time) */ /* 12: 11 & power */ /* 21: parameters only (off-line) */ /* 22: 21 & power */ /* Data type (ACF-mode) */ /* 1: ACF & power & DC component */ /* 2: power & DC component */ /* 3: ACF only */ uint mpulse; /* Multi-pulse pattern (32 bits) */ uint macf[21]; /* Lag number of each ACF point (21 words) */ /* Number of sum (power profile) (16 words) */ uint ibeam[16]; /* Beam directional number in first 16 beams (16 words) */ uint nfit; /* Number of fitting points in dopplfit */ /* Number of blocks for removing meteor echo in pwrdeb and acfmet */ int lsubp; /* Length of a sub-pulse (micro s) (-1: 0.5micro s) */ uint nsubp; /* Number of sub-pulse */ uint mscan; /* Beam scanning mode */ /* 1: every ISPL (unavailable) */ /* 0: every IPP */ char hpnam[8]; /* HP parameter-file name (6 bytes) */ uint nomode; /* */ uint nehead; /* */ uint nicohm[16]; /* Number of sum (ACF method) (16 words) */ uint nsampl; /* Number of sample points (ACF method) */ char reserv[180]; /* Reserved for the future (180 bytes) */ /* ---------------------------- new header ---------------------------- */ char oparam[16]; /* Observation parameter name (16 bytes) */ uint iprver; /* Program Version */ time_t ista; /* Record start time (s) (since epoch) */ uint istaus; /* Record start time shorter than 1 sec (micro s) */ time_t iend; /* Record end time (s) (since epoch) */ uint iendus; /* Record end time shorter than 1 sec (micro s) */ uint npseq; /* Number of pulse sequencies (1-64) */ uint itxcod[MAX_PSEQ];/* Transmit pulse pattern (32 bits x 64) */ uint ldcdal; /* Decoding code length for all channels */ uint npsqal; /* Number of pulse decoding sequencies for all channels */ uint idcdal[MAX_PSEQ];/* Pulse decoding pattern for all channels (32 bits x 64) */ uint isteer; /* Beam steering interval (0: one beam, 1: IPP, 2: 2 IPP, 3: FFT) */ short ibeam2[MAX_BEAM];/* Beam direction (2 bytes x 256) */ uint ibshap; /* Beam shape */ int iazoff; /* Beam azimuth offset (0.01 degree unit) */ int izeoff; /* Beam zenith offset (0.01 degree unit) */ uint ipolar; /* Polarization (1: right circular fixed) */ uint ntxfrq; /* Number of TX frequencies */ float txfreq[MAX_NTXFRQ];/* TX frequency offset (5 words) */ int igain; /* Gain correction of TX source signal */ int itxatt; /* TX attenuator */ int irxatt[MAX_ANCHAN];/* RX attenuator (4 words) */ uint itxon; /* TX on(1)/off(0) (1-25 bits) and TX module No. (26-30 bits; 0: all) */ uint irxon[MAX_ANCHAN];/* RX on(1)/off(0) (4 words) RX No. 1-4 means Channel No. 26-29 */ short irxsel[26]; /* RX module selection (2 bytes x (25 + 1), 0: all modules) */ uint ifiltr; /* Selection of filter (same as PIO) */ uint irngzr; /* Range zero correction (ns) */ uint istart[MAX_BEAM];/* Sample start time (256 words: unit of sub-pulse/4) */ uint irxseq; /* Reception sequence (Dummy) */ uint ichan[MAX_CHAN]; /* Channel number in digital combine (32 bits x 29) */ uint ncoh2[MAX_CHAN]; /* Number of coherent integrations for each combined channel (29 words) */ uint nfft[MAX_CHAN]; /* Number of FFT points for each combined channel (29 words) */ uint ndata2[MAX_CHAN];/* Number of data points for each combined channel (29 words) */ short ifft1[MAX_CHAN][2];/* Lower and upper boundary of FFT number in each combined channel */ /* (2 bytes x 2 x 29) */ short ifft2[MAX_CHAN][2];/* Same as above */ short ifft3[MAX_CHAN][2];/* Same as above */ float rxfreq[MAX_CHAN];/* RX frequency offset for each combined channel (29 words) */ short itxfir[MAX_FIR]; /* FIR coefficient in TX (2 bytes x 16) */ short igafir[MAX_CHAN][2];/* Gain adjustment of FIR filter in RX for each combined channel (2 bytes x 2 x 29) */ uint intptn; /* CIC interpolation pattern in TX (0-15) */ uint intrat; /* CIC interpolation rate in TX (1-640) */ uint ntxcic; /* Number of CIC filter in TX (1-10) */ uint igacic; /* Gain adjustment of CIC filter in TX (log2 G) */ uint nrxcic[MAX_CHAN];/* Number of CIC filter in RX for each combined channel (29 words) */ uint icrrat[MAX_CHAN];/* CIC cropping rate in RX for each combined channel (29 words) */ float sealvl; /* Above sea level (m) \hfill ...\ Memo. */ uint iheadf; /* Header flag */ /* 0x1: RX FIR coefficient and TX module selection */ /* 0x2: Pulse decoding pattern etc. */ /* 0x4: TX pulse pattern including on/off */ char coment[80]; /* Comment by user (80 bytes) */ uint nfftc; /* Number of FFT points to calculate coherence */ uint nbls; /* Number of baselines */ uint ichanc; /* Channel number in coherence calculation (32 bits) */ char usrhdr[208]; /* User header */ } HEAD; typedef struct { uint irxfir[MAX_CHAN][MAX_FIR][2];/* FIR coefficient in RX for each combined channel (2 x 16 x 29 words) */ uint itxsel[25]; /* TX module selection (32 bits x 25) */ char reserv[668]; /* Reserved for future */ } HEAD_FIR; typedef struct { uint ldcd; /* Decoding code length */ uint npsq; /* Number of pulse decoding sequencies */ uint idcd[MAX_PSEQ]; /* Pulse decoding pattern (32 bits x 64) */ } HEAD_DCD_SUB; typedef struct { HEAD_DCD_SUB dcd[MAX_CHAN]; /* Pulse decoding for each combined channel */ } HEAD_DCD; typedef struct { uint ldcd01; /* Decoding code length in combined channel 1 */ uint npsq01; /* Number of pulse decoding sequencies in combined channel 1 */ uint idcd01[MAX_PSEQ];/* Pulse decoding pattern in combined channel 1 (32 bits x 64) */ uint ldcd02; /* Decoding code length in combined channel 2 */ uint npsq02; /* Number of pulse decoding sequencies in combined channel 2 */ uint idcd02[MAX_PSEQ];/* Pulse decoding pattern in combined channel 2 (32 bits x 64) */ uint ldcd03; /* Decoding code length in combined channel 3 */ uint npsq03; /* Number of pulse decoding sequencies in combined channel 3 */ uint idcd03[MAX_PSEQ];/* Pulse decoding pattern in combined channel 3 (32 bits x 64) */ uint ldcd04; /* Decoding code length in combined channel 4 */ uint npsq04; /* Number of pulse decoding sequencies in combined channel 4 */ uint idcd04[MAX_PSEQ];/* Pulse decoding pattern in combined channel 4 (32 bits x 64) */ uint ldcd05; /* Decoding code length in combined channel 5 */ uint npsq05; /* Number of pulse decoding sequencies in combined channel 5 */ uint idcd05[MAX_PSEQ];/* Pulse decoding pattern in combined channel 5 (32 bits x 64) */ uint ldcd06; /* Decoding code length in combined channel 6 */ uint npsq06; /* Number of pulse decoding sequencies in combined channel 6 */ uint idcd06[MAX_PSEQ];/* Pulse decoding pattern in combined channel 6 (32 bits x 64) */ uint ldcd07; /* Decoding code length in combined channel 7 */ uint npsq07; /* Number of pulse decoding sequencies in combined channel 7 */ uint idcd07[MAX_PSEQ];/* Pulse decoding pattern in combined channel 7 (32 bits x 64) */ uint ldcd08; /* Decoding code length in combined channel 8 */ uint npsq08; /* Number of pulse decoding sequencies in combined channel 8 */ uint idcd08[MAX_PSEQ];/* Pulse decoding pattern in combined channel 8 (32 bits x 64) */ uint ldcd09; /* Decoding code length in combined channel 9 */ uint npsq09; /* Number of pulse decoding sequencies in combined channel 9 */ uint idcd09[MAX_PSEQ];/* Pulse decoding pattern in combined channel 9 (32 bits x 64) */ uint ldcd10; /* Decoding code length in combined channel 10 */ uint npsq10; /* Number of pulse decoding sequencies in combined channel 10 */ uint idcd10[MAX_PSEQ];/* Pulse decoding pattern in combined channel 10 (32 bits x 64) */ uint ldcd11; /* Decoding code length in combined channel 11 */ uint npsq11; /* Number of pulse decoding sequencies in combined channel 11 */ uint idcd11[MAX_PSEQ];/* Pulse decoding pattern in combined channel 11 (32 bits x 64) */ uint ldcd12; /* Decoding code length in combined channel 12 */ uint npsq12; /* Number of pulse decoding sequencies in combined channel 12 */ uint idcd12[MAX_PSEQ];/* Pulse decoding pattern in combined channel 12 (32 bits x 64) */ uint ldcd13; /* Decoding code length in combined channel 13 */ uint npsq13; /* Number of pulse decoding sequencies in combined channel 13 */ uint idcd13[MAX_PSEQ];/* Pulse decoding pattern in combined channel 13 (32 bits x 64) */ uint ldcd14; /* Decoding code length in combined channel 14 */ uint npsq14; /* Number of pulse decoding sequencies in combined channel 14 */ uint idcd14[MAX_PSEQ];/* Pulse decoding pattern in combined channel 14 (32 bits x 64) */ uint ldcd15; /* Decoding code length in combined channel 15 */ uint npsq15; /* Number of pulse decoding sequencies in combined channel 15 */ uint idcd15[MAX_PSEQ];/* Pulse decoding pattern in combined channel 15 (32 bits x 64) */ uint ldcd16; /* Decoding code length in combined channel 16 */ uint npsq16; /* Number of pulse decoding sequencies in combined channel 16 */ uint idcd16[MAX_PSEQ];/* Pulse decoding pattern in combined channel 16 (32 bits x 64) */ char reserv[256]; /* Reserved for future */ } HEAD_DCD1; typedef struct { uint ldcd17; /* Decoding code length in combined channel 17 */ uint npsq17; /* Number of pulse decoding sequencies in combined channel 17 */ uint idcd17[MAX_PSEQ];/* Pulse decoding pattern in combined channel 17 (32 bits x 64) */ uint ldcd18; /* Decoding code length in combined channel 18 */ uint npsq18; /* Number of pulse decoding sequencies in combined channel 18 */ uint idcd18[MAX_PSEQ];/* Pulse decoding pattern in combined channel 18 (32 bits x 64) */ uint ldcd19; /* Decoding code length in combined channel 19 */ uint npsq19; /* Number of pulse decoding sequencies in combined channel 19 */ uint idcd19[MAX_PSEQ];/* Pulse decoding pattern in combined channel 19 (32 bits x 64) */ uint ldcd20; /* Decoding code length in combined channel 20 */ uint npsq20; /* Number of pulse decoding sequencies in combined channel 20 */ uint idcd20[MAX_PSEQ];/* Pulse decoding pattern in combined channel 20 (32 bits x 64) */ uint ldcd21; /* Decoding code length in combined channel 21 */ uint npsq21; /* Number of pulse decoding sequencies in combined channel 21 */ uint idcd21[MAX_PSEQ];/* Pulse decoding pattern in combined channel 21 (32 bits x 64) */ uint ldcd22; /* Decoding code length in combined channel 22 */ uint npsq22; /* Number of pulse decoding sequencies in combined channel 22 */ uint idcd22[MAX_PSEQ];/* Pulse decoding pattern in combined channel 22 (32 bits x 64) */ uint ldcd23; /* Decoding code length in combined channel 23 */ uint npsq23; /* Number of pulse decoding sequencies in combined channel 23 */ uint idcd23[MAX_PSEQ];/* Pulse decoding pattern in combined channel 23 (32 bits x 64) */ uint ldcd24; /* Decoding code length in combined channel 24 */ uint npsq24; /* Number of pulse decoding sequencies in combined channel 24 */ uint idcd24[MAX_PSEQ];/* Pulse decoding pattern in combined channel 24 (32 bits x 64) */ uint ldcd25; /* Decoding code length in combined channel 25 */ uint npsq25; /* Number of pulse decoding sequencies in combined channel 25 */ uint idcd25[MAX_PSEQ];/* Pulse decoding pattern in combined channel 25 (32 bits x 64) */ uint ldcd26; /* Decoding code length in combined channel 26 */ uint npsq26; /* Number of pulse decoding sequencies in combined channel 26 */ uint idcd26[MAX_PSEQ];/* Pulse decoding pattern in combined channel 26 (32 bits x 64) */ uint ldcd27; /* Decoding code length in combined channel 27 */ uint npsq27; /* Number of pulse decoding sequencies in combined channel 27 */ uint idcd27[MAX_PSEQ];/* Pulse decoding pattern in combined channel 27 (32 bits x 64) */ uint ldcd28; /* Decoding code length in combined channel 28 */ uint npsq28; /* Number of pulse decoding sequencies in combined channel 28 */ uint idcd28[MAX_PSEQ];/* Pulse decoding pattern in combined channel 28 (32 bits x 64) */ uint ldcd29; /* Decoding code length in combined channel 29 */ uint npsq29; /* Number of pulse decoding sequencies in combined channel 29 */ uint idcd29[MAX_PSEQ];/* Pulse decoding pattern in combined channel 29 (32 bits x 64) */ char reserv[1048]; /* Reserved for future */ } HEAD_DCD2; typedef struct { uint itxptn[MAX_PSEQ][16];/* TX pulse on/off pattern (512 bits x 64) */ char reserv[384]; /* Reserved for future (1) */ uint itxphs[MAX_PSEQ][16];/* TX pulse phase pattern (512 bits x 64) */ char reser2[384]; /* Reserved for future (2) */ } HEAD_TXPTN; typedef struct { int hmin; /* Lowest observation range (m) */ int hmax; /* Highest observation range (m) */ int sample_start; /* Sample start (micro sec) */ int itime; /* Pure observation time (micro sec) */ int narrowpulse; /* 1: 0.5 us pulse, 0: others */ int mode; /* Observation mode */ int dt_number; /* Data taking number */ int nmpulse; /* Number of multi pulse pattern */ int nsample; /* Number of sampling points */ int ntxptn; /* Number of TX pulse on/off pattern */ int rawdatastore; /* Store raw data (1: on, 0: off) */ int fft_calc; /* Perform FFT calculation in DSP(0) or PC(1) */ int iaz[MAX_BEAM]; /* Beam azimuth angle */ int ize[MAX_BEAM]; /* Beam zenith angle */ int shift[MAX_BEAM]; /* Sampling shift */ int macf_start[21]; /* ACF start position */ int nrecord; /* Number of records for 1 file */ int lowmem_bcpu_ini[MAX_CHAN]; /* Lower Boundary for Block Master (Before observation) */ int lowmem_bcpu[MAX_CHAN]; /* Lower Boundary for Block Master (In observation) */ int stt; /* STT */ int sttrange; /* STT range No. */ char prgnam[32]; /* Signal processing prognam name */ } HEAD_SUB; typedef struct { HEAD h; /* Header */ HEAD_FIR hfir; /* Header for RX FIR coefficient */ HEAD_DCD hdcd; /* Header for pulse decoding pattern */ HEAD_TXPTN htxptn; /* Header for TX pulse pattern */ HEAD_SUB hsub; /* Other header information */ } HEAD_ALL; #endif