cd \d486\dynadcp\resuldyn\brut
load shet1
load timesh1
 faclat=1852*60;faclong=1852*60*cos(43.25*pi/180);
 dlat=diff(hesh1(:,5));dlong=diff(hesh1(:,6));
 vlat=dlat*faclat*1000/120;
 vlong=dlong*faclong*1000/120;

vnref=vnsh1(:,20);veref=vesh1(:,20);
vnrefabs=(vnref(101:3284)+vlat(100:3283));
[b,a]=butter(5,1/30);
vnrefabf=filtfilt(b,a,vnrefabs);
vnrefabf(1:20)=55*ones(20,1);
[b1,a1]=butter(5,1/100);
 vnrefab2=filtfilt(b1,a1,vnrefabf);
  plot(vnrefab2,'g')
 hold on
 vnrelf2=filtfilt(b1,a1,vnsh1(:,1)-vnsh1(:,20));
 verelf2=filtfilt(b1,a1,vesh1(:,1)-vesh1(:,20));

  plot(vnrelf2(101:3284),'r')
  title('dynaproc Vnord rel bin 1 et abs bin20(ref) filtre (5,1/100)')
 figure
 
  plot(temps(101:3284),vnrefab2,'g')
  hold on
  plot(temps(101:3284),vnrefab2+vnrelf2(101:3284),'k')
   title('dynaproc Vnord abs bin 1 et bin20 filtre (5,1/100)')
   
   figure
   verefabs=veref(2:3284)+vlong;
   verefabf=filtfilt(b,a,verefabs(100:3283));
 verefabf(1:20)=-50*ones(20,1);
verefab2=filtfilt(b1,a1,verefabf);

plot(temps(101:3284),verelf2(101:3284)+verefab2,'r')
 hold on
 plot(temps(101:3284),verefab2)
 title('dynaproc Vest abs bin 1 et bin20 filtre (5,1/100)')
 
 figure
 plot(cumsum(verelf2(101:3284)+verefab2)*0.12/1000,cumsum(vnrelf2(101:3284)+vnrefab2)*0.12/1000)
 title('hodographe bin 1 (bleu) et bin 20 (noir)')
 hold on
 plot(cumsum(verefab2)*0.12/1000,cumsum(vnrefab2)*0.12/1000,'k')
 