# Calculating angle between the sun and a perpendicular to earth given lon/lat & time

If you had your longitude/latitude, and the time/date, how could I go about working out the angle between your normal and the sun?

At first I was doing a simplistic approach of assuming elliptical orbit in only two dimensions and that the earth is a perfect sphere,

Can I get a more accurate method /formula than this that can be evaluated in one step without any iterative methods?

Here is rough example of what I mean, say the green plane is the point on the surface of the earth I want.

The angle I seek is between the black line perpendicular to the green plane and the black line between the plane and the sun.

There are 2 problems involved here, knowing how the normal changes as the non spherical earth rotates and knowing the relative position between the earth and the sun. Any help appreciated.

• Do you want the Sun's zenith angle, or the complement of its declination? – Mike G Jan 5 '20 at 7:02
• edited the question with a 3D example of what I'm looking for – BinkyNichols Jan 5 '20 at 7:39
• What do you mean "your normal"? There are several possible definitions, depending on if it's a mathematical surface like a reference ellipsoid, or if it takes into account local gravity and/or centrifugal acceleration (e.g. a plumb line), or maybe you mean radially away from the geocenter? See space.stackexchange.com/a/31723/12102 and en.wikipedia.org/wiki/Geoid and en.wikipedia.org/wiki/Earth_Gravitational_Model and en.wikipedia.org/wiki/World_Geodetic_System#WGS84 – uhoh Jan 5 '20 at 12:56
• thanks for taking the time for the links,though I meant mathematical surface, – BinkyNichols Jan 5 '20 at 19:24
• If you know the Sun's right ascension and declination (both of which have approximate closed form formulas) and your latitude and local sidereal time, there are formulas you can use to get this: astronomy.stackexchange.com/a/14508/21 – user21 Jan 7 '20 at 1:01