## Sunday, March 20, 2016

### PrgCalcPro: Third Law of Kepler

PrgCalcPro:  Third Law of Kepler: Approximate Time of Orbit in Years

Formula:
P = √((4*π^2*a^3)/(G*(m1+m2))
P is then divided by 3.15576*10^7 (number of seconds in a Julian year)

Where G = 6.67384*10^-11 m^3/(kg*s^2)

SI units are used

Store in the following registers:
Memory 0 = mass of the sun or star (kg)
Memory 1 = mass of the planet or other astronomical object (kg)
Memory 2 = average distance or semi-major axis (m)

Program:

0: 03  ;  3
1: 62  ;  R2
2: 24  ;  X^Y // power function has x as the base, y the exponent
3: 04  ;  4
4: 12  ;  *
5: 20  ;  Pi
6: 22  ;  X^2
7: 12  ;  *
8: 60  ;  R0
9: 61  ;  R1
10: 10  ;  +
11: 06  ;  6
12: 0A  ;  .
13: 06  ;  6
14: 07  ;  7
15: 03  ;  3
16: 08  ;  8
17: 04  ;  4
18: 0C  ;  E // press the [EXT] key
19: 01  ;  1
20: 01  ;  1
21: 0B  ;  +- // CHS
22: 12  ;  *
23: 13  ;  /
24: 21  ;  sqr // √
25: 03  ;  3
26: 0A  ;  .
27: 01  ;  1
28: 05  ;  5
29: 05  ;  5
30: 07  ;  7
31: 06  ;  6
32: 0C  ;  E // [EXT] key
33: 07  ;  7
34: 13  ;  /
35: 50  ;  STOP

Examples:

Sun, mass = 1.988435*10^30 kg
Earth, mass = 5.972190*10^24 kg
Avg Distance = 1.4959787*10^11 m (1 AU)
Period ≈ 1.000455 years

Sun, mass = 1.988435*10^30 kg
Mars, mass = 6.3902433*10^23 kg
Avg Distance = 2.2798715*10^11 m (1.524 AU)
Period ≈ 1.8814721 years

This blog is property of Edward Shore, 2016.