Essentially what I am trying to do is:
- Take an Observer point (using lat/lon)
- Calculate the dates for the next equinox and solstice given a starting date
- Find the Sunset Azimuth for each
- Find the Sunrise Azimuth for each
*Please note, I am working in ArcGIS, so some of my values are pulling from an outside table
Here is kind of what I have:
sun = ephem.Sun()
final = ephem.Observer()
final.lon = row[1]
final.lat = row[2]
final.elevation = row[3]
equinoxDate = ephem.next_equinox('0001/01/01')
equinoxSetDate = final.next_setting(ephem.Sun(), start=equinoxDate, use_center=True)
final.date = equinoxSetDate
sun.compute(final)
print sun.az
I keep getting hung up on the "next_setting" part. I get NeverUpError... if I switch it to previous_setting, next_rising, previous_rising... it doesn't matter. I always get a NeverUpError or AlwaysUpError.
If someone can help me get it to find the Azimuth for an Equinox Sunset (on any date) then I can figure out the rest I am sure.
Let me know if something isn't clear.
THANKS!