(meteorobs) Sun elevation and azimuth algorithm

bob71741 bob71741 at yahoo.com
Fri Nov 14 18:09:34 EST 2008


Lu - I looked at the formulae on the web site that you referenced and
they appear to be straight forward. A couple of hints may be necessary
for you to get the right answers though.

1) Computing Julian centuries is straight forward from the formula given.

2)Computing the  Greenwich sidereal time (GST) has a couple of traps
to watch out for. The first is finding UT in decimal hours; you need
to convert YOUR local time to decimal hours, and then ADD your time
zone to it to get the UT. This is what you will plug in to Tut in
formula 4 & 6. 

Example: It is 10:43 AM in Mexico City. The decimal hours are 10.716,
and Mexico City is in time zone 6, so the UT decimal hours are 16.716.

The next trap is in formula 5 where you find the Local Sidereal time
(LST); You need to convert your longitude to decimal Hours and
SUBTRACT it from the GST. The formula says to add, but your West
longitude is negative degrees from the Greenwich meridian, so we
subtract it. Example: Mexico City longitude is 99 degrees 12 minutes,
which is 99.2 degrees or 4.133 hours (99.2/24).

3) Computing the solar coordinates is again fairly straight foward,
but remember to convert degrees to radians when using the sin or cos
functions, and convert the radians to degrees when using the arcsin
and arctan functions. I plug the constants (PI/180) and (180/PI) into
a cell and just use that cell location to multiply the degrees or
radians. Example: 30 degrees = 30*PI/180 = 0.523 radians.

4) For the horizontal coordinates, the correct quadrant for formula 17
is found by using the following:

if 0 < H < 12
A = 180 + arctan A if A is positive
A= 360 + arctan A, if A is negative
if 12 < H < 24
A= arctan A, if A is positive
A= 180 + arctan A, if A is negative 


Good Luck and Best Regards
Bob

--- In meteorobs at yahoogroups.com, "lourdes salinas" <lsalinas6 at ...> wrote:
>
> *Hi, *
> 
> *I'm a Mexican architecture student trying to calculate the
elevation and
> the azimuth of the sun at any given time or day with the intention of
> designing the most efficient solar panels for a project. I'm using
an excel
> spreadsheet and the algorithm found at
> http://www.astro.uio.no/~bgranslo/aares/calculate.html, which is very
> similar (but a little bit more complex) than the one posted in
meteorobs in
> the msg 09197.*
> 
> *I have already set up all the formulas and have reviewed them, but
I still
> have something wrong. If anyone could send an example (of a certain
day and
> time) or could explain the units that I have to use for the " t
> ut",(universal time used in the calculation for the sidereal time) or
> basically which formulas should be done in radians and which in degrees,
> would help me a lot. *
> 
> *I have been trying to figure this algorithm for weeks, and haven't
achieved
> the desired results which I'm comparing to the ones at
> http://sunposition.info/sunposition/spc/locations.php*
> 
> *Any advice or help would be great.*
> 
> *Thank you so much!*
> 
> *Lu*
> _______________________________________________
> Mailing list meteorobs: meteorobs at ...
> To UNSUBSCRIBE, email: owner-meteorobs at ...
> http://lists.meteorobs.org/mailman/listinfo/meteorobs
>





More information about the Meteorobs mailing list