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

5 vues (au cours des 30 derniers jours)
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

Réponses (0)

Catégories

En savoir plus sur Simulation dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by