How to calculate the slope from geopraphical coordinates?
이전 댓글 표시
Hi all,
I have installed a GPS logger on a vehicle, so I have extracted the geographcal coordinates in degree (longitude, latitude and elevation). I need to calculate the slope encountered by the vehicle. I came up with the following code, that is far from being good as you can see in the attached plot. How may I improve the results?
wgs84 = wgs84Ellipsoid('meters');
[gpsx,gpsy,gpsz] = geodetic2ecef(wgs84,Latitude,Longitude,Altitude);
slope=atand(diff(gpsz)./sqrt(diff(gpsx).^2+diff(gpsy).^2));
Thank you.
Best regards.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Standard File Formats에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

