Find angle of line and time of impact for a line between two parametric circles.

61 Views Asked by At

I am trying to find the angle of a parametric line so that it will intersect a circular parametric curve when both of their parameters are equal. I also need to have the line's start position be defined by another parametric curve. What I have so far is this:

The application for this is somewhat contrived, as I'm trying to find the angle of a rocket launched from Planet A to Planet B. I'm not taking into account any sort of physics, I'm just assuming the rocket flies in a straight line with constant velocity once it leaves Planet A's surface.I'm also assuming the planets have negligible size and mass. I'm trying to find the angle I need to launch it at to intercept Planet B, which is orbiting further out than Planet A.

$r$ = distance from center of solar system

$p$ = period of orbit

$\alpha$ = phase shift of planet A

$\beta$ = phase shift of planet B

$v$ = speed of rocket

$\phi$ = angle of launch


$x_A(t) = r_A*cos(\frac{2\pi}{p_A}(t + \alpha))$

$y_A(t) = r_A*sin(\frac{2\pi}{p_A}(t + \alpha))$

$x_B(t) = r_B*cos(\frac{2\pi}{p_B}(t + \beta))$

$y_B(t) = r_B*sin(\frac{2\pi}{p_B}(t + \beta))$

$x_{rocket}(t) = v*cos(\phi)*t$

$y_{rocket}(t) = v*sin(\phi)*t$


What I've come up with so far is solving the x and y component as two equations, solving for time of flight and angle of launch. I have two times, time of launch ($t_o$), which is when the rocket leaves Planet A's surface, and time of flight ($t$). I make $t_o$ a constant and end up with these equations

$x_B(t_o+t) = x_{rocket}(t) + x_A(t_o)$

$y_B(t_o+t) = y_{rocket}(t) + y_A(t_o)$

However, when I expand these, they become

$r_B*cos(\frac{2\pi}{p_B}(t_o + t + \beta)) = v*cos(\phi)*t + r_A*cos(\frac{2\pi}{p_A}(t_o + \alpha))$

$r_B*sin(\frac{2\pi}{p_B}(t_o + t + \beta)) = v*sin(\phi)*t + r_A*sin(\frac{2\pi}{p_A}(t_o + \alpha))$

I'm not sure if these are solvable, at least without actual numbers for the constants. Is there a better way to approach this than what I'm doing now?

1

There are 1 best solutions below

1
On BEST ANSWER

Assuming that the initial speed $v$ is fixed, you have two equation in two unknowns, $\phi$ and $t$. So in general, isolated solutions exist. However, note that you are mixing $t$ inside and outside of the trigonometric functions. You are not going to be able to solve these in a nice closed form. Instead, you will need to use some scheme of improving approximations. But then, except for polynomials and a few special values, all calculations are actually done this way.

First, let's simplify your equations. You appear to be trying your best to make this as tough as possible to solve by making the most complex choices that you can. Boil it down to the essentials instead. First: $\alpha = t_0 = 0$. Don't define your phase angles from some arbitrary point. Define them from the most useful point - the time at which your rocket sets off, which is also when we shall set our clock to $0$. Second: $p_B = 2\pi$. Our unit of time is $\frac{1}{2\pi}$ of a $B$-year. Third: $r_B = 1$. Our unit of distance is a planet $B$-radius. And just to make it a little easier to write out, $r = r_A$. Then what we have left is: $$\cos(t + \beta) = vt\cos \phi + r$$ $$\sin(t + \beta) = vt\sin \phi$$

So $$\sin^2 \phi = \frac{\sin^2(t +\beta)}{v^2t^2}$$ and $$\cos^2 \phi = \frac{(\cos(t + \beta) - r)^2}{v^2t^2}$$

Thus $$\begin{align}v^2t^2 &= (\cos(t + \beta) - r)^2 + \sin^2(t +\beta)\\&=1 + r^2 - 2r\cos(t + \beta)\end{align}$$ $$v^2t^2 + 2r\cos(t + \beta) - 1 - r^2 = 0$$ Now, to solve this for $t$, you can use Newton's Method with $f(t) = v^2t^2 + 2r\cos(t + \beta) - 1 - r^2$. It likely will be as quick as any other method. In general, there should be two solutions. I haven't worked it out completely to be sure, but I expect one of the solutions will have $t < 0$ while the other will have $t > 0$. So you can throw out the negative solution. Once you know $t$, you can find $\phi$ from $$\sin \phi = \frac{\sin(t + \beta)}{vt}$$

Finally, to translate between the simplified version and your "make all the worst choices" version, I will add a prime to all the values of the simplified version. Then:

$$r' = \frac{r_A}{r_B}$$ $$v' = \frac{vp_B}{2\pi r_B}$$ $$\beta' = \frac{2\pi}{p_B}(\beta - \alpha)$$ and $$t = \frac{p_B}{2\pi}t' + t_0$$ $$\phi = \phi' + \frac{2\pi}{p_A}\alpha$$