# Determining the spacecraft position vector with respect to ICRF frame for Venus flyby

For an interplanetary mission design to Saturn, I have considered doing multiple gravity assists starting with Venus. I am using the JPL Horizons ephemeris and ESA Lambert Solver.

I have the velocity vectors of the spacecraft in the ICRF frame(obtained it from the solver) centered about the barycentre of the Solar system. I am having difficulty obtaining the position vector of the spacecraft near Venus in the ICRF frame. Is there any way to obtain the position vectors of the spacecraft using ICRF frame? The MATLAB code is:

r1vec=[-1.477068281616569E+08,2.279790503327744E+07,4.898292942424305E+03]; Earth position vector in ICRF frame
r2vec=[5.041133888931480E+07,-9.500729420957273E+07,-4.262957928339511E+06]; Venus position vector in ICRF frame
tf=112; m=0;
muC=1.32711E+11;
[V1, V2, extremal_distances]=lambert(r1vec, r2vec, tf, m, muC)


The output is:

V(near earth) =
-4.3381  -26.2828   -1.3166

V(near Venus) =
30.1512   22.1471    1.3083

extremal_distances =
1.0e+08    1.0764    1.4949


The extremal distances are the periapsis and apoapsis distances of the transfer ellipse.

• There seems to be some discussion of the same or similar software here: esa.int/gsp/ACT/projects/gtop/gtop.html as well as a potentially easier to use Python version here: github.com/esa/pagmo Also see this: asee.org/public/conferences/20/papers/7481/download – uhoh Dec 25 '18 at 4:36
• @uhoh Thanks! will go through these and will post further if I have any doubts! – Suraj Dec 25 '18 at 4:45
• @uhoh the codes given in the esa website requires you to also specify pericentre radii as well as some "penalty factor" which I am not quite aware of. And the software named TRACT mentioned in the paper is not available for download as of now. – Suraj Dec 26 '18 at 23:23
• After re-reading your question a few times I think you are really asking how to use a Matlab program that doesn't have documentation sufficient for you. I don't have Matlab and so I can't try to run it. You might get an answer here but it might take a while, and you might not. In this case you may have to try to contact people who have used the software via e-mail addresses found in websites or published papers. Or, you could try a different Lambert solver. You might also consider this the right time to start using Python. You may find much more support, community and recent activity. – uhoh Dec 27 '18 at 0:08
• One example might be the package described in How does the poliastro python package “Going to Mars with Python” example work? What's it really doing? I think you will have the best results if you find a software solution that has an active community of users. It's just a thought. – uhoh Dec 27 '18 at 0:17