Why are all of my axes flipped in this figure?
1 回表示 (過去 30 日間)
古いコメントを表示
Hello everyone,
Im trying to create a playback video of an AUV survey, I want to show a point with the roll pitch and yaw values attached so you can see the telemetry of the vehicle as it moves through the mission. The playback is working well but for some reason all of my axes are filled. I tried set(gca, 'Xdir', 'reverse') for each axes but that didnt work. My code is below, hopefully some one can tell me where I am going wrong. Thanks!
P = 'C:/Users/keith/OneDrive/Desktop/Single Beam Bathy/SN06222/Cleaned/Cleaned';
S = dir(fullfile(P,'*.csv'));
S = natsortfiles(S);
for k= 1:numel(S)
F2 = fullfile(S(k).folder,S(k).name);
M1 = readmatrix(F2);
lat = M1(:,1);
lon = M1(:,2);
dep = M1(:,4);
yaw = M1(:,5);
pitch = M1(:,6);
roll = M1(:,7);
alt = M1(:,8);
Alt = -1.*alt;
DepS = -1.*(dep+alt);
deg = [roll, pitch, yaw];
[y,x] = ll2utm(lat, lon);
pos = [x, y, Alt];
[minLat, maxLat] = bounds(y);
[minLon, maxLon] = bounds(x);
[minDep, maxDep] = bounds(Alt);
tp = theaterPlot('Xlimit', [minLon maxLon], 'Ylimit', [minLat maxLat], 'Zlimit', [minDep maxDep]);
op = orientationPlotter(tp,'DisplayName','Orientation', 'LocalAxesLength',50);
for i = 1:numel(pos)
plotOrientation(op, roll(i), pitch(i), yaw(i), pos(i,:))
drawnow
end
end
Heres an example of the output, you can see that all three directions are reversed and I cant figure out how to flip them. Thanks everyone!
0 件のコメント
回答 (2 件)
Image Analyst
2024 年 4 月 4 日
Try
axis xy
or
axis ij
after you're all done plotting to see if one of those makes it the way you want it.
0 件のコメント
Star Strider
2024 年 4 月 4 日
Without your data I cannot run your code.
The documentation states that the roll, pitch, and yaw angles have to be in degrees, so check to see what their units and values are. If they are in radians, use rad2deg to convert them to degrees. (I do not have either of the Toolboxes that use those functions, so I have no experience with them. I just read the documentation.)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Graphics Performance についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!