Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!munnari.oz.au!metro!grivel!gara!ddavidso From: ddavidso@gara.une.oz.au (Dean Davidson) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: Unusual program Message-ID: <6978@gara.une.oz.au> Date: 12 Jun 91 23:38:41 GMT References: <1238@ocsmd.com> Reply-To: ddavidso@gara.une.oz.au (Dean Davidson) Organization: Uni. of New England, Armidale, NSW. Lines: 52 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