coordinate bug cleanup

This commit is contained in:
2026-05-03 09:23:21 -07:00
parent 81fe1b67c5
commit 4159a3a5cb
4 changed files with 22 additions and 2 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ function value = transmitterGain(obj, t, a)
% Angular offset from boresight via spherical law of cosines
% Convention: t=0° nadir, t=90° horizon; a=0° +y, a=90° +x
cos_theta = sind(obj.tilt) .* sind(t) .* cosd(a - obj.tilt) + ...
cos_theta = sind(obj.tilt) .* sind(t) .* cosd(a - obj.azimuth) + ...
cosd(obj.tilt) .* cosd(t);
cos_theta = max(-1, min(1, cos_theta)); % clamp for numerical safety
theta = acosd(cos_theta);