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

5 ビュー (過去 30 日間)
Alok Virkar
Alok Virkar 2019 年 10 月 30 日
編集済み: Alok Virkar 2019 年 10 月 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 Center および File ExchangeVisualization についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by