Skip to content

Commit

Permalink
Update get_atm_interf_gen.m
Browse files Browse the repository at this point in the history
  • Loading branch information
fgnievinski authored May 4, 2023
1 parent 6ed4b1b commit 88e9a6a
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions get_atm_interf_gen.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,23 @@
if (nargin < 6), opt = struct(); end
opt = structmergenonempty(get_opt_default(), opt);

da = 2*H*N./sind(e+de);
dg = 2*H.*(sind(e+de)-sind(e));
dt = da + dg;
%% auxiliary quantities:
ep = e + de;
sine = sind(e);
sinep = sind(ep);
Dl = 2*H./sine; %#ok<NASGU>
Dlp = 2*H./sinep;
Di = 2*H.*sine;
Dip = 2*H.*sinep;
dDi = Dip - Di;

%% propagation delays:
da = N.*Dlp;
dg = dDi + N.*(Dip-Dlp);
dt = (1+N).*Dip - Di;
%dt_alt = da + dg;
%tmp = max(abs(dt-dt_alt))
%tmp < sqrt(eps(max(dt))) % DEBUG

if (nargout < 4), return; end

Expand Down

0 comments on commit 88e9a6a

Please sign in to comment.