0
$\begingroup$

Yes, I asked this in the past but I got sidetracked and did other things. Now my question is, can one find the exact time when "north node" reaches a certain longitude?

I am looking for 15.125 or 15° 07' 30" and happen to know exactly when this will happen but only after playing with the dates and time in this little "app" (it is used in astrology, but I do not know anything about astrology nor care to know). Anyway I got to this after many changes in the date and time so obviously it's not something I want to keep doing.

swetest -pt -b10.5.2024 -ut21:33:24 
date (dmy) 10.5.2024 greg.   21:33:24
 UT     version 2.10.03-deb1
UT:  2460441.398194444     delta t: 69.065689 sec
TT:  2460441.398993816
Epsilon (t/m)     23°26'18.6220   23°26' 9.9980
Nutation          -0° 0' 5.1606    0° 0' 8.6241
true Node         15° 7'29.9990    0° 0' 0.0000    0.002408994

Then I tried to figure it the old fashion way, but the time is not accurate because I could only find the start DMS and end DMS for the day without seconds so it's a little off. This is how that works:

    start at 0:00 15°13 == 54,780 arc seconds
    end at 24:00 15° 7 == 54,420 arc seconds
    total arc seconds for 24 hours 360 arc seconds

15.125 == 54,450 arc seconds

54,780 - 
54,450
   330 

330/360 = 0.9167 x 24 = 22(10 PM) which is a little off.

I also tried to work on this code but failed thus far:

import numpy as np
from typing import Callable
 
import pytz
import skyfield.searchlib
from skyfield import api, timelib
from skyfield.jpllib import SpiceKernel, ChebyshevPosition
from skyfield.vectorlib import VectorSum
from skyfield.framelib import ecliptic_frame
 
 
def ecliptic_longitude_exceeds(
        longitude: float,
        target: str|VectorSum|ChebyshevPosition,
        ephemeris: SpiceKernel) -> Callable[[timelib.Time], np.array]:
    """
    Creates functions that check whether target ecliptic longitude exceeds
    value at a specified time
    :param longitude: Ecliptic Longitude in decimal degrees
    :param target: Object to be checked
    :param ephemeris: Ephemeris to be used.
    :return: find_discrete-compatible function
    """

    earth = ephemeris['earth']
    target = ephemeris[target] if isinstance(target, str) else target
 
    def function(time: timelib.Time) -> np.array:
        """
        :param time: Time of Observation
        :return: Array of booleans indicating whether ecliptic longitude > longitude
        """
        observation = earth.at(time).observe(target).apparent()
        _, observed_longitude, _ = observation.frame_latlon(ecliptic_frame)
        return observed_longitude.degrees > longitude
 
    function.step_days = 60
 
    return function
 
 
def main():
 
    ephemeris = api.load('de421.bsp')
    ts = api.load.timescale()
    utc = pytz.timezone("UTC")
    # Set start and stop dates to May 9 and May 11, 2024
    start, stop = ts.utc(2024, 5, 9), ts.utc(2024, 5, 11)
 
    moon_exceeds = ecliptic_longitude_exceeds(
        longitude=15.125, target="moon", ephemeris=ephemeris  
    )
 
    times, states = skyfield.searchlib.find_discrete(start, stop, moon_exceeds)
 
    longitude_times = list(time for time, in_state
                           in zip(times.astimezone(utc), states)
                           if in_state)
 
    print('\n'.join(str(lt) for lt in longitude_times))
 
 
if __name__ == '__main__':
    main()
$\endgroup$
5
  • 1
    $\begingroup$ The motion of the Moon's north node is rather irregular. Using my plotting script I get this graph. $\endgroup$
    – PM 2Ring
    Commented Mar 29 at 1:12
  • 1
    $\begingroup$ Horizons says OM is 15.125° on 2024-Apr-27 23:40 TDB, but that's for the J2000 equinox. If you want to use the "of date" equinox you need to adjust for precession of the equinox, as Mike G mentioned on one of your earlier questions. $\endgroup$
    – PM 2Ring
    Commented Mar 29 at 1:13
  • $\begingroup$ Your Python code appears to be checking the Moon's longitude, not its north node's longitude. $\endgroup$
    – PM 2Ring
    Commented Mar 29 at 1:25
  • $\begingroup$ Adjusting for precession 0.3402638°, so OM=14.784736°, gives 2024-May-11 01:00:36 TDB ssd.jpl.nasa.gov/api/… $\endgroup$
    – PM 2Ring
    Commented Mar 29 at 2:26
  • $\begingroup$ PM 2Ring, I appreciate your comments select_date = swe.julday(2024, 5, 10, 21.55067, swe.GREG_CAL) this is what the swieesph code prints alculation successful! Ascending node: Position: (15.125165845230343,) Descending node: Position: (195.12516584523127,) Velocity: (0.0, 0.0, 0.0) Perihelion: Position: (4.957640578587505,) Velocity: (-0.9184831739624794, 0.002406733121510601, 0.0, 0.0, 0.0) Aphelion: Position: (184.9576405785884,) Velocity: (0.9184831739628908, 0.0027318105529593037, 0.0, 0.0, 0.0) $\endgroup$
    – dimitri33
    Commented Mar 29 at 4:56

0

You must log in to answer this question.

Browse other questions tagged .