angle difference between two lines

Sep 2018
There are two angles, each with azimuth and elevation (azimuth related to true south and elevation related to true local horizontal. What are the steps/equation to calculate the angle between the two described angles? What is the general method to solve?

Moved into a house with some solar panels facing due south and some facing due west. Our latitude is 33.8 North in California. We are in the Mojave desert with very little cloud cover. The angle of the roof is 22 degrees from horizontal. What is the equation that will accept the azimuth and elevation of the sun, combine with the azimuth and elevation of the panels, and determine the angle of the sun from the solar panel perpendicular?

Do not want
A calculator to generate the best angle for any latitude. I can find that. I did the google search.

Thank you for your time.
Last edited by a moderator:


Forum Staff
Dec 2006
Do you understand how to use a rotation matrix?