I am realizing a sun tracker based on latitude, longitude, and date-time. The system calculates the azimuth and elevation angles to track the sun.
In a classic sun tracker, the azimuth axis is aligned with the normal to the ground, whereas the elevation axis is always parallel to the ground and mounted serially with the azimuth joint, as in the picture below:
Given the azimuth and elevation angles, computing the target configuration of the axes is straightforward.
However, I now need to change my system into a mirror array where the order of the axes is swapped, as shown in the following diagram:
As a result, the logic required to control the system does clearly change.
In essence, given the azimuth and elevation angles of the sun, I would need to come up with the target configuration of the normals depicted in green.
To calculate the orientation vector in the classic configuration: Ej: Elevation 45 Azimuth 30 With some math :
Given the vector (x=1,y=0,z=0) starting position (red dot)
Where "x" is parallel to the equator, "y" parallel to the earth rotation axis and "z" normal to ground.
1) Perform elevation of 45 degress turn over "y" axis and get: (sin(45), 0, sen(45))=(0.707,0,0.707)(green)
2) Perform azimuth of 30 degress turn over "z" and get the vector (0.61237244, 0.35355339, 0.707)(blue)
Basically, I need to solve for:
(motor1_angle, motor2_angle) = from(orientation_vector)
From my point of view, there is only one solution, thus a closed-form should be possible.