How to visualize a vector in Simscape Multibody
Hello!
I have been working on a 6-DOF Simscape Multibody simulation for a thrust vectored rocket. The simulation works, but I have been wanting to visualize the thrust vector below the rocket. How should I go about this?
In my searching, I have found that this visualization would likely have to be a geometric solid with no mass, which is okay (I just want an indication of direction and I have modeled a vector solid already). This would be relatively straightforward if the Rigid Transform block could take a dynamic rotation matrix, as that is already what my simulation uses to calculate the thrust vector in the proper global frame, but it seems that it can only take a compile- or run-time rotation matrix.
I have also considered using a spherical joint under the rocket connected to the vector solid, but doing so would require being able to set the position of the spherical joint, and I have not been able to figure out how to do that.
I have even tried making my own Simscape component to act as a Dynamic Transform block, but the Simscape language does not have access to the Multibody Frame class necessary to make this work.
Is visualizing a vector like this possible, and if so, what is the best way to go about it?Hello!
I have been working on a 6-DOF Simscape Multibody simulation for a thrust vectored rocket. The simulation works, but I have been wanting to visualize the thrust vector below the rocket. How should I go about this?
In my searching, I have found that this visualization would likely have to be a geometric solid with no mass, which is okay (I just want an indication of direction and I have modeled a vector solid already). This would be relatively straightforward if the Rigid Transform block could take a dynamic rotation matrix, as that is already what my simulation uses to calculate the thrust vector in the proper global frame, but it seems that it can only take a compile- or run-time rotation matrix.
I have also considered using a spherical joint under the rocket connected to the vector solid, but doing so would require being able to set the position of the spherical joint, and I have not been able to figure out how to do that.
I have even tried making my own Simscape component to act as a Dynamic Transform block, but the Simscape language does not have access to the Multibody Frame class necessary to make this work.
Is visualizing a vector like this possible, and if so, what is the best way to go about it? Hello!
I have been working on a 6-DOF Simscape Multibody simulation for a thrust vectored rocket. The simulation works, but I have been wanting to visualize the thrust vector below the rocket. How should I go about this?
In my searching, I have found that this visualization would likely have to be a geometric solid with no mass, which is okay (I just want an indication of direction and I have modeled a vector solid already). This would be relatively straightforward if the Rigid Transform block could take a dynamic rotation matrix, as that is already what my simulation uses to calculate the thrust vector in the proper global frame, but it seems that it can only take a compile- or run-time rotation matrix.
I have also considered using a spherical joint under the rocket connected to the vector solid, but doing so would require being able to set the position of the spherical joint, and I have not been able to figure out how to do that.
I have even tried making my own Simscape component to act as a Dynamic Transform block, but the Simscape language does not have access to the Multibody Frame class necessary to make this work.
Is visualizing a vector like this possible, and if so, what is the best way to go about it? simscape, simulink MATLAB Answers — New Questions