[AstroPy] computing latitude/longitude from RA/Dec

Michael Brewer brewer at astro.umass.edu
Thu Aug 25 20:46:32 EDT 2022


Michael,

   This is fairly easy to do. First convert AltAz to Cartesian 
coordinates. This is a left handed coordinate system. The X  axis points 
North, and the Y axis points East. Then rotate clockwise around the Y 
axis by 90 - latitude and reverse the X and Y coordinates so that the X 
axis points South and the Y axis points West. You are now in the HADec 
coordinate system and the LHA ls the angle between the X and Y axes 
measured clockwise from the X axis.


On 8/25/22 7:06 PM, Michael Hoenig wrote:
> Hi,
>
> I currently have an image of the night sky and matching RA/Dec 
> coordinates of the center.  I also have the azimuth and elevation the 
> camera was pointed at, and the time.  I am trying to use this info to 
> calculate the latitude and longitude on Earth where the picture was 
> taken from, using AstroPy methods...
>
> latitude = Dec +/- zenith distance, this is easy.
>
> longitude = LST - GMST, where LST = LHA + RA.  This one I'm having 
> some more trouble with...
>
> I can create a Time() object, and then use .sidereal_time('mean') to 
> get the LST, but of course that requires the location to begin with.
>
> I can create a SkyCoord object from my RA and Dec, but is seems a 
> simple transform_to() isn't sufficient either.
>
> What am I missing here?  Is this possible in AstroPy, or do I need to 
> resort to something like PyEphem or Skyfield?
>
> Thanks for any help!
> Michael
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org
> https://mail.python.org/mailman/listinfo/astropy



More information about the AstroPy mailing list