File size: 4,762 Bytes
5ab75a9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | function [Nacon,Nicon,Nbcon] = NumExpectedUniformShell(Nc,hkm,zenmaxdeg,zaint,fbint,asundeg,HW20,verbose)
% NumExpectedUniformShell - Estimate satellites above using uniform shell approx
% Syntax: [Nacon,Nicon,Nbcon] = NumExpectedUniformShell(Nc,hkm,zenmaxdeg,zaint,fbint,asundeg,HW20,verbose);
%
% =========================================================================
%
% Copyright (c)�2024�United States Government as represented by the
% Administrator of the National Aeronautics and Space Administration.
% All Rights Reserved.
%
% =========================================================================
%
% Description:
% Use uniform shell approx to estimate the number of constellation
% satellites above an Earth-based observer. Also estimate the normalized
% flux from those satellites
%
% =========================================================================
%
% Input:
% Nc = Number of constellation satellites
% h = Constellation altitude
% zenmaxdeg = Max observation zenith angle
% asundeg = Solar elevation (i.e., altitude) angle, which is the negative
% of the solar depression angle
% zaint = Zenith angle interpolation array (rad)
% for brighter-than-recommended fraction
% fbint = Fraction array for brighter-than-recommended fraction
% HW20 = Flag to use Hainaut & Williams (2020) integrand
% expression, which produces equivalent results as
% Hall (2021) integrand
% verbose = Verbose flag
%
% =========================================================================
%
% Output:
% Nacon = Number of constellation satellites above a low-lat. observer
% within specified angle of the zenith direction
% Nicon = Number of those satellites that are also illumiated by the Sun
% Nbcon = Number of those satellites that are also brighter than
% recommended
%
% =========================================================================
%
% Initial version: Nov�2024;� Latest update: Nov�2024
%
% ----------------- BEGIN CODE -----------------
% Initializations
Nargin = nargin;
na = 0;
na=na+1; if Nargin < na; Nc = 1600; end
na=na+1; if Nargin < na; hkm = 550; end
na=na+1; if Nargin < na; zenmaxdeg = 60; end
na=na+1; if Nargin < na; asundeg = -18; end
na=na+1; if Nargin < na; zaint = [0 pi/2]; end
na=na+1; if Nargin < na; fbint = [1 0]; end
na=na+1; if Nargin < na; HW20 = false; end
na=na+1; if Nargin < na; verbose = false; end
% Solar altitude angle (e.g., end of Ast. twilight = 18 deg)
a = asundeg * pi/180; ca = cos(a); sa = sin(a);
% Use t = theta for zenith angle
tmax = zenmaxdeg * pi/180;
ctmax = cos(tmax); stmax = sin(tmax);
% Earth radius
Re = 6378.137;
% Constellation altitude and radius
h = hkm;
Rs = Re+h;
% Check if asun < 0
if (a > 0)
error('Estimation for a > 0 not tested');
end
% Calculate the total number of satellites above zenith cutoff
NeedIllumination = false;
Naint = @(t)Nintegrand(t,ca,sa,Rs,Re,NeedIllumination);
Nacon = Nc*integral(Naint,0,tmax);
% Analytical form by Hall (2021)
% Nacon1 = (Nc*(Rs - Re*stmax^2 - ctmax*sqrt(Rs^2 - Re^2*stmax^2)))/(2*Rs);
btmax = sqrt(Rs^2 - Re^2*stmax^2);
Nacon1 = (Nc/2/Rs) * (Rs - Re*stmax^2 - ctmax*btmax);
% Analytical form from HW20
fncz = asin(Re*stmax/Rs);
fncz = cos(tmax-fncz);
fncz = 0.5*(1-fncz);
Nacon2 = Nc * fncz;
if verbose
Nfig = 15;
disp(['Nacon = ' smart_exp_format(Nacon ,Nfig) ' ' ...
smart_exp_format(Nacon1,Nfig) ' ' ...
smart_exp_format(Nacon2,Nfig)]);
end
% Calculate the number of illuminated satellites above zenith cutoff
NeedIllumination = true;
Niint = @(t)Nintegrand(t,ca,sa,Rs,Re,NeedIllumination,HW20);
Nicon = Nc*integral(Niint,0,tmax);
if verbose
disp(['Nicon = ' smart_exp_format(Nicon,Nfig)]);
end
Nbint = @(t)Nintegrand(t,ca,sa,Rs,Re,NeedIllumination,HW20).*interp1(zaint,fbint,t);
Nbcon = Nc*integral(Nbint,0,tmax);
if verbose
disp(['Nbcon = ' smart_exp_format(Nbcon,Nfig)]);
end
return
end
% ----------------- END OF CODE ------------------
%
% Please record any changes to the software in the change history
% shown below:
%
% ----------------- CHANGE HISTORY ------------------
% Developer |���� Date��� | Description
% ---------------------------------------------------
% D. Hall��� |� 2024-Nov �| Initial version.
% =========================================================================
%
% Copyright (c)�2024�United States Government as represented by the
% Administrator of the National Aeronautics and Space Administration.
% All Rights Reserved.
%
% ========================================================================= |