HP Prime: Perigee and Apogee of a Conic Section
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 semimajor axis (A) and the semiminor axis (P). For a hyperbola, input A as negative.
HP Prime Program
CONICAP
EXPORT CONICAP(A,P)
BEGIN
// EWS 20171210
// Fundamentals Of Astrodynamics
// ABS(A)≥P
LOCAL E;
E:=√(1P/A);
PRINT();
PRINT("Perigee:
"+STRING(A*(1E)));
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

A = 5, P = 5

A = 8, P = 3

Perigee

1.67544467966

5

1.38083151968

Apogee

14.3245553203

5

N/A

Eccentricity

0.790569415042

0

1.17260393996

Source:
Roger R. Bate, Donald D. Mueller, Jerry E. White. Fundamentals of Astrodynamics Dover
Publications: New York. 1971. ISBN13:
9780486600611
Eddie
This blog is property of Edward Shore, 2017.
The correlationcalculator displays correlations for major, exotic and cross currency pairs. It is a useful analytical tool that helps in making a sound trading decision.
ReplyDelete