{ Practical astronomy | Computing | Solar system ephemeris }

# Solar system ephemeris

Here we combine the computing environment, the software design principles and the insights about the movement of Sun, Moon and planets into software to do some calculations for us. The result are the modules Planets and Moon.

We use one hidden file to identify the "planet" we are interested in. The Moon needs no such information, as it is identified by the algorithm used.

`.CL4_PLA`
Stores the name of a planet or similar object. Values can be Sun (not Earth), Mercury, Venus, Mars, Jupiter, Saturn, Uranus or Neptune.

We have these user utilities to show the sky position of the chosen object. They require Python scripts to invoke from the Bash shell and to convert input parameters, and Python functions to do the work:

```PlanetSet.py PlanetSet()```
Store the planet name in `.CL4_PLA`.
```PlanetShow.py PlanetShow()```
Show the sky position of the planet named in `.CL4_PLA`.
```PlanetPhys.py PlanetPhys()```
Show the physical ephemeris of the planet named in `.CL4_PLA`.
```PlanetRise.py alt PlanetRise(alt)```
Show the next rise and set times for the planet. The given parameter is the altitude in degrees that defines the "rise" or "set". Give 0 for the mathematical horizon or −0.6° to compensate for average atmospheric refraction. If the object is the Sun, give −0.8° to compensate for average atmospheric refraction and to define the event as the upper limb coinciding with the horizon. Further, twilight is defined by the Sun being at altitudes −6° (civil), −12° (nautical) or −18° (astronomical).
```MoonShow.py MoonShow()```
Show the sky position of the Moon.
```MoonPhys.py MoonPhys()```
Show the physical ephemeris of the Moon.
```MoonRise.py alt MoonRise(alt)```
Show the next rise and set times for the Moon. The given parameter is the altitude in degrees that defines the "rise" or "set". Give −0.8° to compensate for average atmospheric refraction and to define the event as the upper limb coinciding with the horizon.

The Planets module supports three alternative orbit integrations:

• `Helio(aTT, 3, aNp)` is the perturbed orbit after Simon et al. (1994a).
• `Helio(aTT, 2, aNp)` is an elliptical orbit.
• `Helio(aTT, 1, aNp)` is a circular orbit.

Similarly, the Moon module contains three alternative orbit integrations:

• `MoonCircle(aTT)` is a circular orbit, but with motion of the nodes.
• `MoonKepler(aTT)` is an elliptical orbit, but with motion of the nodes and of the perigee.
• `MoonMeeus(aTT)` is an elliptical orbit with perturbation after Meeus (1982a).

Here is an example use from the Bash shell for the Sun. The time is set from the computer's clock, then the observatory and object selected. Five output routines show time, observatory, position ephemeris, physical ephemeris, and finally, when the Sun will set below −18° altitude (astronomical twilight).

```\$ TimSetSys.py
\$ LocSet.py   -70.417 -24.667 2635 "Cerro Paranal"
\$ PlanetSet.py Sun

\$ TimShow.py

JD [d]  2459161.991307
Gregorian Date and UT  2020-11-08T11:47:29.0
Julian Date and UT  2020-10-26T11:47:29.0
TT - UT [s]  70.85418564783117
TAI - UTC [s]  37.0

\$ LocShow.py

Observatory  Cerro Paranal
Geographic longitude [deg]  -70.417
Geographic latitude [deg]  -24.667
Geocentric latitude [deg]  -24.52155560529307
Elevation [m]  2635.0
Sidereal time [deg]  154.58181864931424

\$ PlanetShow.py

Object  Sun
lII,bII  340.9180032955 36.888462972414 148.198216723548
RA,Dec B1950  223.08744836319 -16.4952782321838 148.198216723548
RA,Dec J2000  223.78523469502 -16.6970297680040 148.198216723548
lam,bet EOD  226.54238165946 0.00212818633463001 148.198216723548
RA,Dec EOD  224.076702072487 -16.7804860298518 148.198216723548
HA,Dec topo  290.50292211666 -16.7797331629366 148.195506902692
A,h topo  97.772030936622 25.1649549304810 148.195506902692

\$ PlanetPhys.py

Object  Sun
V  -26.720412161128476
Elongation [deg]  0.0
Phase angle [deg]  180.0
Illuminated fraction  1.0
Inclination [deg]  3.5632020702425025
Position angle [deg]  23.00746174240958
Central meridian [deg]  265.3004716149302

\$ PlanetRise.py -18

next set  2020-11-09T00:24:13.9
next rise  2020-11-09T08:26:31.7
altitude [deg]  -18.0
```

Here the corresponding output for the Moon, where the rise and set are for the upper limb of the Moon:

```\$ MoonShow.py

Object  Moon
lII,bII  208.608294040021 40.625729304660 0.38167081055938
RA,Dec B1950  138.32487637033 20.5632762313279 0.38167081055938
RA,Dec J2000  139.034167850505 20.354609367196 0.38167081055938
lam,bet EOD  135.52055437073 4.2796803935602 0.38167081055938
RA,Dec EOD  139.32949146861 20.2669104431338 0.38167081055938
HA,Dec topo  15.5004532428646 20.9381191853625 0.37736562150935
A,h topo  340.38456308246 41.969072850272 0.377365621509353

\$ MoonPhys.py

Object  Moon
V  -10.176269713195403
Elongation [deg]  -91.44367187850128
Phase angle [deg]  -88.41048590616889
Terminator PA [deg]  17.43114268045042
Illuminated fraction  0.5138693480117649
Inclination [deg]  -6.093415933143147
Axis PA [deg]  18.36298234013797
Central meridian [deg]  -7.80905458002411

\$ MoonRise.py -0.8

next set  2020-11-08T16:17:33.2
next rise  2020-11-09T05:58:39.0
altitude [deg]  -0.8
```

Here the corresponding output for Mercury:

```\$ PlanetSet.py Mercury
\$ PlanetShow.py

Object  Mercury
lII,bII  324.99721766074 52.0224779479664 139.783503844039
RA,Dec B1950  205.71832694748 -8.267494650808 139.783503844039
RA,Dec J2000  206.377178348758 -8.517115254453 139.783503844039
lam,bet EOD  207.83241791121 2.228868425884 139.783503844039
RA,Dec EOD  206.65226095301 -8.6208097340310 139.783503844039
HA,Dec topo  307.92766041590 -8.619956220889 139.779581116991
A,h topo  81.437281598913 37.938755417566 139.779581116991

\$ PlanetPhys.py

Object  Mercury
V  -0.35424757810627994