Computing Mean Anomoly from Vector Confusion

In summary, Mean Anomaly is an angle that describes where in an orbit an object is relative to its periapsis. The formula for calculating Mean Anomaly is M = E - e * sin(E), where E is Eccentric Anomaly and e is eccentricity. Eccentric Anomaly, in turn, can be calculated using the formula E = arccos((1 - |r|/a)/e), where r is the orbital position vector and a is the semi-major axis. However, since r is a vector and the formula only uses its modulus, there may be multiple points on the orbit with the same value for |r|. To solve this, the direction of the vector can be taken into account by using the eccentricity
  • #1
tony873004
Science Advisor
Gold Member
1,752
143
I'm trying to compute Mean Anomoly. Mean Anomoly is an angle that describes where in an orbit an object is relative to its periapsis. The formula according to Wikipedia is

[tex]
M = E - e \cdot \sin E
[/tex]
where e is eccentricity (which I know), and E is Eccentric Anomoly.

According to Wikipedia, Eccentric Anomoly is
[tex]
E = \arccos \frac{{1 - \left| r \right|/a}}{e}
[/tex]
where a is Semi-Major Axis (which I know), e is eccentricity (which I know), and r is an orbiting body's position vector. If I solve for r, I'm home free.

According to Wikipedia, The orbital position vector r is a cartesian vector describing the position of the orbiting body. Wouldn't that mean that r would be express as something like 1.0i + 2.0j+3.0k? But I can't plug something like that into the formula for Eccentric Anomoly. I could use Pothagorean Theorum to solve for distance and use this number. But that turns the vector into a scalar, and I doubt that's the right way to do it. Direction is pretty important here.

I know the object's x, y, and z position wrt the reference frame. How do I turn r into something I can use in these formulas?
 
Mathematics news on Phys.org
  • #2
The formula involves only the modulus of the vector r, doesn't it?
 
  • #3
Modulus = absolute value??

In my example with 1.0i + 2.0j + 3.0k, I could do r=sqrt(1^2+2^2+3^2). But there are two points on the orbit that would have this same value for r. So I wouldn't know which one I computed.
 
  • #4
tony873004 said:
Modulus = absolute value??
Yes.

In my example with 1.0i + 2.0j + 3.0k, I could do r=sqrt(1^2+2^2+3^2). But there are two points on the orbit that would have this same value for r. So I wouldn't know which one I computed.
IIRC, you are the author of an orbit simulation program, right? I'm a [exaggeration]novice[/exaggeration] when it comes at programming, so I don't understand the exact nature of your problem. Sorry. :redface:
 
Last edited:
  • #5
Yes :biggrin: . And if you use the program, you'll notice on the orbital elements box I leave out Mean Anomoly, simply because I don't get it right. I see many references that give the same formulas as Wikipedia for Mean Anomoly. And they all have the variable r in them. r is a vector, not a scalar, which is why I'm confused as to how to turn an x,y,& z position into a single number that I can assign to r that conveys both distance and direction. From physics classes, I remember that any answer that is a vector is stated as a scalar plus either an angle, or with the ijk-hat method. But of course any programming language doesn't want to see hats in the code. And E=Arcos((1-ABS(15, northwest)/a)/(e)) will generate a syntax error.

Thanks for your help thus far :smile:
 
  • #6
I have used your program before, and had fun generating all those patterns. :biggrin: But to fully appreciate a program such as this, I think I will need a decent understanding of celestial mechanics (I know it's not a necessity, but still I prefer it that way :) ). Keep up the good work, and I hope you get this problem solved.
 
  • #7
I could be wrong here, because I have no clue about oribtal mechanics (if that's what it's called :smile:)

But, maybe this will help:
So you are trying to calculuate [itex] E [/itex]

http://en.wikipedia.org/wiki/Eccentric_anomaly" by the following:

[tex] E = cos^{-1} \frac{1-\frac{| \vec r |}{a}}{e}[/tex]

Looking up the definition of [itex] r [/itex] and [itex] e [/itex] we have:

http://en.wikipedia.org/wiki/Orbital_position_vector" :
[itex] \vec r [/itex]

Since you are taking the modulus of this, you will return a scaler:
ie) [tex] | \vec r | = \sqrt{x^2+y^2+z^2} [/tex]

This is the length of the vector. So assuming my geometry is correct (I haven't really worked with ellipses), you will have at least two spots where [tex] | \vec r | [/tex] can be equal. For example if the ellipse was on 2d plane.

[tex] | \vec r_1 | = |\vec r_2 | [/tex]
where:
[tex] \vec r_1 = (a,0,0) [/tex]
[tex] \vec r_2 = (-a,0,0) [/tex]

However, you are worried about a point on an ellipse, so you need some more information to make the angle unique (since [itex] \vec r [/itex] by itself is not doing it).

Now if we look at [itex] e [/itex],
"[URL
Orbital Eccentricity[/URL] ([itex] e [/itex])

[tex] e = | \vec e | [/tex]
where:

http://en.wikipedia.org/wiki/Eccentricity_vector" ([tex] \vec e [/tex])

[tex] \vec e = \frac{\vec v \times \vec h}{\vec \mu}-\frac{\vec r}{| \vec r |} [/tex]
where:
[tex] \vec v = [/tex] orbital velocity vector
[tex] \vec h = [/tex] orbital angular momentum
[tex] \vec r = [/tex] orbital position vector
[tex] \vec \mu = [/tex] standard gravitational parameter

It would seem that at the point in question, [itex] \vec v [/itex] would be unique, thus causing [itex] e = | \vec e | [/itex] to be the unique quantity that is dependent on position.

:blushing: Like I said, I could be way off here.

EDIT: I don't know what's up with the LaTeX... I guess I have an error somewhere. I hope this is somewhat readable.
 
Last edited by a moderator:
  • #8
The LaTeX is fine. It doesn't work in preview mode though. Thanks. I think I'm getting a grip on it now. Using
[tex] | \vec r | = \sqrt{x^2+y^2+z^2} [/tex]

I'm getting good results. But I would expect the angle to increase from 0 to 2pi over the course of an orbit. Instead, it increases from 0 to pi and then back to 0. If I subtract this angle from 2pi anytime the object is in the 3rd or 4th quadrant (negative y value), then all is well.

It just seems from the referenced formulas that this type of a piecewise answer is not necessary. But since taking the absolute value of the vector will yield the same answer for two different positions, I guess it is.

One silly mistake I was making was forgetting that the angle is measured from periapsis (closest point) rather than as a longitude (angle from a fixed direction, usually the Vernal equinox). But in a circular orbit, where the only hint of eccentricity comes 5 places to the right of the decimal, this point is not well defined and it drifts all over the place, causing Mean Anomoly to do the same. Once given a little eccentricity, things begin to work a lot better.
 

Related to Computing Mean Anomoly from Vector Confusion

1. What is computing mean anomaly?

Computing mean anomaly is a process used in celestial mechanics to determine the position of a celestial body at a specific time, based on its average angular velocity and time since a reference point. It is commonly used in orbital mechanics to track the position of satellites, planets, and other objects in space.

2. How is mean anomaly calculated?

Mean anomaly is calculated by dividing the time since the reference point by the orbital period and multiplying it by 360 degrees. This value is then adjusted based on the eccentricity of the orbit and the eccentric anomaly, which takes into account the deviation from a perfect circular orbit.

3. What is vector confusion in relation to mean anomaly?

Vector confusion refers to the uncertainty in the direction of a celestial body's motion, which can occur when trying to determine its position based on mean anomaly. This can be caused by a variety of factors, including measurement errors, gravitational perturbations, and changes in the orbit over time.

4. How is vector confusion addressed in computing mean anomaly?

To address vector confusion, scientists use a variety of techniques such as averaging multiple measurements, using advanced mathematical models, and incorporating data from other sources. Additionally, continuously tracking the position of the celestial body over time can help to reduce the effects of vector confusion.

5. Why is computing mean anomaly important?

Computing mean anomaly is important because it allows scientists to accurately track the position of celestial bodies over time, which is crucial for understanding their behavior and predicting their future movements. This information is used in a variety of fields, including astronomy, astrophysics, and space exploration.

Similar threads

Replies
4
Views
795
  • Introductory Physics Homework Help
Replies
11
Views
629
Replies
13
Views
2K
Replies
2
Views
886
Replies
62
Views
6K
  • Classical Physics
Replies
4
Views
990
  • Special and General Relativity
Replies
1
Views
408
Replies
4
Views
2K
  • Calculus and Beyond Homework Help
Replies
16
Views
2K
  • Astronomy and Astrophysics
Replies
1
Views
6K
Back
Top