clc;
clear 
msgID = ["anchorPt" "flbbSetup"  "ascendPt" "parkPt" "surfacePt" ...
      "ctdCPBins" "ctdCPData" "gps" "timeOffset" "deanchorDetails"];

msgStrings = readlines('CPF003001VerA.txt');

msgsStruct = [];
t = [];
for i=1:length(msgID)
    indexes = startsWith(msgStrings(:), msgID(i), 'IgnoreCase', true);
    msgsStruct.(msgID(i)) = split(msgStrings(indexes));
    msg = msgsStruct.(msgID(i));
    t.(msgID(i)) = array2table(msg(2:end,:),'VariableNames',msg(1,:));
end