# How to find position vector in Kepler orbit?

As the title says, I am trying to determine the position vector $$r$$, knowing true anomaly, semi-major axis, angular momentum and eccentricity vector.

There is an equation describe the distance to the central body using eccentricity and true anomaly as following

$$r(\theta )= \frac{a\,(1-e^{2})}{1+e\,\cos(\theta)}$$

however it only calculate the distance instead of position vector. How do I find position vector using parameters stated above?

• How about $\vec r=(r\cos\theta,r\sin\theta)$? Jan 1, 2021 at 14:13
• I was trying to avoid using sin, cos thus keep everything in their 3D vector form throughout the calculation. Other parameters, such as eccentricity vector and velocity vector can be calculated directly in their vector form (velocity vector can be found given eccentricity vector and position vector), but I did not find a way doing this for position vector :( Jan 1, 2021 at 21:30

You are correct in expecting to need two coordinates to specify position in the orbital plane. Distance from the central body supplies one of them. The other is simply the angle $$\theta$$. The two numbers give you the position vector in the polar coordinates $$(r,\theta)$$.

In order to convert them to the Cartesian coordinates $$(x, y)$$ you can use these conversion formulas

$$x = r(\theta) \cos\theta \\ y = r(\theta) \sin\theta.$$

• Thank you for your reply. This is correct, but those equation does not accommodate yaw, roll and pitch of the orbit. How do I transform this result in 'standard reference frame' into any predefined orbit? Jan 1, 2021 at 21:55
• The answer makes the assumption that you're trying to obtain a position vector in a Cartesian frame whose $xy$ plane lies in the plane of the orbit and so the third coordinate (e.g. $z$) can be assumed to be zero at all times. Are you saying this is not the case? If so, what coordinate frame would you like your position vector to be expressed in? Jan 1, 2021 at 22:04
• No, it is not the case. The only constraint is center mass sits in origin (0,0,0). The position and velocity vector could point to any direction. i.e., angular momentum does not necessarily perpendicular to x-y plane. Jan 1, 2021 at 22:19
• In this case, you can first follow the answer to obtain $(x, y, z)=(r\cos\theta, r\sin\theta, 0)$ coordinates in the frame whose $xy$ plane lies in the orbital plane. Next, you can rotate these coordinates into the coordinate frame you prefer. This leaves the problem of finding the appropriate rotation. That depends on what data you are given. For example, if you're given angular momentum vector (and not just its magnitude) then you can exploit the fact that the vector points along the $z$ axis in the first frame. Jan 1, 2021 at 22:37
• Thank you for your reply. That was actually what I thought originally, but I was wondering if there are any approach could avoid doing such rotation. anyway, thank you very much and happy new year. Jan 1, 2021 at 22:44

As this is the equation for the radius of an ellips in polar coördinates we just have like with a circle $$x = r\cos(\theta) \text{ and } y = r\sin(\theta)$$ but now with r dependent on $$\theta$$: $$x = r(\theta)\cos(\theta) \text{ and } y = r(\theta)\sin(\theta)$$ and thus in 2D we have $$\vec{r} = (x,y)$$ i.e $$\vec{r} = r(\theta)\cos(\theta)\vec{e_x} + r(\theta)\sin(\theta)\vec{e_y}$$

• Thank you for your reply. How could I transform this into a predefined orbit in 3D space? It seems I need to find yaw roll and pitch of the orbit to do so? Jan 1, 2021 at 21:48