difference between "geodetic2aer" and "azimuth" function
21 次查看(过去 30 天)
显示 更早的评论
What is the difference between the azimuth from "geodetic2aer" and "azimuth" functions in matlab?
In the following example, I set the first point latitude, logintude, and altitude as lat0, long0, and h0 and those of the second point as lat, long, and h. Using "geidetic2aer" gives an azimuth of 238.08 deg while using "azimuth" gives 237.99 deg. Are the azimuth returnd by these two functions supposed to be the same or am I missing something about their meaning? I know "azimuth" returns the angle for the great circle path.
wgs84 = wgs84Ellipsoid;
lat0 = 46.017;
lon0 = 7.750;
h0 = 1673;
lat = 45.977;
lon = 7.658;
h = 4531;
format shortG
[az,elev,slantRange] = geodetic2aer(lat,lon,h,lat0,lon0,h0,wgs84)
az1= azimuth(lat0,lon0,lat,lon)
0 个评论
回答(1 个)
William Rose
2022-11-11
@MatG, azimuth, by default, assumes the Earth is a sphere. geodetic2aer() ias using wgs84 spheroid, in your usage. If you tell azimuth to use wgs84, they give the same result.
wgs84 = wgs84Ellipsoid;
lat0 = 46.017;
lon0 = 7.750;
h0 = 1673;
lat = 45.977;
lon = 7.658;
h = 4531;
format shortG
[az,elev,slantRange] = geodetic2aer(lat,lon,h,lat0,lon0,h0,wgs84);
az1= azimuth(lat0,lon0,lat,lon,wgs84);
fprintf('geodetic2aer: az=%.2f. azimuth(): az=%.2f.\n',az,az1);
Try it.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Mapping Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!