Example #1
0
 private static function setupDasha()
 {
     if (!isset(self::$_vimshottariYears)) {
         self::$_vimshottariYears = array();
         self::$_vimshottariYears['Ketu'] = 7;
         self::$_vimshottariYears['Venus'] = 20;
         self::$_vimshottariYears['Sun'] = 6;
         self::$_vimshottariYears['Moon'] = 10;
         self::$_vimshottariYears['Mars'] = 7;
         self::$_vimshottariYears['Rahu'] = 18;
         self::$_vimshottariYears['Jupiter'] = 16;
         self::$_vimshottariYears['Saturn'] = 19;
         self::$_vimshottariYears['Mercury'] = 17;
         self::$_vimshottariYears = self::$_vimshottariYears;
     }
     if (!isset(self::$_dashaSequence)) {
         self::$_dashaSequence = array_keys(self::$_vimshottariYears);
     }
 }
<?php

require_once 'orbit.php';
require_once 'planet.php';
require_once 'transit.php';
require_once 'astroreport.php';
require_once 'AspectsGenerator.php';
require_once 'VimshottariDasha.php';
require_once 'functions.php';
$birth_data = array('timezone' => array('hours' => 5, 'min' => 30, 'direction' => 'E'), 'longitude' => array('degrees' => 75, 'min' => 49, 'direction' => 'E'), 'latitude' => array('degrees' => 26, 'min' => 55, 'direction' => 'N'), 'month' => 7, 'day' => 7, 'year' => 1986, 'hour' => 8, 'min' => 53, 'report_name' => 'Arpit Tambi', 'city' => 'Jaipur', 'country' => 'IN', 'am_pm' => 'am', 'has_all_info' => true);
$aa = new AstroReport($birth_data);
$birthTS = getBirthTS($birth_data);
$houses = $aa->getHouses();
$planets = $aa->getPlanets();
$dasha = new VimshottariDasha($planets['Moon']['fulldegree'], $birthTS);
$pratayantarDashaLord = $dasha->getDashaLord(time(), 3);
var_dump($pratayantarDashaLord);
 private function executeRuleOne($time, $time_planets)
 {
     $birthdata = $this->_birth_data;
     $bithDataTS = mktime($this->_birth_data['hour'], $this->_birth_data['min'], 0, $this->_birth_data['month'], $this->_birth_data['day'], $this->_birth_data['year']);
     $moonFullDegree = $this->_birth_planets['Moon'][MarriageGuru::FULLDEGREE_STRING];
     $dashaGuru = new VimshottariDasha($moonFullDegree, $bithDataTS);
     $MDL = $dashaGuru->getDashaLord($time, 1);
     $ADL = $dashaGuru->getDashaLord($time, 2);
     print "\n MDL is {$MDL}";
     print "\n ADL is {$ADL}";
     $ll = $this->_lagna_lord;
     $sl = $this->_seventh_lord;
     print "\n lagna lord is {$ll} ";
     print "\n 7th lord is {$sl} ";
     $MDL_position = $time_planets[$MDL][MarriageGuru::FULLDEGREE_STRING];
     $MDL_sign = $time_planets[$MDL][MarriageGuru::SIGN_STRING];
     $ADL_position = $time_planets[$ADL][MarriageGuru::FULLDEGREE_STRING];
     $ADL_sign = $time_planets[$ADL][MarriageGuru::SIGN_STRING];
     foreach ($this->_birth_houses as $house => $data) {
         if (strcmp($data[MarriageGuru::SIGN_STRING], $MDL_sign) == 0) {
             $MDL_house = $house;
         }
         if (strcmp($data[MarriageGuru::SIGN_STRING], $ADL_sign) == 0) {
             $ADL_house = $house;
         }
     }
     //	var_dump($this->_navamsh_houses);
     foreach ($this->_navamsh_houses as $house => $data) {
         if (strcmp($data[MarriageGuru::SIGN_STRING], $MDL_sign) == 0) {
             $MDL_nhouse = $house;
         }
         if (strcmp($data[MarriageGuru::SIGN_STRING], $ADL_sign) == 0) {
             $ADL_nhouse = $house;
         }
     }
     $lagna_lord_position = $this->_birth_planets[$this->_lagna_lord][MarriageGuru::FULLDEGREE_STRING];
     $seventh_lord_position = $this->_birth_planets[$this->_seventh_lord][MarriageGuru::FULLDEGREE_STRING];
     //	var_dump($this->_navamsh_planets[$this->_navamsh_lagna_lord]);
     //	var_dump($this->_navamsh_planets[$this->_navamsh_seventh_lord]);
     $navamsh_lagna_lord_position = $this->_navamsh_planets[$this->_navamsh_lagna_lord][MarriageGuru::FULLDEGREE_STRING];
     $navamsh_seventh_lord_position = $this->_navamsh_planets[$this->_navamsh_seventh_lord][MarriageGuru::FULLDEGREE_STRING];
     $res1 = 0;
     $res2 = 0;
     if (strcmp($MDL, 'Sun') == 0 || strcmp($MDL, 'Moon') == 0) {
         $res1 = 1;
     }
     if (strcmp($ADL, 'Sun') == 0 || strcmp($ADL, 'Moon') == 0) {
         $res1 = 1;
     }
     if ($MDL_house == 1 || $MDL_house == 7) {
         print "mdl house in 1 or 7 ";
         $res1 = 1;
     } elseif (strcmp($MDL, $this->_lagna_lord) == 0 || strcmp($MDL, $this->_seventh_lord) == 0) {
         print "mdl is ll or 7l";
         $res1 = 1;
     } elseif ($this->find_house_aspect($MDL, $MDL_house, 1) == 1 || $this->find_house_aspect($MDL, $MDL_house, 7) == 1) {
         print "mdl aspects with 1h or 7h";
         $res1 = 1;
     } elseif ($this->find_aspect($MDL, $MDL_position, $lagna_lord_position) == 1 || $this->find_aspect($MDL, $MDL_position, $seventh_lord_position) == 1) {
         print "mdl aspects with ll or 7l";
         $res1 = 1;
     } elseif ($MDL_nhouse == 1 || $MDL_nhouse == 7) {
         print "mdl house in 1 or 7 in d9";
         $res1 = 1;
     } elseif (strcmp($MDL, $this->_navamsh_lagna_lord) == 0 || strcmp($MDL, $this->_navamsh_seventh_lord) == 0) {
         print "mhl is ll or 7l in d9";
         $res1 = 1;
     } elseif ($this->find_house_aspect($MDL, $MDL_nhouse, 1) == 1 || $this->find_house_aspect($MDL, $MDL_nhouse, 7) == 1) {
         print "mdl aspects with 1h or 7h in d9";
         $res1 = 1;
     } elseif ($this->find_aspect($MDL, $MDL_position, $navamsh_lagna_lord_position) == 1 || $this->find_aspect($MDL, $MDL_position, $navamsh_seventh_lord_position) == 1) {
         print "mdl aspects with ll or 7l in d9";
         $res1 = 1;
     }
     if ($ADL_house == 1 || $ADL_house == 7) {
         print "adl house in 1 or 7 ";
         $res2 = 1;
     } elseif (strcmp($ADL, $this->_lagna_lord) == 0 || strcmp($ADL, $this->_seventh_lord) == 0) {
         print "adl is ll or 7l";
         $res2 = 1;
     } elseif ($this->find_house_aspect($ADL, $ADL_house, 1) == 1 || $this->find_house_aspect($ADL, $ADL_house, 7) == 1) {
         print "adl aspects with 1h or 7h";
         $res2 = 1;
     } elseif ($this->find_aspect($ADL, $ADL_position, $lagna_lord_position) == 1 || $this->find_aspect($ADL, $ADL_position, $seventh_lord_position) == 1) {
         print "adl aspects with ll or 7l";
         $res2 = 1;
     } elseif ($ADL_nhouse == 1 || $ADL_nhouse == 7) {
         print "adl house in 1 or 7 in d9";
         $res2 = 1;
     } elseif (strcmp($ADL, $this->_navamsh_lagna_lord) == 0 || strcmp($ADL, $this->_navamsh_seventh_lord) == 0) {
         print "adl is ll or 7l in d9";
         $res2 = 1;
     } elseif ($this->find_house_aspect($ADL, $ADL_nhouse, 1) == 1 || $this->find_house_aspect($ADL, $ADL_nhouse, 7) == 1) {
         print "adl aspects with 1h or 7h in d9";
         $res2 = 1;
     } elseif ($this->find_aspect($ADL, $ADL_position, $navamsh_lagna_lord_position) == 1 || $this->find_aspect($ADL, $ADL_position, $navamsh_seventh_lord_position) == 1) {
         print "adl aspects with ll or 7l in d9";
         $res2 = 1;
     }
     if ($res1 == 1) {
         print "proper position for MDL ";
     }
     if ($res2 == 1) {
         print "proper position for ADL ";
     }
     if ($res1 == 1 && $res2 == 1) {
         return 1;
     } else {
         return 0;
     }
 }