function retval = DeltaP(Theta, Time, Tporuch, Tvyppor, Pmax1, Pmax2, Pmax3, Pt)
  if (Time < Tporuch)
    Palt=Pmax1*sin(Theta);
  elseif (Time < Tvyppor)
    Palt=Pmax2*sin(Theta);
  else
    Palt=Pmax3*sin(Theta);
  endif
  retval = (Palt-Pt)*1.0E6;
end
