%**************************************************************************
%This function calculates the required horizontal motion of the pole
%assembly base shims in order to get the desired gap change.
%
%Input:
%cant_angle, angle the poles make with respect to each other (positive)
%shim_dgap, gap change required to get the desired field change (m)
%
%Output:
%shim_dx, horiztal motion of the shim requred to get the desired gap change (m)
%
%Zachary Wolf, 10/21/06

function [shim_dx] = setgap_calc_shim_dx(cant_angle, shim_dgap)

%Method
%The poles open out toward negative x.  Shim motion toward positive x means
%the gap gets bigger.  Shim motion toward negative x makes the gap smaller.
%Both top and bottom shims are moved.
%dgap / dx = cant_angle
%dx = dgap / cant_angle

%Perform the calculation
shim_dx = shim_dgap / cant_angle;
    
%Done
