*The original question was*:

I got quite the challenge from my father in law. The problem is well defined, but I’m having difficulties finding a meaningful answer. The reason why he asked me is because I’m an engineering student and he is in the windmill industry.

Before they attach the actual mill on the concrete foundation, it has to be absolutely leveled. If not, a tall mill would be quite offset even with a very small angle. To tackle this, they use two angle gauges and measure in two directions. The angle gauges are connected and you know the angle between them, their mutual angle. I’m supposed to find a way to convert these 3 inputs (angle 1, angle 2 and mutual angle) to find 2 outputs (the steepest angle and in which direction this is relative to the gauges).

**Physicist**: This is a gorgeous question that leads through some pretty math and ends with an elegant answer. If you’ve taken a class or two that used lots of vectors, then this is a cute exploration of what you can do with surprisingly little. If you’ve never taken a class or two that used lots of vectors, then please do: it’s fun stuff. You get to draw pictures and everything.

So you’ve got a flat slab that isn’t quite level. Two angle gauges (with plumb lines or bubbles or whatever) are placed on the slab in two directions. Define and as the directions of the two gauges on the ground and as up. These may as well be unit vectors, so: they are.

Define the angle between and as and the angle between each each of the levels and as and .

Measuring the angles between these vectors means that we know sine and cosine of these angles, and knowing that means that we know the dot product and magnitude of the cross product, since and .

Finally, since the windmill will be built perpendicular to the slab, it will be built perpendicular to both and . When a physicist (hell, even a mathematician) hears “I need a vector perpendicular to two other vectors” they convulsively respond “cross product those mothers”. If is the windmill’s “up”, then . If you were standing on the slab where the tails of and meet, then would be on the right and would be on the left (that’s the right hand rule).

If we project onto the , plane, the result will be pointing in the direction opposite the direction of the windmill’s lean. Define this projection as . The direction of is the direction that the windmill needs to be “leaned” so that it will stand straight.

The questions (way back at the top of this page) now boil down to:

1) What is the angle between and ?

2) What is the angle between , and and ?

For #1, it turns out that the cross product is easier to work with. Define as the angle between and .

We also know that:

And therefore:

In the event that (and honestly, why wouldn’t you want your gauges perpendicular?), then this simplifies a lot:

For #2 we find the projection, , and dot it with and . The projection onto the slab is . That is; it’s the up direction minus whatever component points in the direction of the windmill.

In that last step you know that since the tower, , and any direction on the slab it’s on, like , are perpendicular.

Defining as the angle between the projection and ,

Again, in the event that , this simplifies:

Similarly, .

So, if you’ve got the inclinometer readings, and , then you can find the lean of the tower, , and the direction you should push it so that it doesn’t lean, and from and respectively. This is a beautiful example of math leading to a cute, relatively simple solution that you probably couldn’t guess.

The windmill picture is from here.