AER2ECI convert AER (azimuth, elevation, slant range) to ECI

Contents

Inputs

Outputs

function [x, y, z] = aer2eci(utc, az, el, rng, lat, lon, alt, spheroid, angleUnit)
if nargin < 8 || isempty(spheroid)
  spheroid = matmap3d.wgs84Ellipsoid();
end
if nargin < 9
  angleUnit = 'd';
end

[x1, y1, z1] = matmap3d.aer2ecef(az, el, rng, lat, lon, alt, spheroid, angleUnit);

x = nan(like=az);
y = nan(like=az);
z = nan(like=az);

for i = 1:numel(x)
  r_eci = matmap3d.ecef2eci(utc, [x1(i); y1(i); z1(i)]);

  x(i) = r_eci(1);
  y(i) = r_eci(2);
  z(i) = r_eci(3);
end

end