You are on page 1of 5

Planet Position Investigation

Dates represented as numbers in format {y, m, d, h, m, s} form


AstronomicalData"Moon", "RightAscension", DateList
13.95
AstronomicalData"Mercury", "Distance", DateList2013, 9, 10, 0, 0, 0
2.0061675 10
11
ToEquatorialCoordsPlanet_, DateTime_ := Module,
+ Convert Right Ascension, Declination and Distance to Earth
Equatorial Coordinates +
RA = AstronomicalDataPlanet, "RightAscension", DateTime;
DEC = AstronomicalDataPlanet, "Declination", DateTime;
+ Note dist is distance in kilometers from Earth +
dist = AstronomicalDataPlanet, "Distance", DateTime;
+ To Equatorial Coordinates +
RA = RA + 15. + Pi 180.; + Convert hours to Radians +
DEC = DEC + Pi 180.; + Convert degrees to Radians +
xeq = dist + CosRA + CosDEC;
yeq = dist + SinRA + CosDEC;
zeq = dist + SinDEC;
Returnxeq, yeq, zeq;
;
ToEclipticFromRADECRA_, DEC_ := Module, ,
= RA + 15. + Pi 180.; + Convert hours to Radians +
= DEC + Pi 180.; + Convert degrees to Radians +
b1 = 0.91746405994 + Sin + 0.397818675669 + Tan ;
ReturnArcTanCos , b1,
ArcSinSin + 0.917464059944 - Cos + 0.397818675669 + Sin + 180. Pi;

NegAdd360x_ := Ifx < 0, x + 360, x;


GeocentricPositionsDate1_ := Module,
+ By date, geocentric position of planets - taking Right Ascension and Declination +
a1 =
MapFlatten, ToEclipticFromRADECAstronomicalData, "RightAscension", Date1,
AstronomicalData, "Declination", Date1 &, "Sun", "Moon",
"Mercury", "Venus", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto" ;
ReturnTablea1ix1, NegAdd360a1ix2 , a1ix3 ,
ix, 1, Lengtha1 ;

Printed by Mathematica for Students


GeocentricPositionsGenList Date1_, AstroObjs_ := Module,
+ By date, geocentric position of planets - taking Right Ascension and Declination
Version for an arbitrary list of Astronomical Objects +
a1 =
MapFlatten, ToEclipticFromRADECAstronomicalData, "RightAscension", Date1,
AstronomicalData, "Declination", Date1 &, AstroObjs;
ReturnTable
a1ix1, NegAdd360a1ix2 , a1ix3 , ix, 1, Lengtha1 ;

h1 = GeocentricPositions1954, 11, 16, 10, 52, 0


Sun, 233.844, 0.00273631, Moon, 136.645, 3.2988,
Mercury, 214.784, 2.28685, Venus, 231.52, 3.37627, Mars, 317.645, 1.71676,
Jupiter, 119.938, 0.251537, Saturn, 223.487, 2.13742,
Uranus, 117.622, 0.523648, Neptune, 206.817, 1.66166, Pluto, 146.692, 10.1267
ToAnglecoords1_, coords2_ :=
+ Compute Angle in Degrees between two sets of Cartesian coordinates +
+ All based from Earth as Orign - inputted as x,y,z +
ArcCosDotcoords1, coords2 SqrtDotcoords1, coords1 +
SqrtDotcoords2, coords2 + 180 Pi;
ToAngleFromLongLatLongLat1_, LongLat2_ :=
+ Input in Form Longitude, Latitude for each of two bodies
Can be Equatorial or Ecliptic +
ArcCosSinLongLat12 + Degree + SinLongLat2 2 + Degree +
CosLongLat12 + Degree + CosLongLat2 2 + Degree +
CosLongLat11 - LongLat21 + Degree Degree;
h1
Sun, 233.844, 0.00273631, Moon, 136.645, 3.2988,
Mercury, 214.784, 2.28685, Venus, 231.52, 3.37627, Mars, 317.645, 1.71676,
Jupiter, 119.938, 0.251537, Saturn, 223.487, 2.13742,
Uranus, 117.622, 0.523648, Neptune, 206.817, 1.66166, Pluto, 146.692, 10.1267
FlattenTableh1ix1, h1jx1,
ToAngleFromLongLath1ix2, h1ix3, h1jx2, h1jx3 ,
ix, 1, Lengthh1 - 1, jx, ix + 1, Lengthh1 , 1
Sun, Moon, 97.1872, Sun, Mercury, 19.1919, Sun, Venus, 4.09547,
Sun, Mars, 83.8039, Sun, Jupiter, 113.905, Sun, Saturn, 10.5738,
Sun, Uranus, 116.221, Sun, Neptune, 27.0738, Sun, Pluto, 87.1964,
Moon, Mercury, 78.3033, Moon, Venus, 94.6645, Moon, Mars, 174.886,
Moon, Jupiter, 17.0707, Moon, Saturn, 86.9726, Moon, Uranus, 19.3939,
Moon, Neptune, 70.3174, Moon, Pluto, 16.7445, Mercury, Venus, 17.6614,
Mercury, Mars, 102.915, Mercury, Jupiter, 94.8316, Mercury, Saturn, 8.69736,
Mercury, Uranus, 97.135, Mercury, Neptune, 7.98623, Mercury, Pluto, 68.0353,
Venus, Mars, 86.0318, Venus, Jupiter, 111.558, Venus, Saturn, 9.74099,
Venus, Uranus, 113.887, Venus, Neptune, 25.2009, Venus, Pluto, 85.5131,
Mars, Jupiter, 162.236, Mars, Saturn, 94.218, Mars, Uranus, 159.945,
Mars, Neptune, 110.862, Mars, Pluto, 167.689, Jupiter, Saturn, 103.529,
Jupiter, Uranus, 2.33238, Jupiter, Neptune, 86.8731, Jupiter, Pluto, 28.3817,
Saturn, Uranus, 105.832, Saturn, Neptune, 16.6666, Saturn, Pluto, 76.6268,
Uranus, Neptune, 89.1808, Uranus, Pluto, 30.4606, Neptune, Pluto, 60.3144
2 PlanetPosition.nb
Printed by Mathematica for Students
ToAngleToEquatorialCoords"Jupiter", DateList ,
ToEquatorialCoords"Moon", DateList
108.295
ToAngleToEquatorialCoords"Chiron", DateList ,
ToEquatorialCoords"Vesta", DateList
139.264
ToAngleFromLongLath112, h113, h122, h123
97.1872
Aspectariand1_ :=
Modulepos1, + Provide a table of aspects between each planet +
pos1 = GeocentricPositionsd1;
ReturnFlattenTablepos1ix1, pos1jx1, ToAngleFromLongLat
pos1ix2, pos1ix3, pos1jx2, pos1jx3 ,
ix, 1, Lengthpos1 - 1, jx, ix + 1, Lengthpos1 , 1
;
Aspectarian1954, 11, 15, 10, 52, 0
Sun, Moon, 109.48, Sun, Mercury, 19.2969, Sun, Venus, 3.68217,
Sun, Mars, 84.1187, Sun, Jupiter, 112.9, Sun, Saturn, 9.70526,
Sun, Uranus, 115.202, Sun, Neptune, 26.1023, Sun, Pluto, 86.2104,
Moon, Mercury, 90.4258, Moon, Venus, 108.581, Moon, Mars, 165.805,
Moon, Jupiter, 4.24764, Moon, Saturn, 100.099, Moon, Uranus, 6.36227,
Moon, Neptune, 83.518, Moon, Pluto, 26.351, Mercury, Venus, 19.3751,
Mercury, Mars, 103.333, Mercury, Jupiter, 93.7252, Mercury, Saturn, 9.68797,
Mercury, Uranus, 96.014, Mercury, Neptune, 6.91758, Mercury, Pluto, 66.9437,
Venus, Mars, 84.7268, Venus, Jupiter, 112.162, Venus, Saturn, 10.4768,
Venus, Uranus, 114.477, Venus, Neptune, 25.8755, Venus, Pluto, 86.1582,
Mars, Jupiter, 162.921, Mars, Saturn, 93.6457, Mars, Uranus, 160.647,
Mars, Neptune, 110.204, Mars, Pluto, 167.205, Jupiter, Saturn, 103.413,
Jupiter, Uranus, 2.31833, Jupiter, Neptune, 86.8419, Jupiter, Pluto, 28.3776,
Saturn, Uranus, 105.702, Saturn, Neptune, 16.5819, Saturn, Pluto, 76.5158,
Uranus, Neptune, 89.1351, Uranus, Pluto, 30.4423, Neptune, Pluto, 60.2866
ToAspectDescangle_, aspectInfo_, conjIndex_ := Module,
type = None;
Forix = 1, ix s LengthaspectInfo, ix++,
Ifangle z aspectInfoix2 - aspectInfoix3 &&
angle <= aspectInfoix2 + aspectInfoix3 ,
type = aspectInfoix1 ;
+ If get here then either the left side of conjunction or no aspect +
type = If angle - 360 z -aspectInfoconjIndex3, Conjunction, type;
Returntype;

+ AspectInfo = AspectName, Degrees, Orb +


AspectInfo = Square, 90, 7.5, Trine, 120, 4, Opposition, 180, 8,
Conjunction, 0, 8, Sextile, 60, 4, SemiSextile, 30, 2, QuinCunix, 150, 2
Square, 90, 7.5, Trine, 120, 4, Opposition, 180, 8,
Conjunction, 0, 8, Sextile, 60, 4, SemiSextile, 30, 2, QuinCunix, 150, 2
PlanetPosition.nb 3
Printed by Mathematica for Students
ToAspectDesc189, AspectInfo, 4
None
ToAspectsWithOrbsd1_, aspectInfo_ := Moduleasp1,
asp1 = Aspectariand1;
ReturnTableasp1ix1, asp1ix2,
ToAspectDescasp1ix3, aspectInfo, 4, ix, 1, Lengthasp1 ;

h1 = ToAspectsWithOrbs1954, 11, 15, 10, 52, 0, AspectInfo


Sun, Moon, None, Sun, Mercury, None, Sun, Venus, Conjunction, Sun, Mars, Square,
Sun, Jupiter, None, Sun, Saturn, None, Sun, Uranus, None, Sun, Neptune, None,
Sun, Pluto, Square, Moon, Mercury, Square, Moon, Venus, None, Moon, Mars, None,
Moon, Jupiter, Conjunction, Moon, Saturn, None, Moon, Uranus, Conjunction,
Moon, Neptune, Square, Moon, Pluto, None, Mercury, Venus, None, Mercury, Mars, None,
Mercury, Jupiter, Square, Mercury, Saturn, None, Mercury, Uranus, Square,
Mercury, Neptune, Conjunction, Mercury, Pluto, None, Venus, Mars, Square,
Venus, Jupiter, None, Venus, Saturn, None, Venus, Uranus, None, Venus, Neptune, None,
Venus, Pluto, Square, Mars, Jupiter, None, Mars, Saturn, Square,
Mars, Uranus, None, Mars, Neptune, None, Mars, Pluto, None, Jupiter, Saturn, None,
Jupiter, Uranus, Conjunction, Jupiter, Neptune, Square, Jupiter, Pluto, SemiSextile,
Saturn, Uranus, None, Saturn, Neptune, None, Saturn, Pluto, None,
Uranus, Neptune, Square, Uranus, Pluto, SemiSextile, Neptune, Pluto, Sextile
GeocentricPositionsGenList DateList, TakeAstronomicalData"Star", 30
Sun, 25.7129, 0.00190064, Sirius, 104.084, 39.6046, Canopus, 104.963, 75.8264,
Arcturus, 204.233, 30.7428, RigelKentaurusA, 239.493, 42.5893,
Vega, 285.316, 61.7348, Capella, 81.858, 22.8627, Rigel, 76.8293, 31.1253,
Procyon, 115.787, 16.0192, Achernar, 345.307, 59.3773,
Betelgeuse, 88.7544, 16.0296, Hadar, 233.793, 44.1356, Altair, 301.775, 29.305,
Acrux, 221.872, 52.8772, Aldebaran, 69.7891, 5.46925, CapellaAb, 81.8554, 22.8706,
Spica, 203.842, 2.05324, Antares, 249.762, 4.56747, Pollux, 113.217, 6.68218,
Fomalhaut, 333.859, 21.1338, Mimosa, 221.649, 48.6368, Deneb, 335.333, 59.9074,
RigelKentaurusB, 239.491, 42.5948, Regulus, 149.83, 0.463884,
Adhara, 110.764, 51.3626, Castor, 110.24, 10.0937, Gacrux, 216.741, 47.8293,
Shaula, 264.585, 13.7858, Bellatrix, 80.9463, 16.8186, Alnath, 82.5749, 5.38299
CountAspectsaspectsList_, AspectInfo_ :=
TableAspectInfoix1, CountFlattenaspectsList, AspectInfoix1 ,
ix, 1, LengthAspectInfo ;
CountAspectsh1, AspectInfo
Square, 11, Trine, 0, Opposition, 0,
Conjunction, 5, Sextile, 1, SemiSextile, 2, QuinCunix, 0
ConvLocalTimeToGMTdate1_, longitude_ :=
+ Take longitude and divide by 15 to hours away from Greenwich,
DateList is smart enough to do day and minute conversions +
DateListFlattenJoinTakedate1, 3, Ndate14 - longitude 15, Takedate1, -2
ConvLocalTimeToGMT1954, 11, 16, 5, 52, 0, -72
1954, 11, 16, 10, 40, 0.
4 PlanetPosition.nb
Printed by Mathematica for Students
Directory
C:\Users\mbloomberg\Virtual Machines\Documents\M7
SetDirectory".\M7"
d1 = DateList + 1 365.25
2014., 4.00274, 15.0027, 14.0027, 8.00274, 53.0344
d1 = DateList2025, 2, 12, 0, 0, 0
2025, 2, 12, 0, 0, 0.
Forix = 0, ix < 3000, ix++,
d2 = DatePlusd1, ix;
d2, Map, AstronomicalData, "RightAscension", d2,
AstronomicalData, "Declination", d2 &, "Sun", "Moon", "Mercury", "Venus", "Mars ,
"Jupiter", "Saturn", "Uranus", "Neptune", "Pluto" >>> "RA_DEC2.txt";
;
PlanetPosition.nb 5
Printed by Mathematica for Students

You might also like