HP Forums
Perigee and Apogee of a Conic Section - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: HP Prime Software Library (/forum-15.html)
+--- Thread: Perigee and Apogee of a Conic Section (/thread-9675.html)



Perigee and Apogee of a Conic Section - Eddie W. Shore - 12-11-2017 12:59 PM

Introduction

The program CONICAP determines three characteristics of a conic section:

Eccentricity:
E = 0, circle
0 < E < 1, ellipse
E = 1, parabola (this case is not covered)
E > 1, hyperbola

Periapsis (Perigee):
The point on the conic section where it is closest to a primary focus (which is designated at one of the two foci F or F’).

Apoapsis (Apogee):
The point on the conic section where it is furthest away from a primary focus. Note for a hyperbola and a parabola, the apogee is ∞.

The inputs are the lengths of the semi-major axis (A) and the semi-minor axis (P). For a hyperbola, input A as negative.

HP Prime Program CONICAP
Code:

EXPORT CONICAP(A,P)
BEGIN
// EWS 2017-12-10
// Fundamentals Of Astrodynamics
// ABS(A)≥P
LOCAL E;
E:=√(1-P/A);
PRINT();
PRINT("Perigee: "+STRING(A*(1-E)));
IF A≥0 THEN
PRINT("Apogee: "+STRING(A*(1+E)));
END;
PRINT("Eccentricity: "+E);
IF E==0 THEN
PRINT("Circle");
END;
IF E>0 AND E<1 THEN
PRINT("Ellipse");
END;
IF E>1 THEN
PRINT("Hyperbola");
END;
END;

Examples

A = 8, P = 3 (Ellipse)
Perigee 1.67544467966
Apogee 14.3245553203
Eccentricity 0.790569415042

A = -8, P = 3 (Hyperbola)
Perigee 1.38083151968
Apogee N/A
Eccentricity 1.17260393996

Source:
Roger R. Bate, Donald D. Mueller, Jerry E. White. Fundamentals of Astrodynamics Dover Publications: New York. 1971. ISBN-13: 978-0-486-60061-1