Skip to content

A PHP Right Ascension and Declination to Altitude and Azimuth for the users current Earth Position and time.

Notifications You must be signed in to change notification settings

tomgillespy/ra-dec-to-alt-az

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

RA/Dec to Alt/Az PHP Class

This class converts celestial coordinates, along with the time, latitude and longditude to a altitude and azimuth for a telescope mount or camera.

##Installation

include('radec.class.php');

##Usage

$radec = new radec(radec::decimaldegrees(latitude), radec::decimaldegrees(longditude));

$radec->setradec(radec::decimaldegrees(right_ascention), radec::decimaldegrees(declination));

$time = strtotime('now');

$azimuth = $radec->getAZ($time);
$altitude = $radec->getALT($time);

##Other Functions

####radec::daysbeforeJ2000($timestamp)

This gives the number of days between $timestamp and the J2000 epoch. Wikipedia Article

####radec::getdecimalUT($timestamp)

This gives the universitl time in decimal form. All calculations in this are performed using decimals from degrees, minutes and seconds and the time equivalent (hours, minuites and seconds).

####radec::fractionalday($timestamp)

This just divides the UT by 24 to get the fraction of a day.

####radec::getLST($timestamp)

This calculated Local Sidereal time for the latitude and longditude set in the constructor. The approximation is within 0.3 seconds of time for dates within 100 years of J2000.

####radec::getHA($timestamp)

Gets the current hour angle - the current angle of the observers location relative to the celestial sphere.

####radec::getALT($timestamp)

Returns the altitude of the specificed target at this time at a location.

####radec::getAZ($timestamp)

Returns the azimuth of the specified target at this time at a location.

About

A PHP Right Ascension and Declination to Altitude and Azimuth for the users current Earth Position and time.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages