      subroutine getmos(p1,p2,p3,p4,mos1)

      implicit none
      real,dimension(3)::p1,p2,p3,p4,pp1,pp2,pp0,pp3
      real::s,m,mos1

      pp1=p4-p1
      pp2=p2-p3
      pp0=p2-p1
      pp3=pp1+pp2

      s=sqrt(pp3(1)**2+pp3(2)**2+pp3(3)**2)
      m=sqrt(pp0(1)**2+pp0(2)**2+pp0(3)**2)

      mos1=m/s

      end subroutine getmos
