Skip to main content

RA/DE to ALT/AZ conversion code

3 posts / 0 new
Last post
stratis
RA/DE to ALT/AZ conversion code

Hi, can anyone point me to open source code (preferably C#) that will convert from RA/DE to ALT/AZ coordinates, given an observing location Long/Lat and date/time?

I’ve seen the math to do this but am having difficulty coding it myself in C# so was hoping there’s something already out there. 

Just to also say I’m not needing high accuracy. +/- 1deg is fine as I’m just wanting to check if a given RA/DE location is observable, I won’t be using the ALT/AZ coordinates for pointing. 

Thanks

Nigel

CTX
CTX's picture
Sidereal Time & Knowing Whats Observable

 

Nigel,

Assuming you simply wish to know what might be observable in terms of RA & DEC from your location,

The really neat thing about using Sidereal time is that at any given Sidereal time objects with that corresponding R.A. are passing the local Meridian (transiting).

If an object has a R.A. (right ascension) of, for example, 08h 24m 16s then we know that an object with that R.A. will transit (pass the local Meridian - imaginary line running North to South in the sky) at a Sidereal time of 08:24:16.

Depending upon the time of year, a typical location will have objects visible about three hours either side of the transit time.  Using the example Sidereal  time  of 08:24:16 then objects from approximately a RA of 05h 24m 00s  to 11h 24m 00s should be visible (unless possibly of negative declinations from mid north locations) if dark enough.

Please keep in mind that how many R.A. hours either side of an object currently passing the Meridian might be available for viewing is going to depend upon your location, the time of year, the objects declination and, most importantly, Darkness.

A few of the options available for us to know the Sidereal time include the following:

Local Sidereal time is readily available with a freeware program for PeeCee’s, titled “Astronomer’s Digital Clock:”

http://astronomers-digital-clock.software.informer.com/3.3/

This software “tool” also shows the UT time and the Julian date along with other useful information.

You can also get the “current” LST (Locall Sidereal Time) at:

http://tycho.usno.navy.mil/sidereal.html

Also, a useful tool is the table on page 37 (Chapter 6) of the AAVSO's Visual Observing Manual, which shows the available RA range for a given month from 2 hours after sunset to midnight:

https://www.aavso.org/visual-observing-manual

Your latitude & horizions are going to determine your DEC range as well as the type of scope you have... each of us generally have had to work this out for ourselves from trial and error.  As an example, my location is ~49 degrees lattitude.  With a SCT scope (& CCD) my typical range of DEC ran from ~ -15 degrees at lowest horizion to a maximum of ~ 74 degrees.  Most of the time I probably worked from about + 20 degrees DEC to 70 degrees DEC.  With a Newtonian, I presume I probably could have worked a much higher DEC.

Hope this helps you out.

Tim Crawford

Eric Dose
Eric Dose's picture
Astroplan

Python has open-source package astroplan https://astroplan.readthedocs.io/en/latest/ , which has what you're looking for and a lot more. Should be easy enough to port a function or two to C# or other numerically-competent language.

Log in to post comments
AAVSO 49 Bay State Rd. Cambridge, MA 02138 aavso@aavso.org 617-354-0484