Confusion with using dec/ra to compute sub-lunar location

altitude and azimuth of stars calculator
convert right ascension and declination to azimuth and elevation
ra, dec to alt/az
celestial coordinates calculator
why do astronomers prefer using right ascension and declination
how to calculate right ascension and declination
altitude and azimuth of constellations
ra cos(dec)

I have a need to compute the apparent azimuth and elevation angles as well as the sub-lunar lat/lon for a given date/time. The az/el angles I get generally agree with other sources (, Horizons, etc.) but there are not good comparison sources for the sub-lunar lat/lon. More importantly, I doubt the lat/lon I get using the dec/ra values because the ra barely changes over long time frames.

Here is the basic call I am making:'2018/1/1 01:00:00'
print('rocMoonTest: %s UTC-4, lat/lon = %0.4f [+N], %0.4f [+E]' %
    (, math.degrees(, math.degrees(roc.lon)))
print('Moon dec/ra     = %s [+N], %s [+W]' % (moon.dec, moon.ra ))
print('Moon a_dec/a_ra = %s [+N], %s [+W]' % (moon.a_dec, moon.a_ra ))
print('Moon g_dec/g_ra = %s [+N], %s [+W]' % (moon.g_dec, moon.g_ra ))
print('Moon az/el      = %0.4f, %0.4f' %
    (math.degrees(, math.degrees(moon.alt)))

And then I iterate on that every 3 hours. Below is the output:

rocMoonTest: 2018/1/1 01:00:00 UTC-4, lat/lon = 43.0000 [+N], -78.0000 [+E]
Moon dec/ra     = 18:53:07.1 [+N], 5:43:03.33 [+W]
Moon a_dec/a_ra = 19:22:21.3 [+N], 5:39:38.43 [+W]
Moon g_dec/g_ra = 19:22:44.7 [+N], 5:40:41.41 [+W]
Moon az/el      = 105.3953, 43.0670

rocMoonTest: 2018/1/1 04:00:00 UTC-4, lat/lon = 43.0000 [+N], -78.0000 [+E]
Moon dec/ra     = 19:07:55.4 [+N], 5:49:00.24 [+W]
Moon a_dec/a_ra = 19:32:24.2 [+N], 5:47:42.22 [+W]
Moon g_dec/g_ra = 19:32:35.1 [+N], 5:48:45.29 [+W]
Moon az/el      = 169.5907, 65.8406

rocMoonTest: 2018/1/1 07:00:00 UTC-4, lat/lon = 43.0000 [+N], -78.0000 [+E]
Moon dec/ra     = 19:13:15.7 [+N], 5:54:49.89 [+W]
Moon a_dec/a_ra = 19:41:07.2 [+N], 5:55:47.50 [+W]
Moon g_dec/g_ra = 19:41:05.5 [+N], 5:56:50.65 [+W]
Moon az/el      = 246.5737, 49.4664

As expected and as verified by the az/el angles, the moon swings from East to West as the earth rotates and reaches a peak altitude somewhere during the period. However, none of the various dec/ra values change significantly. Over this 6 hour span, I would expect to see approximately a 6 hour change in the ra. Obviously, when I use any of these ra values to compute the longitude, I get the wrong answer. It appears the reference frame for dev/ra is not rotating with the earth. However, the docs indicate that I should expect it to.

Anyone care to explain where I went wrong in my understanding of the various right ascension variables and what the most direct way is to compute the sub-lunar lat/lon? Note, I would rather avoid using an approach that rotates the apparent az/el position into geodetic lat/lon.

The measurement "Right Ascension" is made not against the rotating surface of the Earth, but against the fixed stars of the sky — it is a kind of longitude but whose origin is the point on a star chart where the two great "equators of the sky," the Earth’s equator and the "Solar System's equator", the Ecliptic (which is not truly the Solar System equator because it's the plane of the Earth's orbit, rather than the weighted average of all planetary orbits), cross.

Since the point of their crossing itself moves as the ages pass, the system of Right Ascension is very slightly different every year, and very different across centuries and millenia. So Right Ascension and declination (celestial latitude) always have to be specified relative to some date, some exact moment like B1950 or J2000.

There is now a fixed coordinate system for RA and dec that doesn't move, the ICRS, which is oriented like J2000 but is defined using the positions of quasars which (we assume) won't move measurably within the lifetime of our species.

Newest 'pyephem' Questions, Confusion with using dec/ra to compute sub-lunar location. I have a need to compute the apparent azimuth and elevation angles as well as the sub-lunar lat/​lon  Tried asking this a while back on stack overflow but no joy and I've just been looking at it again and I'm none the wiser :) I'm using pyEphem to calculate RA/Decs of satellites and I'm confused by the different values computed and descr

regarding this part of your question

what the most direct way is to compute the sub-lunar lat/lon?

Here is my code to calculate the sublunar point.

greenwich = ephem.Observer() = "0"
greenwich.lon = "0" = datetime.utcnow()

#add Moon Sub Solar Point
moon = ephem.Moon(greenwich)
moon_lon = math.degrees(moon.ra - greenwich.sidereal_time() )
# map longitude value from -180 to +180 
if moon_lon < -180.0 :
  moon_lon = 360.0 + moon_lon 
elif moon_lon > 180.0 :
  moon_lon = moon_lon - 360.0

moon_lat = math.degrees(moon.dec)
print "moon Lon:",moon_lon, "Lat:",moon_lat

Hope that helps. I also use the same approach to calculate the sub-solar point. Works great for me.

EDIT: Yes... latitude of Greenwich is set to zero BECAUSE it doesn't matter at all for this calculation.

The Moon, You remove your camera's lens, mate the camera adapter in its place, and theodolite, or ±24 hour confusion in recording the times of your observations. of the sub-Earth point, based on a comprehensive calculation of the Moon's Clearly, celestial coordinates (RA, Dec or α, δ) are not a natural coordinate system in  @richardgmcmahon-- if you just subtract the RA, you get the difference in RA units. This is more naturally seen if you keep RA in time units: there is a one second difference in time between the two objects crossing the same location, independent of declination.

You might reinforce your thinking in the direction of this approach by taking a look at this other link:

Computing sub-solar point

Which gives basically the same solution, but for the sub_solar_point, also from Liam Kennedy (where he gave a non zero Lat for Greenwich), and also with an answer from Brandon Rhodes who wrapped the xephem library in python to give us pyephem, and until recently was actively maintaining it. Brandon is now focusing more on his next iteration, a pure python library called skyfield, which uses the latest available ephemeris with a more intuitive API.

Although I can not contribute it now, might I suggest a comparison of the results of pyephem and skyfield, perhaps in a matplotlib figure or two, IOW, just how different/improved might be the results from skyfield?

Celestial Coordinates, Right Ascension (or "RA") and Declination (or "Dec") are global coordinates: After a lot of dickering, European nations finally decided to use the location of the One can find the details in any good book on celestial mathematics, such as. The descent isn't considered at all. Likewise, the VNAV descent rate is computed using current groundspeed, so when airspeed increases in the descent, it always has an increasing vertical speed and doesn't calculate things like reducing the descent rate for the last 1000 feet.

The Illustrated London News, The several incidents and localities in the Royal Progress which we have of Marr, upon “Mm-i- a of. the Dec, and is thus described by a correspondent of the and the Roman illOliO' ' Cave txutem ' The fire-place is of iron bars crossed on the Tucson, lit-The Moon enters her last quarter at 9h. A n Old and Feeble Sub. Ideally I'm hoping to get something JavaScript can calculate at a "reasonable speed" without recursion, loops, or extra libraries. I've tried several things (eg, Fourier series on the Sun/Moon's RA/DEC), but nothing seems quite accurate enough.

Earthquakes, Phases of the Moon, Sub-Lunar and Sub-Solar Points, (Figure 1.) The results are certainly not obviously conducive' in supporting any motions iii declination is that earthquakes abound in tropical and sub-tropical shift the place of the maximum to the sub-lunar point or to some circle intermediate rather confusing, in recognizing readily which three points belonged together. Click on the “Unspecified” link next to “Location” in the upper right corner and enter your location and click the Search button. Then click the Update button below the map. This should take you back to the main page. Click on the “Interactive sky chart” link under Astronomy. This will show you a sky chart for your location.

HORIZONS User Manual - JPL Solar System Dynamics, Orbit uncertainties can be computed for asteroids and comets. Astrometric coordinates: Positions or values (such as RA and DEC) which account For example, for an observer on the Earth, the "interfering body" is the Moon. it is helpful to understand a few more things to avoid confusion in some situations. Satellite confusion to your need # Geographic location latitude = '43:43:47.0' longitude = '6:54:00.0' # Satellite TLE (can be retreived on

  • Could you quote more specifically the documentation that describes the right ascension (RA) as changing as the Earth turns? My own understanding is that the right ascension of an object is its position against the stars, so it would take ~1 month for the Moon's right ascension to go through 360°.
  • Brandon, this was the key misunderstanding on my behalf. Not coming from the uplooking astronomy community but rather the downlooking remote sensing community, I was not aware of the reference frame for right ascension and that it isn't Earth fixed. It appears incorporating the sidereal time is the missing ingredient in my calculation.
  • I'm glad we tracked down the source of confusion and you can more forward again! I'll write up a little answer, then, so that other folks with the same question can easily find the answer in the future.