Matlab Mobile: Plot a walking path in cartesian

조회 수: 1 (최근 30일)
Nazish Fahim
Nazish Fahim 2019년 8월 27일
댓글: Hamed Shamsi khani 2023년 5월 24일
Hi,
I am using Matlab mobile to acquire postioning data while walking along a path . Then I convert it to cartesian and plot it in 3D. I want to calculate the distance walked. Here is the code:
In Matlab Mobile: [Android]
m = mobiledev;
m.PositionSensorEnabled = 1;
m.Logging = 1;
<walk straight 10 steps>
m.Logging = 0
[lat,lon,timestamp,speed,course,alt,horizac] = poslog(m)
< convert to cartesian>
[x,y,z] = geodecticenu(lat,lon,horizac,lat(1),lon(1),horizac(1),wgs84Ellipsoid);
plot3(x,y,z)
I expect a staright path in 3D, But it is not showing that.
Kindly help.
Looking forward to your response.
Regards,
Naz
  댓글 수: 1
Hamed Shamsi khani
Hamed Shamsi khani 2023년 5월 24일
Hello. Both geodecticenu and geodectic2enu give this error:
'wgs84Ellipsoid' requires Mapping Toolbox

댓글을 달려면 로그인하십시오.

채택된 답변

Abhisek Pradhan
Abhisek Pradhan 2019년 8월 30일
The entire code looks fine.Just a minor mistake in using geodeticenu function. Use geodetic2enu instead for getting the desired results.
  댓글 수: 1
Nazish Fahim
Nazish Fahim 2019년 9월 4일
Thank you, I tried the function you mentioned, it gives desirable results. Thanks.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

커뮤니티

더 많은 답변 보기:  원격 교육 커뮤니티

카테고리

Help CenterFile Exchange에서 MATLAB Mobile에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by