Proximity sensor question
Posted: Thu Feb 27, 2014 12:49 am
Sorry for many questions.. i am new and i also have some questions.
1) http://moderndevice.com/wpcontent/uploa ... _AP580.pdf
in the link above there is a PDF and in the 4th and 5th page i see sensing range looks like circle but after i tested it looks like inverse parabola or egg check this out( https://lh3.googleusercontent.com/-KR2T ... /aaass.png )
so i am exciting how did you calculate 3D position using the equation in the PDF ?
2)
is that angle or direction pointer line is 2D or 3D? it seems 2D but not sure.
3)
and in the link you referred what does Processing_SI1143_ColorVisualizer example code do? is that related in this video?
4) how to connect it to matlab kk ( just if you know)?
5) i want to connect sensor to matlab to work for further estimation for my project. So i need to rewrite the algorithm below..i just followed the code and calculated by hand on a paper,,,but still dont understand why did you multiplied Vector B and C by 0.5 ? why multiplied by 0.866 and 57.296?
x = (float)Avect - (.5 * (float)Bvect ) - ( .5 * (float)Cvect); // integer math
y = (.866 * (float)Bvect) - (.866 * (float)Cvect);
angle = atan2((float)y, (float)x) * 57.296 + 180 ; // convert to degrees and lose the neg values
Tvect = (long)sqrt( x * x + y * y);
1) http://moderndevice.com/wpcontent/uploa ... _AP580.pdf
in the link above there is a PDF and in the 4th and 5th page i see sensing range looks like circle but after i tested it looks like inverse parabola or egg check this out( https://lh3.googleusercontent.com/-KR2T ... /aaass.png )
so i am exciting how did you calculate 3D position using the equation in the PDF ?
2)
is that angle or direction pointer line is 2D or 3D? it seems 2D but not sure.
3)
and in the link you referred what does Processing_SI1143_ColorVisualizer example code do? is that related in this video?
4) how to connect it to matlab kk ( just if you know)?
5) i want to connect sensor to matlab to work for further estimation for my project. So i need to rewrite the algorithm below..i just followed the code and calculated by hand on a paper,,,but still dont understand why did you multiplied Vector B and C by 0.5 ? why multiplied by 0.866 and 57.296?
x = (float)Avect - (.5 * (float)Bvect ) - ( .5 * (float)Cvect); // integer math
y = (.866 * (float)Bvect) - (.866 * (float)Cvect);
angle = atan2((float)y, (float)x) * 57.296 + 180 ; // convert to degrees and lose the neg values
Tvect = (long)sqrt( x * x + y * y);