# Calculate thrust of a rocket in order to approach and keep a position is space ?

Tags:
1. Nov 4, 2014

### pixartist

Okay, first of all, I'm not very good at maths, so I will have to talk in programmer terms here. I have the following issue:
A small rocket is moving in space, and I want it to move to and stay at a location in space, similar to a quadcopter.
No as far as I see it, I have the following variables to consider:
- Location
- Target Location
- Rotation / thrust vector
- Maximum thrust
- Gravity
- time delta

I want my function to output the thrust multiplier (0-1) and the change in rotation OR the optimal heading.

I do NOT have information about:
- How quickly I can change the rotation of the craft

I can omit the following:
- How quickly thrust changes. It changes instantly.
- Air resistance

Now, I'm aware that I can not expect a perfect calculation since I will have to approximate how rotational impulses will affect the craft, but I would like to have a good approximation. I can get a relatively good approximation for the altitude, but horizontal movement is giving me a headache.

2. Nov 4, 2014

### Danger

Hi, Pixartist.
I can't get into any specifics about it, but it would be nice to know whether you mean the exact same spot in space, or the exact same spot relative to another craft, or the exact same spot over a planet, or... well, you get it. If you mean the same spot in space, I don't believe that it can be done because space itself is dragged along in gravitational fields. For a ship-to-ship meeting, you have to match orbits or flightpaths with it. In the case of a planet, you need to achieve geosynchronous orbit.
Good luck with it. Someone else will have to take it from here.

3. Nov 4, 2014

### pixartist

I'm sorry, I mean a simple Newtonian space. Locations are simple 3D-Vectors and are fixed above the surface.

For example target could be 100,100,0 meaning 100 meters right, 100 meters high and 0 meters back in space relative from the location the craft started (or whatever, the coordinate system is fixed anyway)

4. Nov 4, 2014

### Danger

So if I've got this straight, that would be a spot approximately 142.5 metres away at a 45° angle upward from the starboard bow?
I still can't help with the answer for you, but I'm trying to make sure that I understand the question just out of curiosity.
Oh, geez... I just realized that I never mentioned some of the other things that you need to consider. For instance, the mass for power requirements, and the distribution of that mass relative to the thrusters (to figure out leverage factors for rotation). That's all a little confusing, though, since you specified instantaneous change. That's not physically possible no matter what formulae you try to apply.

Last edited: Nov 4, 2014
5. Nov 6, 2014

### Lsos

Fixed relative to what? The earth? Sun? Galaxy? The problem is nothing is really "fixed" in space.

Whatever it is you mean, in space it's not so easy to have something be "fixed", because every body in space interacts gravitationally with every other body. Close to the earth, the earth obviously has the greatest influence. Whatever produces the greatest local gravity, you WILL eventually crash into it if you attempt to be "fixed" above it. If you want to avoid crashing into it, you have to get into a stable orbit (but that's requires movement) or you will have to continually fire your thrusters (but that requires fuel).