difference between "geodetic2aer" and "azimuth" function
    조회 수: 4 (최근 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!

