A Space & astronomy forum. SpaceBanter.com

Go Back   Home » SpaceBanter.com forum » Others » Solar
Site Map Home Authors List Search Today's Posts Mark Forums Read Web Partners

What is "Zenith" and how to calculate it (How to use date_sunrise)



 
 
Thread Tools Display Modes
  #1  
Old December 1st 04, 10:16 PM
Wouter
external usenet poster
 
Posts: n/a
Default What is "Zenith" and how to calculate it (How to use date_sunrise)

Hi

I found a nice function for PHP:
http://nl.php.net/manual/en/function.date-sunrise.php

It can calculate the sunrise if you provide the Long, Lat and the Zenith.

My problem is that I never have heard of a zenith.
I think it has something to do with height, but that's about all I know
about it.

I really would like to use this function.
And I found out that the zenith for "De Bild" is about 90.79 (lat 52.07;
long = 5.11 in the Netherlands) by comparing time tables
(http://www.knmi.nl/voorl/verken/zon_ehdb2004.html).
But I would like to calculate the zenith of places where I don't have time
tables of.

I hope someone here can tell me more about how to calculate the Zenith.
A google search did not result in a nice discription of an algorithm.

Thanks,
Wouter


  #2  
Old December 1st 04, 10:28 PM
George King
external usenet poster
 
Posts: n/a
Default


"Wouter" wrote in message
...
Hi

I found a nice function for PHP:
http://nl.php.net/manual/en/function.date-sunrise.php

It can calculate the sunrise if you provide the Long, Lat and the Zenith.

My problem is that I never have heard of a zenith.
I think it has something to do with height, but that's about all I know
about it.

I really would like to use this function.
And I found out that the zenith for "De Bild" is about 90.79 (lat 52.07;
long = 5.11 in the Netherlands) by comparing time tables
(http://www.knmi.nl/voorl/verken/zon_ehdb2004.html).
But I would like to calculate the zenith of places where I don't have time
tables of.

I hope someone here can tell me more about how to calculate the Zenith.
A google search did not result in a nice discription of an algorithm.

Thanks,
Wouter


Straight up. (aka "the point opposite the nadir of the imaginary sphere
around the observer....").
AKA 90 degrees... as in the example in the function. I think the author is
having
fun with his/her audience. I think you'll be fine to leave the 90 value and
just replace lat & long.

George


  #3  
Old December 1st 04, 10:57 PM
Wouter
external usenet poster
 
Posts: n/a
Default


"George King" wrote in message
news:BArrd.6218$1z5.1848@trnddc06...
:
: "Wouter" wrote in message
: ...
: Hi
:
: I found a nice function for PHP:
: http://nl.php.net/manual/en/function.date-sunrise.php
:
: It can calculate the sunrise if you provide the Long, Lat and the
Zenith.
:
: My problem is that I never have heard of a zenith.
: I think it has something to do with height, but that's about all I know
: about it.
:
: I really would like to use this function.
: And I found out that the zenith for "De Bild" is about 90.79 (lat 52.07;
: long = 5.11 in the Netherlands) by comparing time tables
: (http://www.knmi.nl/voorl/verken/zon_ehdb2004.html).
: But I would like to calculate the zenith of places where I don't have
time
: tables of.
:
: I hope someone here can tell me more about how to calculate the Zenith.
: A google search did not result in a nice discription of an algorithm.
:
: Thanks,
: Wouter
:
:
: Straight up. (aka "the point opposite the nadir of the imaginary sphere
: around the observer....").
: AKA 90 degrees... as in the example in the function. I think the author
is
: having
: fun with his/her audience. I think you'll be fine to leave the 90 value
and
: just replace lat & long.

If I use 90 instead of 90.79 for "De Bild" I get :

SunRise: 08:32
SunSet: 16:23

but it should be:
SunRise: 08:26
SunSet: 16:31


according to http://www.knmi.nl/voorl/verken/zon_ehdb2004.html

and

http://aa.usno.navy.mil/cgi-bin/aa_r...=7&zz1=1&zz0=1

Wouter








:
: George
:
:


  #4  
Old December 2nd 04, 12:41 AM
George King
external usenet poster
 
Posts: n/a
Default

"Wouter" wrote in message
...

"George King" wrote in message
news:BArrd.6218$1z5.1848@trnddc06...
:
: "Wouter" wrote in message
: ...
: Hi
:
: I found a nice function for PHP:
: http://nl.php.net/manual/en/function.date-sunrise.php
:
: It can calculate the sunrise if you provide the Long, Lat and the
Zenith.
:
: My problem is that I never have heard of a zenith.
: I think it has something to do with height, but that's about all I
know
: about it.
:
: I really would like to use this function.
: And I found out that the zenith for "De Bild" is about 90.79 (lat
52.07;
: long = 5.11 in the Netherlands) by comparing time tables
: (http://www.knmi.nl/voorl/verken/zon_ehdb2004.html).
: But I would like to calculate the zenith of places where I don't have
time
: tables of.
:
: I hope someone here can tell me more about how to calculate the
Zenith.
: A google search did not result in a nice discription of an algorithm.
:
: Thanks,
: Wouter
:
:
: Straight up. (aka "the point opposite the nadir of the imaginary sphere
: around the observer....").
: AKA 90 degrees... as in the example in the function. I think the author
is
: having
: fun with his/her audience. I think you'll be fine to leave the 90 value
and
: just replace lat & long.

If I use 90 instead of 90.79 for "De Bild" I get :

SunRise: 08:32
SunSet: 16:23

but it should be:
SunRise: 08:26
SunSet: 16:31


according to http://www.knmi.nl/voorl/verken/zon_ehdb2004.html

and

http://aa.usno.navy.mil/cgi-bin/aa_r...=7&zz1=1&zz0=1

Wouter


Wouter,

Sorry, I should have known there would be more than one astronomical
defintion of zenith. This from the U.S. Navy Observatory:
Sunrise and sunset. For computational purposes, sunrise or sunset is defined
to occur when the geometric zenith distance of center of the Sun is 90.8333
degrees. That is, the center of the Sun is geometrically 50 arcminutes below
a horizontal plane. For an observer at sea level with a level, unobstructed
horizon, under average atmospheric conditions, the upper limb of the Sun
will then appear to be tangent to the horizon. The 50-arcminute geometric
depression of the Sun's center used for the computations is obtained by
adding the average apparent radius of the Sun (16 arcminutes) to the average
amount of atmospheric refraction at the horizon (34 arcminutes).

And, according to the U.S. Navy's 1990 Almanac for Computers, there are
multiple versions of "zenith" for different predictions:

offical = 90 degrees 50' (gk: this is the "official" number to
determine sunrise & sunset)
civil = 96 degrees (gk: this is the number to obtain
civilian twilight times - horizon may be visible)
nautical = 102 degrees (gk: this is the number to obtain nautical
twilight - the horizon is not visible)
astronomical = 108 degrees (gk: this is the number for astronomical
twilight - starts at sunset).

You might also look at some of the following:

http://www.qarlos.free.fr/navegacion...e/formulas.htm

http://williams.best.vwh.net/sunrise..._algorithm.htm

http://www.kevinboone.com/suntimes.html

http://star-www.st-and.ac.uk/~fv/webnotes/chapt12.htm



However, I don't understand where the 90.79 figure comes from. As the USN
noted above, it should be for "official" rise/set, 90.8333. (50 arc minutes
= 50/60 of a degree or 90.83333333333333333333333333333333333.... Could this
be a problem with the gmt offset?

Good luck,

George













  #5  
Old December 2nd 04, 09:32 AM
Wouter
external usenet poster
 
Posts: n/a
Default

The code I use now:

?php

// De Bilt, The Netherlands, weather station #06260
$lat = 52.10; // North
$long = 5.18; // East
$offset = 1; // difference between GMT and local time in hours

$zenith=90+50/60;
echo "brpSunrise: ".date_sunrise(time(), SUNFUNCS_RET_STRING, $lat,
$long, $zenith, $offset);
echo "brSunset: ".date_sunset(time(), SUNFUNCS_RET_STRING, $lat, $long,
$zenith, $offset);

$zenith=96;
echo "brp\"Civilian Twilight\" start: ".date_sunrise(time(),
SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset);
echo "br\"Civilian Twilight\" end: ".date_sunset(time(),
SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset);

$zenith=102;
echo "brp\"Nautical Twilight\" start: ".date_sunrise(time(),
SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset);
echo "br\"Nautical Twilight\" end: ".date_sunset(time(),
SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset);

$zenith=102;
echo "brp\"Astronomical Twilight\" start: ".date_sunrise(time(),
SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset);
echo "br\"Astronomical Twilight\" end: ".date_sunset(time(),
SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset);

?

Maybe this helps someone else too
Wouter


  #6  
Old December 2nd 04, 09:38 AM
Wouter
external usenet poster
 
Posts: n/a
Default

OEPs..

?php

// De Bilt, The Netherlands, weather station #06260
$lat = 52.10; // North
$long = 5.18; // East
$offset = 1; // difference between GMT and local time in hours

$zenith=90+50/60;
echo "brpSunrise: ".date_sunrise(time(), SUNFUNCS_RET_STRING, $lat,
$long, $zenith, $offset);
echo "brSunset: ".date_sunset(time(), SUNFUNCS_RET_STRING, $lat, $long,
$zenith, $offset);

$zenith=96;
echo "brpCivilian Twilight start: ".date_sunrise(time(),
SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset);
echo "brCivilian Twilight end: ".date_sunset(time(), SUNFUNCS_RET_STRING,
$lat, $long, $zenith, $offset);

$zenith=102;
echo "brpNautical Twilight start: ".date_sunrise(time(),
SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset);
echo "brNautical Twilight end: ".date_sunset(time(), SUNFUNCS_RET_STRING,
$lat, $long, $zenith, $offset);

$zenith=108;
echo "brpAstronomical Twilight start: ".date_sunrise(time(),
SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset);
echo "brAstronomical Twilight end: ".date_sunset(time(),
SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset);

?


  #7  
Old December 4th 04, 04:06 AM
Manuel Lemos
external usenet poster
 
Posts: n/a
Default

Hello,

On 12/01/2004 08:16 PM, Wouter wrote:
I found a nice function for PHP:
http://nl.php.net/manual/en/function.date-sunrise.php

It can calculate the sunrise if you provide the Long, Lat and the Zenith.

My problem is that I never have heard of a zenith.
I think it has something to do with height, but that's about all I know
about it.

I really would like to use this function.
And I found out that the zenith for "De Bild" is about 90.79 (lat 52.07;
long = 5.11 in the Netherlands) by comparing time tables
(http://www.knmi.nl/voorl/verken/zon_ehdb2004.html).
But I would like to calculate the zenith of places where I don't have time
tables of.

I hope someone here can tell me more about how to calculate the Zenith.
A google search did not result in a nice discription of an algorithm.


You may want to try and contact the author of this PHP class that
involves sunrise and sunset calculations:

http://www.phpclasses.org/sun_rise_set

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:49 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 SpaceBanter.com.
The comments are property of their posters.