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!