I’m working on a sun tracking project using mirrors to direct the sun into a skylight, but have struck a 3d geometry issue. You can check the project out if your interested here: http://arduinobeam.blogspot.com/
I didn’t see this issue coming and still struggle a bit to visualise it but a 3d model helps.

See image below…

Because of the way the primary mirror is offset to prevent shadow being cast onto it from the secondary mirror, it turns out a few complications occur. The adjustment of the primary (elevation) mirror angle effects the azimuth alignment because the reflection plane is not vertical (as it would be if both mirrors were in line). To solve this I need to be able to calculate the two angles marked with ? from the elevation angle E and the mirror offset (currently 18.4deg). I know that the angles A are equal (this is the path of a ray in the plane of reflection).

I have had a go at this, but so far am struggling with the derivation. I assumed that the solid lines were of known length (1 for convenience) but this may not be necessary. If anyone feels inspired please give it a crack and let me know how you get on!

Ah but A is unknown as it increases and decreases with changed in E (the elevation of the sun). Sorry about the symbols bad form I know, try this one out:

I haven’t used the Windows version, but under Linux you can run predict in server mode.
One of the things it broadcasts on port 1280 is the sun’s current altitude and azimuth.
You could put an Ethernet shield on your Arduino and receive the Sun’s or Moon’s current position.

Hey Korman, there are right angles between the planes containing x and y and the planes containing x and E. But x does not equal 2*18.4. that seems intuitive, and is what I first thought as well, but the model I made shows how the projection of the two equal angles ‘a’ onto a second plane creates two new angles… if that makes sense.

I may need to go back to the old text books, seems like this should be easily solvable with the right technique.

After tackeling the cad model in a different way it became clear that the tips of the incoming ray vectors all lay on a circle offset from the circle traced by the centre of the elevation mirror. Knowing this and using some similar triangles I came up with these two equations:

az = sin-1(sin(off)/cos(e))
em = tan-1(tan(off).tan(e)/(sin(az) + tan(off).cos(az)))

where :
az = additional azimuth angle added by primary mirror
em = required elevation of the primary mirror
off = offset of the primary mirror from centre
e = calculated elevation of the sun

Now the required machine position can be calculated from the elevation and azimuth angles of the sun.