I've been using PyEphem to play around with the motion of planets relative to a certain position on Earth. However, I notice sometimes that the results I get from PyEphem appear non-continuous for Declination, while Right Ascension appears continuous. The RA and Dec coordinates are taken in these plots every 30 minutes.
I would expect the stellar bodies to move in a continuous manner, however when declination is negative it looks discontinuous.
Any ideas why this would be? I can post my script if that helps as well.
Code:
from ephem import *
import datetime
import re
def cSTI(number):
degrees = int(number[0])
minutes = int(number[1])
seconds = float(number[2])
full = degrees + (minutes/60) + (seconds/60/60)
return round(full,2)
planets = [Sun(),Mercury(),Venus(),Moon(),Mars(),Jupiter(),Saturn(),Uranus(),Neptune(),Pluto()]
masses = [1.989*10**30,.330*10**24,4.87*10**24,0.073*10**24,0.642*10**24,1898*10**24,568*10**24,86.8*10**24,102*10**24,0.0146*10**24]
earthMass = 5.97*10**24
gravitational_constant = 6.67408 * 10**-11
theYear = '2018'
theMonth = '9'
theDay = '8'
revere = Observer()
revere.lon = '-42.4084'
revere.lat = '71.0120'
currentDate = datetime.datetime(2018,11,30,12,0,0)
lowerDateLimit = datetime.datetime(2018,9,1,12,0,0)
revere.date = currentDate
print('DATE SUN(RA) SUN(DEC) SUN(AZI) SUN(GFORCE) MERCURY(RA) MERCURY(DEC) MERCURY(AZI) MERCURY(GFORCE) VENUS(RA) VENUS(DEC) VENUS(AZI) VENUS(GFORCE) MOON(RA) MOON(DEC) MOON(AZI) MOON(GFORCE) MARS(RA) MARS(DEC) MARS(AZI) MARS(GFORCE) JUPITER(RA) JUPITER(DEC) JUPITER(AZI) JUPITER(GFORCE) SATURN(RA) SATURN(DEC) SATURN(AZI) SATURN(GFORCE) URANUS(RA) URANUS(DEC) URANUS(AZI) URANUS(GFORCE) NEPTUNE(RA) NEPTUNE(DEC) NEPTUNE(AZI) NEPTUNE(GFORCE) PLUTO(RA) PLUTO(DEC) PLUTO(AZI) PLUTO(GFORCE) ')
while (currentDate> lowerDateLimit):
print('%s ' % (revere.date),end = ' ')
planetIndex = 0;
for planet in planets:
planet.compute(revere)
rightascension = str(planet.ra)
declination = str(planet.dec)
azimuth = str(planet.az)
rightascension = re.split('[:]',rightascension)
declination = re.split('[:]',declination)
azimuth = re.split('[:]',azimuth )
rightascension = cSTI(rightascension);
declination = cSTI(declination);
azimuth = cSTI(azimuth);
GFORCE = gravitational_constant * ((masses[planetIndex]*earthMass)/(planet.earth_distance**2))
print('%s %s %s %s ' % (rightascension,declination,azimuth,GFORCE),end = ' ')
planetIndex+=1
print()
currentDate += datetime.timedelta(minutes=-30)
revere.date = currentDate