Published on by

HP Prime -planet orbits

With all the fuss about the spacecraft arriving to the proximity of Pluto, it occurred to me that it could be interesting to discuss programs for HP calculators that calculate planets orbits - so I set to search for that. And it found it from none other than Eddie’s Math and Calculator Blog. You have seen it mentioned here several times - he is able to treat a number of different subjects, always from interesting points of view, and from many different scientific areas.

The program he has created doesn’t only deal with Pluto, but with all other planets! It can calculate the speed and the distance from the sun at any given time from each planet’s perihelion (if you don’t remember what the perihelion is, a school refresher: it is the point of the orbit where it is closer to the sun (one of the two focus of the elipse)

Here are some orbital data from Pluto:

And here is Eddie’s article:

And, finally, here is the program:

EXPORT ORBSD()

BEGIN

// Orbital distance and

// speed around the Sun

// EWS 2015–06–25

// Initialization

LOCAL lm,pm,la,pa,le,pe;

LOCAL ld,pd;

LOCAL p,sp,θ,d,v,r;

// Planets

sp:={“Mercury”,”Venus”,”Earth”,

“Mars”,”Jupiter”,”Saturn”,

“Uranus”,”Neptune”,

“Pluto (Dwarf)”};

// Mass (kg)

lm:={3.29438ᴇ23,4.85749ᴇ24,

5.9722ᴇ24,6.40397ᴇ23,1.89469ᴇ27,

5.67312ᴇ26,8.66437ᴇ25,1.02224ᴇ26,

1.31ᴇ22};

// Semi-Major Axis (m)

la:={57909829824,108209876544,

149594962176,227921734656,

778412012083,1.42673ᴇ12,

2.87097ᴇ12,4.49825ᴇ12,

5.90637ᴇ12};

// Eccentricity (ε)

le:={.206,.007,.017,.093,.048,

.056,.046,.009,.249};

// Days in a year

ld:={87.96899,224.701,365.256,

686.98,4332.58899,10759.22,

30685.4,60189,90465};

// Input

INPUT({{p,sp},d},”Data”,

{“Planet:”,”# Days:”},

{“Planet”,”# Days after

Perihelion”});

pm:=lm[p];

pa:=la[p];

pe:=le[p];

pd:=ld[p];

θ:=360*d/pd;

HAngle:=1; // degree

// distance

r:=(pa(1-pe2))/(1+peCOS(θ));

// orbit distance

v:=√((1.9884ᴇ30+pm)6.63784ᴇ−11

(2/r–1/pa));

// output

PRINT();

PRINT(“Distance from the Sun:”);

PRINT(STRING®+” m”);

PRINT(“Orbital Speed:”);

PRINT(STRING(v)+” m/s”);

RETURN {r,v};

END;