Effacer les filtres
Effacer les filtres

Why are all of my axes flipped in this figure?

9 vues (au cours des 30 derniers jours)
Bradley
Bradley le 4 Avr 2024
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!

Réponses (2)

Image Analyst
Image Analyst le 4 Avr 2024
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.

Star Strider
Star Strider le 4 Avr 2024
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.)

Catégories

En savoir plus sur Animation dans Help Center et File Exchange

Tags

Produits


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by