Edit: 2011 Apr 29, mu = GM not Gm!
Introduction & Review
I am going to work a numerical example of the equations I worked out in the previous post. To be specific, I am going to assume we are given the position and velocity vectors for an object in orbit, at one instant of time.
Let me begin by doing what I should have done at the end of the previous post: here’s a summary of the previous post.
We took the vector differential equation
as our starting point for the twobody problem, where G is the universal gravitation constant in Newton’s equation for the gravitational force between two bodies of masses M and m:
and
— although we will almost always, perhaps always, assume that mass m is negligibly small compared with mass M, and we will take
.
(Edit: That’s a correction; I can’t believe I had LC m instead of UC M!)
First, we dotted that vector differential equation with the velocity vector …
and got conservation of energy:
, a constant.
Second, we crossed that vector differential equation with the position vector …
.
and got conservation of angular momentum:
, a constant.
Third, we crossed the vector differential equation with the angular momentum vector …
and got a vector orbit equation for the position and velocity on the orbit:
.
Fourth, we dotted the position vector into that vector orbit equation
and got a scalar orbit equation for the position as a function of angle:
,
where the angle is defined as the angle between the vector constant of integration and the position vector :
…
but we can show that the angle is also the angle between periapse (closest approach) and r, so we infer that the vector points from the primary (the origin) to periapse. (When , we have pointing to periapse, and parallel to it, so , which is constant, points toward periapse, too.)
Oh, and
and .
The example
This example comes from p. 18 of “Fundamentals of Astrodynamics” by Bate, Mueller, and White (see the bibliography page).
Given position and velocity vectors at one time in some inertial coordinate system,
find specific energy & momentum. (They don’t say this is the “earth”, but it is. And they don’t say the origin is at the center of the earth, but it is.)
Incidentally, let me call this the “observer coordinate system”.
They also want to
find the flight path angle (whatever that is; I’ll you what it is shortly).
First, let’s just go to town. We are given position and velocity vectors:
Angular momentum (actually, specific angular momentum or angular momentum per unit mass) is just the cross product
(That’s their answer, too.)
For the energy, we need of earth. Mathematica will happily give me the gravitational constant…
The product is… = G M = 3.98735*10^14 Meter^2 Newton/Kilogram
which simplifies to… = 3.98735*10^14 Meter^3/Second^2
and I convert to English units… = 1.40812*10^16 Feet^3/Second^2
Then the specific energy is
= 1.57253*10^9 Feet^2/Second^2
(And that matches their answer.)
Note that the energy is positive, so this is a hyperbolic orbit.
Last part of the question. What is this thing called the flight path angle? Here’s a picture:
This a redrawing of their figure 1.41, on p 17. is the angle between r and v; is the flight path angle.
Because , we are replacing the scalar equation (for the magnitude of the cross product)
by
.
(To be more specific, is the angle between r and v; by using its complement , we get to write the magnitude of h as though it were some kind of dot product — but the fact remains that is not the angle between r and v, and h is not the dot product of r and v.)
They say, plausibly, that the sign of will be the sign of r.v, which is also the sign of . I infer that if , then will be chosen negative, so that we still have .
OK, we need magnitudes.
r = 1.28997*10^8 Feet
v = 57994.7 Feet/Second
h = 6.0922*10^12 Feet^2/Second
(They did show all of those magnitudes, and we have the same answers. And, just in case you’re very new at this, the magnitude of a vector is just the square root of its dot product with itself: e.g. , and that’s how I computed the magnitudes.)
Then
= h / r v = 0.814345
and
(Once again, as we would hope, the book and I agree.)
That’s the end of the example.
At the very least, however, I want to convert the distance and speed into units I have a feeling for. Mathematica will happily convert.
Just how far from the center of the earth is this thing? Convert r to miles…
24431.2 Mile
(That’s about where a geosynchronous orbit would be.)
… and how fast is it moving? Convert v to mph…
39541.8 Mile/Hour
(Smoking!)
the scalar orbit
But we can get so much more. In particular, I write the vector equation for the orbit in the form
and solve for B. The vector is…
and its magnitude is
B = 3.41946*10^17 Feet^3/Second^2.
Then ,
p = 2.63578*10^9 Feet
e = 24.2839
(That’s good: e > 1, which is another way of seeing that the orbit is hyperbolic.)
We can now write the equation of the orbit:
Now, where was this thing when we saw it? Since , we have
which gives us two values for : ±0.643099 (radians).
Hmm. We have the magnitude of , but we don’t know whether we’re approaching perigee (closest approach) or leaving it.
But we have the position vector. Can’t we do a changeofbasis to get from the observer coordinate system to the orbit (local) coordinate system?
Sure we can!
But first, let’s just try drawing a picture. I want to show you what the scalar orbit equation gives us.
In the orbit coordinate system, as we saw, the orbit has polar equation
What’s the radius of the earth? (I want to show it on the drawing.)
Now here’s the drawing. It has only two pieces: the scalar equation for the orbit, and a circle whose radius is that of the earth.
We’d be home free if we could transform our initial r and v into that coordinate system.
But that’s easy.
In the oberver coordinate system, we define a new x axis using a unit vector along B; just divide the vector by its magnitude.
(In the orbit coordinate system, the xaxis always points toward periapse… but the B vector does that, so it becomes our new x axis, hence defines a new unit vector.)
We define a new z axis using a unit vector along h:
(The angular momentum is perpendicular to r and v, i.e. to the plane of the orbit… and we take that plane to be the xyplane in the orbit coordinate system… so h gives us the zaxis.)
To get the third basis vector in a righthanded coordinate system, we define the new y axis using a crossproduct, namely
.
Exactly what are these vectors? They are the old (observer) components of the new basis vectors.
Therefore the attitude matrix has these vectors for rows…
The transition matrix T (mapping new to old, orbit to observer) is the transpose of the attitude matrix:
and the inverse transition matrix, mapping old to new, observer to orbit) is
Notice something?
The inverse transition matrix is the same as the attitude matrix, which is the transpose of the transition matrix. That is, the inverse of the transition matrix is also its transpose.
Oh, the transition matrix is a rotation. (We didn’t change the physical scale for the orbit coordinate system, so all we’re doing is rotating the coordinates.)
That shouldn’t be surprising, and I could have simply said so up front — but computing power is cheap…. It’s probably a good thing to see it, whether before or after computing it.
What we really want to know is the orbit coordinates for our initial position and velocity vectors and . We apply the inverse trasition matrix to and to …
and we see that the zcomponents are, in fact, zero. (Please note the terms 10^9 and 10^12 for the zcomponents.) That’s reassuring, because our orbit coordinate system was chosen so that the orbit was in the xyplane!
Let me just get 2D vectors, instead of 3D, for our 2D drawing… and drop the units:
NOTE that v is much smaller than r. I’m going to multiply v by 1000 for the graph.
So, take the previous pictutre of the orbit… draw the r vector from the origin… and then draw (magnified 1000 times) the v vector from r.
Whatever it is, it is outbound, moving away from the earth. (That is, the correct choice for was positive.)
Summary
Given the position and velocity vectors at one time — not all that easy to get in the real world — we…
 computed the specific angular momentum as the cross product
 computed the specific energy using the velocity, distance, and ,
 defined the flight path angle, and computed it from
 computed and used it to write out the equation for the scalar orbit
 then we could draw the orbit (and the primary)
 then we constructed the transition matrix (etc.) relating the (old ) initial coordinate system and the (new) orbit coordinate system

and we transformed the given r and v to the orbit coordinate system
and added them to the drawing.
I have a few additional remarks.
The flight path angle may seem a little odd. In the elementary theory of curves, we define a really nice coordinate system (the Frenet frame) by starting with the tangent vector — which can often be interpreted as the velocity. From it we would get the binormal and normal vectors.
By contrast, our starting point for the flight path angle is the “local vertical” — the position vector — and then the local horizontal; the velocity vector is not generally one of those two directions.
And that brings me to a second remark. The flight path angle is zero exactly when the position and velocity are perpendicular… i.e. exactly at periapse and apoapse (closest and furthest distances from the primary; yes, apoapse is infinite for parabolic and hyperbolic orbits)… so we might suspect that it has one sign as we go from peripase to apoapse, and the other sign coming the other way.
That is, we should expect to see that the flight path angle has one sign “inbound” and the other sign “outbound”.
Go ahead, draw both possibilities for an ellipse. The point is that the positive value of flight path angle implies that the object was on its way to apoapse.
I could have told that it was outbound without drawing a picture.
In addition, although I never wrote out the explicit vector equation for the orbit, the computation of was all we needed — I just headed straight for the scalar orbit.
June 10, 2010 at 9:57 pm
[…] Twobody orbits: example frοm initial vectors « Rip’s Applied Mathematics Blog […]
I have decided to allow this post — because it might bring more people here, and that’s a good thing in principle.
Besides, I haven’t looked at traffic theory in a long time. (Of course I have looked at it.)