<p>The short answer is to call <code>swe.calc_ut</code> with body <code>swe.TRUE_NODE</code> (11) instead of <code>swe.MEAN_NODE</code> (10).</p>
<p>The underlying <a href="https://www.astro.com/swisseph/swisseph.htm#_Toc112511712" rel="nofollow noreferrer">library documentation</a> explains the difference between the two.
If I understand correctly, the &quot;true&quot; node is that of an <a href="https://en.wikipedia.org/wiki/Osculating_orbit" rel="nofollow noreferrer">osculating orbit</a>,
and the &quot;mean&quot; node uses a semi-analytical expression
in the form of <a href="https://en.wikipedia.org/wiki/Ephemeride_Lunaire_Parisienne" rel="nofollow noreferrer">ELP 2000-85</a>
but fitted to JPL DE431.</p>
<p>I also suggest passing the current UT hour to <code>swe.julday</code> instead of the default 12:00.</p>
<pre><code>current_date = datetime.datetime.now(datetime.timezone.utc)

jd = swe.julday(current_date.year, current_date.month, current_date.day,
        current_date.hour + current_date.minute / 60)

pos = swe.calc_ut(jd, swe.TRUE_NODE)
</code></pre>

CC BY-SA 4.0
2023-08-29T22:22:08.210Z
2023-08-30T15:38:44.670Z
2023-08-30T15:38:44.670Z
Mike G
<p>this is the code i am using for the &quot;Mean Node&quot; even tho even this one is off by a couple of minutes</p>
<pre><code>import datetime
import swisseph as swe

swe.set_ephe_path('/usr/share/ephe')

# Get the current date
current_date = datetime.date.today()

# Calculate the Julian Day
jd = swe.julday(current_date.year, current_date.month, current_date.day)

# Calculate the position of the North Node (10 represents North Node)
pos = swe.calc_ut(jd, 10)

# Extract the ecliptic longitude of the North Node
ecliptic_longitude = pos[0][0]  # Access the correct value within the tuple

# Calculate astrological sign and degrees
zodiac_signs = ['Aries', 'Taurus', 'Gemini', 'Cancer', 'Leo', 'Virgo',
                'Libra', 'Scorpio', 'Sagittarius', 'Capricorn', 'Aquarius', 'Pisces']

# Calculate degrees, minutes, and seconds
degrees = int(ecliptic_longitude)
remaining_degrees = (ecliptic_longitude - degrees) * 60
minutes = int(remaining_degrees)
seconds = (remaining_degrees - minutes) * 60

# Calculate astrological sign index
sign_index = (degrees // 30) % 12

print(f&quot;Current Date and Time: {datetime.datetime.now()}&quot;)
print(f&quot;Longitude of North Node: {degrees}° {minutes}' {seconds:.2f}\&quot;&quot;)
print(f&quot;Astrological Sign: {zodiac_signs[sign_index]}&quot;)

swe.close()
</code></pre>
<p>I am yet to find any info on how to calculate  this thing. The one in the example uses python by any language is fine. Also even tho this code uses &quot;swisseph&quot; skyfield is also fine as long as it works</p>

CC BY-SA 4.0
2023-08-29T21:22:32.737Z
Here's how to ask JPL Horizons to calculate the true node: https://astronomy.stackexchange.com/a/54466/16685
PM 2Ring
CC BY-SA 4.0
2023-09-06T00:39:36.523Z
Thank you Mike, that actually fixed my issue as after posting I found the swe.TRUE_NODE(11) and it was a couple of minutes off even with that.. so problem solved. I spoke too soon .. the first output is before the edit however the second is still off by seconds now, which in node world can be quite a bit `$ python truenodes1.py Current Date and Time: 2023-09-05 16:12:28.545007
Longitude of North Node: 25° 44' 52.47"
Astrological Sign: Aries
(pipshitz) ethan@astrologyReadings ~/Downloads $ nano truenodes1.py (pipshitz) ethan@astrologyReadings ~/Downloads $ python truenodes1.py Current Date and
dimitri33
<observational-astronomy>
How do you calculate the position of the True Node
dimitri33
# How do you calculate the position of the True Node

(Asked by: username_0 on 2023-08-29)

this is the code i am using for the "Mean Node" even tho even this one is off by a couple of minutes

```
import datetime
import swisseph as swe

swe.set_ephe_path('/usr/share/ephe')

# Get the current date
current_date = datetime.date.today()

# Calculate the Julian Day
jd = swe.julday(current_date.year, current_date.month, current_date.day)

# Calculate the position of the North Node (10 represents North Node)
pos = swe.calc_ut(jd, 10)

# Extract the ecliptic longitude of the North Node
ecliptic_longitude = pos[0][0]  # Access the correct value within the tuple

# Calculate astrological sign and degrees
zodiac_signs = ['Aries', 'Taurus', 'Gemini', 'Cancer', 'Leo', 'Virgo',
                'Libra', 'Scorpio', 'Sagittarius', 'Capricorn', 'Aquarius', 'Pisces']

# Calculate degrees, minutes, and seconds
degrees = int(ecliptic_longitude)
remaining_degrees = (ecliptic_longitude - degrees) * 60
minutes = int(remaining_degrees)
seconds = (remaining_degrees - minutes) * 60

# Calculate astrological sign index
sign_index = (degrees // 30) % 12

print(f"Current Date and Time: {datetime.datetime.now()}")
print(f"Longitude of North Node: {degrees}° {minutes}' {seconds:.2f}\"")
print(f"Astrological Sign: {zodiac_signs[sign_index]}")

swe.close()

```

I am yet to find any info on how to calculate this thing. The one in the example uses python by any language is fine. Also even tho this code uses "swisseph" skyfield is also fine as long as it works

**Tags:** observational-astronomy

> **Comments:**
> **username_1**: Here's how to ask JPL Horizons to calculate the true node: https://astronomy.stackexchange.com/a/54466/16685  
> **username_0**: Thank you username_2, that actually fixed my issue as after posting I found the swe.TRUE_NODE(11) and it was a couple of minutes off even with that.. so problem solved. I spoke too soon .. the first output is before the edit however the second is still off by seconds now, which in node world can be quite a bit `$ python truenodes1.py Current Date and Time: 2023-09-05 16:12:28.545007 Longitude of North Node: 25° 44' 52.47" Astrological Sign: Aries (pipshitz) ethan@astrologyReadings ~/Downloads $ nano truenodes1.py (pipshitz) ethan@astrologyReadings ~/Downloads $ python truenodes1.py Current Date and  

---

## 1 answers

### Answer by username_2 on 2023-08-29. Score: 5

The short answer is to call `swe.calc_ut` with body `swe.TRUE_NODE` (11) instead of `swe.MEAN_NODE` (10).

The underlying [library documentation](https://www.astro.com/swisseph/swisseph.htm#_Toc112511712) explains the difference between the two.
If I understand correctly, the "true" node is that of an [osculating orbit](https://en.wikipedia.org/wiki/Osculating_orbit),
and the "mean" node uses a semi-analytical expression
in the form of [ELP 2000-85](https://en.wikipedia.org/wiki/Ephemeride_Lunaire_Parisienne)
but fitted to JPL DE431.

I also suggest passing the current UT hour to `swe.julday` instead of the default 12:00.

```
current_date = datetime.datetime.now(datetime.timezone.utc)

jd = swe.julday(current_date.year, current_date.month, current_date.day,
        current_date.hour + current_date.minute / 60)

pos = swe.calc_ut(jd, swe.TRUE_NODE)

```


---

