added antenna pointing parameters

This commit is contained in:
2026-04-30 09:49:16 -07:00
parent a202164875
commit 35702a6ce2
5 changed files with 50 additions and 44 deletions
+10 -6
View File
@@ -11,11 +11,15 @@ function value = transmitterGain(obj, t, a)
error("t and a must be the same size");
end
n_t = 4; % tilt beamwidth (higher = narrower beam)
n_a = 4; % azimuth rolloff sharpness (higher = more directional)
n = 4; % beamwidth exponent (higher = narrower beam)
% Elevation: cardioid family, null at zenith (t=180°), peak at nadir (t=0°)
% Azimuth: cardioid family, peak at a=0° (+y), null at a=180° (-y)
value = 10 .* n_t .* log10((1 + cosd(t)) ./ 2) + ...
10 .* n_a .* log10((0.5 + 0.5 .* cosd(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.boresightTilt) .* sind(t) .* cosd(a - obj.boresightAzimuth) + ...
cosd(obj.boresightTilt) .* cosd(t);
cos_theta = max(-1, min(1, cos_theta)); % clamp for numerical safety
theta = acosd(cos_theta);
% Cardioid family: peak at boresight (theta=0), null opposite (theta=180°)
value = 10 .* n .* log10((1 + cosd(theta)) ./ 2);
end