I've been pulling my hair on this problem for a couple of days now, researched a lot but have not been able to find results.
Basically I'm writing a program capable of drawing a transfer orbit between two co-planar circular orbits. I'll call the orbits from which the transfer starts and ends orbit1 and orbit2 respectively from now on. A user would input the semi-major axis of the two orbits, a mass for the parent body, and then be able to change the transverse and radial velocity of the transfer orbit where it intersects with orbit1 (where the transfer starts).
Here is a visualization of what I am describing. The red point (point1) is the start of the transfer, the pink one is the end (point2). (Ignore the rest of the points.)
At point1, the transfer orbit's velocity can be computed using the vis-viva equation:
$v_1^2 = GM \left({ 2 \over r_1} - {1 \over a}\right)$
Using the path angle:
$\phi=\arctan\frac{e \sin \theta_1}{1 + e \cos \theta_1}$, $\theta_1$ is the true anomaly of point1
$\theta_1=\arccos\frac{a(1-e²)-r_1}{r_1e} $
I can then decompose that velocity into two equations:
$(v_1)_t=v_1 \cos \phi$, the transverse velocity.
$(v_1)_r=v_1 \sin \phi$, the radial velocity.
(although I'm confident I haven't made any mistake this far, this whole problem could be coming down to these equations being wrong).
So this is what I have so far, given orbit1 and all its characteristics, as well as the transfer orbit's semi-major axis, I am able to get $(v_1)_t$ and $(v_1)_r$.
However, as described previously, I would like to get the transfer orbit's semi-major axis $a$ given $(v_1)_t$ and $(v_1)_r$ as well as $r_1$. From my understanding, I would need to compute the flight path angle $\phi$ and the true anomaly $\theta_1$ for $r_1$ in order to get the semi-major axis $a$.
This is what I've been stuck with, I can't seem to be able to find an equation that describes $a$ depending on those three parameters, as my formulas for $\theta_1$ and $\phi$ depend either on $a$ or $e$.
Using the vis-viva equation, I was able to get a formula for $a$ depending on $v_p$ (velocity at periapsis). This means I am able to solve this problem for a one-tangent burn, but not the general case where the two impulses are not tangent to their current flight path. This means equations for $v_p$ and $r_p$ depending on the three previously mentioned parameters would also solve my problem.
I feel like what I am missing is just one tiny element, but I can't see the big picture anymore as I've been stuck with this problem for what seems like ages.
Hope everything is clear and someone can help me out, thanks!