Skip to main content
fix code blocks (first line of 2nd block was hidden}; improve formatting; edit for grammar and clarity
Source Link

How to find the Moon's node longitude crossing

Yes, I asked this in the past but iI got sidetracked and did other things. Now my question to you 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" ( yes itit is used in astrology but please believe me when i tell you, ibut I do not know anything about astrology nor care to know) anyways i. Anyway I got to this after many changes in the date and time so obviously it's not something iI 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 than i

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, but the time is not accurate because I could only find the start DMS and end DMS for the day without seconds toso 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 thethis code but failed thisthus 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()

node longitude crossing

Yes I asked this in the past but i got sidetracked and did other things. Now my question to you 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" ( yes it is used in astrology but please believe me when i tell you, i do not know anything about astrology nor care to know) anyways 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 than 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 to it's a little off. This is how that works

    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 the code but failed this 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()

How to find the Moon's node longitude crossing

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()
Source Link

node longitude crossing

Yes I asked this in the past but i got sidetracked and did other things. Now my question to you 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" ( yes it is used in astrology but please believe me when i tell you, i do not know anything about astrology nor care to know) anyways 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 than 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 to it's a little off. This is how that works

    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 the code but failed this 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()