Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed this function to measure angles from semi-major axis correctly #16

Merged
merged 2 commits into from
Jul 22, 2015

Conversation

drbitboy
Copy link
Contributor

see
49bc0fe

1) Old code returned values that were in error
1.1)  arclength_ellipse(1., .5, pi*.001, pi*.002) returned 0
1.2)  arclength_ellipse(1., .5, pi*.002, pi*.001) returned -.0003*pi instead of pi correct .0005*pi
1.3)  arclength_ellipse(1., .5, theta0, theta1) did not return the negative of the same call with the thetas reversed

2) Angles theta0 and theta1 were always interpreted as measured from the semi-minor axis
2.1) More common use for theta is measured from semi-major axis
2.1.1) orbital eccentric anomaly is measured from perigee vector
2.1.2) perigee vector lies along the semi-major vector
@drbitboy drbitboy closed this Jul 15, 2015
@drbitboy drbitboy reopened this Jul 15, 2015
@drbitboy
Copy link
Contributor Author

didn't realize what close did.

if(a<b)
[F1, E1] = elliptic12( theta1-theta0, 1 - (a./b).^2 );
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

theta1-theta0 is an error here; it should be only theta1

@moiseevigor
Copy link
Owner

Thank you Brian for this precious correction! I'm sure you're correct and beg your pardon for my loose understanding of celestial mechanics, but could you please to point me out to the book/article with the comprehensive studying of the properties on the arc-length? Even tables of calculated arc-length for different values of parameters would nice to check.

I'd like to elaborate on comments in you pull request, give you the credit and create the testing suite for this procedure since it looks like have been used quite extensively.

Thanks again!

@drbitboy
Copy link
Contributor Author

If you want to know about arc length, just look up Incomplete Elliptic Integral of the Second Kind.

https://en.wikipedia.org/wiki/Orbital_elements

There are many others, but that is a decent summary that groups the six elements into their separate effect: size and shape of the orbit ellipse; orientation of the orbital plane; position of the orbiting body at an epoch on the ellipse.

Here is one on eccentric anomaly:

https://en.wikipedia.org/wiki/Eccentric_anomaly

Here is a page that has more detailed definitions of the various elements:

http://www.amsat.org/amsat/keps/kepmodel.html

I haven't read it through, but from what I did read seems reasonable.

On the relevance of the major axis of the ellipse:

  1. The Argument of the Perihelion (or of Perigee or of Periapse; ArgP or W0 or Wnaught) this is an angle expressing the orientation within the orbital plane of the ray from the central body to the orbiting body at the time of closest approach. Since the central body is on the major axis, this ray is along that same axis.

  2. There are two forms of anomailies (angles), true and eccentric, to define the position of the body in the orbital plane, but all are measured relative to the vector at periapse i.e. from the sem-major axis. I am pretty sure that the eccentric anomaly is the same angle as u in elliptic12.m, and as theta0 and theta1 in arclength_ellipse.m.

  3. Sometimes the size of the orbit (ellipse) is defined via the length of the semi-major axis (a), and sometimes via the peri-focal distance (Rp), which is along the major axis. Since the eccentricity is also supplied, and Rp = a * (1-e), it doesn't matter which formulation is used, but the point is that both refer to a distance along the major axis.

3.1) Sometime the size of the ellipse is not specified directly, but the period (time per 360 degrees) or mean daily motion (degrees per time) and the GM parameter (gravitational constant times mass) of the central body is provided. Again, the Keplerian formula means a and Rp can both be derived from that information.

And here is my by-hand analysis of the derivation of arc length and how to deal with both b>a and a>b:

img_4074

which is similar to this:

https://www.youtube.com/watch?v=4KdZm4TnUvA

[ETA: link to Eccentric Anomaly Wiki page; suggest search on Elliptic Integral of the Second Kind]

@moiseevigor moiseevigor self-assigned this Jul 15, 2015
moiseevigor added a commit that referenced this pull request Jul 22, 2015
Fixed arc-length function to measure angles from semi-major axis correctly.
@moiseevigor moiseevigor merged commit 5ce4199 into moiseevigor:master Jul 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants