I have a formula, which given a time $t$, returns the $x$ and $y$ position of a planet, essentially it fakes a planet orbiting a star.
I have a ship that is stationary with respect to the planet, starting at an arbitrary location, it thrusts at a constant rate, leading to constant acceleration, with no friction, or no gravitational forces.
I want to determine what vector the ship should thrust at, and for how long (I expect $t/2$) before decelerating in order to reach the destination planet at the exact time the planet arrives at that location.
Initially I tried to determine how long it would take $t_1$ to arrive at the planet, at it's current location $(x_1, y_1)$. Then I determine how long it would take $t_2$, to arrive at the planet, at it's location after $t_1$ time has passed $(x_2, y_2)$. Then I iterated over this over and over again until $t_n$ was very close to $t_{n+1}$ and used $(x_n, y_n)$ as the target location, which had a ton of flaws and was very computationally expensive.
Any help would be appreciated.