[comp.binaries.ibm.pc.d] Unusual program

glenn@zeus.ocs.com (Glenn Ford) (06/12/91)

I am looking for a program (or algorithm, to write my own if need be)
that, given current time of day, latitude and longitude, will calculate
the suns current position.  Any program or existing algorithm for this??
If there is a more proper news group, please let me know..


--

Glenn Ford
glenn@zeus.ocs.com
.uunet!zeus!glenn

userDHAL@mts.ucs.UAlberta.CA (David Halliwell) (06/13/91)

In article <1238@ocsmd.com>, glenn@zeus.ocs.com (Glenn Ford) writes:
>I am looking for a program (or algorithm, to write my own if need be)
>that, given current time of day, latitude and longitude, will calculate
>the suns current position.  Any program or existing algorithm for this??
>If there is a more proper news group, please let me know..
> 
> 
>--
    
    Joseph J. Michalsky (1988) "The Astronomical Almanac's Algorithm
for Approximate Solar Position (1950-2050)", SOLAR ENERGY 40, 227-235.
   
    There was an errata published for the article, mentioning that
the formulae in the appendix have errors (although they appear
correctly in the body of the text).
   
    Any decent climatolgy text provides a number of the formulae that
you want. Two that might be easily found are
  
    Sellers, W.D. (1965) PHYSICAL CLIMATOLOGY
  
and
   
    Oke, T. R. (1987) BOUNDARY LAYER CLIMATES (*second edition*)
   
   
   I have written a couple of Pascal programs to do some of this stuff:
contact me at userdhal@mts.ucs.ualberta.ca if you want them.
   
  
   ... and finally, direct followups to sci.geo.meteorology!
  
  
Dave Halliwell
Dept. of Geography
University of Alberta

ddavidso@gara.une.oz.au (Dean Davidson) (06/13/91)

In article <1238@ocsmd.com> glenn@zeus.ocs.com (Glenn Ford) writes:
>I am looking for a program (or algorithm, to write my own if need be)
>that, given current time of day, latitude and longitude, will calculate
>the suns current position.  Any program or existing algorithm for this??

I wrote (for Turbo Pascal) a unit which included calculation of rise
and set times.  In doing this it calculated the suns position but does not
explicitly return the values.
I have extracted this into a stand-alone unit and have placed it
(to save net bandwidth) for anonymous ftp on

suna.mqcc.mq.oz.au 137.111.161.1

in the directory pub/PC/Turbopas     as  sununit.pas

Here is the header for the unit:
Note the references I have included.  These may be of some use if
you are not into TP and also may give algorithms to calculate the
position!

----------------------------------------------------------------------------

Unit sununit;

{given latitude, longitude, current date & time difference W of Grenwich
 returns sunrise,sunset, first light, last light}

{
Refs and acknowledgements -

Various Almanacs & Ephemiris

"Practical Astronomy with your Calculator" P. Duffett-Smith
    Cambridge University Press 2nd Edition  1981

"United States Naval Observatory Almanac for Computers"
     (No more details known)

"Astronomy" 12(4):75-7, Apr 1984

Original Basic Program written by  W C  Bell
Adapted by Ken Shea 1988  in Brisbane
Rewritten and modified for Turbo Pascal by Dean Davidson May 1988

Developed for Army War Game Centre, Mosman NSW Australia
Copyright, Commonwealth of Australia   1988,1991
}
-- 
Dean Davidson                                 ddavidso@gara.une.oz.au
Dept Psychology                               Phone 61 67 73 2585
University of New England                     Fax   61 67 72 9816
Armidale NSW 2351 Australia                   VK2 ZID

rkaminsk@risky.ecs.umass.edu (Robert D. Kaminsky) (06/13/91)

In article <1238@ocsmd.com> glenn@zeus.ocs.com (Glenn Ford) writes:
>I am looking for a program (or algorithm, to write my own if need be)
>that, given current time of day, latitude and longitude, will calculate
>the suns current position.  Any program or existing algorithm for this??
>If there is a more proper news group, please let me know..
>

I highly recommend the book "Practical Astronomy with Your Calculator"
or "Practival Astronomy with Your Computer" by Peter Duffett-Smith.
The books lay out very easy to follow methods to calculate a very wide
variety of astronomy problems.

                                   -- Bob Kaminsky

coffey@fionn.enet.dec.com (Aedan Coffey) (06/13/91)

In article <1238@ocsmd.com>, glenn@zeus.ocs.com (Glenn Ford) writes...

>I am looking for a program (or algorithm, to write my own if need be)
>that, given current time of day, latitude and longitude, will calculate
>the suns current position.  Any program or existing algorithm for this??
>If there is a more proper news group, please let me know..

Try the COSMOS program that was posted to c.b.i.p recently, it will do what you
want, so will the floppy almanack published yearly by some US department or
other.

	Good luck,

		Aedan.
-- 
Aedan Coffey	            Coffey@Fionn.enet.dec.com
Digital Equipment Intl.     ..or.. ...!decwrl!fionn.enet.dec.com!coffey
Dublin, Ireland.	    ..or.. coffey%fionn.dec@decwrl.enet.dec.com

fisher@sc2a.unige.ch (06/14/91)

In article <1238@ocsmd.com>, glenn@zeus.ocs.com (Glenn Ford) writes:
> I am looking for a program (or algorithm, to write my own if need be)
> that, given current time of day, latitude and longitude, will calculate
> the suns current position.  Any program or existing algorithm for this??
> If there is a more proper news group, please let me know..

Want to build a sundial, eh?

I have a program to draw a sundial on the screen and dump the coordinates
needed to draw the sundial for any size (even for declining sundials).
The problem is, of course, the equation of time.  (That is, the apparent
sun rotation is not constant over the year(s).)

I have recently posted a request to sci.astro (the proper newsgroup, BTW,
not "meteorology", as someone proposed).  An astronomer was kind enough
to send me the time equation.  This I built into the program, but in the
form of a simple table.  I would like to draw that equation on the wall
(taking for example the year 2000, it doesn't vary *that* much), but didn't
yet manage to do it.

If you would like to share info, just drop me a note.  (i.e. I'm also
interested in your info!)

good luck,

Markus G. Fischer                                  fisher@sc2a.unige.ch