2017 © Pedro Peláez
 

library ra-dec-to-alt-az

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

image

leonboot/ra-dec-to-alt-az

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

  • Tuesday, August 2, 2016
  • by leonboot
  • Repository
  • 2 Watchers
  • 1 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

RA/Dec to Alt/Az PHP Class

This repository is a fork of Tom Gillespy's RA/Dec to Alt/Az repository, with the sole purpose of making the class composer installable. Some code refactoring was done, most importantly the class has been put into its own namespace., (*1)

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

Installation

composer install leonboot/ra-dec-to-alt-az

Usage

require 'vendor/autoload.php';

use Radec\Calculator as radec;

$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\Calculator::daysbeforeJ2000($timestamp)

This gives the number of days between $timestamp and the J2000 epoch. Wikipedia Article, (*3)

Radec\Calculator::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)., (*4)

Radec\Calculator::fractionalday($timestamp)

This just divides the UT by 24 to get the fraction of a day., (*5)

Radec\Calculator::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., (*6)

Radec\Calculator::getHA($timestamp)

Gets the current hour angle - the current angle of the observers location relative to the celestial sphere., (*7)

Radec\Calculator::getALT($timestamp)

Returns the altitude of the specificed target at this time at a location., (*8)

Radec\Calculator::getAZ($timestamp)

Returns the azimuth of the specified target at this time at a location., (*9)

The Versions

02/08 2016

dev-master

9999999-dev

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

  Sources   Download

by Tom Gillespy

02/08 2016

v0.1.1

0.1.1.0

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

  Sources   Download

by Tom Gillespy

25/07 2016

0.1

0.1.0.0

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

  Sources   Download