Calculate the date & time given the position of the sun (Azimuth & elevation) and latitude and longitude
Asked Answered
Z

2

8

Related to this extremely helpful question regarding finding the azimuth & elevation of the sun for a given date, and coordinates. I wish to find the inverse: times & dates the sun will be in that position of the sky.

Therefore I am wondering could someone help with maybe an existing formula or modifying the one linked to.

My current idea was to take two ranges with a variation of a couple of degrees for both, one for the azimuth (120-123 degrees) and elevation (18-21 degrees). Then write an algorithm to iterate through all days / times, and check if the given ranges exist for a time on that day. Looping through these days and using the attached algorithm isn't exactly going to keep Big O small, and also won't be best for performance.

Any help or tips appreciated, please.

Thanks.

Zirconia answered 8/1, 2013 at 16:43 Comment(6)
i think you should first attempt the solution yourself - then ask when stuck.Shena
I will if I can first get confirmation that such a mathematical formula doesn't exist.Zirconia
related: find the next time when the sun will cast a shadow with the same length as right now (an azimuth -- direction of the shadow is not considered)Supervisory
Is there any reason why you assume that the given method of calculation does not have a mathematical inverse?Mickel
this is most certainly possible, as civilization has used the position of the sun to determine date and time for centuries. i think a short approach is to: 1) calculate the solar declination to determine the date (there are usually two answers to this) and 2) calculate the ascension to determine the timeMichellmichella
had thinking about it a little more and it is possible (sun paths are not crossing)Hobbledehoy
B
2

There is some useful stuff here (see the links - in particular [12]-[15])

https://en.wikipedia.org/wiki/Position_of_the_Sun

One problem is if you are using this to determine things like "which days would the sun be directly over the 'Heel Stone' at Stonehenge in Z-thousand BC", then there will be a lot of sources of errors beyond precession and/or nutation (earthquakes change the earths rotation period, when the Sun is close to the horizon you'll get some significant refraction). There is also http://www.stargazing.net/kepler/sun.html . However, as there are many days and times when the sun is in a particular position, the method of guessing a window of date and time and then doing a Newton-style approximation iteratively is probably best. Perhaps if you could give more information as to why you are trying to find the answer (i.e."when does the shadow of the oak tree fall on the buried treasure..."), we could be more helpful?

Busyness answered 29/10, 2015 at 16:31 Comment(0)
H
1

After some thinking you can get the date like this:

if (ang>=0.0) date = (21.March)    +ang*(21.June    -21.March    )/(23.4 degrees);
else          date = (21.September)-ang*(21.December-21.September)/(23.4 degrees);
  • dates are pretty straight forward
  • ang is the current angle between the ecliptic plane and Earths equator plane
  • must be measured during day !!!
  • if you measure the suns height (at your latitude) at astronomical noon then:

    ang = height - (90 degrees - your latitude)
    
  • to convert height measured at any time you need to apply vector math
  • see computation of angle between two planes
  • see image for more clarity

Ecliptic during the year To compute time during the day you will need to look for

  • conversions between standard (UTC) time and stellar time
  • also a good idea is to look for solar clock design which includes all computations in geometrical manner.

Do not forget that this approach do not include precession, nutation ...

  • if you account for that then this task become unsolvable because of sun sky-dome path crossing which leads to multiple solutions for any given suns position
  • luckily precession is too slow and we can skip it for few thousands years
  • and nutation has small radius (affect accuracy only)
Hobbledehoy answered 14/10, 2013 at 9:16 Comment(1)
only one last thing i forget: date cannot be acquired this way from suns positions too close to equator because its too close to planes intersection and the accuracy of the angle between them goes to none, anyway the hills and buildings prevent you to measure it at that point anyway (if you are not on the sea or poles ... i that case wait a hour :) or use different algorithm)Hobbledehoy

© 2022 - 2024 — McMap. All rights reserved.