fprintf('Init GPS\n');

clear all;
close all
delete(instrfindall);

gps = struct();

gps.SP = serial('COM8', ...
    'BaudRate',9600, ...
    'Parity','none', ...
    'DataBits', 8, ...
    'StopBits',1, ...
    'InputBufferSize',8192);

%gps.SP.BytesAvailableFcnMode = 'terminator';
%gps.SP.BytesAvailableFcn = @GPSCallback;

fopen(gps.SP);

while(true)
    fgetl(gps.SP)
    pause(2);
end
