# Deriving Apoapsis and periapsis formulas

1. Jul 18, 2011

### Hyprodimus

Hello, I'm wondering if anyone can tell me where these formulas for RA and RP (apoapsis and periapsis) come from.

RA = $\frac{a(1-e^{2})}{(1-e^{2}sin^{2}(LatB))^{3/2}}$

RP = $\frac{a}{(1-e^{2}sin^{2}(LatB))^{1/2}}$

If you multiply RA by $\frac{1-e^{2}sin^{2}(LatB)}{1-e^{2}}$, you can get RP. Seems to be a clue, but I cant figure it out.

I am trying to go from Latitude/Longitude to XYZ co-ordinates with A as the origin somewhere on the Earth, and B as the point I want to place with respect to A. Right now I am using an Excell spreadsheet which has these formulas. The spreadsheet uses the WGS84 Earth model for a,b and e.

a = semi-major axis
b = semi-minor axis
e = ellipsoid eccentricity
LatB is the latitude of the second point

I found these two on the internet, but I dont get how they relate to the other two.
RA = a(1+e)
RP = a(1-e)

It then does
R = $\sqrt[]{RA\times RP}$
which is the geometric mean to find a spherical model radius for the AB area.

Any help is appreciated. Thank you.