The algorithm of method 1
The description of method 1 is here. Below I present the description of calculations that I added to the NOAA spreadsheet. I did not modify any calculations in the original spreadsheet. I added calculations in cells from A49 to B76 and in cells C73, C75.
Input data:
cell B3 - latitude in degrees
cell B4 - longitude in degrees
cell B5 - time zone (you need to add 1 if Daylight Saving Time is in effect)
cell B7 - date
cell B49 - an object's height (let's denote it as Height)
cell B50 - the length of the shadow (let's denote it as ShadowLength)
The calculations:
Cells B51 and B52 take data from the original spreadsheet.
Cell B51 - sun's declinations in degrees at a selected time (by default it is 12:00 so the value of the cell is set to =T121)
Let's denote it as deltaDeg.
Cell B52 - EOT (Equation of Time) in minutes at the selected time (by default it is 12:00 so the value of the cell is set to =V121).
Let's denote the Equation of Time as EOTmin.
Cell B53 - latitude in radians
Let's denote latitude in radians as fi.
fi = radians(latitude)
Cell B54 - sun's elevation in radians
Let's denote sun's elevation in radians as alpha.
Formula (8) in [1]
alpha = atan(Height / ShadowLength) (1)
Cell B55 - sun's elevation in degrees
alpha deg = degrees(alpha)
Cell B56 - sun's declination in radians
Let's denote sun's declination in radians as delta.
delta = radians(deltaDeg)
Cell B57 - a temporary value
Let's denote it as cosHuncorr.
From formula (2) in [3] we have
cosHuncorr = (sin(alpha) - sin(fi) * sin(delta)) / (cos(fi) * cos(delta)) (2)
Cell B58 - corrected cosH
Sometimes it happens that we obtain a value greater than 1 from formula (2). In this case we have to limit it to 1 so that the inverse cosine function will work properly.
Let's denote it as cosH.
Cell B59 - the hour angle in radians
Let's denote the hour angle as H1.
We have two values of the hour angle that satisfy equation (2). The first is H1, the second is -H1.
H1 = acos(cosH)
Cell B60 - the second hour angle = -H1
H2 = -H1
Cell B61 - the first hour angle in degrees
Let's denote it as H1deg.
H1deg = degrees(H1)
Cell B62 - the second hour angle in degrees
Let's denote it as H2deg.
H2deg = degrees(H2)
Cell B63 - the first local solar time
Let's denote it as LST1.
From formula (5) in [3]
LST1 = H1deg / 15 + 12
Cell B64 - the second local solar time
Let's denote it as LST2.
From formula (5) in [3]
LST2 = H2deg / 15 + 12
Cell B65 - a temporary value to keep conformity to my Java program
Let's denote it as DeltaGMT.
DeltaGMT = time zone
Cell B66 - correction to local solar time due to the time zone effect
Let's denote it as TC1.
Formula (7) in [3]
TC1 = 4 * (Longitude - 15 * DeltaGMT) (in minutes)
Cell B67 - a temporary value
Let's denote it as sinAz1.
Formula in point 57 in the table on page 16 in [2]:
sinAz1 = - cos(delta) * sin(H1) / cos(alpha)
Cell B68 - a temporary value
Let's denote it as cosAz.
Formula in point 58 in the table on page 16 in [2]:
cosAz = ( sin(delta) - sin(alpha) * sin(fi) ) / ( cos(alpha) * cos(fi) )
Cell B69 - the first azimuth in radians
Let's denote it as Az1rad.
Formula in point 59 in the table on page 16 in [2]:
Az1rad = atan2(cosAz, sinAz1)
See also a comment how to use the atan2 function in spreadsheets page 17 in [2].
Cell B70 - a temporary value
Let's denote it as sinAz2.
Formula in point 57 in the table on page 16 in [2]:
sinAz2 = - cos(delta) * sin(H2) / cos(alpha)
Cell B71 - the second azimuth in radians
Let's denote it as Az2rad.
Formula in point 59 in the table on page 16 in [2]:
Az2rad = atan2(cosAz, sinAz2)
See also a comment how to use the atan2 function in spreadsheets page 17 in [2].
Cell B72 - the total time correction
Let's denote it as TC.
Formula (10) in [3]:
TC = TC1 + EOTmin
Cell B73 - the first local time
Let's denote it as LT1.
From formula (11) in [3]:
LT1 = LST1 - TC / 60 (in hours)
Cell B74 - the first azimuth in degrees
Azdeg = degrees(Az1rad)
Az1deg = mod(Azdeg, 360)
See also a comment about the mod function in [2] page 17.
Cell B75 - the second local time
Let's denote it as LT2.
From formula (11) in [3]:
LT2 = LST2 - TC / 60 (in hours)
Cell B76 - the second azimuth in degrees
Azdeg = degrees(Az2rad)
Az2deg = mod(Azdeg, 360)
See also a comment about the mod function in [2] page 17.
Cell C73 - the first local time as a fraction of a day
The cell displays the time in the familiar format hh:mm:ss
Cell C75 - the second local time as a fraction of a day
The cell displays the time in the familiar format hh:mm:ss
Cells B74, B76, C73, C75 are output data.
References
[1] Frode Eika Sandnes "Determining the Geographical Location of Image Scenes based on Object Shadow Lengths"
https://www.researchgate.net/publication/220541439_Determining_the_Geographical_Location_of_Image_Scenes_based_on_Object_Shadow_Lengths
accessed 28.06.2019.
[2] Kevin Karney "Basic Solar Positional Astronomy"
http://www.precisedirections.co.uk/Sundials/Basic%20Solar%20Positional%20Astronomy.pdf
accessed 28.08.2019.
[3] Abhik Milan Pal, Subhra Das "Analytical Model for Determining the Sun’s Position at All Time Zones"
http://article.sapub.org/10.5923.j.ijee.20150503.03.html
accessed 29.10.2019.