math - Re: Space physics for missiles, spaceships -


In the useful codeProject article, an entrepreneur and very useful person has made the necessary mathematics for a Newtonian missile, which is the target of Newton.

It is necessary to kill (It works for matching and speed between the spaceship, little bit of input).

In the last few days, I have written one thing about it, hundreds of spacecraft (blocks), missiles (block) firing on each other quite clear.

However, it only works entirely for Newton's craft and, as most of the space simulators can point to flying (or who can tell the FTL methods Likes), Newtonian is not the only way to fly

And I think that, with all the wonderful computer hardware, there should be a computer program, which can say, p + v * t + 0.5 * a * t * t = P + V * T + 0.5 * A * T * T and spray equations that depend on the T and A (or A, to ensure that the chaser is left or right).

The legend is near me (MATLAB may be able to get it, but I do not not $ 2,100), but if I have 1-column, 2- Line vector "matrix" (I have 4.2, no 5)

So - help me to ruin genocide between stars? I am not a bad alien to defeat MIB, I promise! : D

Edit: I'm not looking for solution equations; I'm looking for software that can give me that solution equation.

Thank you.

I still can not believe what you are trying to do. If you want to solve the algebraic equation at the time of writing the code, then the Wolfram alpha is quite useful, e.g. .

If you want to solve the algebraic equation on the runtime, then this is a very difficult problem in general. If you give me the same information you are trying to do, then I can recommend some good free packages.

Edit: The example problem you are trying to resolve:

Question: Initial position Q0, initial velocity v0, and continuous acceleration a0, and with initial position Q1 Looking at a spacecraft with a missile, I want to find Missile Velocity v1 with magnitude M, which will eventually lead to the missile collision with the space shuttle.

A: You are trying to solve the system of equations

  q0 + v0t + 1/2 a0t ^ 2 = q1 + v1t v1 v1 = M ^ 2   

For vector v1, where effect t's time is also unknown. It is very difficult to solve this system in a closed form, as far as I can tell: Wolfram Alpha pastes it, and even hard times of mathematica. However, it is to attack with comparatively numerical methods. To do this, first we first solve the problem by touching the equation in the second one:

  (q0 - q1 + v0t + 1/2 a0t ^ 2). (Q0 - q1 + v0t + 1/2 a0t ^ 2) == M ^ 2T ^ 2   

It has a quartic polynomial in t with known coefficient:

  [(q0 - q1) (Q0-q1)] + [2 (q0 - q1). V0] t + [v0.v0 + (q0-q1) .a 0 -m ^ 2] t ^ 2 + [v0.a0] t ^ 3 + [1/4 a0.a0] t ^ 4 = 0   

Everything in the bracket is a scalar that you can calculate with known quantities. To find the roots of this quartic, use a black-box root solvent (I'm highly available at Jenkins-Trub: C ++ code at www.crbond.com/download/misc/rpoly.cpp, Java and Fontron version Also floating around are 'nets').

Once you have the roots, select the least positive positive (this is the direction that will kill the missile as soon as possible the space shuttle) and it will first plug it into the equation, And trivially solved for v1 Question: In the initial position q0, initial velocity v0, and continuous acceleration a0, and initial position q1 and a spaceship with the initial missile, velocity v1, I want to find Missile Acceleration A1 with magnitude M, which will eventually hit the missile with the space shuttle.

A: This problem is similar to the first; Your equation is now

  q0 + v0 t + 1/2 a0t ^ 2 = q1 + v1 t + 1/2 a1 t ^ 2 a1 a1 = m ^ 2  < / Pre> 

Whereas a1 and t are unknown then, these equations can be combined with known coefficients in a quartic in t:

  [(q0 - q1). (Q0-q1)] + [2 (q0 - q1). (V0-v1)] T + (v0-v1). (V0-v1) + (q0-q1) .a0] t ^ 2 + [(v0-v1). A0] T ^ 3 + [1/4 a0]. A 0 - 1/4 m ^ 2] t ^ 4 = 0   

Again, using Jenkins-Trout to find roots For, firstly plug the least positive root in the equation, and solve for A1.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -