Monday, December 11, 2017

HP Prime: Perigee and Apogee of a Conic Section

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 semi-major axis (A) and the semi-minor axis (P).  For a hyperbola, input A as negative. 



HP Prime Program CONICAP

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
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. ISBN-13: 978-0-486-60061-1

Eddie


This blog is property of Edward Shore, 2017.

  Casio fx-7000G vs Casio fx-CG 50: A Comparison of Generating Statistical Graphs Today’s blog entry is a comparison of how a hist...