I have a numerical interplanetary trajectory model and am trying to find a way to accurately insert a spacecraft into a rendezvous orbit with its target planet having a particular periapse radius (for example, I'd like to have a spacecraft travel from Earth to Mars, and when it reaches Mars its periapse radius must be 200km above Mars' surface). Currently I can simulate a spacecraft trajectory from Earth to Mars, but have to get my required periapse radius by trial and error which is very time consuming. I've looked at Fundamentals of Astrodynamics (Bate et al.) which gives a way of doing this using a fully patched-conic approach using phase angles (pages 372 to 377). However I require a mid-course correction using a Lambert solver in my simulation and was wondering how I could calculate the required delta-V so that I will get the required periapse radius upon target arrival from this mid-course correction point. Any help would be greatly appreciated.
EDIT: Having read some more articles it seems that a term called the impact parameter is used a lot in literature when calculating planetary rendezvous and is given by,
$b=r_{p}\sqrt{1+\frac{2 \mu}{v_{\infty}^{2}r_{p}}}$
Now, if I know what I want my spacecraft's periapse radius, $r_{p}$, to be when it reaches Mars, I know Mars' gravitation parameter, $\mu = GM$, and I know the spacecraft's hyperbolic excess velocity relative to Mars, $v_{\infty}$, when it enters Mars' sphere of influence, then would the value of $b$ given to me from the above equation be a radial "offset value" that I can put into a Lambert solver to get into the required orbit upon Mars rendezvous? That is, would the rendezvous aiming point that I give to the Lambert solver (in Cartesian coordinates) now be $ (x_{mars}, y_{mars}) + (b_{x}, b_{y})$, where $x_{mars}$ and $y_{mars}$ are the original heliocentric x and y coordinates of Mars upon intercept and $b_{x}$ and $b_{y}$ are the offset values that I'll add to the original Mars intercept point that will give me the required periapse radius upon Mars' rendezvous?