Rocket Simulation

Begging

Please help me.

Background

Ok, for a while now I’ve been trying to come up with a physical model where you input two angles on a rocket motor gimbal and a rocket motor force and double integrate the accelerations over time to get the position and orientation of the rocket. I’ve not been successful.

That’s why I am turning to this forum, because neither I or my physics teacher (i think he just doesn’t care) can create this physical model.

Rocket

The rocket has a gimballed engine which is defined by two angles and a force. This is the input. The rocket has a position and an orientation. This is the output.

Problem

How do i go from two angles and a force to position and orientation over time. I need this to be accurate to the real world. Though for the moment not taking aerodynamics into consideration. But everything else.

please don’t hesitate to respond all input can be helpful

2 Likes

3D force vector simulation, juicy!

Just to make sure I understood you correctly:
You have the red inputs and want the blue as outputs, just with 3 spacial dimensions instead of 2?

Edit: Have to click on the image, discourse crops it.

yes, well wouldn’t the blue vector be originating from the CoM?

But yes what you drew but in 3D. Also not only position but orientation and like that the orientation will effect the way the forces effect position over time ect.

yes yes yes continue pls

Yes it would.

Are there any programming languages you are familiar with?
If not, Processing is easy to learn and should do all you need for this.

C, C++, Python, Javascript, C#, arduino and processing ect.

But preferably in c++ because i am making the 3d graphics in c++.

I will have to do some reading.

Earliest I get something functional going will be friday or saturday.

Yo dude wtf, thanks a lot, take as much time as you want to. I’ll be sure to mention you in the work I am doing if i ever get done.

wait i just re-read what you wrote.

you have the red inputs and want the blue as outputs

no, the blues are not outputs. the output is the position and orientation of the entire rocket.

1 Like

what?, you liked my post but didn’t reply. nani

Kind of busy preparing for tomorrow and thursday.

yeah no it’s fine just kinda weird to like the post.

Anyhow do you acknowledge and agree?

Interesting project. Do you want to include external forces such as gravity? And also account for the mass distribution of the rocket? Without having looked at it with pen and paper I guess you end up with a second order ODE that you need to solve… The tricky part is properbly how the angle of the trust affects the direction, might give it a look in one of the comming days. :slight_smile:

Everything is included but aerodynamics since the rocket will not get up to speed. The mass will change and the CoM will move ect ect.

how the thrust affects the direction shouldn’t be that hard, right?

Isn’t it just that you start out with (alpha, beta, F) and assume that the force vector is pointing straight up. then you rotate the force vector with 2 rotation matrices with the angles alpha and beta so that you get the force components for the engine.

then just rotate the force components with rotation matrices with the angles of the orientation of the rocket so that you get the global force vectors?

This is what i came up with to get the force components of the engine. the order of multiplication may be wrong but the principle should be right, right?

don’t you just do the same in order to move these local engines forces to the CoM so that you know how they will translate the rocket?

the problem is mostly how these will make the rocket rotate which in turn will cause the rocket to translate differently since the forces on the CoM depend of the orientation of the rocket.

Nevermind I understand what you meant with second order diffs.