kunjara / jyotish

PHP library for calculations in Vedic astrology
http://jyotish.su
175 stars 118 forks source link

Undefined array key "graha" #32

Open tufkan1 opened 2 years ago

tufkan1 commented 2 years ago

`$Locality = new Locality([

    'longitude' => "11.09",

    'latitude' => "79.6",

    'altitude' => 0,

]);

$DateTime = new DateTime();

$DateTime->setTimezone(new DateTimeZone('Europe/Istanbul'));

$DateTime->setDate(1999,4,3);

$DateTime->setTime(5,45);

$Ganita = new Swetest(["swetest" => $_SERVER["DOCUMENT_ROOT"]."/../vendor/kunjara/swetest/win/"]);

$data = new Data($DateTime, $Locality,$Ganita);

$data->calcParams();`

the last line works externally. I get the error Undefined array key "graha" in the last line.

vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php : 251 $longitudeKe = Math::oppositeValue($dataParams['graha'][Graha::KEY_RA]['longitude'], 360);

nitinmukesh commented 2 years ago

Working fine for me in windows

Check JSON data https://pastebin.com/DcsFcugM

Check here (You can mouse over or click on grahas) https://adorable-daffodil-7bc3b0.netlify.app/

tufkan1 commented 2 years ago

I'm running it on cPanel, what do I need to do with the json? It's a shame there is no documentation

nitinmukesh commented 2 years ago

Look here https://github.com/jscuba/jyotish-lambda

tufkan1 commented 2 years ago

im using laravel

nitinmukesh commented 2 years ago

I don't know much about PHP, i am just developing on local