subroutine qsadd c use mblock_module c use arrays_module c use arrayp_module c use meshcb_module c use voids_module c use obsijk_module c #ifdef SINGLE include '../comdeck/precis4.f' #else include '../comdeck/precis.f' #endif include '../comdeck/params.f' include '../comdeck/const.f' include '../comdeck/cntrl.f' include '../comdeck/cbusr.f' include '../comdeck/dumn.f' include '../comdeck/mparam.f' include '../comdeck/acctrm.f' include '../comdeck/scalar.f' c c c c HINCHEY JOT CODE: PROP AUV c if(cycle.eq.0) then open(UNIT=1,FILE="C:\\Users\\Hinchey\\Desktop\\ ^ data.txt",STATUS='NEW') close(UNIT=1) endif if(cycle.eq.0) then sum=0.0 cs=0.0 rold=0.0 aold=0.0 pold=0.0 eold=0.0 depth=dogs eold=command-depth endif if(t.gt.on) then depth=dogs enew=command-depth slope=(enew-eold)/delt control=gp*enew control=control+gi*sum control=control+gd*slope if(control>+dump) then control=+dump endif if(control<-dump) then control=-dump endif sum=sum+delt*enew rnew=rold+delt*cats adot=(control-xyz*aold)/uvw anew=aold+delt*adot pdot=(paw-xyz*pold)/uvw pnew=pold+delt*pdot cs=anew rold=rnew aold=anew pold=pnew eold=enew endif c results if(cycle.eq.0) return open(UNIT=1,FILE="C:\\Users\\Hinchey\\Desktop\\ ^ data.txt",ACCESS='APPEND',STATUS='OLD') WRITE(1,*) t,cs,dogs,cats close(UNIT=1) c c HINCHEY JOT CODE: PROP AUV c c c c c HINCHEY JOT CODE: TANK AUV c c if(cycle.eq.0) then c open(UNIT=1,FILE="C:\\Users\\Hinchey\\Desktop\\ c ^ data.txt",STATUS='NEW') c close(UNIT=1) c endif c if(cycle.eq.0) then c cs=0.0 c rold=0.0 c aold=0.0 c anew=0.0 c pold=0.0 c eold=0.0 c endif c depth=dogs c enew=command-depth c rnew=rold+delt*cats c pdot=(paw-xyz*pold)/uvw c pnew=pold+delt*pdot c anew=aold c adot=0.0 c if(enew.gt.0.0 .and. c * anew.lt.0.0254) then c anew=aold+0.0254*delt c adot=0.0254 c endif c cs=adot c cs=0.0 c rold=rnew c pold=pnew c aold=anew c eold=enew c results c if(cycle.eq.0) return c open(UNIT=1,FILE="C:\\Users\\Hinchey\\Desktop\\ c ^ data.txt",ACCESS='APPEND',STATUS='OLD') c WRITE(1,*) t,cs,fzb,dogs,cats c close(UNIT=1) c c HINCHEY JOT CODE: TANK AUV c c c c c HINCHEY JOT CODE: PROP/TANK AUV c c if(cycle.eq.0) then c open(UNIT=1,FILE="C:\\Users\\Hinchey\\Desktop\\ c ^ data.txt",STATUS='NEW') c close(UNIT=1) c endif c if(cycle.eq.0) then c sum=0.0 c cs=0.0 c rold=0.0 c aold=0.0 c pold=0.0 c eold=0.0 c depth=dogs c eold=command-depth c endif c if(t.gt.on) then c depth=dogs c enew=command-depth c slope=(enew-eold)/delt c control=gp*enew c control=control+gi*sum c control=control+gd*slope c if(control>+dump) then c control=+dump c endif c if(control<-dump) then c control=-dump c endif c sum=sum+delt*enew c rnew=rold+delt*cats c adot=(control-xyz*aold)/uvw c anew=aold+delt*adot c pdot=(paw-xyz*pold)/uvw c pnew=pold+delt*pdot c cs=anew c rold=rnew c aold=anew c pold=pnew c eold=enew c endif c results c if(cycle.eq.0) return c open(UNIT=1,FILE="C:\\Users\\Hinchey\\Desktop\\ c ^ data.txt",ACCESS='APPEND',STATUS='OLD') c WRITE(1,*) t,cs,dogs,cats c close(UNIT=1) c c HINCHEY JOT CODE: PROP/TANK AUV c c c c return end