- #1
simurq
- 7
- 0
Hello good people,
I'm using http://www.ecy.wa.gov/programs/eap/models/twilight.zip by Greg Pelletier to calculate sunrise/sunset times at a desired location. However, the sheet formulae return an error message (#NUM) for latitudes above the Arctic/Antarctic Circle since the sun/moon almost never set there depending on latitude and season (summer/winter). Actually, it's because the ACOS function (-1 to 1) used in the sheet for HA sunrise degree calculation fails...
Anyway, what I'm really after is a trap to confine this error message in the program I'm writing so that instead of an error message I could write "Polar Day" or "Polar Night" depending on latitude and season.
So, how can I (programmatically?) know which season is on to get a relevant "polar day/night" message pop up?
Thanks!
Rustam
I'm using http://www.ecy.wa.gov/programs/eap/models/twilight.zip by Greg Pelletier to calculate sunrise/sunset times at a desired location. However, the sheet formulae return an error message (#NUM) for latitudes above the Arctic/Antarctic Circle since the sun/moon almost never set there depending on latitude and season (summer/winter). Actually, it's because the ACOS function (-1 to 1) used in the sheet for HA sunrise degree calculation fails...
Anyway, what I'm really after is a trap to confine this error message in the program I'm writing so that instead of an error message I could write "Polar Day" or "Polar Night" depending on latitude and season.
So, how can I (programmatically?) know which season is on to get a relevant "polar day/night" message pop up?
Thanks!
Rustam
Last edited: