# Calculating positions of Moon's ascending and descending nodes from ephemeris files

I am trying to find the position of planets and moon at any specific date which I was able to find using the JPL ephemeris ASCII files.

I am however stuck now at finding the positions of the moon's ascending nodes and descending nodes (intersection points of moon's orbit and the ecliptic) from that data. How can I perform the calculations to get those positions at any given point in time?

• It depends on exactly what data you're looking at. What you want is the ecliptic latitude which is zero at a node. Feel free to google talk me directly at [email protected] as I do stuff like this for fun too.
– user7073
Oct 22, 2016 at 17:28
• @barrycarter, it will be useful to many of us if you could provide an answer. Oct 26, 2016 at 12:58
• OK, but I'll need to know what data the OP already has and what tools are available. astronomy.stackexchange.com/questions/13488/… is a general resource that might help.
– user7073
Oct 26, 2016 at 14:29

Here's a way to do it entirely online if you don't want to download the CSPICE libraries. Visit https://naif.jpl.nasa.gov/naif/webgeocalc.html -> click WebGeocalc and click position finder:

Fill out the data like this:

Note that a planetocentric latitude of 0 means the ecliptic latitude is 0, since we're using the ECLIPDATE (ecliptic of the date) reference frame.

Hit calculate:

The results are all the times the moon crosses the ecliptic between 1970 and 2040. This includes both ascending nodes and descending nodes.

Of course, you don't want the times, you want the actual positions, so click "Save All Intervals":

Go back to the calculation menu and hit "state vector":

Fill it out as follows:

Note that you may need to drag your saved intervals list to the "List of Intervals" box, or it may automatically be filled in.

After filling out, hit calculate:

And there you have it: the list of lunar positions for when the moon is at its descending and ascending nodes.

Notice the right ascension of the node moves somewhat linearly:

but not exactly.

If you were to plot the node's ecliptic longitude, you would see a more linear fit because of the consistent cycle between the moon's draconic and sidereal months.

• Thank you for the very informative answer. I was not aware of this tool and I look forward to playing with it.
– Dave
Feb 2, 2017 at 19:04

The answer using SPICE is excellent!

A short cut is to use the JPL Horizons interface in ORBITAL ELEMENTS mode, download a table and use OM or $$\Omega$$, the longitude of ascending node in degrees.

  Symbol meaning:

JDTDB    Julian Day Number, Barycentric Dynamical Time
EC     Eccentricity, e
QR     Periapsis distance, q (km)
IN     Inclination w.r.t X-Y plane, i (degrees)
OM     Longitude of Ascending Node, OMEGA, (degrees)
W      Argument of Perifocus, w (degrees)
Tp     Time of periapsis (Julian Day Number)
N      Mean motion, n (degrees/sec)
MA     Mean anomaly, M (degrees)
TA     True anomaly, nu (degrees)
A      Semi-major axis, a (km)
AD     Apoapsis distance (km)
PR     Sidereal orbit period (sec)

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import numpy as np
import matplotlib.pyplot as plt

with open('datamoon.txt', 'r') as infile:

lines = [line.split(',') for line in linez]

Omega = np.array([float(line[5]) for line in lines])

JD = np.array([float(line[0]) for line in lines])
JD -= JD[0]

plt.plot(JD/365.2564 + 10, Omega)
plt.xlim(10, 30)
plt.xlabel('years since 2000')
plt.ylabel('geocentric lunar ascending node Ω (deg)')
plt.show()


Indian native almanacs provide the position of nodes. The ascending node is Raahu;the descending one is Kethu. https://srirangaminfo.com/vakya-panchangam-srirangam.php