5
$\begingroup$

I'm helping some middle-school students write a spacecraft simulator. As part of that, I'm trying to wrap my head around orbital mechanics today, mainly using this excellent guide: http://www.braeunig.us/space/orbmech.htm

But of the six orbital elements it says are required, there's one I don't understand: argument of periapsis. This is defined as the angle between the ascending node and the periapsis point. But how could this angle ever be anything other than 90°? I'm having real trouble picturing that.

More to the point, I guess, is: what do I do with this parameter to actually calculate a position (in 3D space) on an orbit? Currently I'm doing this:

public Vector3 PointAtAngle(float radians) {
    float r = RadiusAtAngle(radians);

    // Start by finding the orbital point in the XZ plane
    // (i.e., the plane against which the inclination is measured),
    // around a focus of zero, and aligned on the X axis.
    Vector3 p = new Vector3(r * Mathf.Cos(radians), 0, r * Mathf.Sin(radians));

    // Then rotate this by the inclination around the Z axis.
    p.Set(p.x * Mathf.Cos(i), p.x * Mathf.Sin(i), p.z);

    // Rotate around the Y axis according to the longitude of ascending node.
    float cosYRot = Mathf.Cos(omega);
    float sinYRot = Mathf.Sin(omega);
    p.Set(p.x * cosYRot - p.z * sinYRot, p.y, p.x * sinYRot + p.z * cosYRot);

    // Finally, add the focus to shift to whatever we're orbiting around.
    return focus + p;
}

Here, RadiusAtAngle just computes the distance from the focus point from the angle, semimajor axis (a), and eccentricity (e). I'm pretty confident in that. Then I do a bit of trig to find a point around the origin in the XZ (ecliptic) plane, rotate this up (around the Z axis) by the inclination (i), and rotate it around the Y axis by the longitude of the ascending node (omega). And finally, add in the focus point.

This all appears to work great, and by tweaking a, e, i, and omega, I can make any-shaped orbit I can imagine. But this is probably a failure of imagination on my part. How does this argument of periapsis come into it?

$\endgroup$
  • $\begingroup$ It sounds like you're measuring your angle (the radians parameter in the code) using a standard unit circle. Instead, you should be measuring from the argument of periapsis. I would recommend you study this picture, since it's more 3D than braeunig's (admittedly wonderful) ASCII art: en.wikipedia.org/wiki/Argument_of_periapsis $\endgroup$ – Nickolai Feb 5 '15 at 20:25
6
$\begingroup$

The periapsis is the point at which the satellite is closest to the central body.

The ascending node is where the orbit crosses the equatorial plane of the central body (this can be defined in a number of way but we'll stick with equator at the moment).

Now, there's no reason the periapsis can't be at any point in the orbit, so lets discuss a few cases.

1)periapsis coincides with ascending node - this means that when the satellite crosses the equator (going upward) it is also at the closest point to the earth.

2) periapsis is a little after the ascending node - in this case the satellite is close to the earth when crossing the equator, but it's still getting closer. This is the case when the argument of periapsis is between 0 and pi radians (0-180degs)

3) periapsis is before the ascending node - in this case when the satellite passes the equator it has already just been at it's closest point and it currently getting further from the earth. This is the case when the argument of periapsis is between pi and 2pi (180-360deg).

A good way for you to test the implementation of your argument of periapsis code would be yo have an orbit with a non zero eccentricity, and a zero inclination (if you view the orbit from above, pi/2 if from the side). This way the changing value of the argument of perigee will change where the closest point of the orbit is.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.