Dear all,

two years ago, I sent to this list the folowing method that you can also see
on my web site (http://www.apro.fr/usr/ymasse/orient.htm). Recently I found
an error in the constants: jm must be 674.03 and jl 752.2
Of course this is not fundamental, the error on the result was about 0.1 or
0.2 deg., but it is better to use the right constants.

Happy dialing

Yvon

----------------------------------------
Method to calculate in one time the declination and inclination of a plane
with only one easy measure:

Use a little board with a perpendicular gnomon. On the board draw a X,Y
system of perpendicular axes with the origin at the foot of the gnomon.
Apply the board on the plane with the Y axis horizontal at right hand and
the X axis in down direction. Note the time and the coordinates of the
shadow of the top of the gnomon. Finally run this little program written
with QBASIC:

REM Astronomic constants
k = .0172024
jm = 673.53 ........... no right constant
jl = 751.7 ............ no right constant
e = .0167
ob = .4091

REM Other constants
pi = 3.141593: dr = pi / 180: hr = pi / 12

REM Time zone
fh = 2

INPUT "Longitude, Latitude (in degree)"; lo, la
lo = lo * dr: dp = (90 - la) * dr

INPUT "Day, Month, Year"; jo, mo, an
IF mo < 3 THEN mo = mo + 12: an = an - 1
INPUT "Hour (legal), Minute"; hh, mn

REM Number of day since May 1st 0 h TU of the last eap-year
h = hh + mn / 60 - fh
j = 365 * (an - 4 * INT(an / 4)) + INT(30.61 * (mo + 1)) + jo + h / 24 - 853

REM True longitude of the sun
m = k * (j - jm): l = k * (j - jl)
s = l + 2 * e * SIN(m) + 1.25 * e * e * SIN(2 * m)

REM Local coodinates of the sun
x = COS(s): y = COS(ob) * SIN(s): z = SIN(ob) * SIN(s)
r = l + h * hr - lo - pi: GOSUB 1300: r = dp: GOSUB 1200

REM Refraction correcting
IF z < .9999 THEN
  ht = ATN(z / SQR(1 - z * z))
  rf = .000291 / TAN(ht + .00223 / (ht + .077))
  cr = (COS(rf) - TAN(ht) * SIN(rf))
  x = cr * x: y = cr * y: z = SIN(ht + rf)
END IF

REM Coordinates of the sun in the board system
INPUT "Height of the top of the gnomon :";g
INPUT "... and X, Y coordinates of its shadow (in the same unit) :"; xp, yp
rc = SQR(xp * xp + yp * yp + g * g)
xp = -xp / rc: yp = -yp / rc: zp = g / rc

REM Compute of the inclinations
rc = SQR(1 - z * z - yp * yp)
i1 = 2 * ATN((-xp + rc) / (z + zp)): i2 = 2 * ATN((-xp - rc) / (z + zp))

REM Compute of the declinations
d1 = 2 * ATN((x - rc) / (y + yp)): d2 = 2 * ATN((x + rc) / (y + yp))

REM Display of results in degree
REM Declination positive to west, inclination nul if horizontal
PRINT "i1="; i1 / dr, "d1="; d1 / dr
PRINT "i2="; i2 / dr, "d2="; d2 / dr

END

1200 REM Rotation around the Y axis through angle r
rx = COS(r) * x - SIN(r) * z: rz = SIN(r) * x + COS(r) * z
x = rx: z = rz: RETURN

1300 REM Rotation around the Z axis through angle r
rx = COS(r) * x + SIN(r) * y: ry = -SIN(r) * x + COS(r) * y
x = rx: y = ry: RETURN

That all ...

If the sun is in front of the vertical plane which contain the Y axis of the
board (that is always true for a wall), the right values are i1 and d1. If
not, of course, they are i2 and d2.

Reply via email to