Substitute algorithm for computing sun altitude

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Substitute algorithm for computing sun altitude

Victor Engel
I'm working on an iOS app that calculates sunrise/sunset via several definitions. Currently, I'm using a subclass of EDSunriseSet https://github.com/erndev/EDSunriseSet to do the calculations, but for reasons I won't get into, I don't care much for that API. The core of that API uses the C algorithms in this code: http://stjarnhimlen.se/comp/sunriset.c

Before I decide whether to change algorithms, I thought I'd post here to see if anyone has recommendations for alternatives.

I don't care about the planets. I don't care about the moon. I say this, but if they affect the solar position, I do care. I don't care about atmospheric refraction. What I really am most interested in is an efficient algorithm that can compute, given time and location, the position of the sun above the horizon. That is all.

Victor
Reply | Threaded
Open this post in threaded view
|

Re: Substitute algorithm for computing sun altitude

Amos Shapir-2
Hi Victor & calendar people,

I'm using a perl script which I wrote based on formulas from Meeuse's Astronomical Algorithms (2nd edition); they are a bit more accurate than these
(but I think these formulas might have been updated in later editions)

Virus-free. www.avg.com

On Mon, Oct 30, 2017 at 10:23 PM, Victor Engel <[hidden email]> wrote:
I'm working on an iOS app that calculates sunrise/sunset via several definitions. Currently, I'm using a subclass of EDSunriseSet https://github.com/erndev/EDSunriseSet to do the calculations, but for reasons I won't get into, I don't care much for that API. The core of that API uses the C algorithms in this code: http://stjarnhimlen.se/comp/sunriset.c

Before I decide whether to change algorithms, I thought I'd post here to see if anyone has recommendations for alternatives.

I don't care about the planets. I don't care about the moon. I say this, but if they affect the solar position, I do care. I don't care about atmospheric refraction. What I really am most interested in is an efficient algorithm that can compute, given time and location, the position of the sun above the horizon. That is all.

Victor



--
Amos Shapir
 
Reply | Threaded
Open this post in threaded view
|

Re: Substitute algorithm for computing sun altitude

Victor Engel
Dear Amos,

I have that book - I'd have to check on the edition. I got it probably about 8 years ago.

Victor

On Tue, Oct 31, 2017 at 2:33 AM, Amos Shapir <[hidden email]> wrote:
Hi Victor & calendar people,

I'm using a perl script which I wrote based on formulas from Meeuse's Astronomical Algorithms (2nd edition); they are a bit more accurate than these
(but I think these formulas might have been updated in later editions)

Virus-free. www.avg.com

On Mon, Oct 30, 2017 at 10:23 PM, Victor Engel <[hidden email]> wrote:
I'm working on an iOS app that calculates sunrise/sunset via several definitions. Currently, I'm using a subclass of EDSunriseSet https://github.com/erndev/EDSunriseSet to do the calculations, but for reasons I won't get into, I don't care much for that API. The core of that API uses the C algorithms in this code: http://stjarnhimlen.se/comp/sunriset.c

Before I decide whether to change algorithms, I thought I'd post here to see if anyone has recommendations for alternatives.

I don't care about the planets. I don't care about the moon. I say this, but if they affect the solar position, I do care. I don't care about atmospheric refraction. What I really am most interested in is an efficient algorithm that can compute, given time and location, the position of the sun above the horizon. That is all.

Victor



--
Amos Shapir