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

4 views (last 30 days)
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

Answers (0)

Categories

Find more on Visualization in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!