Elxis CMS Forum

Support => General => Topic started by: spyrou on April 04, 2011, 19:13:07

Title: Zenith Value
Post by: spyrou on April 04, 2011, 19:13:07
I have met at least 2 elxis modules (event calendar & greek calendar) with the parameter "Zenith" below "Latitude" and "Longitude" and I must input a value for my location in it. Does anyone knowing where can I find this value for my location. I have searched the internet via google unsuccessfully. Any help???
Title: Re: Zenith Value
Post by: datahell on April 04, 2011, 20:04:10
On google maps: http://maps.google.com (http://maps.google.com)
Locate the exact spot you are interested in and copy the link google provides you for that spot. There is an "ll" parameter, this is the latidute and longtitude.
Title: Re: Zenith Value
Post by: webgift on April 04, 2011, 20:11:28
For example Rhodes :
http://maps.google.com/maps?f=d&source=s_d&saddr=36.16227,27.976685&daddr=&hl=en&geocode=&mra=dme&mrsp=0&sz=11&sll=36.335041,28.119507&sspn=0.430893,0.891953&ie=UTF8&z=11

Has a parameter named 'sll'. sll=36.335041,28.119507. Do you mean that parameters John ?
Title: Re: Zenith Value
Post by: spyrou on April 04, 2011, 20:34:39
Take a look at the image attachment. Module ask me to "Set a zenith value for my location", I have already setting Latitude and Longitude for my location "Rhodes".  ???

[attachment deleted by admin]
Title: Re: Zenith Value
Post by: spyrou on April 04, 2011, 20:58:16
Stavro maybe the last parameter "z=11" in the link that you have send me is the "zenith" value for my location. I will try it... Thank you all guys!!!
Title: Re: Zenith Value
Post by: datahell on April 04, 2011, 21:07:40
I guess it asks for zenith value in order to calculate the sun's sunrize and sunset times. You can contact the author of the module (user nikos) to tell you the right value for Greece.

Edit: z=11 is wrong. This is the map's zoom level! it seems zenith is about 90 + 50/60 (degrees) = 90.58333.
I calculated the sunrise time for Athens with this value and the result is correct, so this must be the zenith.

Calculate sun's sunrise and sunset times for Athens, Greece:
Code: [Select]
$ts = time();
$z = 90.58333; //or $z = ini_get("date.sunrise_zenith");
$lat = 37.979116;
$lon = 23.717766;
$time1 = date_sunrise($ts, SUNFUNCS_RET_STRING, $lat, $lon, $z, 3);
$time2 = date_sunset($ts, SUNFUNCS_RET_STRING, $lat, $lon, $z, 3);

Result for April 04 2011: 07:05 and 19:50 (correct!)
Title: Re: Zenith Value
Post by: spyrou on April 04, 2011, 22:00:10
Thank you very match datahell !!! I will find it, for my location Rhodes.
Title: Re: Zenith Value
Post by: spyrou on April 04, 2011, 22:20:33
Where did you found the value for Athens 90.58333 ???
Title: Re: Zenith Value
Post by: datahell on April 04, 2011, 22:36:12
From PHP manual: http://php.net/manual/en/function.date-sunrise.php (http://php.net/manual/en/function.date-sunrise.php) (see the second comment)
Title: Re: Zenith Value
Post by: nikos on April 04, 2011, 23:00:28
Spyrou have a look here http://en.wikipedia.org/wiki/Zenith until to update the module as i told you by e-mail.
Title: Re: Zenith Value
Post by: spyrou on April 04, 2011, 23:19:35
Thank you datahell, thank you nikos about the info links...
Title: Re: Zenith Value
Post by: nikos on April 04, 2011, 23:33:54
I found for you all you need exactly

1. Here (http://www.gorissen.info/Pierre/maps/googleMapLocation.php) you can find Lat and Lon (Latitude, Longitude) of any place on earth

2. Then you go here (http://solardat.uoregon.edu/SolarPositionCalculator.html) where you give values and you can calculate automaticly the rest,  included zenith