Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using It #1

Open
krishnaguragain opened this issue Jan 2, 2015 · 88 comments
Open

Using It #1

krishnaguragain opened this issue Jan 2, 2015 · 88 comments
Labels

Comments

@krishnaguragain
Copy link

How to use this library ??

@rajeev-k-tomy
Copy link

I am also planning to use it.. I just want to know whether this repo is ready for using in production environment !!

@kunjara
Copy link
Owner

kunjara commented Jun 28, 2015

Documentation coming soon.

@vtoms
Copy link

vtoms commented Jul 19, 2015

jyotish.su looks great!! I am very much looking forward to the documentation to use for Panchanga and natal charts. I have been trying to make the swetest.exe work but it always ends up with the wrong output.

@klodha
Copy link

klodha commented Nov 10, 2015

Is it possible to get hindu month name for current tithi using this api?

@mahen3d
Copy link

mahen3d commented Apr 20, 2016

is it possible to add the matching capability to this ? plus ability to change the charkra to East indian style will be great.

@kunjara
Copy link
Owner

kunjara commented Apr 22, 2016

is it possible to add the matching capability to this? plus ability to change the charkra to East indian style will be great.

You can choose one of three styles: East, North or South

@sathishnagarajan01
Copy link

This is great library, i know little bit about astrology, i got your library which is ganita and base is the core for passing the arguments of date, time, timezone, etc... , eventhough some confusion occurs, so we all waiting for your documentation, Thank you for this great work.

@kunjara
Copy link
Owner

kunjara commented Feb 4, 2017

Documentation will be after library should be released stable.

@Kalianey
Copy link

What is the main function to call to get a chart calculation? Like on your demo website, which function are you calling with the button Calculate -> Chakra (Chart)? Some pointers would be great :)

@rohithdiya
Copy link

Hi, how do i use your library to calculate Rasi of a person based on his date of birth, time of birth and place of birth ?

@rahulyhg
Copy link

rahulyhg commented Jun 19, 2017

any documentation?

@nagarajan010
Copy link

nagarajan010 commented Sep 4, 2017

Hi,
I think I have managed to find how to use the library, below is the process i have used to generate birth chart data

  1. Download the library from github
  2. you need composer to install additional required libraries
  3. go to the downloaded directory, where you can see a composer.json file
  4. run composer install in the directory
  5. After it's finished, create a new index.php file in that directory, add the following code in it
require './vendor/autoload.php';

use Jyotish\Base\Data;
use Jyotish\Base\Locality;
use Jyotish\Base\Analysis;
use Jyotish\Ganita\Method\Swetest;
use Jyotish\Dasha\Dasha;
$Locality = new Locality([
            'longitude' => "11.09",
            'latitude' => "79.6",
            'altitude' => 0,
            ]);
$DateTime = new DateTime();
$DateTime->setTimezone(new DateTimeZone('Asia/Kolkata'));
$DateTime->setDate(2017,09,26);
$DateTime->setTime(19,18);
$Ganita = new Swetest(["swetest" => "./vendor/kunjara/swetest/win/"]);
// for linux
// run sudo apt install libswe-dev
// after that use 
// $Ganita = new Swetest(["swetest" => "/usr/bin/"]);
$data = new Data($DateTime, $Locality, $Ganita);
// To Calculate Panchangam
$data->calcParams();
$data->calcRising();
$data->calcPanchanga();
// To calculate Upagraha
$data->calcUpagraha();
// To calculate Birth chart Divisions
$data->calcVargaData(["D1","D2","D3","D4","D7","D9","D10","D12",
"D16","D20","D24","D27","D30","D40","D45","D60"]);

you will get the degrees of planets with correct lagna

Update: Thanks to @mattchambers for pointing out the error in timezone setting

Update: Thanks to @eaglehawkstudio fixed an error in swetest path for windows

@mattchambers
Copy link

mattchambers commented Sep 27, 2017

@nagarajan010

You're example works great but when I used it, the data returned from the library was inaccurate. I realized it was due to the timezone being stated after the date and time for the DateTime object.

Here's what I did and everything works like a charm using your example.

Thank you

$DateTime = new DateTime();
$DateTime->setTimezone(new DateTimeZone('America/New_York'));
$DateTime->setDate(2017,09,26);
$DateTime->setTime(19,18);

@nagarajan010
Copy link

@mattchambers

Thank you, by using your example am able to get accurate data and I have updated the code in my above post

@Kalianey
Copy link

Kalianey commented Sep 27, 2017

With this code I get a lot of notices (like 50) and the data is incomplete:
Notice: Undefined index: Sy in /Applications/XAMPP/xamppfiles/htdocs/jyotish-master/src/Graha/Upagraha.php on line 76 Notice: Undefined offset: 2 in /Applications/XAMPP/xamppfiles/htdocs/jyotish-master/src/Ganita/Method/Swetest.php on line 283 Notice: Undefined index: graha in /Applications/XAMPP/xamppfiles/htdocs/jyotish-master/src/Ganita/Method/Swetest.php on line 251 etc... Any idea why?

@nagarajan010
Copy link

nagarajan010 commented Sep 27, 2017

@Kalianey
i think as you are in mac you need to find a mac version of Swetest and replace in that folder

@mattchambers
Copy link

@Kalianey

what OS are you developing in and plan to deploy in?

@eaglehawkstudio
Copy link

Thank you for the instructions above Having the same issue as @Kalianey - On Mac OSX locally and Linux remotely. Any luck finding a mac version of Swetest?

@nagarajan010
Copy link

@eaglehawkstudio I have not been able to find any solution to make it work in mac, my suggestion is to use a Linux or Windows machine to develop

@eaglehawkstudio
Copy link

Thank you @nagarajan010 - Now have it working beautifully on Windows. A couple of notes:

  • Mac users - To test locally, I'm utilizing Parallels Desktop (https://www.parallels.com/products/desktop/).
  • When establishing the the path to define $Ganita - had to add a '.' before the first slash to get it working ($Ganita = new Swetest(["swetest" => "./vendor/kunjara/swetest/win/"]);).
  • To work remotely - had to employ a VPS running Windows so the swetest.exe file would execute (as opposed to a shared hosting solution)

@imviv3k
Copy link

imviv3k commented Mar 29, 2018

I just followed the above given steps but getting the following error.

Notice: Undefined variable: DateTime in C:\xampp\htdocs\astro1\jyotish\index.php on line 15

Fatal error: Call to a member function setTimezone() on null in C:\xampp\htdocs\astro1\jyotish\index.php on line 15

Please help! Thanks

@nagarajan010
Copy link

@imviv3k please add this like before you set the time zone
$DateTime = new DateTime();
The code has been corrected to include this line in the post above

@imviv3k
Copy link

imviv3k commented Mar 30, 2018

Hellow @nagarajan010
After setting that line of code i am getting the following output,
Notice: Undefined offset: 2 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 281

Notice: Undefined offset: 2 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 283

Notice: Undefined offset: 3 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 283

Notice: Undefined offset: 5 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 284

Notice: Undefined offset: 6 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 284

Notice: Undefined offset: 3 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 281

Notice: Undefined offset: 2 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 283

Notice: Undefined offset: 3 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 283

Notice: Undefined offset: 5 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 284

Notice: Undefined offset: 6 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 284

Notice: Undefined offset: 4 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 281

Notice: Undefined offset: 2 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 283

Notice: Undefined offset: 3 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 283

Notice: Undefined offset: 5 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 284

Notice: Undefined offset: 6 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 284

Notice: Undefined offset: 5 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 281

Notice: Undefined offset: 2 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 283

Notice: Undefined offset: 3 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 283

Notice: Undefined offset: 5 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 284

Notice: Undefined offset: 6 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 284

Warning: Division by zero in C:\xampp\htdocs\astro1\jyotish\src\Panchanga\AngaDefiner.php on line 267

and nothing is being displayed thereafter. I will be very much thankful for your kind help.

@rahulyhg
Copy link

@imviv3k
mail me details will guide you.

@nagarajan010
Copy link

@imviv3k
i think you have not configured the swetest well, you need to make sure there is a swetest.exe in folder
vendor\kunjara\swetest\win\

@imviv3k
Copy link

imviv3k commented Mar 30, 2018

thanks a lot for replying
first image shows the root folder where i have created index.php file. (code taken from above post)
but i can see swetest.exe file is there in vendor\kunjara\swetest\win\ folder.
1
2

@astrosanthosh
Copy link

changing swetest.exe to the folder where index.php is there will solve your problem.

@imviv3k
Copy link

imviv3k commented Mar 30, 2018

@astrosanthosh that did not help!

@govindarajan78
Copy link

Hi,
How to change the Ayanamsa to KP

Thanks,
Govind

@xxrocks
Copy link

xxrocks commented Dec 23, 2018

How to access public functions like getRahuKala() ?

@nanoakhi
Copy link

Hi,
I think I have managed to find how to use the library, below is the process i have used to generate birth chart data

  1. Download the library from github
  2. you need composer to install additional required libraries
  3. go to the downloaded directory, where you can see a composer.json file
  4. run composer install in the directory
  5. After it's finished, create a new index.php file in that directory, add the following code in it
require './vendor/autoload.php';

use Jyotish\Base\Data;
use Jyotish\Base\Locality;
use Jyotish\Base\Analysis;
use Jyotish\Ganita\Method\Swetest;
use Jyotish\Dasha\Dasha;
$Locality = new Locality([
            'longitude' => "11.09",
            'latitude' => "79.6",
            'altitude' => 0,
            ]);
$DateTime = new DateTime();
$DateTime->setTimezone(new DateTimeZone('Asia/Kolkata'));
$DateTime->setDate(2017,09,26);
$DateTime->setTime(19,18);
$Ganita = new Swetest(["swetest" => "./vendor/kunjara/swetest/win/"]);
// for linux
// run sudo apt install libswe-dev
// after that use 
// $Ganita = new Swetest(["swetest" => "/usr/bin/"]);
$data = new Data($DateTime, $Locality, $Ganita);
// To Calculate Panchangam
$data->calcParams();
$data->calcRising();
$data->calcPanchanga();
// To calculate Upagraha
$data->calcUpagraha();
// To calculate Birth chart Divisions
$data->calcVargaData(["D1","D2","D3","D4","D7","D9","D10","D12",
"D16","D20","D24","D27","D30","D40","D45","D60"]);

you will get the degrees of planets with correct lagna

Update: Thanks to @mattchambers for pointing out the error in timezone setting

Update: Thanks to @eaglehawkstudio fixed an error in swetest path for windows

May i know step by step process.I am unable to do where to start and where to put index.php
Kindly Help

@nanoakhi
Copy link

@nagarajan010
Yes, I copied the complete code as below

require './vendor/autoload.php';
// error_reporting(E_ALL);
// ini_set('display_errors', 1);
use Jyotish\Base\Data;
use Jyotish\Base\Locality;
use Jyotish\Base\Analysis;
use Jyotish\Ganita\Method\Swetest;
use Jyotish\Dasha\Dasha;
$Locality = new Locality([
'longitude' => "77.80",
'latitude' => "11.56",
'altitude' => 0,
]);

$DateTime = new DateTime();
$DateTime->setTimezone(new DateTimeZone('Asia/Kolkata'));
$DateTime->setDate(2000, 8, 27);
$DateTime->setTime(15,28);
// $Ganita = new Swetest(["swetest" => ""]);
// // for linux
// // run sudo apt install libswe-dev
// // after that use
$Ganita = new Swetest(["swetest" => "./vendor/kunjara/swetest/win/"]);
// For Linux
// $Ganita = new Swetest(["swetest" => "/usr/bin/"]);
$data = new Data($DateTime, $Locality, $Ganita);
// To Calculate Panchangam
$data->calcParams();
$data->calcRising();
$data->calcPanchanga();
// To calculate Upagraha
$data->calcUpagraha();

$data->calcDasha("vimshottari", null);
// $data->calcYoga(['mahapurusha','Dhana','RAJA']);
// $data->calcHora();
$data->calcExtraLagna();
// $data->calcBhavaArudha();
$Analysis = new Analysis($data);
$new = [
"data" => $data,
"Analysis" => $Analysis,
];

$dasha = $data->getData()['dasha']['vimshottari']['periods'];

?>

<title>Document</title> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> ### Panchanga * Thiti: getData()['panchanga']['tithi']['paksha'] . ' ' .$data->getData()['panchanga']['tithi']['name'] . ' ' .round($data->getData()['panchanga']['tithi']['left'], 2) . ' % left'; ?> * Nakshatra: getData()['panchanga']['nakshatra']['name']; ?> * Yoga: getData()['panchanga']['yoga']['name']; ?> * Vara: getData()['panchanga']['vara']['name']; ?> Lord: getData()['panchanga']['vara']['key']; ?> * Karana: getData()['panchanga']['karana']['name']; ?>
		<div class="col-md-4">
			<h5>D1 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($data->getData()['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($data->getData()['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D2 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D2")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D2")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D3 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D3")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D3")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D4 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D4")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D4")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D7 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D7")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D7")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D9 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D9")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D9")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D10 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D10")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D10")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D12 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D12")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D12")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D16 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D16")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D16")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D20 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D20")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D20")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D24 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D24")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D24")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D27 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D27")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D27")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D30 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D30")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D30")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D40 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D40")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D40")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D45 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D45")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D45")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D60 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D60")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D60")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h2 class="sub-heading-dasha">Vimshotri Maha Dasha</h2>
  <ul>
  	<?php foreach ($dasha as $key => $single): ?>
    <li  class="dasha"><?php echo $key ?> - <?php echo $single['start'] ?> - <?php echo $single['end'] ?>

        <ul class="antradasha">
            <?php foreach ($single['periods'] as $key => $one): ?>
            <h2 class="sub-heading-dasha">Antardasha</h2>
            <li><?php echo $key ?> - <?php echo $one['start'] ?> - <?php echo $one['end'] ?>

                <ul>
                    <h2 class="sub-heading-dasha">Pratyantardasha</h2>

            	<?php foreach ($one['periods'] as $key => $one): ?>
                    <li><?php echo $key ?> - <?php echo $one['start'] ?> - <?php echo $one['end'] ?></li>
  	<?php endforeach ?>
                </ul> 
            </li>

  	<?php endforeach ?>
        </ul> 
    </li>   
  	<?php endforeach ?>
</ul>
		</div>
	</div>
</div>

And the error which I am getting is :

image

Hi Can u help me how to use this project .I have Wamp instaled but when i accessing from www. Its nothing so anything.what is wrong

@chakracharyulu
Copy link

chakracharyulu commented Oct 21, 2019

when I was run window swisstest file getting error its showing splc_18.se is not found in the path. using Moshier eph.
how can I find out tithi, vara, nakshatra, yoga, Karna, start time and end time?
I was developed Android Panchang app but we have stopped at the point of Masa Calculations.
How can I calculate Masa, Adhika masa and Kshaya Masa?
do you know the calculations of masa, please provide any language code.

@krishnaguragain
Copy link
Author

@chakracharyulu Please go through this script. You can find here http://www.cc.kyoto-su.ac.jp/~yanom/sanskrit/pancanga/pancanga3.14

@arunwebber
Copy link

Hi,
I think I have managed to find how to use the library, below is the process i have used to generate birth chart data

  1. Download the library from github
  2. you need composer to install additional required libraries
  3. go to the downloaded directory, where you can see a composer.json file
  4. run composer install in the directory
  5. After it's finished, create a new index.php file in that directory, add the following code in it
require './vendor/autoload.php';

use Jyotish\Base\Data;
use Jyotish\Base\Locality;
use Jyotish\Base\Analysis;
use Jyotish\Ganita\Method\Swetest;
use Jyotish\Dasha\Dasha;
$Locality = new Locality([
            'longitude' => "11.09",
            'latitude' => "79.6",
            'altitude' => 0,
            ]);
$DateTime = new DateTime();
$DateTime->setTimezone(new DateTimeZone('Asia/Kolkata'));
$DateTime->setDate(2017,09,26);
$DateTime->setTime(19,18);
$Ganita = new Swetest(["swetest" => "./vendor/kunjara/swetest/win/"]);
// for linux
// run sudo apt install libswe-dev
// after that use 
// $Ganita = new Swetest(["swetest" => "/usr/bin/"]);
$data = new Data($DateTime, $Locality, $Ganita);
// To Calculate Panchangam
$data->calcParams();
$data->calcRising();
$data->calcPanchanga();
// To calculate Upagraha
$data->calcUpagraha();
// To calculate Birth chart Divisions
$data->calcVargaData(["D1","D2","D3","D4","D7","D9","D10","D12",
"D16","D20","D24","D27","D30","D40","D45","D60"]);

you will get the degrees of planets with correct lagna

Update: Thanks to @mattchambers for pointing out the error in timezone setting

Update: Thanks to @eaglehawkstudio fixed an error in swetest path for windows

This is not working on ubuntu as there is an exe file associatted with it

@arunwebber
Copy link

Hi,
I think I have managed to find how to use the library, below is the process i have used to generate birth chart data

  1. Download the library from github
  2. you need composer to install additional required libraries
  3. go to the downloaded directory, where you can see a composer.json file
  4. run composer install in the directory
  5. After it's finished, create a new index.php file in that directory, add the following code in it
require './vendor/autoload.php';

use Jyotish\Base\Data;
use Jyotish\Base\Locality;
use Jyotish\Base\Analysis;
use Jyotish\Ganita\Method\Swetest;
use Jyotish\Dasha\Dasha;
$Locality = new Locality([
            'longitude' => "11.09",
            'latitude' => "79.6",
            'altitude' => 0,
            ]);
$DateTime = new DateTime();
$DateTime->setTimezone(new DateTimeZone('Asia/Kolkata'));
$DateTime->setDate(2017,09,26);
$DateTime->setTime(19,18);
$Ganita = new Swetest(["swetest" => "./vendor/kunjara/swetest/win/"]);
// for linux
// run sudo apt install libswe-dev
// after that use 
// $Ganita = new Swetest(["swetest" => "/usr/bin/"]);
$data = new Data($DateTime, $Locality, $Ganita);
// To Calculate Panchangam
$data->calcParams();
$data->calcRising();
$data->calcPanchanga();
// To calculate Upagraha
$data->calcUpagraha();
// To calculate Birth chart Divisions
$data->calcVargaData(["D1","D2","D3","D4","D7","D9","D10","D12",
"D16","D20","D24","D27","D30","D40","D45","D60"]);

you will get the degrees of planets with correct lagna

Update: Thanks to @mattchambers for pointing out the error in timezone setting

Update: Thanks to @eaglehawkstudio fixed an error in swetest path for windows

I am getting the error invalid numeric litrals

@nagarajan010
Copy link

nagarajan010 commented Nov 18, 2019

Hi,
I think I have managed to find how to use the library, below is the process i have used to generate birth chart data

  1. Download the library from github
  2. you need composer to install additional required libraries
  3. go to the downloaded directory, where you can see a composer.json file
  4. run composer install in the directory
  5. After it's finished, create a new index.php file in that directory, add the following code in it
require './vendor/autoload.php';

use Jyotish\Base\Data;
use Jyotish\Base\Locality;
use Jyotish\Base\Analysis;
use Jyotish\Ganita\Method\Swetest;
use Jyotish\Dasha\Dasha;
$Locality = new Locality([
            'longitude' => "11.09",
            'latitude' => "79.6",
            'altitude' => 0,
            ]);
$DateTime = new DateTime();
$DateTime->setTimezone(new DateTimeZone('Asia/Kolkata'));
$DateTime->setDate(2017,09,26);
$DateTime->setTime(19,18);
$Ganita = new Swetest(["swetest" => "./vendor/kunjara/swetest/win/"]);
// for linux
// run sudo apt install libswe-dev
// after that use 
// $Ganita = new Swetest(["swetest" => "/usr/bin/"]);
$data = new Data($DateTime, $Locality, $Ganita);
// To Calculate Panchangam
$data->calcParams();
$data->calcRising();
$data->calcPanchanga();
// To calculate Upagraha
$data->calcUpagraha();
// To calculate Birth chart Divisions
$data->calcVargaData(["D1","D2","D3","D4","D7","D9","D10","D12",
"D16","D20","D24","D27","D30","D40","D45","D60"]);

you will get the degrees of planets with correct lagna

Update: Thanks to @mattchambers for pointing out the error in timezone setting

Update: Thanks to @eaglehawkstudio fixed an error in swetest path for windows

This is not working on ubuntu as there is an exe file associatted with it

for linux
run the below command in terminal and replace the path of swetest to the linux executable location then try using the code
sudo apt install libswe-dev

@nagarajan010
Copy link

when I was run window swisstest file getting error its showing splc_18.se is not found in the path. using Moshier eph.
how can I find out tithi, vara, nakshatra, yoga, Karna, start time and end time?
I was developed Android Panchang app but we have stopped at the point of Masa Calculations.
How can I calculate Masa, Adhika masa and Kshaya Masa?
do you know the calculations of masa, please provide any language code.

se

you can google and download the missing .se data files and add them

@dlinx
Copy link

dlinx commented Mar 9, 2020

What is D1 to D12?
I am refering to this => $data->calcVargaData(["D1","D2","D3","D4","D7","D9","D10","D12", "D16","D20","D24","D27","D30","D40","D45","D60"]);

@nanoakhi
Copy link

I have downloaded the clone and placed in my wamp directory then i installed composer
and created index.php with below code:

Whats wrong facing this issues last many days .Heartily gratitude if anyone assist me

"77.80", 'latitude' => "11.56", 'altitude' => 0, ]); $DateTime = new DateTime(); $DateTime->setTimezone(new DateTimeZone('Asia/Kolkata')); $DateTime->setDate(2000, 8, 27); $DateTime->setTime(15,28); // $Ganita = new Swetest(["swetest" => ""]); // // for linux // // run sudo apt install libswe-dev // // after that use $Ganita = new Swetest(["swetest" => "./vendor/kunjara/swetest/win/"]); // $Ganita = new Swetest(["swetest" => "/usr/bin/"]); $data = new Data($DateTime, $Locality, $Ganita); // To Calculate Panchangam $data->calcParams(); $data->calcRising(); $data->calcPanchanga(); // To calculate Upagraha $data->calcUpagraha(); $data->calcDasha("vimshottari", null); // $data->calcYoga(['mahapurusha','Dhana','RAJA']); // $data->calcHora(); $data->calcExtraLagna(); // $data->calcBhavaArudha(); $Analysis = new Analysis($data); $new = [ "data" => $data, "Analysis" => $Analysis, ]; $dasha = $data->getData()['dasha']['vimshottari']['periods']; ?> <title>Document</title> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

Panchanga

  • Thiti: getData()['panchanga']['tithi']['paksha'] . ' ' .$data->getData()['panchanga']['tithi']['name'] . ' ' .round($data->getData()['panchanga']['tithi']['left'], 2) . ' % left'; ?>
  • Nakshatra: getData()['panchanga']['nakshatra']['name']; ?>
  • Yoga: getData()['panchanga']['yoga']['name']; ?>
  • Vara: getData()['panchanga']['vara']['name']; ?> Lord: getData()['panchanga']['vara']['key']; ?>
  • Karana: getData()['panchanga']['karana']['name']; ?>
		<div class="col-md-4">
			<h5>D1 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($data->getData()['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($data->getData()['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D2 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D2")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D2")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D3 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D3")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D3")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D4 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D4")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D4")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D7 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D7")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D7")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D9 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D9")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D9")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D10 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D10")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D10")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D12 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D12")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D12")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D16 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D16")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D16")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D20 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D20")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D20")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D24 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D24")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D24")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D27 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D27")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D27")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D30 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D30")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D30")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D40 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D40")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D40")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D45 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D45")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D45")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h5>D60 Details</h5>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>Name</th>
						<th>Degree</th>
						<th>Sign</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($Analysis->getVargaData("D60")['lagna'] as $key => $lagna): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $lagna['longitude']; ?></td>
						<td><?php echo $lagna['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
					<?php foreach ($Analysis->getVargaData("D60")['graha'] as $key => $graha): ?>
					<tr>
						<td><?php echo $key; ?></td>
						<td><?php echo $graha['longitude']; ?></td>
						<td><?php echo $graha['rashi']; ?></td>
					</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
		<div class="col-md-4">
			<h2 class="sub-heading-dasha">Vimshotri Maha Dasha</h2>
  <ul>
  	<?php foreach ($dasha as $key => $single): ?>
    <li  class="dasha"><?php echo $key ?> - <?php echo $single['start'] ?> - <?php echo $single['end'] ?>

        <ul class="antradasha">
            <?php foreach ($single['periods'] as $key => $one): ?>
            <h2 class="sub-heading-dasha">Antardasha</h2>
            <li><?php echo $key ?> - <?php echo $one['start'] ?> - <?php echo $one['end'] ?>

                <ul>
                    <h2 class="sub-heading-dasha">Pratyantardasha</h2>

            	<?php foreach ($one['periods'] as $key => $one): ?>
                    <li><?php echo $key ?> - <?php echo $one['start'] ?> - <?php echo $one['end'] ?></li>
  	<?php endforeach ?>
                </ul> 
            </li>

  	<?php endforeach ?>
        </ul> 
    </li>   
  	<?php endforeach ?>
</ul>
		</div>
	</div>
</div>

Capture

@MonMohon
Copy link

MonMohon commented Apr 8, 2020

@nanoakhi
please add at top
`<?php

require './vendor/autoload.php';
use Jyotish\Base\Data;
use Jyotish\Base\Locality;
use Jyotish\Base\Analysis;
use Jyotish\Ganita\Method\Swetest;
use Jyotish\Dasha\Dasha;
$Locality = new Locality(['longitude' => "77.80", 'latitude' => "11.56", 'altitude' => 0, ]);
`

@chirag-chopra
Copy link

Hellow @nagarajan010
After setting that line of code i am getting the following output,
Notice: Undefined offset: 2 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 281

Notice: Undefined offset: 2 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 283

Notice: Undefined offset: 3 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 283

Notice: Undefined offset: 5 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 284

Notice: Undefined offset: 6 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 284

Notice: Undefined offset: 3 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 281

Notice: Undefined offset: 2 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 283

Notice: Undefined offset: 3 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 283

Notice: Undefined offset: 5 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 284

Notice: Undefined offset: 6 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 284

Notice: Undefined offset: 4 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 281

Notice: Undefined offset: 2 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 283

Notice: Undefined offset: 3 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 283

Notice: Undefined offset: 5 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 284

Notice: Undefined offset: 6 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 284

Notice: Undefined offset: 5 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 281

Notice: Undefined offset: 2 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 283

Notice: Undefined offset: 3 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 283

Notice: Undefined offset: 5 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 284

Notice: Undefined offset: 6 in C:\xampp\htdocs\astro1\jyotish\src\Ganita\Method\Swetest.php on line 284

Warning: Division by zero in C:\xampp\htdocs\astro1\jyotish\src\Panchanga\AngaDefiner.php on line 267

and nothing is being displayed thereafter. I will be very much thankful for your kind help.

I am getting same error....
please anyone help....

I just want vimshottari code...
PLEASE PLEASE HELP!

@purursharma
Copy link

The Natal/Divisional charts generated using these libraries differ from the one used in other (major) Indian apps/websites like astrosage etc. This is primarily arising owing to difference in degrees and lagna. Could any one please help us rectify the Charts generated ?

Here is one example :

Date of Birth : 26 June 2018 , Time of Birth : 16:48 , Place of birth : Bharatpur India

Natal Chart
Kunjara Kundali : Lagna is Virgo
Most other websites : Langa is Scorpio

The difference exists in all Divisional charts too.

Will request the developer of these libraries and other fellow developers to help us with the changes needed in the php code to rectify this.

Thanks !

I also agree that the data is not correct, if one use the script available in this threads. I am sure that the api provides the correct data, one must only be able to use it. Was anyone able to use the api correctly? Please support.

@krishnaguragain
Copy link
Author

Yeah, it works.

@purursharma
Copy link

purursharma commented Apr 28, 2021

Yeah, it works.

Could u pls help me with that, may be share a piece of correct code. I would be very thankful to you.

@jscuba
Copy link

jscuba commented Apr 28, 2021

The Natal/Divisional charts generated using these libraries differ from the one used in other (major) Indian apps/websites like astrosage etc. This is primarily arising owing to difference in degrees and lagna. Could any one please help us rectify the Charts generated ?
Here is one example :

Date of Birth : 26 June 2018 , Time of Birth : 16:48 , Place of birth : Bharatpur India

Natal Chart
Kunjara Kundali : Lagna is Virgo
Most other websites : Langa is Scorpio
The difference exists in all Divisional charts too.
Will request the developer of these libraries and other fellow developers to help us with the changes needed in the php code to rectify this.
Thanks !

I also agree that the data is not correct, if one use the script available in this threads. I am sure that the api provides the correct data, one must only be able to use it. Was anyone able to use the api correctly? Please support.

I think you need to give the library the local date/time for the locality of the chart you're pulling. You can use moment-timezone to adjust for timezone.

@purursharma
Copy link

purursharma commented Apr 28, 2021

I am using the local timezone using the script provided in thread. The Script works well, only the output of lagna and dashas is incorrect. Maybe some one who has a correct running script can support.

  • require './vendor/autoload.php';
  • //error_reporting(E_ALL);
  • // ini_set('display_errors', 1);
  • use Jyotish\Base\Data;
  • use Jyotish\Base\Locality;
  • use Jyotish\Base\Analysis;
  • use Jyotish\Ganita\Method\Swetest;
  • use Jyotish\Ganita\Time;
  • use Jyotish\Dasha\Dasha;
  • $Locality = new Locality([
  •         'longitude' => "77.21",
    
  •         'latitude' => "28.67",
    
  •         'altitude' => 0,
    
  •         ]);
    
  • $DateTime = new DateTime();
  • $DateTime->setTimezone(new DateTimeZone('Asia/Kolkata'));
  • $DateTime->setDate(1978,10,28);
  • $DateTime->setTime(07,30);
  • $Ganita = new Swetest(["swetest" => "/usr/bin/"]);
  • $data = new Data($DateTime, $Locality, $Ganita);
  • // To Calculate Panchangam
  • $data->calcParams();
  • $data->calcRising();
  • $data->calcPanchanga();
  • // To calculate Upagraha
  • $data->calcUpagraha();
  • $data->calcDasha("vimshottari", null);
  •   // $data->calcYoga(['mahapurusha','Dhana','RAJA']);
    
  •   // $data->calcHora();
    
  • $data->calcExtraLagna();
  • // $data->calcBhavaArudha();
  • $Analysis = new Analysis($data);
  •   $new = [
    
  •   	"data" => $data,
    
  •   	"Analysis" => $Analysis,
    
  •   ];
    
  • $dasha = $data->getData()['dasha']['vimshottari']['periods'];

@Abhirama108
Copy link

Hi, How to change the Ayanamsa to KP

Thanks, Govind

Change Ayanamsa like that:

$Ganita->setOptionAyanamsha('Raman');

@qwertynik
Copy link

@Abhirama108
Any ideas if this library support using tropical calculations for signs and sidereal for Nakshatras?

@jscuba
Copy link

jscuba commented Mar 18, 2022

This is a relatively simple way to get this library up and running on AWS Lambda. https://github.com/jscuba/jyotish-lambda

I posted this a few places in the issues. I thought I'd post it here in the "docs" too. I hope it helps.

@sushantdanekar
Copy link

THank you

@alex-webmaster
Copy link

Please help. I have Error.
Warning: Undefined array key "graha" in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 251

Warning: Trying to access array offset on value of type null in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 251

Warning: Trying to access array offset on value of type null in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 251

Warning: Undefined array key "graha" in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 252

Warning: Trying to access array offset on value of type null in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 252

Warning: Trying to access array offset on value of type null in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 252

Warning: Undefined array key "graha" in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 257

Warning: Trying to access array offset on value of type null in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 257

Warning: Trying to access array offset on value of type null in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 257

Warning: Undefined array key "graha" in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 258

Warning: Trying to access array offset on value of type null in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 258

Warning: Trying to access array offset on value of type null in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 258

Warning: Undefined array key "graha" in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 262

Warning: Trying to access array offset on value of type null in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 262

Warning: Trying to access array offset on value of type null in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 262

Warning: Undefined array key 2 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 282

Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 282

Warning: Undefined array key 2 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 284

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 284

Warning: Undefined array key 3 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 284

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 284

Warning: Undefined array key 5 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 285

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 285

Warning: Undefined array key 6 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 285

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 285

Warning: Undefined array key 3 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 282

Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 282

Warning: Undefined array key 2 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 284

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 284

Warning: Undefined array key 3 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 284

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 284

Warning: Undefined array key 5 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 285

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 285

Warning: Undefined array key 6 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 285

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 285

Warning: Undefined array key 4 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 282

Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 282

Warning: Undefined array key 2 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 284

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 284

Warning: Undefined array key 3 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 284

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 284

Warning: Undefined array key 5 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 285

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 285

Warning: Undefined array key 6 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 285

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 285

Warning: Undefined array key 5 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 282

Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 282

Warning: Undefined array key 2 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 284

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 284

Warning: Undefined array key 3 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 284

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 284

Warning: Undefined array key 5 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 285

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 285

Warning: Undefined array key 6 in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 285

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Ganita/Method/Swetest.php on line 285

Warning: Undefined array key "Ch" in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Panchanga/AngaDefiner.php on line 76

Warning: Trying to access array offset on value of type null in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Panchanga/AngaDefiner.php on line 76

Warning: Undefined array key "Sy" in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Panchanga/AngaDefiner.php on line 77

Warning: Trying to access array offset on value of type null in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Panchanga/AngaDefiner.php on line 77

Fatal error: Uncaught Jyotish\Panchanga\Exception\InvalidArgumentException: Tithi with the key '0' does not exist. in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Panchanga/Tithi/Tithi.php:171 Stack trace: #0 /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Panchanga/AngaDefiner.php(82): Jyotish\Panchanga\Tithi\Tithi::getInstance() #1 /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Panchanga/AngaDefiner.php(342): Jyotish\Panchanga\AngaDefiner->getTithi() #2 /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Base/Data.php(396): Jyotish\Panchanga\AngaDefiner->generateAnga() #3 /var/www/www-root/data/www/vptk.info/module/moon4.mod.php(37): Jyotish\Base\Data->calcPanchanga() #4 /var/www/www-root/data/www/vptk.info/core/router.php(109): include('...') #5 /var/www/www-root/data/www/vptk.info/index.php(6): include('...') #6 {main} thrown in /var/www/www-root/data/www/vptk.info/libs/vendor/kunjara/jyotish/src/Panchanga/Tithi/Tithi.php on line 171

@MonMohon
Copy link

yes, I can fix the error for that you need to pay me if you are agree then contact me on my email thanks. @alex-webmaster

@alex-webmaster
Copy link

The problem was that I used the code for Windows, but I have Linux

I commented line:

//$Ganita = new Swetest(["swetest" => BASEDIR.'libs/vendor/kunjara/swetest/win/']);

Run: sudo apt install libswe-dev

uncommented:

$Ganita = new Swetest(["swetest" => "/usr/bin/"]);

Now it works! ;)

@alex-webmaster
Copy link

alex-webmaster commented Sep 26, 2024

Is there any way to get a specific time instead of left?

[nakshatra] => Array
        (
            [anga] => nakshatra
            [key] => 27
            [ratio] => 1
            [abhijit] => 
            [left] => 22.01782575
            [name] => Revati
            [pada] => 4
        )

@MonMohon
Copy link

i tried every possibilities but no results sorry @alex-webmaster

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests