function state_num = state_finder(str)
%function [state_num state_color] = state_finder(str)
%             NotRunning = 0,
%             RunEngrTest,
%             InitializeMission,
%             InitializeProfile,
%             SurfaceOpsSetBellows,
%             PreMissionDelay,
%             SurfaceOps,
%             ABSetFast,
%             ABRetractSlow,
%             Descend,
%             Anchor,
%             StartCPMode,
%             DumpCPData,
%             DeAnchor,
%             Ascend,
%             Surface,
%             SetRecoveryMode,
%             ProcessErrors,
%             Exit,
%             lastState

%disp(str);

state_num = -9; %no idea what state

states =    { 'SM Not Running',  %1
            'Run Engr Test',
            'Init Mission',
            'Init Profile',
            'SOSetBellows', %5
            'PreMissionDelay',
            'SurfaceOps',
            'AB Set Fast',
            'AB Retract Slow',
            'Descend', %10
            'Anchor',
            'Start CP Mode',
            'Dumping CP Data',
            'DeAnchor',
            'Ascend', %15
            'Surface',
            'Set Recovery Mode',
            'ProcessErrors',
            'Exit',
            'lastState'}; %20
        
 
for i=1:1:size(states,1)
    if(strncmp(states{i},str,size(states{i},2)))
        state_num=i; break;
    end
end


        