Borrar filtros
Borrar filtros

Having problem in the rotational animation of a lander

1 visualización (últimos 30 días)
Giorgos
Giorgos el 10 de En. de 2014
Comentada: Mischa Kim el 10 de En. de 2014
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?

Respuestas (2)

Mischa Kim
Mischa Kim el 10 de En. de 2014
Editada: Mischa Kim el 10 de En. de 2014
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 comentario
Mischa Kim
Mischa Kim el 10 de En. de 2014
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.

Iniciar sesión para comentar.


Giorgos
Giorgos el 10 de En. de 2014
Hi Mischa,
Thank you for your replay. Though I found the Rotation Angles to Quaternions (321) block, and put it in between the vr sink and the output angles of the lander. just when the simulation starts the lander disappears from the screen.

Community Treasure Hunt

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

Start Hunting!

Translated by