Open nitinmukesh opened 3 years ago
Did you manage to resolve this @nitinmukesh?
@qwertynik Nope
@nitinmukesh Notices and warnings can be ignored. Ideally they should be addressed.
@qwertynik Did you managed to run it
Yes @nitinmukesh
Adding below line at the end of the code sample you posted should help.
print_r($data->getData());
@qwertynik Thank you. I actually deleted this as I don't know PHP and could not solve the issue.
I am gonna try again. Thinking of converting this to nodejs and create public API for everyone to use. Not sure how much time I will get to learn PHP.
@nitinmukesh I managed to run this. Let me know what kind of help do you need at krishnaguragain @ outlook.com
@krishnaguragain
Did you manage to calculate the Nakshatras using this library?
@qwertynik Nikhil I am also looking to calculate Nakshatras for each planet. I see there is a lot of code related to the same but not exposed in output.
I see this site is using the same code and shows Nakshatras. https://sidereal.live/
@krishnaguragain I managed to run it and see the output. Thank you.
@qwertynik Nikhil I am also looking to calculate Nakshatras for each planet. I see there is a lot of code related to the same but not exposed in output.
I see this site is using the same code and shows Nakshatras. https://sidereal.live/
@nitinmukesh , Could you please share the details how to resolve the issues? Thanks.
This is a relatively simple way to get this library up and running on AWS Lambda. https://github.com/jscuba/jyotish-lambda
I'll post this to a few of the issues. It might be helpful as a reference too.
I had to sort of manually pull the nakshatras. I'm not much of a PHP programmer as you can probably tell.
Thank you @jscuba . https://github.com/jscuba/jyotish-lambda/blob/main/index.php
Any possibility to add Combust and Retro against each planet.
It's there in GrahaEnvironment.php
public function isAstangata()
@jantech
Install XAMPP with PHP 7 Download the code from here and put in xampp/htdocs folder https://github.com/jscuba/jyotish
install dependencies using composer
@nitinmukesh You can check the speed of the planet to see if it's retrograde. Negative value indicates retrograde. I added combustion. I also saw getRashiAvastha() there, so I added the dignity as well.
@jscuba
I see the isAstangata is not working correctly. Sun at 12 and Moon at 19 degree is showing as non combust which is incorrect. I found the issue is in public function isAstangata() { if (in_array($this->optionBhagaAstangata, [Biblio::BOOK_SS, Biblio::BOOK_BJ])) {
It is always picking default value as 6 whereas it should pick values from Graha.php public static $bhagaAstangata = [
I am not sure how to fix it. Please could you help with this issue
@jscuba
I added additional information in the code provided by you. Please update in your code
` $nakshatra = null; foreach ($vargaData['graha'] as $grahaKey => $value) { $nakshatra = $angaDefiner->getNakshatra(false, false, $grahaKey); $vargaData['graha'][$grahaKey]['nakshatra'] = $nakshatra; $Graha = Graha::getInstance($grahaKey)->setEnvironment($data); $vargaData['graha'][$grahaKey]['astangata'] = $Graha->isAstangata(); // combustion $vargaData['graha'][$grahaKey]['rashiAvastha'] = $Graha->getRashiAvastha(); // dignity $vargaData['graha'][$grahaKey]['gocharastha'] = $Graha->isGocharastha(); // gocharastha $vargaData['graha'][$grahaKey]['bhavaCharacter'] = $Graha->getBhavaCharacter(); // Bhava Character $vargaData['graha'][$grahaKey]['tempRelation'] = $Graha->getTempRelation(); // Get tatkalika (temporary) relations $vargaData['graha'][$grahaKey]['relation'] = $Graha->getRelation(); // Get summary relations $vargaData['graha'][$grahaKey]['vargottama'] = $Graha->isVargottama(); // Vargottama $vargaData['graha'][$grahaKey]['yogakaraka'] = $Graha->isYogakaraka(); // yogakaraka $vargaData['graha'][$grahaKey]['mrityu'] = $Graha->isMrityu(); // graha is in mrityu bhaga $vargaData['graha'][$grahaKey]['pushkaraNavamsha'] = $Graha->isPushkara(Graha::PUSHKARA_NAVAMSHA); // graha is in pushkara navamsha $vargaData['graha'][$grahaKey]['pushkaraBhaga'] = $Graha->isPushkara(Graha::PUSHKARA_BHAGA); // graha is in pushkara bhaga $vargaData['graha'][$grahaKey]['yuddha'] = $Graha->isYuddha(); // graha is in planetary war $vargaData['graha'][$grahaKey]['avastha'] = $Graha->getAvastha(); // Get avastha of graha $vargaData['graha'][$grahaKey]['dispositor'] = $Graha->getDispositor(); // Get ruler of the bhava, where graha is positioned
}
`
@nitinmukesh I ended up writing my own combustion calculation. This is some javascript to give you an idea.
const sunDegree = vargaData.graha.Sy.rashi * 30.0 + vargaData.graha.Sy.degree
// and then for each planet...
let dist = Math.abs(sunDegree - (data.rashi * 30.0 + data.degree))
dist = Math.min(dist, 360 - dist)
switch (data.graha) {
case 'Sy':
break
case 'Ch':
if (dist < 12) {
data.combust = true
}
break
case 'Ma':
if (dist < 17) {
data.combust = true
}
break
case 'Bu':
if (data.speed >= 0) {
if (dist < 14) {
data.combust = true
}
} else if (dist < 12) {
data.combust = true
}
break
case 'Gu':
if (dist < 11) {
data.combust = true
}
break
case 'Sk':
if (data.speed >= 0) {
if (dist < 10) {
data.combust = true
}
} else if (dist < 8) {
data.combust = true
}
break
case 'Sa':
if (dist < 15) {
data.combust = true
}
break
case 'Ra':
break
case 'Ke':
break
default:
break
}
Thanks for the additional info for jyotish-lambda. I'll add it.
@jscuba Thank you m8.
Have a look at this.
You can mouse over graha in D1 https://golden-longma-0a62a5.netlify.app/nits.html
Only desktop friendly
@jscuba
Do you have any understanding how to prepare Bhava Chalit. I have seen several videos and read articles but can't gather my thoughts on how to implement (coding). May be I am old enough to get this through my head.
@nitinmukesh No, sorry. I hadn't heard of it until you mentioned it.
I was able to setup the code and run index.php using XAMPP using PHP 5.6 version.
index.php
I am however getting the following errors and no idea what is wrong. I also checked "vendor\kunjara\swetest\win" for swetest.exe and it is present. Please any help on solving the issue