From 02740218c227717421873b1d6e765df2312cbb56 Mon Sep 17 00:00:00 2001 From: Jan Date: Sun, 9 Oct 2022 12:32:28 -0600 Subject: [PATCH] ros2tigng ignores constant tign (> time now), taken as = tign_g(1,1) --- vis3d/grad.m | 2 +- vis3d/tign2rosg.m | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/vis3d/grad.m b/vis3d/grad.m index fa5a96f..cba0936 100644 --- a/vis3d/grad.m +++ b/vis3d/grad.m @@ -16,4 +16,4 @@ dyy= y(2:end-1, 3:end)-y(2:end-1, 1:end-2); dyn= sqrt(dxy.^2+dyy.^2); dfdy=(f(2:end-1, 3:end)-f(2:end-1, 1:end-2))./dyn; -bend \ No newline at end of file +end \ No newline at end of file diff --git a/vis3d/tign2rosg.m b/vis3d/tign2rosg.m index 4cee9ea..677fc46 100644 --- a/vis3d/tign2rosg.m +++ b/vis3d/tign2rosg.m @@ -1,5 +1,7 @@ -function r=tign2ros(p,i) -[gx,gy]=grad(p.fxlong(:,:,i),p.fxlat(:,:,i),p.tign_g(:,:,i)); +function r=tign2rosg(p,i) +t=p.tign_g(:,:,i); +t(t==t(1,1))=nan; +[gx,gy]=grad(p.fxlong(:,:,i),p.fxlat(:,:,i),t); gn=sqrt(gx.^2+gy.^2); r = 1./gn; end \ No newline at end of file -- 2.11.4.GIT