try
close(inst_plot);
catch
    fprintf('Already closed');
end

inst_plot=figure;
set(inst_plot,'name','GPS STATS');

t=get(Dhand.Time_Select,'value');
    switch t,
     case 1
        t=1;
      case 2
        t=3;
     case 3
        t=7;
     case 4
        t=100000; 
    end % switch
 
tind=find(Drift.gps(1,:)>=falsenow-t);
plot(Drift.gps(3,tind),Drift.gps(2,tind),'rx');
xlabel('Latitude','FontWeight','Bold');
ylabel('Longitude','FontWeight','Bold');
titl=sprintf('%s GPS Position',graphtitle);
title(titl,'FontWeight','Bold');
set(inst_plot,'Position',[3 29 1022 672]);
