Animation of moving vehicle location on image

2 次查看(过去 30 天)
Hello,
I am trying to animate a vehilce as it changes location (lat, lon, alt) on a map image.
%display map image drapped over elevation data
figure('Renderer', 'opengl');
usamap(latLim, lonLim);
geoshow(double(Z), R, 'DisplayType', 'surface', 'CData', orthoImage);
daspectm('m', 1);
axis vis3d;
v1_handle = plot3m(vehicle_1(1,2), vehicle_1(1,3), vehicle_1(1,4), 'b.', 'EraseMode','xor');
for i =1:length(vehicle_1(:,2))
set(v1_handle, 'XData', vehicle_1(i,2), ...
'YData', vehicle_1(i,3), ...
'ZData', vehicle_1(i,4))
drawnow
end
The image and elevation data display fine, however, after the initial position is displayed in the figure, it doesn't update on the image even though the X/Y/ZData from the v1_handle is updaiting.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Vehicle Scenarios 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by