How do I create an animation for a rocket using xyz, roll, pitch, yaw and time in matlab?

5 次查看(过去 30 天)
Here is what I have tried so far:
wgs84 = wgs84Ellipsoid('foot');
[x,y,z] = geodetic2ecef(wgs84,gdlat,long,gdalt);
xyz = [x,y,z];
xyz_m = ft2m(xyz);
datats = [data.time,x,y,z,deg2rad(rolr),deg2rad(pitr),deg2rad(yawr)];
h=Aero.Animation;
f=figure;
h.Figure=f;
h.initialize();
h.FramesPerSecond=10
h.TimeScaling = 5;
idx1=h.createBody('delta2.ac','ac');
h.show()
h.bodies{1}.TimeseriesSourceType='Array6DoF';
h.bodies{1}.timeseriesSource=datats;
h.Camera.offset=[-150 -150 0];
h.show()
h.VideoRecord = 'on';
h.VideoQuality = 50;
h.VideoCompression = 'Motion JPEG AVI'
h.VideoFilename = 'rocket trajectory';
h.play()
h.VideoRecord='off';
However when I try to run the data, the rocket doesnt move. I have access to the aerospace toolbox, but I do not have access to Simulink3d animation

回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by