15,922,696 members

# Welcome to the Lounge

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 Re: maths question Member 115770084-Feb-20 11:59 Member 11577008 4-Feb-20 11:59
 Re: maths question davecasdf4-Feb-20 3:48 davecasdf 4-Feb-20 3:48
 Re: maths question Joan M4-Feb-20 21:32 Joan M 4-Feb-20 21:32
 Re: maths question davecasdf5-Feb-20 4:48 davecasdf 5-Feb-20 4:48
 Re: maths question Member 108052214-Feb-20 4:47 Member 10805221 4-Feb-20 4:47
 Re: maths question Member 108052214-Feb-20 4:52 Member 10805221 4-Feb-20 4:52
 Re: maths question Member 108052214-Feb-20 4:57 Member 10805221 4-Feb-20 4:57
 Re: maths question tnich4-Feb-20 7:44 tnich 4-Feb-20 7:44
 Simple answer: Yes you can find the angle given measurements of the two discs. I will give you some details in a moment. More complicated answer: If you want an accurate estimate of the angle, you are out of luck. If you only plan to use the cosine of the angle, you can come up with something pretty good. Let's call theta the angle that the sensor deviates from dead center on the disc(s). Let y be the distance of the sensor from the center of the disc(s). You can use the law of cosines to build two equations involving y and theta. r_1^2 = m_1^2 + y^2 - 2*m_1*y*cos(theta) r_2^2 = m_2^2 + y^2 - 2*m_2*y*cos(theta) Solving them gets you y = sqrt(m_1*m_2 + (m_2*r_1^2 - m_1*r_2^2)/(m_2 - m_1)) cos(theta) = (m_1^2 - r_1^2)/(2*m_1*y) + y/(2*m_1) The problem with getting a good value for theta is that cos(theta) is going to be very close to 1.0000 for any small value of theta. So even a tiny measurement error will result in a incommensurately large error in theta. And cos(theta) may even come out to be greater than 1, in which case theta is undefined. However, it seems like a good bet that you can get by with just an estimate of cos(theta) for your calibration, since given a measurement m you can use the law of cosines to find the distance from the center.modified 4-Feb-20 17:02pm.
 Re: maths question itprorh664-Feb-20 8:36 itprorh66 4-Feb-20 8:36
 Re: maths question Joan M4-Feb-20 10:10 Joan M 4-Feb-20 10:10
 Re: maths question tnich4-Feb-20 11:03 tnich 4-Feb-20 11:03
 Re: maths question itprorh665-Feb-20 4:43 itprorh66 5-Feb-20 4:43
 Re: maths question Rick Shaub4-Feb-20 11:28 Rick Shaub 4-Feb-20 11:28
 Re: maths question Gerry Schmitz5-Feb-20 8:04 Gerry Schmitz 5-Feb-20 8:04
 WSO CCC OTD 2020-02-03 OriginalGriff2-Feb-20 21:42 OriginalGriff 2-Feb-20 21:42
 Re: WSO CCC OTD 2020-02-03 pkfox2-Feb-20 22:08 pkfox 2-Feb-20 22:08
 Re: WSO CCC OTD 2020-02-03 - we have a winner! OriginalGriff2-Feb-20 22:14 OriginalGriff 2-Feb-20 22:14
 Re: WSO CCC OTD 2020-02-03 - we have a winner! musefan2-Feb-20 22:41 musefan 2-Feb-20 22:41
 Re: WSO CCC OTD 2020-02-03 - we have a winner! OriginalGriff2-Feb-20 22:57 OriginalGriff 2-Feb-20 22:57
 Re: WSO CCC OTD 2020-02-03 - we have a winner! pkfox21-Jul-20 10:33 pkfox 21-Jul-20 10:33
 I might need to optimize this XD honey the codewitch2-Feb-20 6:02 honey the codewitch 2-Feb-20 6:02
 Re: I might need to optimize this XD Eddy Vluggen2-Feb-20 7:02 Eddy Vluggen 2-Feb-20 7:02
 Re: I might need to optimize this XD honey the codewitch2-Feb-20 7:28 honey the codewitch 2-Feb-20 7:28
 Re: I might need to optimize this XD Eddy Vluggen2-Feb-20 7:43 Eddy Vluggen 2-Feb-20 7:43
 Re: I might need to optimize this XD honey the codewitch2-Feb-20 9:29 honey the codewitch 2-Feb-20 9:29
 Last Visit: 31-Dec-99 18:00     Last Update: 24-Jun-24 19:43 Refresh ᐊ Prev1...5799580058015802580358045805580658075808 Next ᐅ