TransWikia.com

Apparent Centering Problem When Using the Perifocal System to Draw Orbital Ellipses

Space Exploration Asked by Keegan on January 5, 2021

I am attempting to render orbital ellipses in software. Given a set of orbital elements, I am using the Perifocal system to determine a set of points along the curve of the ellipse. I am using the equation:

r = r cos(v) P + r sin(v) Q,

where v is the angle, P and Q are the perifocal vectors correspondent to I and J, and r is the polar equation of the conic:

r = p / 1 + e cos(v),

where p is the semi-latus rectum, e is eccentricity, and v, in both equations, is the angle.

I am determining the vectors P and Q using the following equations:

Pi =   cos (lan) cos (aop) - sin (lan) cos (inc) sin (aop)
Pj =   sin (lan) cos (aop) + cos (lan) cos (inc) sin (aop)
Pk =   sin (inc) cos (aop)

Qi = - cos (lan) sin (aop) - sin (lan) cos (inc) cos (aop)
Qj = - sin (lan) sin (aop) + cos (lan) cos (inc) cos (aop)
Qk =   sin (inc) cos (aop)

where lan is the Longitude of Ascending Node, aop is the Argument of Periapsis, and inc is the inclination.

This process yields the correct ellipse! However, the ellipse does not seem to be centered correctly on its focus; the focus appears to be far too close to the center of the ellipse. Here is an example:

enter image description here

You can see that these two highly eccentric ellipses have their shared center of mass at their centers – not at their respective foci.

Is there some step in my process that I’m missing? I could just apply an offset to the ellipses, but that would be a hack, I want to solve the problem.

Any help is appreciated! Thank you!

QUESTION EDITS AND CLARIFICATIONS:

This image is taken from a vantage point nearly normal to the orbital plane; there is almost no perspective here.

Second, a helpful user has pointed out an issue in the equation for Pk. The correct expression is:

Pk = sin (inc) sin (aop)

Unfortunately, this was correct in my code – so while the correction was a good one, it was not the source of my problems.

2 Answers

I solved the issue.

Everything I posted in the OP was correct; I made a simple, stupid sign error when transcribing the expressions into code.

It should also be noted that in the OP, the expression for Pk is wrong. The correct expression is

Pk = sin (inc) sin (aop)

Just in case anybody is trying to pull this off themselves!

Thanks for the ideas everyone!

Correct Orbits:

enter image description here

Correct answer by Keegan on January 5, 2021

According the definition of the Perifocal Frame on wikipedia, the equation of Pk needs an adjustment. I am not sure if that is the source of the error you observe through.

Instead of:

Pk = sin (inc) cos (aop)

Wikipedia says:

Pk = sin (inc) sin (aop)

Answered by Manny on January 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP