Having problem in the rotational animation of a lander
2 次查看(过去 30 天)
显示 更早的评论
Hello, I am working on a simulation that represents the motion of a moon lander based on the simulink model that I have done. Now that the model has finished, I wish to animate this in a 3d fashion. Though i have a couple of questions that I hope someone can answer:
a. Firstly I have managed to animate the transitional mode of the lander, but considering that the motion of the lander starts from a 3000m hight and -5000m x-direction, the lander is never in the range of the camera and thus i cannot observe the motion of the lander. Are there any proposals on how to fix this? I am using v-reaml to make the graphics.
b. Secondly I wish to add to the transitional model of the lander, the angles it makes to correct its trajectory. As can be seen from the attached file i simutanusly have as an output all three angles. I cant feed them in the vr sink . any proposals for this problem?
0 个评论
回答(2 个)
Mischa Kim
2014-1-10
编辑:Mischa Kim
2014-1-10
Hello Giorgos,
a. What exactly do you mean by "observing" and "camera"? Are you referring to the fact that you cannot see the lander in the VR? If so, you can define so-called viewpoints. So, for example, you could define the location of one of the viewpoints to be some constant distant away from the lander. Once the lander is close enough you could switch to a different viewpoint that is located near the landing site.
b. The three angles (Euler angles) need to be converted to quaternions. See this answer for reference.
1 个评论
Mischa Kim
2014-1-10
Looking at your model closer I notice that you have two VR Sinks, not quite sure why. I would get rid of one of them and feed both the translation and rotation in the remaining VR Sink. You need to check the appropriate boxes in the VR model tree for that.
In case you are working with a complex lander VR model (consisting of several bodies, that is), I would recommend - for debugging purposes - to start modeling the lander as a cube. That way you don't have to worry about rotating about the correct center of rotation.
Another thing you could do is to set translational values to zero for the moment (constant block) and see if you can make the rotation work.
Finally, please repost your answer as a comment .
Best of luck.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!