-1
$\begingroup$

I am currently working on an astrology project and need to figure out the exact date and time based on the sun's position of birth - 88° degree (approx. 89 days) before the moment of birth.

I am using the swisseph python library (https://astrorigin.com/pyswisseph/pydoc/index.html) to calculate planet postions.

For example: the following date (1991.01.07 09:27:00 UT) gives the longitude of the sun 286.57609582639475.

Now I would need a formula to calculate the UT time from this longitude of sun - 88° degree.

Does anybody have an idea?

$\endgroup$

2 Answers 2

2
$\begingroup$

This is how you can do it in Python using pyswisseph:

import swisseph as swe

# set ephemeris files path
swe.set_ephe_path('...')

# birth time as Julian day number (UT), for example
birth_t = swe.julday(2007, 7, 30, 8.5)
# sun longitude at birth
sun_longitude = swe.calc_ut(birth_t, swe.SUN)[0][0]
# longitude searched
xlon = swe.degnorm(sun_longitude - 88)
# start search 90 deays prior to birth
tstart = birth_t - 90
# find exact crossing time
res = swe.solcross_ut(xlon, tstart)
# turn it into a date
date = swe.revjul(res)

print("Year:", date[0], "Month:", date[1], "Day:", date[2], "Hour:", date[3])
$\endgroup$
1
  • $\begingroup$ Are you sure that the python library pyswisseph has a 'solcross_ut' method? Because I get the following error: AttributeError: module 'swisseph' has no attribute 'solcross_ut' $\endgroup$ Commented Jun 1, 2022 at 12:52
1
$\begingroup$

You could try successive approximation using your Python library. Put in your best guess date/time and keep adjusting it to get 88 degrees.

$\endgroup$
4
  • $\begingroup$ Do you know how to get Geocenteric or heliocentric positions $\endgroup$ Commented Oct 12, 2023 at 13:44
  • $\begingroup$ @user1047873 positions of what? Whatever it is you have to know its position in some coordinate system and then convert with widely available conversion equations. $\endgroup$
    – stretch
    Commented Oct 13, 2023 at 16:56
  • $\begingroup$ Can you please help me to convert Geocenteric to Heliocenteric coordinates ? $\endgroup$ Commented Oct 14, 2023 at 6:25
  • $\begingroup$ @user1047873: See en.wikipedia.org/wiki/Astronomical_coordinate_systems $\endgroup$
    – stretch
    Commented Oct 14, 2023 at 12:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .