added antenna pointing parameters
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user