Javascript Function Wanted

View: New views
3 Messages — Rating Filter:   Alert me  

Javascript Function Wanted

by Brillig :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Does anyone on this list have a javascript function that satisfies the
following criteria?

Given the following inputs:

Observer latitude
Observer longitude
Current date/time (or nominated date/time)

returns:

Azimuth, Elevation

for the sun. I need accuracy to within 1/2 degree or better for our
times (it is not meant to be used for time periods far into the past
or future).

The purpose of this function will be to simulate a solar observatory.

Victor


Re: Javascript Function Wanted

by Brillig :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think this will get me what I need:

http://www.susdesign.com/sunangle/

On Wed, Aug 12, 2009 at 10:26 AM, Victor Engel<brillig@...> wrote:

> Does anyone on this list have a javascript function that satisfies the
> following criteria?
>
> Given the following inputs:
>
> Observer latitude
> Observer longitude
> Current date/time (or nominated date/time)
>
> returns:
>
> Azimuth, Elevation
>
> for the sun. I need accuracy to within 1/2 degree or better for our
> times (it is not meant to be used for time periods far into the past
> or future).
>
> The purpose of this function will be to simulate a solar observatory.
>
> Victor
>


Re: Javascript Function Wanted

by OvV_HN :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

----- Original Message -----
From: "Victor Engel" <brillig@...>
To: <CALNDR-L@...>
Sent: Wednesday, August 12, 2009 5:26 PM
Subject: Javascript Function Wanted


> Does anyone on this list have a javascript function that satisfies the
> following criteria?
>
> Given the following inputs:
>
> Observer latitude
> Observer longitude
> Current date/time (or nominated date/time)
>
> returns:
>
> Azimuth, Elevation
>
> for the sun. I need accuracy to within 1/2 degree or better for our
> times (it is not meant to be used for time periods far into the past
> or future).


The NOAA sun position calculator:
http://www.srrb.noaa.gov/highlights/sunrise/azel.html
is a good one. Rather accurate though.
Less accurate but also very good are the algorithms from Paul Schlyter:
"How to compute planetary positions"
http://stjarnhimlen.se/comp/ppcomp.html

Oscar van Vlijmen