Animation of moving vehicle location on image
조회 수: 4 (최근 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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Vehicle Scenarios에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!