Forgot my geometry (Revived)
I think I'm overlooking something simple, but I figured somebody here would have a ready answer. Here's the problem:
For a line A-B with point C on the line halfway between A and B, such that AC = BC, and a point N not on the line, what is the formula to find the angle ACN given only the lengths AB, AN, and BN?
Basically, I have two sensors that will be picking up a return echo off of an item that will be somewhere in front of it, and I need to find the bearing to it. The purpose of the point C is that the bearing from either "eye" is not all that meaningful.
Re: Forgot my geometry (Revived)
Got thinking that something might be a bit off with my design, so I put a couple numbers into Excel and tried out those equations. With AN=BN=5, I got about the right value for CN, but I'm not sure quite what I ended up with for angle ACN. It sure wasn't right in degrees, but maybe it wasn't supposed to be in degrees?
However, the reason I went looking was because I'm not sure any of this matters. All of these equations require that AN and BN are at least reasonably accurate, right? However, due to the error associated with each eye, A could be seeing a point up to four centimeters different from B. For an object twenty cm away, this would mean a maximum error of 25% away from where the object really is. It seems to me that this could make the math produce some bogus values. Therefore, I intend to do a little testing to see how great an error I am likely to encounter in the real application.
Re: Forgot my geometry (Revived)
Excel will perform trigonometry in Radians by default, not Degrees.
Assuming the angle to be 30 degrees...
If you do SIN(30), it will give the answer -0.98803,
so you have to convert your given angle to radians: r = (x * Pi) / 180
So, in Excel: =SIN(30*PI()/180) gives the answer 0.5.
or use the RADIANS function: =SIN(RADIANS(30)), also gives the answer 0.5.
Don't know if that helps you, or if you already knew that!
Anyway, good luck with your project, sounds interesting. :thumb:
Re: Forgot my geometry (Revived)
Actually, it never occured to me to look at how Excel was going to handle it. I'll go back and have another look.
Re: Forgot my geometry (Revived)
Ok, I have now tested the three equations in post #7. It is apparent that something is a bit off on the third one (angle CAN), because the value is right around 90 for all of them. However, it is also clear that I really don't need either CAN or CN, so I can simplify things greatly by throwing out the second two equations, and just using the calculation for angle NAC, which works fine.
Unfortunately, I have also confirmed that I could easily have problems with the error of the readings. If the error is such that |AN-BN| > AB, then the equation falls down, because ACOS(x) isn't happy with x>1.
Fortunately, I can cheat.