Animation of moving vehicle location on image
4 views (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Vehicle Scenarios in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!