Coder Social home page Coder Social logo

Notice: Undefined offset about jyotish HOT 21 OPEN

kunjara avatar kunjara commented on May 30, 2024
Notice: Undefined offset

from jyotish.

Comments (21)

krishnaguragain avatar krishnaguragain commented on May 30, 2024 2

@nitinmukesh I managed to run this. Let me know what kind of help do you need at krishnaguragain @ outlook.com

from jyotish.

jscuba avatar jscuba commented on May 30, 2024 2

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.

from jyotish.

jscuba avatar jscuba commented on May 30, 2024 1

@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.

from jyotish.

jscuba avatar jscuba commented on May 30, 2024 1

@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.

from jyotish.

qwertynik avatar qwertynik commented on May 30, 2024

Did you manage to resolve this @nitinmukesh?

from jyotish.

nitinmukesh avatar nitinmukesh commented on May 30, 2024

@qwertynik Nope

from jyotish.

qwertynik avatar qwertynik commented on May 30, 2024

@nitinmukesh Notices and warnings can be ignored. Ideally they should be addressed.

from jyotish.

nitinmukesh avatar nitinmukesh commented on May 30, 2024

@qwertynik Did you managed to run it

from jyotish.

qwertynik avatar qwertynik commented on May 30, 2024

Yes @nitinmukesh
Adding below line at the end of the code sample you posted should help.
print_r($data->getData());

from jyotish.

nitinmukesh avatar nitinmukesh commented on May 30, 2024

@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.

from jyotish.

qwertynik avatar qwertynik commented on May 30, 2024

@krishnaguragain

Did you manage to calculate the Nakshatras using this library?

from jyotish.

nitinmukesh avatar nitinmukesh commented on May 30, 2024

@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/

from jyotish.

nitinmukesh avatar nitinmukesh commented on May 30, 2024

@krishnaguragain I managed to run it and see the output. Thank you.

from jyotish.

jantech avatar jantech commented on May 30, 2024

@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.

from jyotish.

nitinmukesh avatar nitinmukesh commented on May 30, 2024

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()

from jyotish.

nitinmukesh avatar nitinmukesh commented on May 30, 2024

@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

from jyotish.

nitinmukesh avatar nitinmukesh commented on May 30, 2024

@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

from jyotish.

nitinmukesh avatar nitinmukesh commented on May 30, 2024

@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

}

`

from jyotish.

nitinmukesh avatar nitinmukesh commented on May 30, 2024

@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

from jyotish.

nitinmukesh avatar nitinmukesh commented on May 30, 2024

@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.

from jyotish.

jscuba avatar jscuba commented on May 30, 2024

@nitinmukesh No, sorry. I hadn't heard of it until you mentioned it.

from jyotish.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.