Matlab Mobile: Plot a walking path in cartesian

3 ビュー (過去 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 Center および File ExchangeMATLAB Mobile についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by