%**************************************************************************
%long_coil_get_meas
%This function gets the header information and the measurements from
%the input data file.
%
%Input:
%param, parameter structure
%
%Output:
%header, header of the measurement file
%pos, position of the measurement (m)
%integ, field integral (Tm or Tm^2)
%
%Zachary Wolf
%5/12/16

function [header, gap, x_pos, y_pos, type, integ] = long_coil_get_meas(param)

%Construct the input file
input_file = strcat(param.input_file_dir, param.input_file_name);

%Read the input file
if strcmp(param.input_file_type, 'ONE_GAP')
    [header, pos, integ] = long_coil_read_meas(input_file);
    gap = 0;
    x_pos = pos;
    y_pos = 0;
    type = 0;
elseif strcmp(param.input_file_type, 'VAR_GAP')
    [header, gap, x_pos, y_pos, type, integ] = long_coil_read_meas_var_gap(input_file);
else
    error('Unknown input file type.');
end

%Done
