Given a datetime, calculate the lat/lon coordinates where the sun is directly overhead
-
29-04-2021 - |
Domanda
Some variants of this question have been asked before, but not this exact one. So here goes:
Given a particular point in time, how do I calculate the lat/lon coordinates of a point on the surface of the Earth where the Sun is directly overhead?
I can get the declination and the right ascension, and those numbers seem accurate. It should be a piece of cake from here but it's getting late and I'm completely lost.
Any help?
Soluzione
Since you are assuming earth to be a sphere, you can assume latitude to be a sinusoidal function of day of the year (more precisely cosine. Normalize 365 days to 2pi and when day = june 21st, the value is equal to 0).
Longitude will depend on the time of the day. Normalize time so that one day = 360 degrees and offset accordingly.
Details:
AT present tropic of cancer is at latitude L = 23° 26′ 16″
So, Latitude = L*cos( (X-a)/b ), where a=June21st, b = 365.25/2pi .
Longitude = (time - t0 ) *360 /24, where time is current time in hours(UTC), t0 is the offset.