PHP code example of leonboot / ra-dec-to-alt-az
1. Go to this page and download the library: Download leonboot/ra-dec-to-alt-az library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
leonboot / ra-dec-to-alt-az example snippets
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);