- accelog: https://www.mathworks.com/help/matlab/ref/mobilesensor.internal.mobiledev.accellog.html
- poslog: https://www.mathworks.com/help/matlab/ref/mobilesensor.internal.mobiledev.poslog.html
- webmap: https://www.mathworks.com/help/map/ref/webmap.html
- wmline: https://www.mathworks.com/help/map/ref/wmline.html
How do I map Accelerometer data to Matlab webmap, so that I can evaluate road distresses?
1 回表示 (過去 30 日間)
古いコメントを表示
I want to display the z axis acceleromter data from matlab mobile to analyze the road distresses
0 件のコメント
回答 (1 件)
Vinayak
2024 年 1 月 9 日
Hi John,
I understand that you want to use the mobile accelerometer data. You can use the function “accellog” to obtain the data. You can also get data from the “poslog” function to get the latitude and longitude for the same duration. You may refer to the sample code below:
% Create a mobiledev object
m = mobiledev;
m.AccelerationSensorEnabled = 1;
m.PositionSensorEnabled = 1;
m.Logging = 1;
pause(30); % Pause for 30 seconds while data is being collected
m.Logging = 0;
[a, t] = accellog(m);
[lat,lon,t_pos] = poslog(m);
zAccel = a(:,3);
% Analyse and Process the data as you require
[lat_p, lon_p] = analyzeData(lat,lon,zAccel); % Your logic to get the points of interest
Once you have processed the required latitudes and longitudes, you can use “wmline” to plot the data on a “webmap”.
webmap;
wmline(lat_p,lon_p);
You can refer to the following documentation link for more details about these functions:
Hope this helps.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で LEGO MINDSTORMS EV3 Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!