/* ************************************************************* */ /* * BLSCAN.H * * Zachary Wolf * 11/24/99 */ #ifndef __BLSCAN_HEADER #define __BLSCAN_HEADER /* ************************************************************* */ /* PARAMETERS */ #define BLSCAN_MAX_NUM_CHAR 100 #define BLSCAN_MAX_NUM_SAMP 500 #define BLSCAN_MAX_NUM_HAR 10 #define BLSCAN_MAX_NUM_MEAS 10 /* ************************************************************* */ /* ENUM DEFINITIONS */ enum blscan_binary_enum {BLSCAN_TRUE, BLSCAN_FALSE}; enum blscan_config {BLSCAN_DOUBLE_COIL, BLSCAN_SINGLE_COIL, BLSCAN_WIRE}; /* ************************************************************* */ /* STRUCTURE DEFINITIONS */ struct blscan_param_struct { int mux_chan_double_coil; /* multiplexer channel for the double coil */ int mux_chan_single_coil; /* multiplexer channel for the single coil */ int mux_chan_wire; /* multiplexer channel for the wire bundle */ int gain_double_coil; /* gain for the double coil signal */ int gain_single_coil; /* gain for the single coil signal */ int gain_wire; /* gain for the wire bundle signal */ double outer_coil_pos; /* position of the outer bundles of the coil relative to the center (m) */ double inner_coil_pos; /* position of the inner bundles of the coil relative to the center (m) */ double wire_pos; /* position of the wire bundle relative to the center (m) */ int num_turns_coil; /* number of turns in each coil */ int num_turns_wire; /* number of turns in the single wire bundle */ double scan_start_pos; /* start position of the scans (m) */ double scan_dist; /* distance to move during the scan (m) */ int scan_num_samp; /* number of samples to take during the scan */ int num_meas_ave; /* number of measurements for averaging */ double norm_radius; /* normalization radius for the x positions (m) */ enum blscan_binary_enum show_ui; /* show user interface if TRUE, don't show if FALSE */ }; /* ************************************************************* */ /* PUBLIC FUNCTION DECLARATIONS */ void blscan_init(char log_file_in[], char dat_file_in[], char plt_file_in[], struct blscan_param_struct blscan_param_in); void blscan_get_vt(double x_start, double dx, int num_samp, double x[], double vt[]); void blscan_calc_vt_coeff(int num_samp, double x[], double vt[], int order, double x_norm[], double vt_coeff[], double vt_fit[]); void blscan_calc_bln_double_coil(int order, double vt_coeff[], int num_har, double bln[]); void blscan_calc_bln_single_coil(int order, double vt_coeff[], int num_har, double bln[]); void blscan_calc_bln_wire(int order, double vt_coeff[], int num_har, double bln[]); void blscan_get_bln_ave(enum blscan_config config, int num_har, double bln_ave[], double bln_rms[]); void blscan_dat_bln_config_ave(enum blscan_config config, double imag_ave, double imag_rms, int num_har, double bln_ave[], double bln_rms[]); void blscan_dat_bln_ave(double imag_ave, double imag_rms, int num_har, double bln_ave[], double bln_rms[]); void blscan_plt_bln_ave(double imag_ave, double imag_rms, int num_har, double bln_ave[], double bln_rms[]); void blscan_save_vt_samp(char file_name[], int num_samp, double x[], double vt[]); /* ************************************************************** */ /* DONE */ #endif