Should it be R=a(1-e^2)/(1-ecos(theta))?
Otherwise, great article.