#!/usr/bin/env octave

1;

function nml(r_in,phi_deg,i)
  y_in = r_in*sin(phi_deg/180*pi);
  z_in = -r_in*cos(phi_deg/180*pi);

  disp(sprintf("y_ray(%2d) = %12.6f",i,y_in))
  disp(sprintf("z_ray(%2d) = %12.6f",i,z_in))
end

disp(sprintf('&sonic_boom'));
i = 0;
i = i+1; nml(15.108,0.260,i);
i = i+1; nml(15.015,15.115,i);
i = i+1; nml(15.115,30.152,i);

disp(sprintf('nsignals = %d',i));
disp(sprintf('/'));

function zone(r_in,phi_deg,i)
  y_in = r_in*sin(phi_deg/180*pi);
  z_in = -r_in*cos(phi_deg/180*pi);

 disp(sprintf('ZONE T="HL=%2.0f,PHI=%02.0f"',r_in,phi_deg))
 disp(sprintf(" %3.1f %12.6f %12.6f %3.1f",0,y_in,z_in,0))

end

zone(15.108,0.260,i);
zone(15.015,15.115,i);
zone(15.115,30.152,i);

