function [piddat, vect] = readInfile(fname)
% function [pid, vect] = readInile(fname)
%
% INCOMPLETE FUNCTION, CURRENTLY UNUSABLE

% read VERTCON *.in file; return list of PIDS
% and corresponding lat/lon and ortho height difference,
% plus metadata on the datums (from filename)
%
% INPUT
% fname name of file; may include path
%
% OUTPUT
% pid     1 name of point (PID)
%         2 datum
% vect   dimensions (#PID x 4)
%         1-2 lat/long (deg)

% textread may be removed on future versions of Matlab, 
% which would require converting this to 'textscan' OR
% turning back on the slow method (below)
[pid, lat, lon, ht1, ht2] = textread(char(fname),...
                        '%s %*s %*s %f %f %*d %*d %*s %*s %f %*d %*d %*s %*s %f');
% columns: pid, state, county, lat, lon, (4x) quality codes, height1,
% (4x) quality codes, height2

return
piddat{1} = pid;
piddat{2} = datum;
vect = [lat lon ht];