1 /* For SIGMET version 1 and version 2 files.
4 * Applied Research Corp.
8 * The structures exactly match the SIGMET documentation.
14 /*Structure identifier, byte 0 of structure_header, III-18 */
15 #define NSIG_INGEST_SUM 3
18 /* Data type, value for byte 22 in ingest data header, III-29 */
19 #define NSIG_DTB_EXH 0
20 #define NSIG_DTB_UCR 1
22 #define NSIG_DTB_VEL 3
23 #define NSIG_DTB_WID 4
24 #define NSIG_DTB_ZDR 5
25 #define NSIG_DTB_KDP 14
26 #define NSIG_DTB_PHIDP 16
27 #define NSIG_DTB_SQI 18
28 #define NSIG_DTB_RHOHV 19
30 /* Product type code ,value for byte 12 in product configuration
33 #define NSIG_PROD_PPI 1 /* PPI */
34 #define NSIG_PROD_RHI 2 /* RHI */
35 #define NSIG_PROD_CAPPI 3 /* CAPPI */
36 #define NSIG_PROD_CROSS 4 /* Cross section */
37 #define NSIG_PROD_TOPS 5 /* Echo tops */
38 #define NSIG_PROD_RAIN1 7 /* Precipitation 1 hour */
39 #define NSIG_PROD_TRACK 6 /* Storm track */
40 #define NSIG_PROD_RAINN 8 /* Precipitation n hour */
41 #define NSIG_PROD_VVP 9 /* Velocity Volume processing */
42 #define NSIG_PROD_VIL 10 /* Vertically Integrated Liquid */
43 #define NSIG_PROD_SHEAR 11 /* Wind shear */
44 #define NSIG_PROD_WARN 12 /* Warning (overlay) */
45 #define NSIG_PROD_RTPPI 13 /* Real time PPI */
46 #define NSIG_PROD_RTRHI 14 /* Real time RHI */
47 #define NSIG_PROD_RAW 15 /* Raw data set (no display)*/
48 #define NSIG_PROD_MAX 16 /* Maximum with side panels */
49 #define NSIG_PROD_USER 17 /* Earth projection user product */
50 #define NSIG_PROD_USERV 18 /* Section projection user product */
51 #define NSIG_PROD_OTHER 19 /* Other user product (no display) */
52 #define NSIG_PROD_STATUS 20 /* Status product (no display) */
53 #define NSIG_PROD_SLINE 21 /* Shear Line Product */
54 #define NSIG_PROD_WIND 22 /* Horizontal wind field */
56 #define NSIG_SCAN_PPI 1
57 #define NSIG_SCAN_RHI 2
58 #define NSIG_SCAN_MAN 3
59 #define NSIG_SCAN_CON 4
60 #define NSIG_SCAN_FIL 5
62 #define NSIG_BLOCK 6144
63 #define NSIG_MAX_BIN 1536
65 /* Two byte binary angle is unsigned short */
66 /* Using these typedefs forces non-word alignment. This is because
67 * we don't want any space between members of a structure.
68 * -- A coding trick --
70 typedef unsigned char bang[2];
71 typedef unsigned char twob[2];
72 typedef unsigned char fourb[4];
74 /* Ray header 3.4.2, page III-29 */
75 /* No change for NSIG_VER2 */
77 bang beg_azm; /* Azimuth at beginning of ray (binary angle). */
78 bang beg_elev; /* Elevation at beginning of ray (binary angle). */
79 bang end_azm; /* Azimuth at end of ray (binary angle). */
80 bang end_elev; /* Elevation at end of ray (binary angle). */
81 twob num_bins; /* Actual number of bins in the ray. */
82 twob sec; /* Time in seconds from start of sweep (unsigned). */
84 /*============================================================*/
85 /*============================================================*/
87 /* Extended Header version 0, section 3.4.3, page III-29 */
88 /* No change for NSIG_VER2 */
93 } NSIG_Ext_header_ver0;
94 /*============================================================*/
95 /*============================================================*/
97 /* Extended Header version 1, section 3.4.3, page III-29 */
99 fourb msec; /* Time in milliseconds from the sweep starting time. */
100 twob cal_sig; /* Calibration Signal level. */
101 bang azm; /* Azimuth (binary angle) */
102 bang elev; /* Elevation (binary angle) */
103 bang train_ord; /* Train order (binary angle) */
104 bang elev_ord; /* Elevation order (binary angle) */
105 bang pitch; /* Pitch (binary angle) */
106 bang roll; /* Roll (binary angle) */
107 bang heading; /* Heading (binary angle) */
108 bang azm_rate; /* Azimuth Rate (binary angle/sec) */
109 bang elev_rate; /* Elevation Rate (binary angle/sec) */
110 bang pitch_rate; /* Pitch Rate (binary angle/sec) */
111 bang roll_rate; /* Roll Rate (binary angle/sec) */
115 bang heading_rate; /* Heading Rate (binary angle/sec) */
117 fourb lat; /* Latitude (binary angle) */
118 fourb lon; /* Longitude (binary angle) */
119 twob alt; /* Altitude (meters) */
120 twob vel_e; /* Velocity East (cm/sec) */
121 twob vel_n; /* Velocity North (cm/sec) */
122 twob vel_u; /* Velocity Up (cm/sec) */
126 fourb time_update; /* Time since last update (milliseconds) */
128 twob nav_sys_flag; /* Navigation system OK flag */
129 twob rad_vel_cor; /* Radial velocity correction (velocity units) */
130 } NSIG_Ext_header_ver1;
131 /*============================================================*/
132 /*============================================================*/
137 /*-----------------------------------------------------------------*/
139 * All structure names are prefixed with NSIG_ and have the
140 * first letter of the remainder capitalized.
142 /*-----------------------------------------------------------------*/
144 /* Structure header 3.2.35, page III-18 */
156 } NSIG_Structure_header;
157 /*============================================================*/
158 /*============================================================*/
160 /* Time sturcture 3.2.36, page III-18 */
164 twob msec; /* Fractions of seconds in milliseconds. */
175 /*============================================================*/
176 /*============================================================*/
178 /* ingest data header 3.4.1, page III-28 */
180 NSIG_Structure_header struct_head;
194 twob data_type; /* Data code (See Task_DSP_Info.IDATA) */
199 } NSIG_Ingest_data_header;
200 /*============================================================*/
201 /*============================================================*/
203 /* No change for NSIG_VER2 */
211 } NSIG_Raw_prod_bhdr;
212 /*============================================================*/
213 /*============================================================*/
215 /* Define the color scale conversion */
217 #define COLOR_SCALE_OVERRIDE (0x0200)
218 #define COLOR_SCALE_VARIABLE (0x0100)
219 #define COLOR_LABEL_MASK (0x00ff)
225 twob ilevel_seams[16];
226 } NSIG_Color_scale_def;
228 /*============================================================*/
229 /*============================================================*/
231 /* Product configuration structure 3.5.1.1, page III-35 */
233 NSIG_Structure_header st_head;
236 twob isch; /* Scheduling */
237 #define PSC_HOLD_P 0 /* Do not run at all. */
238 #define PSC_NEXT_P 1 /* Run once on next available data */
239 #define PSC_ALL_P 2 /* Run as data becomes available */
240 #define PSC_AGAIN_P 3 /* Run again on data last used */
242 fourb isch_skip; /* # seconds between runs */
247 NSIG_Ymds_time prod_time;
248 NSIG_Ymds_time file_time;
249 NSIG_Ymds_time schd_time;
250 twob schd_code; /* Not used in Ver 2. */
251 fourb sec_skip; /* Not used in Ver 2. */
266 fourb ixscale, iyscale, izscale; /* Scale in cm/pixel */
278 fourb irange_last_v20; /* Range of last bin in cm (raw only) */
280 twob idata_out; /* Data type of data generated by product gen */
282 /* This section for version 2.1+ products: */
284 twob idata_in; /* Data type used by the generator */
286 twob iradial_smooth; /* Range in km*100 over which radial */
287 /* smoothing should be done. 0:none. */
288 twob iruns; /* # of times this pcf has been run */
289 fourb izr_const; /* Z-R or Z-W constant and exponent */
290 fourb izr_exp; /* in 1/1000 of integers */
291 twob ix_smooth; /* X-Y Smoothing parameters for 2D */
292 twob iy_smooth; /* products. km*100, 0:none */
294 /* ---- Product Specific Parameters ---- */
295 /*The following area conveys information needed for each specific product.*/
297 char psi[80]; /* Do we need these?? -John 8/14/96 */
300 NSIG_Color_scale_def colors;
309 /* The following depends on version 2.0, 2.1 etc check III-34,35 */
310 /* Currently, though, this is not used. */
313 } NSIG_Product_config;
314 /*============================================================*/
315 /*============================================================*/
318 /* product end 3.5.1.2 ,page III-36 */
321 char sprod_sitename[16]; /* Name of product generator site, space padded */
322 char sprod_version[8]; /* Product IRIS version, null terminated */
323 char sing_version[8]; /* Ingest IRIS version, null terminated */
324 NSIG_Ymds_time data_time; /* Oldest data in this file */
327 char part_name[80]; /* Path name of file on disk. */
328 NSIG_Ymds_time data_time; /* Date/time structure. */
330 char site_name[16]; /* Site name. Eg. mit, tog, kwa (upper-case?). */
331 twob ahead_gms; /* # minutes ahead of GMT. */
332 fourb lat; /* Latitude (binary angle format). */
333 fourb lon; /* Longitude (binary angle format). */
334 twob grnd_sea_ht; /* Signed ground height (meters). */
335 twob rad_grnd_ht; /* Radar height above ground (meters). */
339 twob sig_proc; /* Type of signal processor used. */
341 fourb prf; /* PRF (hz). */
342 fourb pulse_wd; /* sample width in microsec/100*/
344 twob sig_proc; /* Type of signal processor used. */
348 twob trg_rate; /* Trigger rate scheme. */
349 twob num_samp; /* number of samples (per ray). */
350 char clutter_file[12]; /* Clutter filter file name. */
351 twob num_filter; /* Number of filter used for the first range bin. */
352 fourb wavelen; /* Wavelength in 1/100 of centimeters. */
353 fourb trunc_ht; /* Truncation height in cm. */
354 fourb rng_f_bin; /* Range of the first bin in cm. */
355 fourb rng_l_bin; /* Range of the last bin in cm. */
356 fourb num_bin; /* Number of output bins. */
357 twob flag; /* Flag word. */
358 #define PH_OVERLAY_P (0x0001) /* Has an overlay \ For picture */
359 #define PH_RINGS_P (0x0002) /* Has range rings/ products only */
361 twob file_up; /* Number of updates to the file. */
362 char label[16][4]; /* Array of labels for color parameter legend. */
364 twob ilog_filter_first; /* Log filter used on first bin */
367 char label_unit[12]; /* Text holding units of the labels. (Ver 2 only) */
369 twob prod_seq; /* Product sequence number. */
370 twob color_num[16]; /* Color numbers for the up to 16 steps. */
371 char color_reject; /* Color used for rejected data. */
375 /* The number of results elements at the end of the file.
376 * Used for warning, shearline, and track only */
379 #define PROD_END_PAD (20)
380 char ipad_end[PROD_END_PAD];
382 char color_unscan; /* Color used for unscanned area. */
383 char color_over; /* Color used for overlays. */
385 fourb prod_max_rng; /* Max range of the first product used as input. */
389 /*============================================================*/
390 /*============================================================*/
392 /* Ingest Summary Header 3.3.1 , page III-19 */
394 char file_name[80]; /* Name of file on disk. */
395 twob num_file; /* Number of associated data files extant. */
397 twob isweeps_done ; /* # of sweeps that have been completed */
399 fourb sum_size; /* Total size of all files in bytes. */
400 NSIG_Ymds_time start_time;
404 char drive_name[16]; /* Name of tape drive written to. */
406 twob size_ray_headers; /* Number of bytes in the ray headers. */
407 twob size_ext_ray_headers; /* Number of bytes in extended ray headers. */
409 twob ib_task; /* # bytes in task config table */
411 char siris_version[8]; /* Null terminated */
412 char ipad_132x18[18];
414 twob num_task_conf_tab; /* Number of task configuration table. */
415 twob size_device_status_tab; /* Number of bytes in device status table. */
416 twob gparam_size; /* Number of bytes in each gparam. */
419 char site_name[16]; /* Name of site from setup program. */
420 twob time_zone; /* Time zione of recorded time, +min of GMT */
421 fourb lat_rad; /* Latitude of radar. */
422 fourb lon_rad; /* Longitude of radar. */
423 twob grd_height; /* Height of ground at site (meters) */
424 twob ant_height; /* Height of radar above ground (meters) */
425 twob azm_res; /* Resolution of delta azimuth in sweep. */
426 twob ray_ind; /* Index of first rays from above set of rays.
427 * Or the angle of the first ray.
429 twob num_rays; /* Number of rays in a sweep. */
430 fourb ant_alt; /* Altitude of radar above sea level in cm */
431 fourb vel[3]; /* [0]=east, [1]=north, [2]=up */
432 fourb ant_offset[3]; /* [0]=starboard, [1]=bow, [2]=up */
438 } NSIG_Ingest_summary;
439 /*============================================================*/
440 /*============================================================*/
442 /* rvp5_gparam structure 3.3.4.1, page III-26 */
444 twob revision; /* Revision */
445 twob num_bins; /* Number of range bins */
446 twob cur_trig_p; /* Current trigger period */
447 twob cur_tag1; /* Current TAG00 - TAG15 */
448 twob cur_tag2; /* Current TAG16 - TAG31 */
449 twob l_chan_noise; /* Log channel noise level */
450 twob i_chan_noise; /* I Channel noise level */
451 twob q_chan_noise; /* Q Channel noise level */
452 twob lat_proc_status;/* Latched processor status */
453 twob imm_proc_status;/* Immdiate processor status */
454 twob diag_reg_a; /* Diagnostic register A */
455 twob diag_reg_b; /* Diagnostic register B */
456 twob num_pulses; /* Number of pulses per ray */
457 twob trig_c_low; /* Trigger count (low 16 bits) */
458 twob trig_c_high; /* Trigger count (high 8 bits) */
459 twob num_acq_bins; /* # of properly acquired bins */
460 twob num_pro_bins; /* # of properly processed bins */
461 twob rng_off; /* 25-meter range offset */
462 twob noise_rng; /* Noise range in KM */
463 twob noise_trg; /* Noise trigger period */
464 twob pulse_w_0; /* Pulse width 0 min trig period */
465 twob pulse_w_1; /* Pulse width 1 min trig period */
466 twob pulse_w_2; /* Pulse width 2 min trig period */
467 twob pulse_w_3; /* Pulse width 3 min trig period */
468 twob pulse_w_pat; /* Pulse width bit patterns */
469 twob cur_wave_pw; /* Current waveform/pulsewidth */
470 twob cur_trig_gen; /* Current trigger gen period */
471 twob des_trig_gen; /* Desired trigger gen period */
472 twob prt_start; /* PRT at start of last ray */
473 twob prt_end; /* PRT at end of last ray */
474 twob proc_thr_flag; /* Processing/threshold flags */
475 twob log_con_slope; /* LOG conversion slope */
476 twob log_noise_thr; /* LOG noise threshold */
477 twob clu_cor_thr; /* Clutter correction threshold */
478 twob sqi_thr; /* SQI threshold */
479 twob log_thr_w; /* LOG threshold for width */
480 twob cal_ref; /* Calibration reflectivity */
481 twob q_i_cur_samp; /* Q and I current sample */
482 twob l_cur_samp; /* Log current sample */
483 twob rng_avr_cho; /* Range averaging choice */
493 /*============================================================*/
494 /*============================================================*/
497 NSIG_Structure_header struct_head;
498 NSIG_Rpv5_gparam rpv5;
500 /*============================================================*/
501 /*============================================================*/
503 /* One_device_structure. Sect: 3.3.3.1 */
507 #define DEV_NULL_P (0) /*Not applicable*/
508 #define DEV_OK_P (1) /*OK*/
509 #define DEV_ERROR_P (2) /*Error has occured*/
510 /* The following are only valid for network devices */
511 #define DEV_REMOTE_P (5) /*Remote computer unavailable*/
512 #define DEV_IRIS_P (6) /*Remote IRIS unavailable*/
514 /* This number indicates which process is using the device. */
516 #define PROC_NONE_P (0) /*Noone is using it*/
517 #define PROC_RTDISP_P (1) /*Real time display*/
518 #define PROC_INGEST_P (2) /*Ingest*/
519 #define PROC_INGFIO_P (3) /*Ingest file output*/
520 #define PROC_REINGEST_P (4) /*Reingest !!!tom */
521 #define PROC_OUTFMT_P (5) /*Output Formatter*/
522 #define PROC_PRODUCT_P (6) /*Product generator*/
523 #define PROC_NETWORK_P (7) /*Network !!!tom */
524 #define PROC_QUICK_P (8) /*Quick look menu(part of out)*/
525 #define PROC_TAPE_P (9) /*Tape process*/
526 #define PROC_NORDRAD_P (10) /*NORDRAD process*/
528 /* Node name or user name */
530 /* Number of characters in the name */
532 /* Process mode, see process_status structure */
534 #define MODE_NULL (0)
535 #define MODE_STOPPED (1)
536 #define MODE_IDLE (2)
537 #define MODE_RUNNING (3)
538 #define MODE_EXIT (4)
539 #define MODE_QUICK (5)
540 #define MODE_INIT (6)
541 #define MODE_HOLD (7)
543 /* Used only for antenna device */
544 #define MODE_ANT_NULL (0)
545 #define MODE_ANT_IRIS (1)
546 #define MODE_ANT_LOCAL (2)
547 #define MODE_ANT_MAIN (3)
548 #define MODE_ANT_COMP (4)
549 #define MODE_ANT_SHUT (5)
560 /*============================================================*/
561 /*============================================================*/
566 /* THIS IS WRONG.... but, does it matter for RSL ???? */
567 NSIG_Structure_header struct_head;
568 NSIG_One_device dsp_stat[4];
569 NSIG_One_device ant_stat[4];
570 NSIG_One_device outdev_stat[12];
573 NSIG_Structure_header struct_head;
574 NSIG_One_device dsp_stat[4];
575 NSIG_One_device ant_stat[4];
576 NSIG_One_device outdev_stat[12];
579 } NSIG_Device_status;
580 /*============================================================*/
581 /*============================================================*/
583 /* No change for NSIG_VER2 */
585 fourb startt; /* Start time (seconds within a day) */
586 fourb stopt; /* Stop time (seconds within a day) */
587 fourb skipt; /* Desired skip time (seconds) */
588 fourb time_last; /* Time last run (seconds w/in a day) */
589 fourb time_used; /* Time used on last run (seconds) */
590 fourb day_last; /* Relative day of last run. */
591 twob iflag; /* bit 0=ASAP, bit 1= Mandatory,
592 * bit 2=Late skip, bit 3= Time used has been measured,
593 * bit 4=Stop after running.
596 } NSIG_Task_sched_info;
597 /*============================================================*/
598 /*============================================================*/
601 /* Task dsp info 3.3.2.2, page III-22 */
611 fourb aux_data_def[32];
619 char filter_name[12];
621 char idop_filter_first; /* Doppler based filter used on first bin */
622 char ilog_filter_first; /* Z based filter used on first bin */
628 twob igas_atten ; /* 100000 * db/km */
629 #define TASK_DSP_INFO_PAD (148)
630 char ipad_end[TASK_DSP_INFO_PAD];
634 } NSIG_Task_dsp_info;
635 /*============================================================*/
636 /*============================================================*/
638 /* task cal info struct: 3.3.2.3, page III-22, rec 2 offset 944 */
639 /* No change for NSIG_VER2 */
641 twob slope; /* 00: Reflectivity slope (4096*dB/ A/D Count) */
642 twob noise; /* 02: Noise threshold (1/16 dB above noise) */
643 twob clutr_corr; /* 04: Clutter correction threshold (1/16 dB) */
644 twob sqi; /* 06: (0-1)*256 */
645 twob power; /* 08: (1/16 dBZ) */
646 char spare1[8]; /* 10: <spare> 8 */
647 twob cal_ref; /* 18: Calibration reflectivity */
648 twob z_flag_unc; /* 20: Threshold flags for Unc. reflectivity */
649 twob z_flag_cor; /* 22: Threshold flags for Cor. reflectivity */
650 twob v_flag; /* 24: Threshold flags for velocity */
651 twob w_flag; /* 26: Threshold flags for width */
652 char spare2[8]; /* 28: <spare> 8 */
653 twob speckle; /* 36: Speckle remover flag. See III-22 */
654 twob slope_2; /* 38: Refl. slope for second processor */
655 twob cal_ref_2; /* 40: Calibration reflectivity for 2nd proc */
656 twob zdr_bias; /* 42: ZDR bias in signed 1/16 dB */
657 char spare3[276]; /* 44: <spare> 276 */
658 } NSIG_Task_calib_info;
659 /*============================================================*/
660 /*============================================================*/
663 /* Task_range_info Structure 3.3.2.4, page III-23 */
665 fourb rng_first; /* 00: Range to first bin [cm] */
666 fourb rng_last; /* 04: Range to last bin [cm] */
668 fourb ibin_last; /* Range of last (input) bin in cm */
671 twob num_bins; /* 08: Number of input bins */
672 twob num_rngbins; /* 10: Number of output range bins */
673 twob var_bin_spacing; /* 12: Variable range bin spacing (0,1) */
674 fourb binstep_in; /* 14: Step between input bins */
675 fourb binstep_out; /* 18: Step between output bins */
676 twob bin_avg_flag; /* 22: Range bin averaging flag */
677 /* 0:No Avg, 1:Avg Pairs, ... */
679 char spare[132]; /* 24: <spare> 132 */
681 char spare[136]; /* 24: <spare> 136 */
683 } NSIG_Task_range_info;
684 /*============================================================*/
685 /*============================================================*/
688 /* Task scan info structure 3.3.2.5, page III-23 */
690 twob ant_scan_mode; /* 1:PPI, 2:RHI, 3:manual, 4:file */
691 twob ang_res; /* Desired angular resolution in 1/100 degree. */
697 twob num_swp; /* Number of sweeps to perform. */
698 bang beg_ang; /* Starting elevation(RHI)/azimuth(PPI) */
699 bang end_ang; /* Ending elevation(RHI)/azimuth(PPI) */
700 bang list[40]; /* List of azimuths(RSI)/elevations(PPI) */
703 union serv_task_scan_info_u
705 struct serv_task_rhi_scan_info rhi;
706 struct serv_task_ppi_scan_info ppi;
707 struct serv_task_file_scan_info fil;
708 struct serv_task_manual_scan_info man;
715 } NSIG_Task_scan_info;
716 /*============================================================*/
717 /*============================================================*/
720 fourb wavelength; /* Wavelength in 1/100 of cm */
721 char serial_num[16]; /* T/R Serial Number */
722 fourb xmit_pwr; /* Transmit Power in watts. */
723 twob flag; /* bit 0: Digital signal simulator in use.
727 twob ipolar; /* Type of polarization, see dsp_lib.h */
728 fourb itrunc; /* Truncation height in cm */
729 char ipad32x18[18]; /* Reserved for polarization description */
734 twob display_parm1; /* Real time display parameter #1 */
735 twob display_parm2; /* Real time display parameter #2 */
736 /* The following 3 members are not used in Ver 2. */
737 twob product_flag; /* Real time product flag */
739 fourb truncation_height;/* Truncation height (cm) */
740 twob nbytes_comments; /* Number of bytes of comments entered. */
742 } NSIG_Task_misc_info;
745 twob major; /* Task major number */
746 twob minor; /* Task minor number */
747 char name[12]; /* Name of task configuration file. */
748 char desc[80]; /* Task description. */
750 fourb ihybrid_count; /* Number of tasks in this hybrid set */
754 twob state; /* Task state: 0=no task, 1=task being modified,
755 * 2=inactive, 3=scheduled, 4=running
762 } NSIG_Task_end_data;
763 /*============================================================*/
764 /*============================================================*/
768 NSIG_Structure_header struct_head;
769 NSIG_Task_sched_info sched_info;
770 NSIG_Task_dsp_info dsp_info;
771 NSIG_Task_calib_info calib_info;
772 NSIG_Task_range_info range_info;
773 NSIG_Task_scan_info scan_info;
774 NSIG_Task_misc_info misc_info;
775 NSIG_Task_end_data end_data;
782 /*============================================================*/
783 /*============================================================*/
787 NSIG_Structure_header struct_head;
788 NSIG_Product_config prod_config;
789 NSIG_Product_end prod_end;
792 /*============================================================*/
793 /*============================================================*/
796 NSIG_Structure_header struct_head;
797 NSIG_Ingest_summary ingest_head;
798 NSIG_Task_config task_config;
799 NSIG_Device_status device_stat;
804 /*============================================================*/
805 /*============================================================*/
808 /* This is the organization of the 2'nd to n'th file on the tape.
809 * This structure is incomplete in that only one data record is
810 * listed. Record 1, Record 2, a data record. As each data record
811 * is ingested, the data replaces the data record part and keeps
812 * the information in Record 1 and 2 unchanged.
814 typedef unsigned char NSIG_Data_record[NSIG_BLOCK];
819 NSIG_Data_record data;
821 /*============================================================*/
822 /*============================================================*/
825 /* This is the first physical file on the TAPE. It is the only
826 * file on the tape that has this organization. All other files
827 * are PRODUCT FILES (NSIG_Product_file). Normally, this is ignored
828 * when reading disk files; there you're only reading PRODUCT FILES.
831 NSIG_Structure_header struct_head;
832 char tape_id_name[16];
838 } NSIG_Tape_header_file;
839 /*============================================================*/
840 /*============================================================*/
842 /* FUNCTION PROTOTYPES */
843 FILE *nsig_open(char *file_name);
844 void swap_nsig_record1(NSIG_Record1 *rec1);
845 void swap_nsig_record2(NSIG_Record2 *rec2);
846 void swap_nsig_raw_prod_bhdr(NSIG_Raw_prod_bhdr *rp);
847 void swap_nsig_ingest_data_header(NSIG_Ingest_data_header *ih);
849 /* Sweep reading structure */
852 unsigned char *range; /* 0..h.num_bins-1 */
854 /*============================================================*/
855 /*============================================================*/
858 NSIG_Raw_prod_bhdr bhdr;
859 NSIG_Ingest_data_header idh;
861 int nparams; /* For freeing. */
863 /*============================================================*/
864 /*============================================================*/
866 /* Each routine in nsig.c is renamed when compiling Ver2 code.
867 * The rename is simple: change nsig_ to nsig2_
870 #define nsig_open nsig2_open
871 #define nsig_read_record nsig2_read_record
872 #define nsig_close nsig2_close
873 #define nsig_endianess nsig2_endianess
874 #define NSIG_I2 NSIG2_I2
875 #define NSIG_I4 NSIG2_I4
876 #define nsig_free_ray nsig2_free_ray
877 #define nsig_free_sweep nsig2_free_sweep
878 #define nsig_read_chunk nsig2_read_chunk
879 #define nsig_read_ext_header_ver0 nsig2_read_ext_header_ver0
880 #define nsig_read_ext_header_ver1 nsig2_read_ext_header_ver1
881 #define nsig_read_ray nsig2_read_ray
882 #define nsig_read_sweep nsig2_read_sweep
883 #define nsig_from_bang nsig2_from_bang
884 #define nsig_from_fourb_ang nsig2_from_fourb_ang
885 #define swap_nsig_structure_header swap_nsig2_structure_header
886 #define swap_nsig_ymds_time swap_nsig2_ymds_time
887 #define swap_nsig_color_scale_def swap_nsig2_color_scale_def
888 #define swap_nsig_product_config swap_nsig2_product_config
889 #define swap_nsig_product_end swap_nsig2_product_end
890 #define swap_nsig_ingest_summary swap_nsig2_ingest_summary
891 #define swap_nsig_task_sched_info swap_nsig2_task_sched_info
892 #define swap_nsig_task_dsp_info swap_nsig2_task_dsp_info
893 #define swap_nsig_task_calib_info swap_nsig2_task_calib_info
894 #define swap_nsig_task_range_info swap_nsig2_task_range_info
895 #define swap_nsig_task_scan_info swap_nsig2_task_scan_info
896 #define swap_nsig_task_misc_info swap_nsig2_task_misc_info
897 #define swap_nsig_task_end_data swap_nsig2_task_end_data
898 #define swap_nsig_task_config swap_nsig2_task_config
899 #define swap_nsig_one_device swap_nsig2_one_device
900 #define swap_nsig_device_status swap_nsig2_device_status
901 #define swap_nsig_gparam swap_nsig2_gparam
902 #define swap_nsig_record1 swap_nsig2_record1
903 #define swap_nsig_record2 swap_nsig2_record2
904 #define swap_nsig_raw_prod_bhdr swap_nsig2_raw_prod_bhdr
905 #define swap_nsig_ingest_data_header swap_nsig2_ingest_data_header
906 #define get_extended_header_info get2_extended_header_info
909 void nsig_free_ray(NSIG_Ray *r);
910 void nsig_free_sweep(NSIG_Sweep **s);
911 NSIG_Sweep **nsig_read_sweep(FILE *fp, NSIG_Product_file *prod_file);
912 int nsig_read_record(FILE *fp, char *nsig_rec);
913 int nsig_endianess(NSIG_Record1 *rec1);
914 short NSIG_I2 (twob x);
915 int NSIG_I4 (fourb x);
916 void nsig_close(FILE *fp);
918 float nsig_from_fourb_ang(fourb ang);
919 float nsig_from_bang(bang in);