Example #1
0
 /**
  * Get aspect by grahas.
  * 
  * @param null|array $options Options to set (optional)
  * @return array
  */
 public function isAspectedByGraha($options = null)
 {
     foreach (Graha::$graha as $key => $name) {
         $Graha = Graha::getInstance($key, $options);
         $grahaDrishti = $Graha->grahaDrishti;
         $distanse = Math::distanceInCycle($this->getEnvironment()['graha'][$key]['rashi'], $this->objectRashi);
         if ($key == $this->objectKey || !isset($grahaDrishti[$distanse])) {
             $isAspected[$key] = null;
         } else {
             $isAspected[$key] = $grahaDrishti[$distanse];
         }
     }
     return $isAspected;
 }
Example #2
0
 /**
  * Get kala hora.
  * 
  * @return array
  */
 public function getHoraKala()
 {
     $DateTime = $this->Data->getDateTime();
     $hours = (int) $DateTime->format('G');
     $horaNumber = Math::distanceInCycle(6, $hours, 24);
     $weekNumber = $DateTime->format('w');
     $intervalHora = 3600;
     $intervalStart = (int) $DateTime->format('i') * 60 + (int) $DateTime->format('s');
     $intervalEnd = $intervalHora - $intervalStart;
     if ($hours >= 6) {
         $varaNumber = $weekNumber;
     } else {
         $varaNumber = $weekNumber != 0 ? $weekNumber - 1 : 6;
     }
     $varaKey = array_keys(Vara::$vara)[$varaNumber];
     $hora = ['number' => $horaNumber, 'key' => self::getLord($horaNumber, $varaKey), 'interval' => $intervalHora, 'left' => fmod($intervalStart, $intervalHora) * 100 / $intervalHora, 'type' => self::TYPE_KALA, 'end' => $DateTime->modify("+{$intervalEnd} seconds")->format(Time::FORMAT_DATETIME)];
     return $hora;
 }
Example #3
0
 /**
  * From atmakaraka, the planets placed in kendras get 60 units each and planets 
  * placed in panapharas get 40 units each and planets placed in apoklimas get 
  * 20 points each.
  * 
  * @return array
  */
 protected function balaKendradi()
 {
     foreach ($this->balaGraha as $key => $name) {
         $distance = Math::distanceInCycle($this->getData()['graha'][$this->atmaKaraka]['rashi'], $this->getData()['graha'][$key]['rashi']);
         if (in_array($distance, Bhava::$bhavaKendra)) {
             $bala[$key] = 60;
         } elseif (in_array($distance, Bhava::$bhavaPanaphara)) {
             $bala[$key] = 40;
         } else {
             $bala[$key] = 20;
         }
     }
     return $bala;
 }
Example #4
0
 /**
  * Get tatkalika (temporary) relations.
  * 
  * @return array
  * @see Maharishi Parashara. Brihat Parashara Hora Shastra. Chapter 3, Verse 56.
  */
 public function getTempRelation()
 {
     $relation = [];
     $friendsRashi = [2, 3, 4, 10, 11, 12];
     foreach ($this->getEnvironment()['graha'] as $key => $data) {
         if ($this->objectKey == $key) {
             continue;
         }
         $distance = Math::distanceInCycle($this->objectRashi, $data['rashi']);
         $relation[$key] = in_array($distance, $friendsRashi) ? 1 : -1;
     }
     return $relation;
 }