clear all
fid = fopen('gpoWhat.txt');
    GT = textscan(fid,'%s');  %u%f%f%s');
    fclose(fid);
    if length(GT{1})==227
        display(['OK, 227 known object types']);
    end
    %return
    
    fid = fopen('FEWtypes.txt');
    TYPES = textscan(fid,'%s','Delimiter','\n');  %u%f%f%s');
    fclose(fid);
    outText=['There are ',num2str(length(TYPES{1})),' types of UXO at FEW'];
    display(outText)
    
    for i=228:264
        GT{1}{i}='UNKNOWN';
    end

    typeIndex=[];
    for i=1:264
        qm=0;
        if regexp(GT{1}{i},'few')
            tmp=GT{1}{i};
            if regexp(tmp,'?')
                qm=1;
            end
            numm=str2num(tmp(4:5))
            if numm==36
                return
            end
            typeIndex=[typeIndex,numm];
            GT{1}{i}=TYPES{1}{numm};
            if qm
                GT{1}{i}=['?',TYPES{1}{numm},'?'];
            end
        else
            %do nothing, list os OKr=1;
            %display(GT{1}{i})
        end
    end
    
    trueTypes={'37mm','Grenade, Rifle','Grenade, Hand, Mk II','Projectile, Mortar,  3" Stokes','Projectile, Shrapnel, 75mm', 'Rocket, Practice Warhead, 2.75"', ...
        'Projectile, Practice Cartridge M385, 40mm','Projectile, Mortar, Practice, 81mm','Projectile, Mortar, Practice, 60mm', 'Projectile, Drill Cartridge M19 A1, 75mm',...
        'Rocket, 2.36"','Projectile, AP, 75mm','none','UNKNOWN'};
    save trueTypes trueTypes
    