Skip to content
Snippets Groups Projects
Commit 381109ad authored by Yves Gouriou's avatar Yves Gouriou
Browse files

Replace NaN in the SOG variable with ship velocity computed using the positions

parent a6334dac
No related branches found
No related tags found
No related merge requests found
...@@ -95,6 +95,14 @@ tsg.report.badvelocity = nBadVelocity; ...@@ -95,6 +95,14 @@ tsg.report.badvelocity = nBadVelocity;
% ------------------------------------------------------ % ------------------------------------------------------
if isempty(tsg.SPDC) if isempty(tsg.SPDC)
tsg.SPDC = velocity(1:tsgLength); tsg.SPDC = velocity(1:tsgLength);
else
% Replace NaN with computed ship velocity
% ---------------------------------------
noSPDC = isnan( tsg.SPDC );
if ~isempty(noSPDC)
ind = find(noSPDC == 1);
tsg.SPDC(ind) = velocity(ind);
end
end end
% Save tsg structure % Save tsg structure
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment