# Inverse kinematics of a sun tracker with swapped axes

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) So how to get the same vector with the mirror array motor arrangement.

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.

Greetings

• it is unclear what is your actual question. – jsotola Aug 26 '19 at 15:28
• Wich part is not clear, just given azimuth and elevation, need to calculate the angles for the motors that move the mirror array to point at sun. – user2232395 Aug 26 '19 at 19:28
• that is a description of the calculations that you have to do ... it is not a question ... why don't you do the calculation then? – jsotola Aug 27 '19 at 4:34
• Because rotations are non commutative in 3d robotacademy.net.au/lesson/rotations-are-non-commutative-in-3d – user2232395 Aug 27 '19 at 11:13
• In this case, isn't one of the motors related only to the elevation and the other one only to the azimuth: yellow bidirectional arrow for the elevation and blue bidirectional arrows for the azimuth? Azimuth first, then elevate. (If you elevate first, then you might over-swing if you apply the same azimuth) – MorganStark47 Sep 4 '19 at 5:15