2

I seem to have asked my question wrong so here goes again I'll try to be more to the point. Is the top answer on this page

https://stackoverflow.com/questions/257717/position-of-the-sun-given-time-of-day-and-lat-long

the solution to the question asked or is more needed?

Thanks

Community
  • 1
  • 1
Pip
  • 95
  • 2
  • 5
  • 2
    Links man! Links! This is the internet! What in the world are you talking about? – Will Hartung Apr 23 '09 at 01:14
  • You definitely need to rephrase your question to be understandable. – lothar Apr 23 '09 at 01:14
  • He wants the R code from the link translated in to C. It seems mostly straightfoward, with one construct I don't quite recognize, but I think I know what it does. – Will Hartung Apr 23 '09 at 01:33
  • Thanks for looking at my question i took me a while to realize that comments were being made! I don't know if the code on that page is C or not thats what I was wondering and if it was finished? what is the construct that you don't recognize? thanks – Pip Apr 23 '09 at 01:43
  • I'm voting to close this question as off-topic because it refers to a now-deleted question. – Peter O. Apr 07 '17 at 21:38

2 Answers2

1

Pysolar is an implementation in Python that can give you altitude/azimuth. http://pysolar.org/ - I came across it after realizing that the NOVAS system in one of the other answers didn't support Windows.

From the docs (https://github.com/pingswept/pysolar/wiki/examples):

>>> import Pysolar
>>> import datetime
>>> d = datetime.datetime.utcnow() # create a datetime object for now
>>> Pysolar.GetAltitude(42.206, -71.382, d)
-20.453156227223857
>>> d = datetime.datetime(2007, 2, 18, 20, 13, 1, 130320) # try another date
>>> Pysolar.GetAltitude(42.206, -71.382, d)
19.551710266768644
Nick
  • 341
  • 3
  • 8
1

Have you looked at the USNO NOVAS routines?

Tim Long
  • 13,508
  • 19
  • 79
  • 147